if (!ug || !priv)
return;
- ret = app_control_get_extra_data(reply, UG_SERVICE_DATA_RESULT, &value);
+ ret = app_control_get_extra_data(reply, UG_APP_CONTROL_DATA_RESULT, &value);
if ((ret == APP_CONTROL_ERROR_NONE) && (value)) {
result = atoi(value);
LOGD("reply result is %d", result);
UG_OPT_INDICATOR_MANUAL = 0x04,
/**< Indicator option:
Indicator will be handled manually */
- UG_OPT_OVERLAP_ENABLE = 0x08,
- /**< Overlap option: Enable indicator overlap */
UG_OPT_MAX
};
-#define GET_OPT_INDICATOR_VAL(opt) opt % UG_OPT_OVERLAP_ENABLE
-#define GET_OPT_OVERLAP_VAL(opt) opt & UG_OPT_OVERLAP_ENABLE
-
-#define UG_SERVICE_DATA_RESULT "__UG_SEND_REUSLT__"
+/**
+ * @brief Definition for key string for the extra data of app_control that is used for result state of ui-gadget.
+ * When ug callee (UI gadgets) sends result state using ug_send_result_full(), the ug caller can get the
+ * result state from ug callee in result parameter of the result_cb().
+ *
+ * @since_tizen 2.3
+ */
+#define UG_APP_CONTROL_DATA_RESULT "__UG_SEND_RESULT__"
/**
* UI gadget callback type
};
/**
- * Easy-to-use macro of ug_init() for EFL
+ * @brief Definition for easy-to-use api of ug_init() for EFL.
+ *
+ * @since_tizen 2.3
+ *
* @see ug_init()
*/
-#define UG_INIT_EFL(win, opt) \
- ug_init_efl(win, opt)
+int UG_INIT_EFL(void *win, enum ug_option opt);
/**
* Easy-to-use macro of ug_init() for GTK
return 0;
}
-static int ugman_indicator_overlap_update(enum ug_option opt)
-{
- if (!ug_man.win) {
- _ERR("indicator update failed: no window");
- return -1;
- }
-
- if (GET_OPT_OVERLAP_VAL(opt)) {
- _DBG("update overlap indicator / opt(%d)", opt);
- elm_object_signal_emit(ug_man.conform, "elm,state,indicator,overlap", "");
- } else {
- _DBG("update no overlap indicator / opt(%d)", opt);
- elm_object_signal_emit(ug_man.conform, "elm,state,indicator,nooverlap", "");
- }
-
- return 0;
-}
-
static int ugman_indicator_update(enum ug_option opt, enum ug_event event)
{
_ERR("controlling indicator is disabled");
/* Indicator Option */
if (ug->mode == UG_MODE_FULLVIEW) {
- ugman_indicator_overlap_update(ug->opt);
ugman_indicator_update(ug->opt, UG_EVENT_NONE);
}
}
#endif
+UG_API int UG_INIT_EFL(void *win, enum ug_option opt)
+{
+ return ug_init_efl((Evas_Object *)win, opt);
+}
+
UG_API int ug_init_efl(Evas_Object *win, enum ug_option opt)
{
if (!win) {
snprintf(tmp_result, 4, "%d", result);
- app_control_add_extra_data(send_dup, UG_SERVICE_DATA_RESULT, (const char*)tmp_result);
+ app_control_add_extra_data(send_dup, UG_APP_CONTROL_DATA_RESULT, (const char*)tmp_result);
ug->cbs.result_cb(ug, send_dup, ug->cbs.priv);