*/
static void* settings_func(void *data, xmlNode *xmlObj);
+
+static void* launch_func(void *data, xmlNode *xmlObj);
+
/**
* do nothing
*/
/* <integer> */__drawer_add("integer", slider_func);
/* <label> */__drawer_add("label", label_func);
/* <link> */__drawer_add("link", link_func);
+ /* <launch> */__drawer_add("launch", launch_func);
/* <extendlist> */__drawer_add("expandlist", expandlist_func);
/* <extenditem> */__drawer_add("expanditem", expanditem_func);
/* <settings> */__drawer_add("settings", settings_func);
static void* __link_list_cb(void *data, Evas_Object *obj, void *event_info)
{
+ SETTING_TRACE_BEGIN;
ret_if(data == NULL);
retm_if(event_info == NULL, "Invalid argument: event info is NULL");
Elm_Object_Item *item = (Elm_Object_Item *) event_info;
return NULL;
}
+static void* __launch_list_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ SETTING_TRACE_BEGIN;
+ ret_if(data == NULL);
+ retm_if(event_info == NULL, "Invalid argument: event info is NULL");
+ Elm_Object_Item *item = (Elm_Object_Item *) event_info;
+ elm_genlist_item_selected_set(item, 0);
+ Setting_GenGroupItem_Data *list_item =
+ (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
+
+ xmlNode* xmlObj = data;
+ ret_if(!xmlObj);
+ const char *key_str = (char*)xmlGetProp(xmlObj, "id");
+ const char *title_str = (char*)xmlGetProp(xmlObj, "title");
+ const char *appid_str = (char*)xmlGetProp(xmlObj, "appid");
+ const char *operation_str = (char*)xmlGetProp(xmlObj, "operation");
+
+
+ service_h svc = NULL;
+ service_create(&svc);
+ service_set_app_id(svc, appid_str); // xml property – appid
+ service_set_operation(svc, operation_str); // property : operation
+ service_send_launch_request(svc, NULL, NULL);
+ service_destroy(svc);
+
+ return NULL;
+}
static void* label_func(void *data, xmlNode *xmlObj)
{
return (void*)obj;
};
+static void* launch_func(void *data, xmlNode *xmlObj)
+{
+ SETTING_TRACE_BEGIN;
+ ret_if(!data || !xmlObj);
+ PluginNode* node = (PluginNode*)data;
+ Draw_Data *pd = node->pd;
+
+ const char *title_str = (char*)xmlGetProp(xmlObj, "title");
+
+ Setting_GenGroupItem_Data * obj =
+ setting_create_Gendial_field_def(pd->scroller, &(itc_1text),
+ __launch_list_cb,
+ xmlObj, SWALLOW_Type_INVALID, NULL, NULL,
+ 0, title_str, NULL, NULL);
+
+ return (void*)obj;
+};
static void __slider_stop_cb(void *data, Evas_Object *obj,
void *event_info)