*
*
* 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
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;
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;
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));
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));
}
}
+ 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;