diff options
-rw-r--r-- | packaging/org.tizen.data-provider-master.spec | 2 | ||||
-rw-r--r-- | pkgmgr_livebox/livebox.xml | 2 | ||||
-rw-r--r-- | pkgmgr_livebox/src/service_register.c | 38 |
3 files changed, 32 insertions, 10 deletions
diff --git a/packaging/org.tizen.data-provider-master.spec b/packaging/org.tizen.data-provider-master.spec index cb8b9e0..054fce2 100644 --- a/packaging/org.tizen.data-provider-master.spec +++ b/packaging/org.tizen.data-provider-master.spec @@ -1,6 +1,6 @@ Name: org.tizen.data-provider-master Summary: Master service provider for liveboxes. -Version: 0.15.2 +Version: 0.15.3 Release: 1 Group: framework/livebox License: Flora License diff --git a/pkgmgr_livebox/livebox.xml b/pkgmgr_livebox/livebox.xml index bbcc8c0..3c258ec 100644 --- a/pkgmgr_livebox/livebox.xml +++ b/pkgmgr_livebox/livebox.xml @@ -12,7 +12,7 @@ <setup>org.tizen.nicesj</setup> - <box type="image" mouse_event="false"> + <box type="image" mouse_event="false" touch_effect="true"> <size preview="ABSPATH">1x1</size> <size preview="ABSPATH">2x1</size> <size>2x2</size> diff --git a/pkgmgr_livebox/src/service_register.c b/pkgmgr_livebox/src/service_register.c index a89a0db..786e9ba 100644 --- a/pkgmgr_livebox/src/service_register.c +++ b/pkgmgr_livebox/src/service_register.c @@ -66,12 +66,12 @@ * * * client - * +-------+------+---------+-------------+---------+---------+-----------+-------+-------------+ - * | pkgid | Icon | Name | auto_launch | pd_size | content | nodisplay | setup | mouse_event | - * +-------+------+---------+-------------+---------+---------+-----------+-------+-------------+ - * | - | - | - | - | - | - | - | - | - } - * +-------+------+---------+-------------+---------+---------+-----------+-------+-------------+ - * CREATE TABLE client ( pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, pd_size TEXT, content TEXT DEFAULT "default", nodisplay INTEGER, setup TEXT, mouse_event INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ) + * +-------+------+---------+-------------+---------+---------+-----------+-------+-------------+--------------+ + * | pkgid | Icon | Name | auto_launch | pd_size | content | nodisplay | setup | mouse_event | touch_effect | + * +-------+------+---------+-------------+---------+---------+-----------+-------+-------------+--------------+ + * | - | - | - | - | - | - | - | - | - } - | + * +-------+------+---------+-------------+---------+---------+-----------+-------+-------------+--------------+ + * CREATE TABLE client ( pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, pd_size TEXT, content TEXT DEFAULT "default", nodisplay INTEGER, setup TEXT, mouse_event INTEGER, touch_effect INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ) * * = auto_launch = UI-APPID * = pd_size = WIDTHxHEIGHT @@ -170,6 +170,7 @@ struct livebox { int primary; /* Is this primary livebox? */ int nodisplay; int mouse_event; /* Mouse event processing option for livebox */ + int touch_effect; /* Touch effect of a livebox */ enum lb_type lb_type; xmlChar *lb_src; @@ -600,7 +601,7 @@ static inline int db_create_client(void) ddl = "CREATE TABLE client (" \ "pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, " \ - "auto_launch TEXT, pd_size TEXT, content TEXT DEFAULT 'default', nodisplay INTEGER, setup TEXT, mouse_event INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)"; + "auto_launch TEXT, pd_size TEXT, content TEXT DEFAULT 'default', nodisplay INTEGER, setup TEXT, mouse_event INTEGER, touch_effect INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)"; if (sqlite3_exec(s_info.handle, ddl, NULL, NULL, &err) != SQLITE_OK) { ErrPrint("Failed to execute the DDL (%s)\n", err); return -EIO; @@ -618,7 +619,7 @@ static inline int db_insert_client(struct livebox *livebox) int ret; sqlite3_stmt *stmt; - dml = "INSERT INTO client ( pkgid, icon, name, auto_launch, pd_size, content, nodisplay, setup, mouse_event ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; + dml = "INSERT INTO client ( pkgid, icon, name, auto_launch, pd_size, content, nodisplay, setup, mouse_event, touch_effect ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL); if (ret != SQLITE_OK) { DbgPrint("Error: %s\n", sqlite3_errmsg(s_info.handle)); @@ -688,6 +689,13 @@ static inline int db_insert_client(struct livebox *livebox) goto out; } + ret = sqlite3_bind_int(stmt, 10, livebox->touch_effect); + if (ret != SQLITE_OK) { + DbgPrint("Error: %s\n", sqlite3_errmsg(s_info.handle)); + ret = -EIO; + goto out; + } + ret = 0; if (sqlite3_step(stmt) != SQLITE_DONE) { DbgPrint("Error: %s\n", sqlite3_errmsg(s_info.handle)); @@ -1707,6 +1715,20 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node) } } + if (!xmlHasProp(node, (const xmlChar *)"touch_effect")) { + livebox->touch_effect = 1; + } else { + xmlChar *touch_effect; + touch_effect = xmlGetProp(node, (const xmlChar *)"touch_effect"); + if (!touch_effect) { + ErrPrint("touch_effect is NIL\n"); + livebox->touch_effect = 1; + } else { + livebox->touch_effect = !xmlStrcasecmp(touch_effect, (const xmlChar *)"true"); + xmlFree(touch_effect); + } + } + for (node = node->children; node; node = node->next) { if (!xmlStrcasecmp(node->name, (const xmlChar *)"size")) { xmlChar *size; |