From: Sung-jae Park Date: Thu, 31 Jan 2013 02:28:59 +0000 (+0000) Subject: Add touch effect. X-Git-Tag: submit/tizen_mobile/20150527.071719~2^2~48^2~21^2~233 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d63a92fa4fb0f414c2b89d3e4ab13bffc997f09;p=platform%2Fcore%2Fappfw%2Fdata-provider-master.git Add touch effect. Change-Id: I1d590814d5169e6e6a62832206e2e0689c36590c --- diff --git a/packaging/com.samsung.data-provider-master.spec b/packaging/com.samsung.data-provider-master.spec index 5bc2a37..4cd25f1 100644 --- a/packaging/com.samsung.data-provider-master.spec +++ b/packaging/com.samsung.data-provider-master.spec @@ -1,6 +1,6 @@ Name: com.samsung.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 4a4d440..8c436dd 100644 --- a/pkgmgr_livebox/livebox.xml +++ b/pkgmgr_livebox/livebox.xml @@ -12,7 +12,7 @@ com.samsung.nicesj - + 1x1 2x1 2x2 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;