static void _app_destroy_cb(void* this);
static Eina_Bool _animation_view_timer_cb(void *data);
-
+static animation_view *this = NULL;
/**
- * @function animation_view_add
- * @since_tizen 2.3
- * @description Animation View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return animation_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-animation_view *animation_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
- animation_view *this = NULL;
- this = calloc(1, sizeof(animation_view));
- RETVM_IF(!this, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- this->x = 0;
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->x = 0;
this->y = 0;
}
this->timer = ecore_timer_add(5, _animation_view_timer_cb, this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function animation_view_add
+ * @since_tizen 2.3
+ * @description Animation View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return animation_view*
+ */
+animation_view *animation_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
+
+ this = calloc(1, sizeof(animation_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data);
static void _attach_panel_event_cb(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *user_data);
static char* get_attach_panel_error(attach_panel_error_e error);
+static attachpanel_view *this = NULL;
+
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->attach_panel = NULL;
+ create_main_view(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function attachpanel_view_add
*/
attachpanel_view *attachpanel_view_add(Evas_Object *navi, Evas_Object *conform, tbt_info *tbt_info, Elm_Object_Item *item)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == conform, NULL, "conform is null");
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == conform, NULL, "conform is null");
- attachpanel_view *this = NULL;
this = calloc(1, sizeof(attachpanel_view));
RETVM_IF(!this, NULL, "calloc failed");
this->view = calloc(1, sizeof(common_view));
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
this->conform = conform;
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- this->attach_panel = NULL;
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
- create_main_view(this);
return this;
}
static void _app_destroy_cb(void* this);
static void save_autofill_view_info(autofill_h ah);
+static autofill_view *this = NULL;
static void connection_status_changed_cb(autofill_h ah, autofill_connection_status_e status, void *user_data)
{
send_fill_request(g_ah);
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->input_entry1 = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "");
+ elm_entry_input_panel_language_set(this->input_entry1, ELM_INPUT_PANEL_LANG_AUTOMATIC);
+ Elm_Input_Panel_Lang lang = elm_entry_input_panel_language_get(this->input_entry1);
+ char msg[100];
+ snprintf(msg, sizeof(msg), "Autofill Input : %d", lang );
+ elm_object_part_text_set(this->input_entry1, PART_ENTRY_GUIDE, msg);
+ input_entry1_handle = this->input_entry1;
+ elm_object_part_content_set(this->view->layout, "main_button", this->input_entry1);
+ evas_object_smart_callback_add(this->input_entry1, "changed", editfield_changed_cb, this->view->layout);
+ evas_object_smart_callback_add(this->input_entry1, "preedit,changed", editfield_changed_cb, this->view->layout);
+
+ this->btn_autofill = ui_utils_push_button_add(this, this->view->layout, "Login with Autofill", autofill_app_launch_button_pressed_cb);
+ elm_object_part_content_set(this->view->layout, "controller_part", this->btn_autofill);
+ evas_object_event_callback_add(this->input_entry1, EVAS_CALLBACK_DEL, entry_del_cb, this->view->layout);
+ autofill_item_create(&ai_h);
+ autofill_item_set_autofill_hint(ai_h, AUTOFILL_HINT_ID);
+ autofill_item_set_id(ai_h, "id");
+ autofill_item_set_label(ai_h, "ID");
+ autofill_item_set_sensitive_data(ai_h, false);
+
+ // create autofill item for save
+ autofill_save_item_create(&si_h);
+ autofill_save_item_set_autofill_hint(si_h, AUTOFILL_HINT_ID);
+ autofill_save_item_set_id(si_h, "id");
+ autofill_save_item_set_label(si_h, "ID");
+ autofill_save_item_set_sensitive_data(si_h, false);
+
+ int ret;
+ ret = autofill_create(&g_ah);
+ if (ret == AUTOFILL_ERROR_NONE)
+ DBG("Succeeded to create autofill");
+ else
+ {
+ DBG("Failed to create autofill. error code: 0x%X, error message: '%s'", ret, get_error_message(ret));
+ return this;
+ }
+
+ ret = autofill_connect(g_ah, connection_status_changed_cb, NULL);
+ if (ret == AUTOFILL_ERROR_NONE)
+ DBG("Succeeded to connect");
+ else
+ DBG("Failed to connect. error code: 0x%X, error message: '%s'", ret, get_error_message(ret));
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
autofill_view *autofill_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- autofill_view *this = NULL;
+
this = calloc(1, sizeof(autofill_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->input_entry1 = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "");
- elm_entry_input_panel_language_set(this->input_entry1, ELM_INPUT_PANEL_LANG_AUTOMATIC);
- Elm_Input_Panel_Lang lang = elm_entry_input_panel_language_get(this->input_entry1);
- char msg[100];
- snprintf(msg, sizeof(msg), "Autofill Input : %d", lang );
- elm_object_part_text_set(this->input_entry1, PART_ENTRY_GUIDE, msg);
- input_entry1_handle = this->input_entry1;
- elm_object_part_content_set(this->view->layout, "main_button", this->input_entry1);
- evas_object_smart_callback_add(this->input_entry1, "changed", editfield_changed_cb, this->view->layout);
- evas_object_smart_callback_add(this->input_entry1, "preedit,changed", editfield_changed_cb, this->view->layout);
-
- this->btn_autofill = ui_utils_push_button_add(this, this->view->layout, "Login with Autofill", autofill_app_launch_button_pressed_cb);
- elm_object_part_content_set(this->view->layout, "controller_part", this->btn_autofill);
- evas_object_event_callback_add(this->input_entry1, EVAS_CALLBACK_DEL, entry_del_cb, this->view->layout);
- autofill_item_create(&ai_h);
- autofill_item_set_autofill_hint(ai_h, AUTOFILL_HINT_ID);
- autofill_item_set_id(ai_h, "id");
- autofill_item_set_label(ai_h, "ID");
- autofill_item_set_sensitive_data(ai_h, false);
-
- // create autofill item for save
- autofill_save_item_create(&si_h);
- autofill_save_item_set_autofill_hint(si_h, AUTOFILL_HINT_ID);
- autofill_save_item_set_id(si_h, "id");
- autofill_save_item_set_label(si_h, "ID");
- autofill_save_item_set_sensitive_data(si_h, false);
-
- int ret;
- ret = autofill_create(&g_ah);
- if (ret == AUTOFILL_ERROR_NONE)
- DBG("Succeeded to create autofill");
- else
- {
- DBG("Failed to create autofill. error code: 0x%X, error message: '%s'", ret, get_error_message(ret));
- return this;
- }
- ret = autofill_connect(g_ah, connection_status_changed_cb, NULL);
- if (ret == AUTOFILL_ERROR_NONE)
- DBG("Succeeded to connect");
- else
- DBG("Failed to connect. error code: 0x%X, error message: '%s'", ret, get_error_message(ret));
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void Bluetooth_adapter_device_discovery_state_changed_cb_p(int result, bt_adapter_device_discovery_state_e discovery_state, bt_adapter_device_discovery_info_s *discovery_info, void *user_data);
static void Bluetooth_bt_adapter_le_scan_result_cb(int result,bt_adapter_le_device_scan_result_info_s *info, void *user_data);
static void Bluetooth_bt_adapter_name_changed_cb_p(char *pszDeviceName, void *user_data);
-
+static bluetooth_view *this = NULL;
/**
* @function get_bluetooth_error
}
/**
- * @function bluetooth_callback_view_add
- * @since_tizen 2.3
- * @description Bluetooth Callback View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return bluetooth_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret, value;
- bluetooth_view *this = NULL;
- this = calloc(1, sizeof(bluetooth_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "bluetooth_callback_viewer";
- tbt_info->layout_file = get_edje_path("bluetooth_callback_viewer.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret, value;
ret = bt_initialize();
if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_CREATE_BOND_TEST)
}
elm_object_part_content_set(this->view->layout, "info_text", this->create_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function bluetooth_callback_view_add
+ * @since_tizen 2.3
+ * @description Bluetooth Callback View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return bluetooth_view*
+ */
+bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(bluetooth_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "bluetooth_callback_viewer";
+ tbt_info->layout_file = get_edje_path("bluetooth_callback_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _pbap_search_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static void _bt_avrcp_control_connection_state_changed_cb(bool connected, const char *remote_address, void *user_data);
-
+static bluetooth_view *this = NULL;
/**
- * @function bluetooth_view_add
- * @since_tizen 2.3
- * @description Bluetooth View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return bluetooth_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-bluetooth_view *bluetooth_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
-
- int result;
- bluetooth_view *this = NULL;
- this = calloc(1, sizeof(bluetooth_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- this->devices_list = NULL;
- this->bonded_devices_list = NULL;
- this->selected_device_profile_list = NULL;
- this->service_list = NULL;
- this->discovery_state = BT_ADAPTER_DEVICE_DISCOVERY_NONE;
- this->rfcomm_created = false;
- this->rfcomm_client_connected = false;
- this->no_of_profiles = 0;
- this->hdp_app_id = NULL;
- this->hdp_channel = 0;
- this->hdp_send_data_flag = false;
- this->is_opp_push_cancelled = false;
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
-// #ifdef DEVICE_TYPE_WEARABLE
-// if(get_device_type() == DEVICE_WEARABLE_320_320)
-// {
-// elm_theme_overlay_add(NULL, get_edje_path("custom_button.edj"));
-// }
-// #endif
-
- if(tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED || tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
- {
- tbt_info->layout_group = "5_part_txt_cnt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("5_part_txt_cnt1.5_cnt_btn_btn.edj");
- //tbt_info->layout_group = "bluetooth_viewer";
- }
- else if(tbt_info->apptype == TBT_APP_BT_PBAP_ALL_VCARDS)
+ if(event_info)
{
- tbt_info->layout_group = "5_part_txt_entry_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj");
- this->pbap_phonebook_size = 0;
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
}
- else
- {
- tbt_info->layout_group = "4_part_txt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj");
- }
-
-
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "view is null");
-
+ int result;
this->bluetooth_label = ui_utils_label_add(this->view->layout, "Bluetooth");
elm_object_part_content_set(this->view->layout, "1txt", this->bluetooth_label);
- if(tbt_info->apptype == TBT_APP_BT_PBAP_ALL_VCARDS)
+ if(this->view->tbt_info->apptype == TBT_APP_BT_PBAP_ALL_VCARDS)
{
this->input_text = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "");
elm_object_part_text_set(this->input_text, PART_ENTRY_GUIDE, "Enter name:");
evas_object_data_set(this->bluetooth_list, "bluetooth_view", this);
elm_object_part_content_set(this->view->layout, "1txt_2cnt", this->bluetooth_list);
- if(strcmp(tbt_info->layout_group, "5_part_txt_cnt_cnt_btn_btn") == 0)
+ if(strcmp(this->view->tbt_info->layout_group, "5_part_txt_cnt_cnt_btn_btn") == 0)
{
Evas_Object *table = elm_table_add(this->view->layout);
- if(tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED)
+ if(this->view->tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED)
{
this->bluetooth_check_label = ui_utils_label_add(table, "Cancel Pair");
this->bluetooth_check = ui_utils_check_add(this, table);
}
- else if(tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
+ else if(this->view->tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
{
DBG("CANCEL BUTTON!!");
this->bluetooth_check_button = ui_utils_push_button_add(this, table, "Cancel Transfer", _cancel_button_pressed_cb);
Evas_Object *control = add_control_layout(this, this->view->layout);
- if(tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED || tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
+ if(this->view->tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED || this->view->tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
{
elm_object_part_content_set(this->view->layout, "1txt_2cnt_3cnt_4btn", control);
}
}
update_view_controls(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function bluetooth_view_add
+ * @since_tizen 2.3
+ * @description Bluetooth View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return bluetooth_view*
+ */
+bluetooth_view *bluetooth_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
+
+ this = calloc(1, sizeof(bluetooth_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ this->devices_list = NULL;
+ this->bonded_devices_list = NULL;
+ this->selected_device_profile_list = NULL;
+ this->service_list = NULL;
+ this->discovery_state = BT_ADAPTER_DEVICE_DISCOVERY_NONE;
+ this->rfcomm_created = false;
+ this->rfcomm_client_connected = false;
+ this->no_of_profiles = 0;
+ this->hdp_app_id = NULL;
+ this->hdp_channel = 0;
+ this->hdp_send_data_flag = false;
+ this->is_opp_push_cancelled = false;
+
+// #ifdef DEVICE_TYPE_WEARABLE
+// if(get_device_type() == DEVICE_WEARABLE_320_320)
+// {
+// elm_theme_overlay_add(NULL, get_edje_path("custom_button.edj"));
+// }
+// #endif
+
+ if(tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED || tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
+ {
+ tbt_info->layout_group = "5_part_txt_cnt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("5_part_txt_cnt1.5_cnt_btn_btn.edj");
+ //tbt_info->layout_group = "bluetooth_viewer";
+ }
+ else if(tbt_info->apptype == TBT_APP_BT_PBAP_ALL_VCARDS)
+ {
+ tbt_info->layout_group = "5_part_txt_entry_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj");
+ this->pbap_phonebook_size = 0;
+ }
+ else
+ {
+ tbt_info->layout_group = "4_part_txt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj");
+ }
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "view is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void on_hardware_back_button_pressed(void *user_data, Evas_Object *obj, void *event_info);
static void _notify_button_pressed_cb(void *user_data, Evas_Object *obj, void *event_info);
static void _bt_gatt_server_notification_sent_cb(int result, const char *remote_address, bt_gatt_server_h server, bt_gatt_h characteristic, bool completed, void *user_data);
+static bluetoothle_view *this = NULL;
+
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->scan_info = NULL;
+ this->is_read_completed = true;
+
+ //Add Label, Button and List
+ this->bluetoothle_label = ui_utils_label_add(this->view->layout, "BLE");
+ elm_object_part_content_set(this->view->layout, "bluetoothle_text", this->bluetoothle_label);
+
+ this->bluetoothle_list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->bluetoothle_list, NULL, "elm_list_add failed");
+ evas_object_data_set(this->bluetoothle_list, "bluetooth_view", this);
+ elm_object_part_content_set(this->view->layout, "bluetoothle_list", this->bluetoothle_list);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+ //Initialize Bluetooth
+ init_bluetooth(this);
+ if(this->view->tbt_info->apptype == TBT_APP_BLE_GATT_CLIENT)
+ {
+ eext_object_event_callback_add(this->view->layout, EEXT_CALLBACK_BACK, on_hardware_back_button_pressed, this);
+ }
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function bluetoothle_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- bluetoothle_view *this = NULL;
this = calloc(1, sizeof(bluetoothle_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->scan_info = NULL;
- this->is_read_completed = true;
-
- //Add Label, Button and List
- this->bluetoothle_label = ui_utils_label_add(this->view->layout, "BLE");
- elm_object_part_content_set(this->view->layout, "bluetoothle_text", this->bluetoothle_label);
-
- this->bluetoothle_list = elm_list_add(this->view->layout);
- RETVM_IF(!this->bluetoothle_list, NULL, "elm_list_add failed");
- evas_object_data_set(this->bluetoothle_list, "bluetooth_view", this);
- elm_object_part_content_set(this->view->layout, "bluetoothle_list", this->bluetoothle_list);
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
-
- //Initialize Bluetooth
- init_bluetooth(this);
- if(this->view->tbt_info->apptype == TBT_APP_BLE_GATT_CLIENT)
- {
- eext_object_event_callback_add(this->view->layout, EEXT_CALLBACK_BACK, on_hardware_back_button_pressed, this);
- }
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _adapter_device_bond_created_cb(int result, bt_device_info_s *device_info, void *data);
static nfc_ndef_message_h create_ndef_message();
static void nfc_ndef_message_read(nfc_ndef_message_h message, void *user_data);
+static bluetoothoob_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int result;
+ if(this->view->tbt_info->apptype == TBT_APP_BT_OOB_DEVICE)
+ {
+ Evas_Object *table = elm_table_add(this->view->layout);
+ this->btn_make_pair = ui_utils_push_button_add(this, table, "Make Pair", on_make_pair_button_pressed_cb);
+ elm_table_pack(table, this->btn_make_pair, 1, 0, 1, 1);
+ elm_object_part_content_set(this->view->layout, "controlr_part", table);
+ evas_object_show(table);
+ }
+
+ bt_initialize();
+
+ result = bt_device_set_bond_created_cb(_adapter_device_bond_created_cb, this);
+ RETVM_IF(result != BT_ERROR_NONE, NULL, "bt_device_set_bond_created_cb Failed");
+
+ initialize_nfc(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function bluetoothoob_view_add
bluetoothoob_view *bluetoothoob_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int result;
- bluetoothoob_view *this = NULL;
this = calloc(1, sizeof(bluetoothoob_view));
this->view = calloc(1, sizeof(common_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- if(this->view->tbt_info->apptype == TBT_APP_BT_OOB_DEVICE)
- {
- Evas_Object *table = elm_table_add(this->view->layout);
- this->btn_make_pair = ui_utils_push_button_add(this, table, "Make Pair", on_make_pair_button_pressed_cb);
- elm_table_pack(table, this->btn_make_pair, 1, 0, 1, 1);
- elm_object_part_content_set(this->view->layout, "controlr_part", table);
- evas_object_show(table);
- }
-
- bt_initialize();
-
- result = bt_device_set_bond_created_cb(_adapter_device_bond_created_cb, this);
- RETVM_IF(result != BT_ERROR_NONE, NULL, "bt_device_set_bond_created_cb Failed");
-
- initialize_nfc(this);
-
return this;
}
static void create_render_rect_and_bg(camera_view *this);
static void destroy_render_rect_and_bg(camera_view *this);
-
+static camera_view *this = NULL;
static void create_render_rect_and_bg(camera_view *this)
{
}
/**
- * @function camera_view_add
- * @since_tizen 2.3
- * @description Camera View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return camera_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
-
- camera_view *this = NULL;
- this = calloc(1, sizeof(camera_view));
- RETVM_IF(NULL == this, NULL, "calloc failed");
-
- this->win = win;
- this->rect = NULL;
- this->camera = NULL;
- this->player = NULL;
- this->recorder = NULL;
- this->file_path = NULL;
- this->recording = EINA_FALSE;
- this->playing = EINA_FALSE;
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
-// #ifdef DEVICE_TYPE_WEARABLE
-// if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360))
-// {
-// elm_theme_overlay_add(NULL, get_edje_path("custom_button.edj"));
-// }
-// #endif
+ RETM_IF(NULL == data, "data is null");
- if (tbt_info->apptype == TBT_APP_CAMERA_CAPTURE || tbt_info->apptype == TBT_APP_CAMERA_RECORD
- || tbt_info->apptype == TBT_APP_CAMERA_HDR_CAPTURE)
- {
- tbt_info->layout_group = "6_part_txt_cnt_txt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("6_part_txt_cnt_txt_cnt_btn_btn.edj");
- }
- else if (tbt_info->apptype == TBT_APP_CAMERA_FACE_DETECT)
- {
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
- }
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->is_feature_supported = true;
evas_object_size_hint_weight_set(this->view->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
update_view_controls(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function camera_view_add
+ * @since_tizen 2.3
+ * @description Camera View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return camera_view*
+ */
+camera_view *camera_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
+
+ this = calloc(1, sizeof(camera_view));
+ RETVM_IF(NULL == this, NULL, "calloc failed");
+
+ this->win = win;
+ this->rect = NULL;
+ this->camera = NULL;
+ this->player = NULL;
+ this->recorder = NULL;
+ this->file_path = NULL;
+ this->recording = EINA_FALSE;
+ this->playing = EINA_FALSE;
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+// #ifdef DEVICE_TYPE_WEARABLE
+// if(get_device_type() == DEVICE_WEARABLE_320_320 || (get_device_type() == DEVICE_WEARABLE_360_360))
+// {
+// elm_theme_overlay_add(NULL, get_edje_path("custom_button.edj"));
+// }
+// #endif
+
+ if (tbt_info->apptype == TBT_APP_CAMERA_CAPTURE || tbt_info->apptype == TBT_APP_CAMERA_RECORD
+ || tbt_info->apptype == TBT_APP_CAMERA_HDR_CAPTURE)
+ {
+ tbt_info->layout_group = "6_part_txt_cnt_txt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("6_part_txt_cnt_txt_cnt_btn_btn.edj");
+ }
+ else if (tbt_info->apptype == TBT_APP_CAMERA_FACE_DETECT)
+ {
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+ }
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
elm_object_item_part_content_set(elm_naviframe_top_item_get(view->navi), "toolbar", view->toolbar);
#endif
- char instrcuction[2048]={'\0',};
- snprintf(instrcuction, sizeof(instrcuction), "%s%s", view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
- ui_utils_guide_instruction_popup_button(view->navi, instrcuction );
+ // char instrcuction[2048]={'\0',};
+ // snprintf(instrcuction, sizeof(instrcuction), "%s%s", view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ // ui_utils_guide_instruction_popup_button(view->navi, instrcuction );
update_view_controls(view);
update_view_controls(view);
static char* get_connection_error(connection_error_e err_code);
static void _app_destroy_cb(void* this);
static bool is_not_supported = false;
+static connection_view *this = NULL;
/**
- * @function connection_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description connection View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return connection_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-connection_view *connection_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- connection_view *this = NULL;
- this = calloc(1, sizeof(connection_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+ RETM_IF(NULL == data, "data is null");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->connection_label = ui_utils_label_add(this->view->layout, "");
elm_label_line_wrap_set(this->connection_label, ELM_WRAP_WORD);
int result;
}
elm_object_part_content_set(this->view->layout, "1cnt", this->connection_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function connection_view_add
+ * @since_tizen 3.0
+ * @description connection View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return connection_view*
+ */
+connection_view *connection_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(connection_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static bool is_not_supported = false;
static void _app_destroy_cb(void* this);
+static contacts_view *this = NULL;
/**
return err_msg;
}
-
/**
- * @function contacts_view_add
- * @since_tizen 2.3
- * @description Contacts View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return contacts_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-contacts_view *contacts_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- contacts_view *this = NULL;
- this = calloc(1, sizeof(contacts_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "contacts_viewer";
- tbt_info->layout_file = get_edje_path("contacts_viewer.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
this->info_label = ui_utils_label_add(this->view->layout, "Contacts: ");
elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
//ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>1. Make a contact Test with number 12345678.<br/>1. Call and message Test.<br/>3. Verify the count with the number of calls and messages made to test.<br/>4. Delete the contact Test.<br/><b>Note:You can also refer info section</b>");
}
elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function contacts_view_add
+ * @since_tizen 2.3
+ * @description Contacts View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return contacts_view*
+ */
+contacts_view *contacts_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(contacts_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "contacts_viewer";
+ tbt_info->layout_file = get_edje_path("contacts_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
}
#endif
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+
+#ifdef USE_GENLIST
+ this->dc_list = elm_genlist_add(this->view->layout);
+ RETVM_IF(!this->dc_list, NULL, "elm_genlist_add failed");
+
+ evas_object_data_set(this->dc_list, "view_data", this);
+ _elm_genlist_item_append("Press start", this);
+ evas_object_show(this->dc_list);
+ elm_object_part_content_set(this->view->layout, "datacontrol_view", this->dc_list);
+#else
+ this->dc_list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->dc_list, NULL, "elm_list_add failed");
+
+ evas_object_data_set(this->dc_list, "view_data", this);
+ elm_list_item_append(this->dc_list, "Press start to check", NULL, NULL, NULL, NULL);
+ elm_list_go(this->dc_list);
+ evas_object_show(this->dc_list);
+ elm_object_part_content_set(this->view->layout, "datacontrol_view", this->dc_list);
+#endif
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+
+ if(this->view->tbt_info->apptype == TBT_APP_DC_INSERT ||
+ this->view->tbt_info->apptype == TBT_APP_DC_DELETE ||
+ this->view->tbt_info->apptype == TBT_APP_DC_UPDATE ||
+ this->view->tbt_info->apptype == TBT_APP_DC_SELECT ||
+ this->view->tbt_info->apptype == TBT_APP_DC_CURSOR)
+ {
+ data_consumer_create(this);
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_DC_MAP)
+ {
+ data_consumer_map_create(this);
+ }
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
/**
* @function datacontrol_view_add
* @since_tizen 2.3
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
-
-#ifdef USE_GENLIST
- this->dc_list = elm_genlist_add(this->view->layout);
- RETVM_IF(!this->dc_list, NULL, "elm_genlist_add failed");
-
- evas_object_data_set(this->dc_list, "view_data", this);
- _elm_genlist_item_append("Press start", this);
- evas_object_show(this->dc_list);
- elm_object_part_content_set(this->view->layout, "datacontrol_view", this->dc_list);
-#else
- this->dc_list = elm_list_add(this->view->layout);
- RETVM_IF(!this->dc_list, NULL, "elm_list_add failed");
-
- evas_object_data_set(this->dc_list, "view_data", this);
- elm_list_item_append(this->dc_list, "Press start to check", NULL, NULL, NULL, NULL);
- elm_list_go(this->dc_list);
- evas_object_show(this->dc_list);
- elm_object_part_content_set(this->view->layout, "datacontrol_view", this->dc_list);
-#endif
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
-
-
- if(this->view->tbt_info->apptype == TBT_APP_DC_INSERT ||
- this->view->tbt_info->apptype == TBT_APP_DC_DELETE ||
- this->view->tbt_info->apptype == TBT_APP_DC_UPDATE ||
- this->view->tbt_info->apptype == TBT_APP_DC_SELECT ||
- this->view->tbt_info->apptype == TBT_APP_DC_CURSOR)
- {
- data_consumer_create(this);
- }
- else if(this->view->tbt_info->apptype == TBT_APP_DC_MAP)
- {
- data_consumer_map_create(this);
- }
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
};
static void _app_destroy_cb(void* this);
-
+static display_view *this = NULL;
/**
- * @function display_view_add
- * @since_tizen 2.3
- * @description Display View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return display_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-display_view *display_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- display_view *this = NULL;
- this = calloc(1, sizeof(display_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "3_part_txt_txt_btn";
- tbt_info->layout_file = get_edje_path("3_part_txt_txt_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
int res;
res = system_info_get_platform_int("tizen.org/feature/screen.width", &this->width);
RETVM_IF(res != 0, NULL, "tizen.org/feature/screen.width");
elm_object_part_content_set(this->view->layout, "1txt", this->width_label);
elm_object_part_content_set(this->view->layout, "2txt", this->height_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function display_view_add
+ * @since_tizen 2.3
+ * @description Display View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return display_view*
+ */
+display_view *display_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(display_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "3_part_txt_txt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_txt_txt_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void update(efl_callbacks_view *this);
static void on_hardware_back_button_pressed(void *data, Evas_Object *obj,
void *event_info);
-
+static efl_callbacks_view *this = NULL;
/**
- * @function efl_callbacks_view_add
- * @since_tizen 2.3
- * @description Efl Callbacks View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return efl_callbacks_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-efl_callbacks_view *efl_callbacks_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- efl_callbacks_view *this = NULL;
- this = calloc(1, sizeof(efl_callbacks_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "4_part_txt_txt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_txt_txt_btn_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->lat_label = ui_utils_label_add(this->view->layout, "???");
this->lon_label = ui_utils_label_add(this->view->layout, "???");
eext_object_event_callback_add(this->action_btn, EEXT_CALLBACK_BACK,
on_hardware_back_button_pressed, this);
update(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function efl_callbacks_view_add
+ * @since_tizen 2.3
+ * @description Efl Callbacks View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return efl_callbacks_view*
+ */
+efl_callbacks_view *efl_callbacks_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(efl_callbacks_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "4_part_txt_txt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_txt_txt_btn_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _app_low_memory_cb(app_event_info_h event_info, void *user_data);
static void _app_destroy_cb(void* this);
+static event_view *this = NULL;
/**
#endif
/**
- * @function event_view_add
- * @since_tizen 2.3
- * @description Event View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return event_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-event_view *event_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- event_view *this = NULL;
- this = calloc(1, sizeof(event_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "6_part_txt_txt_txt_txt_txt_btn";
- tbt_info->layout_file = get_edje_path("6_part_txt_txt_txt_txt_txt_btn.edj");
+ RETM_IF(NULL == data, "data is null");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
bool is_orientation_supported = does_feature_exist("tizen.org/feature/screen.auto_rotation");
int result = APP_ERROR_NONE;
DBG("ui_app_add_event_handler");
ui_utils_label_set_text(this->low_memory_label, "Low Memory: ", "left");
elm_object_part_content_set(this->view->layout, "1txt_2txt_3txt_4txt_5txt", this->low_memory_label);
#endif
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function event_view_add
+ * @since_tizen 2.3
+ * @description Event View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return event_view*
+ */
+event_view *event_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(event_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "6_part_txt_txt_txt_txt_txt_btn";
+ tbt_info->layout_file = get_edje_path("6_part_txt_txt_txt_txt_txt_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static void feature_summary_list_prepare(feature_view *this);
static char* get_system_info_error(system_info_error_e err_code);
static void _app_destroy_cb(void* this);
+static feature_view *this = NULL;
#ifdef USE_GENLIST
static void _gl_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
return item;
}
#endif
+
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+#ifdef USE_GENLIST
+ this->list = elm_genlist_add(this->view->layout);
+ RETVM_IF(!this->list, NULL, "elm_genlist_add failed");
+#else
+ this->list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->list, NULL, "elm_list_add failed");
+#endif
+
+
+ evas_object_data_set(this->list, "view_data", this);
+ elm_object_part_content_set(this->view->layout, "1cnt", this->list);
+
+ feature_summary_list_prepare(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
/**
* @function feature_view_add
* @since_tizen 2.3
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- feature_view *this = NULL;
this = calloc(1, sizeof(feature_view));
RETVM_IF(!this, NULL, "calloc failed");
this->view = calloc(1, sizeof(common_view));
RETVM_IF(NULL == this->view, NULL, "navi is null");
-#ifdef USE_GENLIST
- this->list = elm_genlist_add(this->view->layout);
- RETVM_IF(!this->list, NULL, "elm_genlist_add failed");
-#else
- this->list = elm_list_add(this->view->layout);
- RETVM_IF(!this->list, NULL, "elm_list_add failed");
-#endif
-
-
- evas_object_data_set(this->list, "view_data", this);
- elm_object_part_content_set(this->view->layout, "1cnt", this->list);
-
- feature_summary_list_prepare(this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _position_updated_cb(double latitude, double longitude, double altitude, time_t timestamp, void *data);
static void _gps_state_changed_cb(location_service_state_e state, void *data);
static void _app_destroy_cb(void* this);
-
+static gps_view *this = NULL;
/**
- * @function gps_view_add
- * @since_tizen 2.3
- * @description Gps View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return gps_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-gps_view *gps_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- gps_view *this = NULL;
- this = calloc(1, sizeof(gps_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "3_part_txt_txt_btn";
- tbt_info->layout_file = get_edje_path("3_part_txt_txt_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
int ret = location_manager_create(LOCATIONS_METHOD_GPS, &this->manager);
RETVM_IF(ret != LOCATIONS_ERROR_NONE, NULL, "location_manager_create fail > Error = %d", ret);
elm_object_part_content_set(this->view->layout, "1txt", this->lat_label);
elm_object_part_content_set(this->view->layout, "2txt", this->lon_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function gps_view_add
+ * @since_tizen 2.3
+ * @description Gps View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return gps_view*
+ */
+gps_view *gps_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(gps_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "3_part_txt_txt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_txt_txt_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _gles_cube_view_glview_resize_cb(Evas_Object *obj);
static void _gles_cube_view_glview_render_cb(Evas_Object *obj);
static void _gles_cube_view_layout_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static graphics_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->gl_layout = gles_cube_view_init(this);
+ if(this->gl_layout == NULL)
+ {
+ gles_cube_view_del(this);
+ return NULL;
+ }
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->gl_layout);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function graphics_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- graphics_view *this = NULL;
this = calloc(1, sizeof(graphics_view));
RETVM_IF(!this, NULL, "calloc failed");
this->view = calloc(1, sizeof(common_view));
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->gl_layout = gles_cube_view_init(this);
- if(this->gl_layout == NULL)
- {
- gles_cube_view_del(this);
- return NULL;
- }
-
- elm_object_part_content_set(this->view->layout, "1cnt", this->gl_layout);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
};
static void _app_destroy_cb(void* this);
+static image_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int x,y,w,h;
+ evas_object_geometry_get(this->view->navi, &x, &y, &w, &h);
+ DBG("Dim: %d %d %d %d", x, y, w, h);
+ const char *file_path;
+ file_path = get_resource_path(this->view->tbt_info->file_name);
+ this->image = ui_utils_create_image(this->view->layout, file_path);
+
+ RETVM_IF(NULL == this->image, false, "create of layout elements failed");
+
+ if(EINA_TRUE == elm_image_animated_available_get(this->image))
+ {
+ elm_image_animated_set(this->image, EINA_TRUE);
+ elm_image_animated_play_set(this->image, EINA_TRUE);
+ }
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->image);
+
+ //int x,y,w,h;
+ evas_object_geometry_get(this->image, &x, &y, &w, &h);
+ DBG("Dim: %d %d %d %d", x, y, w, h);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function image_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int x,y,w,h;
- evas_object_geometry_get(navi, &x, &y, &w, &h);
- DBG("Dim: %d %d %d %d", x, y, w, h);
-
- image_view *this = NULL;
this = calloc(1, sizeof(image_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- const char *file_path;
- file_path = get_resource_path(this->view->tbt_info->file_name);
- this->image = ui_utils_create_image(this->view->layout, file_path);
-
- RETVM_IF(NULL == this->image, false, "create of layout elements failed");
-
- if(EINA_TRUE == elm_image_animated_available_get(this->image))
- {
- elm_image_animated_set(this->image, EINA_TRUE);
- elm_image_animated_play_set(this->image, EINA_TRUE);
- }
-
- elm_object_part_content_set(this->view->layout, "1cnt", this->image);
-
- //int x,y,w,h;
- evas_object_geometry_get(this->image, &x, &y, &w, &h);
- DBG("Dim: %d %d %d %d", x, y, w, h);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _lang_set_button_clicked_cb(void *data, Evas_Object *obj, void *event_info);
static void _lang_get_button_clicked_cb(void *data, Evas_Object *obj, void *event_info);
static void _return_key_button_clicked_cb(void *data, Evas_Object *obj, void *event_info);
-
+static ime_view *this = NULL;
/**
- * @function ime_view_add
- * @since_tizen 2.3
- * @description Ime View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return ime_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-ime_view *ime_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- DBG("Inside ime_view_add");
-
- ime_view *this = NULL;
- this = calloc(1, sizeof(ime_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "ime_viewer";
- tbt_info->layout_file = get_edje_path("input_viewer.edj");
-
-
- DBG("EDJ added.");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
if(this->view->tbt_info->apptype == TBT_APP_IME_ALPHABATIC)
{
this->ime_entry1 = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "");
Elm_Input_Panel_Layout l;
l = elm_entry_input_panel_layout_get(this->ime_entry1);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function ime_view_add
+ * @since_tizen 2.3
+ * @description Ime View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return ime_view*
+ */
+ime_view *ime_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ DBG("Inside ime_view_add");
+
+ this = calloc(1, sizeof(ime_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "ime_viewer";
+ tbt_info->layout_file = get_edje_path("input_viewer.edj");
+
+
+ DBG("EDJ added.");
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
};
static void _app_destroy_cb(void* this);
-
+static input_view *this = NULL;
/**
- * @function input_view_add
- * @since_tizen 2.3
- * @description Input View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return input_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-input_view *input_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- input_view *this = NULL;
- this = calloc(1, sizeof(input_view));
- RETVM_IF(!this, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "2_part_cnt_btntop";
- tbt_info->layout_file = get_edje_path("2_part_cnt1.5_btntop.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
if(this->view->tbt_info->apptype == TBT_APP_IDEV_NUM_KEYPAD)
{
this->input_text = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NUMBER, "");
Elm_Input_Panel_Layout l;
l = elm_entry_input_panel_layout_get(this->input_text);
RETVM_IF(ELM_INPUT_PANEL_LAYOUT_INVALID == l, NULL, "elm_entry_input_panel_layout_get failed");
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function input_view_add
+ * @since_tizen 2.3
+ * @description Input View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return input_view*
+ */
+input_view *input_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(input_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btntop";
+ tbt_info->layout_file = get_edje_path("2_part_cnt1.5_btntop.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static bool was_playing;
static local_view *view;
-
+static local_view *this = NULL;
/**
* @function get_system_error
}
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+
+ #ifdef DEVICE_TYPE_MOBILE
+ Evas *evas = evas_object_evas_get(this->view->navi);
+ this->video_rect = evas_object_image_filled_add(evas);
+ #else
+ int width, height;
+
+ int ret = system_info_get_platform_int("tizen.org/feature/screen.width", &width);
+ RETVM_IF(SYSTEM_INFO_ERROR_NONE!=ret, NULL, "system_info_get_platform_int failed %s", get_system_error(ret));
+ RETVM_IF(width <= 0, NULL, "width is zero or negative");
+ ret = system_info_get_platform_int("tizen.org/feature/screen.height", &height);
+ RETVM_IF(SYSTEM_INFO_ERROR_NONE!=ret, NULL, "system_info_get_platform_int failed %s", get_system_error(ret));
+ RETVM_IF(height <= 0, NULL, "height is zero or negative");
+
+ //this->video_rect = elm_win_util_standard_add("Video", "Video");
+ #endif
+
+ //evas_object_show(this->video_rect);
+ #ifdef DEVICE_TYPE_MOBILE
+ elm_object_part_content_set(this->view->layout, "video_view", this->video_rect);
+ #endif
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+ update_view_controls(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function local_view_add
local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item, Evas_Object *win)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- local_view *this = NULL;
_tbt_pause_resume_cb = _on_app_pause_resume_cb;
_tbt_app_terminate_cb = _app_destroy_cb;
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
this->main_win = win;
this->win = NULL;
this->rect = NULL;
this->video_rect = NULL;
this->is_feature_supported = true;
-
- #ifdef DEVICE_TYPE_MOBILE
- Evas *evas = evas_object_evas_get(this->view->navi);
- this->video_rect = evas_object_image_filled_add(evas);
- #else
- int width, height;
-
- int ret = system_info_get_platform_int("tizen.org/feature/screen.width", &width);
- RETVM_IF(SYSTEM_INFO_ERROR_NONE!=ret, NULL, "system_info_get_platform_int failed %s", get_system_error(ret));
- RETVM_IF(width <= 0, NULL, "width is zero or negative");
- ret = system_info_get_platform_int("tizen.org/feature/screen.height", &height);
- RETVM_IF(SYSTEM_INFO_ERROR_NONE!=ret, NULL, "system_info_get_platform_int failed %s", get_system_error(ret));
- RETVM_IF(height <= 0, NULL, "height is zero or negative");
-
- //this->video_rect = elm_win_util_standard_add("Video", "Video");
- #endif
-
- //evas_object_show(this->video_rect);
- #ifdef DEVICE_TYPE_MOBILE
- elm_object_part_content_set(this->view->layout, "video_view", this->video_rect);
- #endif
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
-
- update_view_controls(this);
-
return this;
}
static void _app_destroy_cb(void* this);
static void _media_key_event_cb(media_key_e key, media_key_event_e status, void *user_data);
-
+static mediakey_view *this = NULL;
/**
* @function get_mediakey_type_error
* @since_tizen 3.0
return err_msg;
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
+ ret = media_key_reserve(_media_key_event_cb,this);
+ RETVM_IF(ret != MEDIA_KEY_ERROR_NONE, NULL, "media_key_reserve failed : %s", get_mediakey_type_error(ret));
+
+ this->mediakey_label = ui_utils_label_add(this->view->layout, "Status[Press audiojack key] ");
+ elm_label_line_wrap_set(this->mediakey_label, ELM_WRAP_WORD);
+
+ this->mediakey2_label = ui_utils_label_add(this->view->layout, "Type[Press audiojack key]");
+ elm_label_line_wrap_set(this->mediakey2_label, ELM_WRAP_WORD);
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->mediakey_label);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->mediakey2_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
/**
* @function mediakey_view_add
* @since_tizen 3.0
mediakey_view *mediakey_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- mediakey_view *this = NULL;
+
this = calloc(1, sizeof(mediakey_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- ret = media_key_reserve(_media_key_event_cb,this);
- RETVM_IF(ret != MEDIA_KEY_ERROR_NONE, NULL, "media_key_reserve failed : %s", get_mediakey_type_error(ret));
-
- this->mediakey_label = ui_utils_label_add(this->view->layout, "Status[Press audiojack key] ");
- elm_label_line_wrap_set(this->mediakey_label, ELM_WRAP_WORD);
- this->mediakey2_label = ui_utils_label_add(this->view->layout, "Type[Press audiojack key]");
- elm_label_line_wrap_set(this->mediakey2_label, ELM_WRAP_WORD);
-
- elm_object_part_content_set(this->view->layout, "1cnt", this->mediakey_label);
- elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->mediakey2_label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void enable_control(mock_view *this, bool enable);
static bool __is_mock_test_running=false;
-
+static mock_view *this = NULL;
/**
* @function get_system_error
return error;
}
-
/**
- * @function mock_view_add
- * @since_tizen 2.3
- * @description Mock View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return mock_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-mock_view *mock_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- mock_view *this = NULL;
- this = calloc(1, sizeof(mock_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- this->down = false;
- tbt_info->layout_group = "4_part_txt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj");
-
- get_screen_resolution(this);
- this->timer = NULL;
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->is_mock_event = false;
this->label = ui_utils_label_add(this->view->layout, "");
ui_utils_label_set_text(this->label, "Clear: ", "left");
Evas_Object *control = add_control_layout(this, this->view->layout);
elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function mock_view_add
+ * @since_tizen 2.3
+ * @description Mock View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return mock_view*
+ */
+mock_view *mock_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(mock_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ this->down = false;
+ tbt_info->layout_group = "4_part_txt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj");
+
+ get_screen_resolution(this);
+ this->timer = NULL;
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static Evas_Object *add_control_layout(motion_detection_view *this, Evas_Object *parent);
static void activity_recognition_callback_check_type(activity_type_e activity, const activity_data_h data, double timestamp, activity_error_e error, void *user_data);
static char *_activity_error(int activity_error);
+static motion_detection_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int x,y,w,h;
+ evas_object_geometry_get(this->view->navi, &x, &y, &w, &h);
+ DBG("Dim: %d %d %d %d", x, y, w, h);
+
+ this->activity_label = ui_utils_label_add(this->view->layout, "Activity Status");
+ RETVM_IF(NULL == this->activity_label, NULL, "Label is null");
+
+ elm_object_part_content_set(this->view->layout, "activity_text", this->activity_label);
+ ui_utils_label_set_text(this->activity_label, "Activity Status", "left");
+ const char *file_path;
+ file_path = get_resource_path(this->view->tbt_info->file_name);
+ this->activity_image = ui_utils_create_image(this->view->layout, file_path);
+
+ //int x,y,w,h;
+ evas_object_geometry_get(this->activity_image, &x, &y, &w, &h);
+ DBG("Dim: %d %d %d %d", x, y, w, h);
+
+ RETVM_IF(NULL == this->activity_image, false, "creation of layout elements failed");
+
+ elm_object_part_content_set(this->view->layout, "activity_image", this->activity_image);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+ evas_object_show(control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function motion_detection_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int x,y,w,h;
- evas_object_geometry_get(navi, &x, &y, &w, &h);
- DBG("Dim: %d %d %d %d", x, y, w, h);
-
- motion_detection_view *this = NULL;
this = calloc(1, sizeof(motion_detection_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->activity_label = ui_utils_label_add(this->view->layout, "Activity Status");
- RETVM_IF(NULL == this->activity_label, NULL, "Label is null");
-
- elm_object_part_content_set(this->view->layout, "activity_text", this->activity_label);
- ui_utils_label_set_text(this->activity_label, "Activity Status", "left");
- const char *file_path;
- file_path = get_resource_path(this->view->tbt_info->file_name);
- this->activity_image = ui_utils_create_image(this->view->layout, file_path);
-
- //int x,y,w,h;
- evas_object_geometry_get(this->activity_image, &x, &y, &w, &h);
- DBG("Dim: %d %d %d %d", x, y, w, h);
-
- RETVM_IF(NULL == this->activity_image, false, "creation of layout elements failed");
-
- elm_object_part_content_set(this->view->layout, "activity_image", this->activity_image);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
- evas_object_show(control);
return this;
}
static void _mtp_event_cb(mtp_event_e event, int event_parameter, void *user_data);
static void mtp_functions(mtp_view *this);
+static mtp_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->list, NULL, "elm_list_add failed");
+ evas_object_data_set(this->list, "view_data", this);
+ elm_object_part_content_set(this->view->layout, "mtp_view", this->list);
+
+ this->info_list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->info_list, NULL, "elm_list_add failed");
+ evas_object_data_set(this->info_list, "view_data", this);
+ elm_object_part_content_set(this->view->layout, "mtp_info_view", this->info_list);
+
+ mtp_functions(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function mtp_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- mtp_view *this = NULL;
this = calloc(1, sizeof(mtp_view));
RETVM_IF(!this, NULL, "calloc failed");
this->view = calloc(1, sizeof(common_view));
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->list = elm_list_add(this->view->layout);
- RETVM_IF(!this->list, NULL, "elm_list_add failed");
- evas_object_data_set(this->list, "view_data", this);
- elm_object_part_content_set(this->view->layout, "mtp_view", this->list);
-
- this->info_list = elm_list_add(this->view->layout);
- RETVM_IF(!this->info_list, NULL, "elm_list_add failed");
- evas_object_data_set(this->info_list, "view_data", this);
- elm_object_part_content_set(this->view->layout, "mtp_info_view", this->info_list);
-
- mtp_functions(this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _app_destroy_cb(void* this);
static void _view_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static void app_control_view_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
-
+static nfc_ese_view *this = NULL;
/**
* @function get_app_control_error
return error;
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->label = ui_utils_label_add(this->view->layout, "");
+ RETVM_IF(!this->label, NULL, "elm_list_add failed");
+ ui_utils_label_set_text(this->label, "Launch nfc ese test app.", "left");
+ elm_object_part_content_set(this->view->layout, "1txt", this->label);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function nfc_ese_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- nfc_ese_view *this = NULL;
this = calloc(1, sizeof(nfc_ese_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->label = ui_utils_label_add(this->view->layout, "");
- RETVM_IF(!this->label, NULL, "elm_list_add failed");
- ui_utils_label_set_text(this->label, "Launch nfc ese test app.", "left");
- elm_object_part_content_set(this->view->layout, "1txt", this->label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
return this;
}
static void _app_destroy_cb(void* this);
static void _view_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static void app_control_view_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
-
+static nfc_hce_preferred_view *this = NULL;
/**
* @function get_app_control_error
return error;
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->label = ui_utils_label_add(this->view->layout, "");
+ RETVM_IF(!this->label, NULL, "elm_list_add failed");
+ ui_utils_label_set_text(this->label, "Launch nfc hce pref app.", "left");
+ elm_object_part_content_set(this->view->layout, "1txt", this->label);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function nfc_hce_preferred_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- nfc_hce_preferred_view *this = NULL;
this = calloc(1, sizeof(nfc_hce_preferred_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->label = ui_utils_label_add(this->view->layout, "");
- RETVM_IF(!this->label, NULL, "elm_list_add failed");
- ui_utils_label_set_text(this->label, "Launch nfc hce pref app.", "left");
- elm_object_part_content_set(this->view->layout, "1txt", this->label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
return this;
}
void on_nfc_snep_started(void* data);
void on_nfc_snep_get(void* data);
void _nfc_p2p_send_completed_cb(nfc_error_e result, void *user_data);
-
-
+static nfc_view *this = NULL;
/**
- * @function nfc_view_add
- * @since_tizen 2.3
- * @description Nfc View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return nfc_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-nfc_view *nfc_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
- nfc_view *this = NULL;
- this = calloc(1, sizeof(nfc_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- if(tbt_info->apptype == TBT_APP_NFC_TAG)
- {
- tbt_info->layout_group = "nfc_viewer_tag";
- tbt_info->layout_file = get_edje_path("nfc_viewer.edj");
-
-
- }
- else if(tbt_info->apptype == TBT_APP_NFC_P2P)
- {
- tbt_info->layout_group = "nfc_viewer_p2p";
- tbt_info->layout_file = get_edje_path("nfc_viewer.edj");
- }
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this->view, NULL, "view NULL after common_view_add");
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
Evas_Object *tabbar;
Elm_Object_Item *nf_it;
Evas_Object *nf = this->view->navi;
initialize_nfc(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function nfc_view_add
+ * @since_tizen 2.3
+ * @description Nfc View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return nfc_view*
+ */
+nfc_view *nfc_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(nfc_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ if(tbt_info->apptype == TBT_APP_NFC_TAG)
+ {
+ tbt_info->layout_group = "nfc_viewer_tag";
+ tbt_info->layout_file = get_edje_path("nfc_viewer.edj");
+
+
+ }
+ else if(tbt_info->apptype == TBT_APP_NFC_P2P)
+ {
+ tbt_info->layout_group = "nfc_viewer_p2p";
+ tbt_info->layout_file = get_edje_path("nfc_viewer.edj");
+ }
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this->view, NULL, "view NULL after common_view_add");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
};
static void _app_destroy_cb(void* this);
-
+static notification_view *this = NULL;
notification_h g_NotificationHandle;
/**
}
/**
- * @function notification_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description Notification View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return notification_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-notification_view *notification_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- notification_view *this = NULL;
- this = calloc(1, sizeof(notification_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+ RETM_IF(NULL == data, "data is null");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
g_NotificationHandle = notification_create(NOTIFICATION_TYPE_NOTI);
if(this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_TITLE)
return this;
}
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function notification_view_add
+ * @since_tizen 3.0
+ * @description Notification View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return notification_view*
+ */
+notification_view *notification_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(notification_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static void _on_add_record_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info);
static void _dnssd_found_cb(dnssd_service_state_e service_state, dnssd_service_h remote_service, void *user_data);
static char** str_split(char* a_str, const char a_delim);
-
+static nsd_dnssd_view *this = NULL;
#ifdef USE_GENLIST
typedef struct
#endif
/**
- * @function nsd_dnssd_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description nsd_dnssd View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return nsd_dnssd_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-nsd_dnssd_view *nsd_dnssd_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- nsd_dnssd_view *this = NULL;
- this = calloc(1, sizeof(nsd_dnssd_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
#ifdef USE_GENLIST
this->list = elm_genlist_add(this->view->layout);
RETVM_IF(!this->list, NULL, "elm_genlist_add failed");
dns_sd_api(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function nsd_dnssd_view_add
+ * @since_tizen 3.0
+ * @description nsd_dnssd View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return nsd_dnssd_view*
+ */
+nsd_dnssd_view *nsd_dnssd_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(nsd_dnssd_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static void _on_browse_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info);
static void _on_add_record_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info);
static void _ssdp_found_cb(ssdp_service_state_e service_state, ssdp_service_h remote_service, void *user_data);
-
-
+static nsd_ssdp_view *this = NULL;
/**
- * @function nsd_ssdp_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description nsd_ssdp View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return nsd_ssdp_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-nsd_ssdp_view *nsd_ssdp_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- nsd_ssdp_view *this = NULL;
- this = calloc(1, sizeof(nsd_ssdp_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->list = elm_list_add(this->view->layout);
RETVM_IF(!this->list, NULL, "elm_list_add failed");
evas_object_data_set(this->list, "view_data", this);
ssdp_api(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function nsd_ssdp_view_add
+ * @since_tizen 3.0
+ * @description nsd_ssdp View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return nsd_ssdp_view*
+ */
+nsd_ssdp_view *nsd_ssdp_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(nsd_ssdp_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
#include "view/tbt-common-view.h"
static void _app_destroy_cb(void* this);
+static oauth2_info_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->access_token = NULL;
+ this->expire_in = 0;
+ this->refresh_token = NULL;
+ this->scope = NULL;
+ this->token_type = NULL;
+ this->state = NULL;
+ this->custom_data = NULL;
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function _oauth2_info_view_add
RETVM_IF(NULL == navi, NULL, "navi is null");
- oauth2_info_view *this = NULL;
this = calloc(1, sizeof(oauth2_info_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->access_token = NULL;
- this->expire_in = 0;
- this->refresh_token = NULL;
- this->scope = NULL;
- this->token_type = NULL;
- this->state = NULL;
- this->custom_data = NULL;
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static void show_google_auth_output(void* user_data);
static void oauth2_info_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static char* get_oauth2_error(oauth2_error_e error);
+static oauth2_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->list, NULL, "elm_list_add failed");
+ elm_object_part_content_set(this->view->layout, "oauth2_view", this->list);
+
+ prepare_oauth2_list(this);
+
+ this->btn_clear_cache = ui_utils_push_button_add(this, this->view->layout, "Clear Cache", clear_chache_button_pressed_cb);
+ elm_object_part_content_set(this->view->layout, "oauth2_btn", this->btn_clear_cache);
+ evas_object_show(this->btn_clear_cache);
+
+ this->btn_oauth2_info = ui_utils_push_button_add(this, this->view->layout, "Info", oauth2_info_button_pressed_cb);
+ elm_object_part_content_set(this->view->layout, "oauth2_info_btn", this->btn_oauth2_info);
+ evas_object_show(this->btn_oauth2_info);
+
+ this->google_desc_obj = ui_utils_label_add(this->view->layout, "");
+ elm_object_part_content_set(this->view->layout, "oauth2_description", this->google_desc_obj);
+ evas_object_show(this->google_desc_obj);
+
+ this->google_img_text = ui_utils_label_add(this->view->layout, "Image");
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function oauth2_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- oauth2_view *this = NULL;
this = calloc(1, sizeof(oauth2_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
RETVM_IF(NULL == this->view->layout, NULL, "navi is null");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
this->oauth2_mgr = NULL;
this->google_name = NULL;
this->google_pic = NULL;
this->state = NULL;
this->custom_data = NULL;
- this->list = elm_list_add(this->view->layout);
- RETVM_IF(!this->list, NULL, "elm_list_add failed");
- elm_object_part_content_set(this->view->layout, "oauth2_view", this->list);
-
- prepare_oauth2_list(this);
-
- this->btn_clear_cache = ui_utils_push_button_add(this, this->view->layout, "Clear Cache", clear_chache_button_pressed_cb);
- elm_object_part_content_set(this->view->layout, "oauth2_btn", this->btn_clear_cache);
- evas_object_show(this->btn_clear_cache);
-
- this->btn_oauth2_info = ui_utils_push_button_add(this, this->view->layout, "Info", oauth2_info_button_pressed_cb);
- elm_object_part_content_set(this->view->layout, "oauth2_info_btn", this->btn_oauth2_info);
- evas_object_show(this->btn_oauth2_info);
-
- this->google_desc_obj = ui_utils_label_add(this->view->layout, "");
- elm_object_part_content_set(this->view->layout, "oauth2_description", this->google_desc_obj);
- evas_object_show(this->google_desc_obj);
-
- this->google_img_text = ui_utils_label_add(this->view->layout, "Image");
-
return this;
}
static void _app_destroy_cb(void* this);
static void _package_manager_event_cb(const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data);
-
+static packagemanager_view *this = NULL;
package_manager_h g_pstPkgMngr;
/**
return err_msg;
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
+ ret = package_manager_create(&g_pstPkgMngr);
+ RETVM_IF(ret != PACKAGE_MANAGER_ERROR_NONE, NULL, "package_manager_create failed : %s", get_package_manager_error(ret));
+
+ ret = package_manager_set_event_cb(g_pstPkgMngr,_package_manager_event_cb, this);
+ RETVM_IF(ret != PACKAGE_MANAGER_ERROR_NONE, NULL, "package_manager_set_event_cb failed : %s", get_package_manager_error(ret));
+
+ this->packagemanager_label = ui_utils_label_add(this->view->layout, "Package Status:Install/Uninstall/Update ");
+ elm_label_line_wrap_set(this->packagemanager_label, ELM_WRAP_WORD);
+
+ this->packagemanagerstate_label = ui_utils_label_add(this->view->layout, "State: No Progress");
+ elm_label_line_wrap_set(this->packagemanagerstate_label, ELM_WRAP_WORD);
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->packagemanager_label);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->packagemanagerstate_label);
+
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
/**
* @function packagemanager_view_add
* @since_tizen 3.0
packagemanager_view *packagemanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- packagemanager_view *this = NULL;
+
this = calloc(1, sizeof(packagemanager_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- ret = package_manager_create(&g_pstPkgMngr);
- RETVM_IF(ret != PACKAGE_MANAGER_ERROR_NONE, NULL, "package_manager_create failed : %s", get_package_manager_error(ret));
-
- ret = package_manager_set_event_cb(g_pstPkgMngr,_package_manager_event_cb, this);
- RETVM_IF(ret != PACKAGE_MANAGER_ERROR_NONE, NULL, "package_manager_set_event_cb failed : %s", get_package_manager_error(ret));
-
- this->packagemanager_label = ui_utils_label_add(this->view->layout, "Package Status:Install/Uninstall/Update ");
- elm_label_line_wrap_set(this->packagemanager_label, ELM_WRAP_WORD);
-
- this->packagemanagerstate_label = ui_utils_label_add(this->view->layout, "State: No Progress");
- elm_label_line_wrap_set(this->packagemanagerstate_label, ELM_WRAP_WORD);
-
- elm_object_part_content_set(this->view->layout, "1cnt", this->packagemanager_label);
- elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->packagemanagerstate_label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _view(void *data, Evas_Object *obj, void *event_info);
static void app_control_view_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
static bool _app_control_extra_data_cb(app_control_h app_control, const char *key, void *data);
-
+static pick_view *this = NULL;
#ifdef USE_GENLIST
return error;
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->label = ui_utils_label_add(this->view->layout, "");
+ RETVM_IF(!this->label, NULL, "elm_list_add failed");
+ ui_utils_label_set_text(this->label, "Pick/View Data: ", "left");
+ elm_object_part_content_set(this->view->layout, "1txt", this->label);
+
+#ifdef USE_GENLIST
+ this->data_list = elm_genlist_add(this->view->layout);
+ RETVM_IF(!this->data_list, NULL, "elm_genlist_add failed");
+#else
+ this->data_list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->data_list, NULL, "elm_list_add failed");
+#endif
+
+ evas_object_data_set(this->data_list, "data_view", this);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt", this->data_list);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function pick_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- pick_view *this = NULL;
this = calloc(1, sizeof(pick_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->label = ui_utils_label_add(this->view->layout, "");
- RETVM_IF(!this->label, NULL, "elm_list_add failed");
- ui_utils_label_set_text(this->label, "Pick/View Data: ", "left");
- elm_object_part_content_set(this->view->layout, "1txt", this->label);
-
-#ifdef USE_GENLIST
- this->data_list = elm_genlist_add(this->view->layout);
- RETVM_IF(!this->data_list, NULL, "elm_genlist_add failed");
-#else
- this->data_list = elm_list_add(this->view->layout);
- RETVM_IF(!this->data_list, NULL, "elm_list_add failed");
-#endif
-
- evas_object_data_set(this->data_list, "data_view", this);
- elm_object_part_content_set(this->view->layout, "1txt_2cnt", this->data_list);
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void push_service_update_btn_state(void* user_data);
static char* push_service_get_error(int error_code);
static char* get_xml_element_value (xmlDocPtr doc, xmlNodePtr cur, const char* tag);
+static push_view *this = NULL;
/**
- * @function push_view_add
- * @since_tizen 2.3
- * @description Push View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return push_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-push_view *push_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- push_view *this = NULL;
- this = calloc(1, sizeof(push_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- this->push_btn_state = DISCONNECTED_STATE;
- push_service_update_btn_state(this);
-
- tbt_info->layout_group = "push_service";
- tbt_info->layout_file = get_edje_path("push_service.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETM_IF(NULL == data, "data is null");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
//get appID and appSecret from file
char auth_file_path[256]={'\0',};
Evas_Object *control = add_control_layout(this, this->view->layout);
elm_object_part_content_set(this->view->layout, "controlr_part", control);
- if(tbt_info->is_push_from_outside == true)
+ if(this->view->tbt_info->is_push_from_outside == true)
{
//Get Push from outside
this->push_btn_state = DISABLED_STATE;
push_service_update_btn_state(this);
char *noti_data = NULL;
- noti_data = push_service_app_control_to_noti_data(tbt_info->push_app_control, tbt_info->push_operation_id);
+ noti_data = push_service_app_control_to_noti_data(this->view->tbt_info->push_app_control, this->view->tbt_info->push_operation_id);
RETVM_IF( NULL == noti_data, NULL, "noti_data is NULL");
elm_object_text_set(this->push_label, noti_data);
free(noti_data);
}
- tbt_info->is_push_from_outside = false;
+ this->view->tbt_info->is_push_from_outside = false;
}
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function push_view_add
+ * @since_tizen 2.3
+ * @description Push View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return push_view*
+ */
+push_view *push_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(push_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ this->push_btn_state = DISCONNECTED_STATE;
+ push_service_update_btn_state(this);
+
+ tbt_info->layout_group = "push_service";
+ tbt_info->layout_file = get_edje_path("push_service.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
radio_h g_pstRadio;
static bool is_not_supported = false;
+static radio_view *this = NULL;
/**
* @function get_radio_type_error
}
/**
- * @function radio_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description Radio View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return radio_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-radio_view *radio_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- radio_view *this = NULL;
- this = calloc(1, sizeof(radio_view));
- RETVM_IF(!this, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
ret = radio_create(&g_pstRadio);
RETVM_IF(ret != RADIO_ERROR_NONE && ret != RADIO_ERROR_NOT_SUPPORTED, NULL, "radio_create failed : %s", get_radio_type_error(ret));
elm_object_part_content_set(this->view->layout, "1cnt", this->radio_label);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function radio_view_add
+ * @since_tizen 3.0
+ * @description Radio View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return radio_view*
+ */
+radio_view *radio_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(radio_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _position_updated_cb(double latitude, double longitude, double altitude, time_t timestamp, void *data);
static void _gps_state_changed_gps_cb(location_service_state_e state, void *data);
-
+static runtimeinfo_view *this = NULL;
/**
* @function get_runtime_info_error
* @since_tizen 2.3
return err_msg;
}
-
/**
- * @function runtimeinfo_view_add
- * @since_tizen 2.3
- * @description Runtimeinfo View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return runtimeinfo_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-runtimeinfo_view *runtimeinfo_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret, value;
- runtimeinfo_view *this = NULL;
- this = calloc(1, sizeof(runtimeinfo_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret, value;
bool bvalue;
if(this->view->tbt_info->apptype == TBT_APP_AUDIO_JACK)
{
return this;
}
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function runtimeinfo_view_add
+ * @since_tizen 2.3
+ * @description Runtimeinfo View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return runtimeinfo_view*
+ */
+runtimeinfo_view *runtimeinfo_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(runtimeinfo_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void scmirroring_sink_show_info(void* user_data);
static char* get_scmirroring_audio_codec(scmirroring_audio_codec_e audio_codec);
static char* get_scmirroring_video_codec(scmirroring_video_codec_e video_codec);
-
+static screenmirror_sink_view *this = NULL;
/**
- * @function screenmirror_sink_view_add
- * @since_tizen 2.4
- * @description Screen Mirror Sink View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return screenmirror_sink_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-screenmirror_sink_view *screenmirror_sink_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
- screenmirror_sink_view *this = NULL;
- this = calloc(1, sizeof(screenmirror_sink_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- this->scmirroring_sink = NULL;
- this->scmirroring_resolution = 0;
-
- tbt_info->layout_group = "screenmirror_sink_viewer";
- tbt_info->layout_file = get_edje_path("screenmirror_sink_viewer.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "this->view is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->status_text = ui_utils_label_add(this->view->layout, "");
elm_object_part_content_set(this->view->layout, "status_text", this->status_text);
//this->display_window = elm_win_xwindow_get(this->display_object);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function screenmirror_sink_view_add
+ * @since_tizen 2.4
+ * @description Screen Mirror Sink View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return screenmirror_sink_view*
+ */
+screenmirror_sink_view *screenmirror_sink_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(screenmirror_sink_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ this->scmirroring_sink = NULL;
+ this->scmirroring_resolution = 0;
+
+ tbt_info->layout_group = "screenmirror_sink_viewer";
+ tbt_info->layout_file = get_edje_path("screenmirror_sink_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "this->view is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static float convert_magnatic_value(float value);
static float convert_pressure_value(float value);
static void get_current_sensor_data(sensor_view *view);
-
+static sensor_view *this = NULL;
/**
* @function get_sensor_error
return error;
}
-
/**
- * @function sensor_view_add
- * @since_tizen 2.3
- * @description Sensor View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return sensor_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-sensor_view *sensor_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- DBG("Inside sensor_view_add");
- RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
- sensor_view *this = NULL;
- this = calloc(1, sizeof(sensor_view));
- RETVM_IF(!this, NULL, "calloc failed");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- if (tbt_info->apptype == TBT_APP_SENSOR_PROXIMITY)
- {
- tbt_info->layout_group = "3_part_cnt_txt_btn";
- tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
-
- }
- else if (tbt_info->apptype == TBT_APP_SENSOR_LIGHT)
- {
- tbt_info->layout_group = "3_part_cnt_txt_btn";
- tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
- }
- else if (tbt_info->apptype == TBT_APP_SENSOR_ULTRA_VIOLET)
- {
- tbt_info->layout_group = "3_part_cnt_txt_btn";
- tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
- }
-
- else if (tbt_info->apptype == TBT_APP_SENSOR_PRESSURE)
- {
- tbt_info->layout_group = "6_part_cnt_cnt_cnt_cnt_txt_btn";
- tbt_info->layout_file = get_edje_path("6_part_cnt0.75_cnt0.75_cnt0.75_cnt0.75_cnt0.75_btn.edj");
- }
-
- else if (tbt_info->apptype == TBT_APP_SENSOR_ACCELEROMETER)
- {
- tbt_info->layout_group = "3_part_cnt_cnt_btn";
- tbt_info->layout_file = get_edje_path("3_part_cnt2.75_cnt_btn.edj");
- }
- else if(tbt_info->apptype == TBT_APP_SENSOR_GYROSCOPE)
- {
- tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
-
- }
- else if(tbt_info->apptype == TBT_APP_SENSOR_MAGNATOMETER)
- {
- tbt_info->layout_group = "5_part_cnt_cnt_cnt_cnt_btn";
- tbt_info->layout_file = get_edje_path("5_part_cnt__cnt__cnt__cnt_btn.edj");
- }
- else if(tbt_info->apptype == TBT_APP_SENSOR_PEDOMETER)
- {
- tbt_info->layout_group = "3_part_cnt_txt_btn";
- tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
- }
- else
- {
- tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
- }
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- this->sensor_info = this->view->tbt_info;
-
- if(is_sensor_supported(this) == false)
- {
- Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
- elm_object_text_set(popup, "Sensor is not supported");
- RETVM_IF(!this->view, NULL,"Sensor is not supported");
-
- }
-
- if(this->sensor_info->apptype == TBT_APP_SENSOR_GYROSCOPE)
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ if(this->sensor_info->apptype == TBT_APP_SENSOR_GYROSCOPE)
{
this->gyro_current_state = 1;
create_control(this, "Next");
elm_object_part_content_set(this->view->layout, "1cnt_2txt", this->pedometer_label);
sensor_get_default_sensor(SENSOR_HUMAN_PEDOMETER, &this->sensor_info->sensor);
}
+ //elm_object_part_content_set(this->view->layout, "gl_view", this->glview);
+ //elm_object_part_content_set(this->view->layout, "value_view", this->genlist);
+ if (this->view->tbt_info->apptype == TBT_APP_SENSOR_PRESSURE)
+ {
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt_3cnt_4cnt", this->genlist);
+ }
- this->glview = gles_cube_view_init(this);
- if(this->glview == NULL)
+ else if (this->view->tbt_info->apptype == TBT_APP_SENSOR_ACCELEROMETER)
{
- gles_cube_view_del(this);
- return NULL;
+ elm_object_part_content_set(this->view->layout, "1cnt", this->glview);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->genlist);
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_SENSOR_GYROSCOPE)
+ {
+ elm_object_part_content_set(this->view->layout, "1cnt", this->glview);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->genlist);
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_SENSOR_MAGNATOMETER)
+ {
+ elm_object_part_content_set(this->view->layout, "1cnt_2txt_3cnt_4cnt", this->genlist);
+ }
+ else
+ {
+ elm_object_part_content_set(this->view->layout, "1cnt", this->glview);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->genlist);
}
- this->genlist = genlist_create(this);
- RETVM_IF(NULL == this->genlist, NULL, "genlist_create is null");
+}
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
- sensor_value_items_create(this);
- sensor_value_items_prepare(this);
+/**
+ * @function sensor_view_add
+ * @since_tizen 2.3
+ * @description Sensor View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return sensor_view*
+ */
+sensor_view *sensor_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ DBG("Inside sensor_view_add");
+ RETVM_IF(NULL == navi, NULL, "navi is null");
- //elm_object_part_content_set(this->view->layout, "gl_view", this->glview);
- //elm_object_part_content_set(this->view->layout, "value_view", this->genlist);
- if (tbt_info->apptype == TBT_APP_SENSOR_PRESSURE)
+ this = calloc(1, sizeof(sensor_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ if (tbt_info->apptype == TBT_APP_SENSOR_PROXIMITY)
{
- elm_object_part_content_set(this->view->layout, "1cnt_2cnt_3cnt_4cnt", this->genlist);
+ tbt_info->layout_group = "3_part_cnt_txt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
+
+ }
+ else if (tbt_info->apptype == TBT_APP_SENSOR_LIGHT)
+ {
+ tbt_info->layout_group = "3_part_cnt_txt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
+ }
+ else if (tbt_info->apptype == TBT_APP_SENSOR_ULTRA_VIOLET)
+ {
+ tbt_info->layout_group = "3_part_cnt_txt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
+ }
+
+ else if (tbt_info->apptype == TBT_APP_SENSOR_PRESSURE)
+ {
+ tbt_info->layout_group = "6_part_cnt_cnt_cnt_cnt_txt_btn";
+ tbt_info->layout_file = get_edje_path("6_part_cnt0.75_cnt0.75_cnt0.75_cnt0.75_cnt0.75_btn.edj");
}
else if (tbt_info->apptype == TBT_APP_SENSOR_ACCELEROMETER)
{
- elm_object_part_content_set(this->view->layout, "1cnt", this->glview);
- elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->genlist);
+ tbt_info->layout_group = "3_part_cnt_cnt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_cnt_btn.edj");
}
else if(tbt_info->apptype == TBT_APP_SENSOR_GYROSCOPE)
{
- elm_object_part_content_set(this->view->layout, "1cnt", this->glview);
- elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->genlist);
+ tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
+
}
else if(tbt_info->apptype == TBT_APP_SENSOR_MAGNATOMETER)
{
- elm_object_part_content_set(this->view->layout, "1cnt_2txt_3cnt_4cnt", this->genlist);
+ tbt_info->layout_group = "5_part_cnt_cnt_cnt_cnt_btn";
+ tbt_info->layout_file = get_edje_path("5_part_cnt__cnt__cnt__cnt_btn.edj");
+ }
+ else if(tbt_info->apptype == TBT_APP_SENSOR_PEDOMETER)
+ {
+ tbt_info->layout_group = "3_part_cnt_txt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_txt_btn.edj");
}
else
{
- elm_object_part_content_set(this->view->layout, "1cnt", this->glview);
- elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->genlist);
+ tbt_info->layout_group = "4_part_cnt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("4_part_cnt1.25_cnt1.5_btn_btn.edj");
}
- evas_object_smart_callback_add(this->view->navi, "transition,finished", _sensor_view_transition_finished_cb, this);
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+ this->sensor_info = this->view->tbt_info;
+
+
+
+ if(is_sensor_supported(this) == false)
+ {
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Sensor is not supported");
+ RETVM_IF(!this->view, NULL,"Sensor is not supported");
+
+ }
+
+ this->glview = gles_cube_view_init(this);
+ if(this->glview == NULL)
+ {
+ gles_cube_view_del(this);
+ return NULL;
+ }
+
+ this->genlist = genlist_create(this);
+ RETVM_IF(NULL == this->genlist, NULL, "genlist_create is null");
+
+
+
+
+ sensor_value_items_create(this);
+ sensor_value_items_prepare(this);
+
+ evas_object_smart_callback_add(this->view->navi, "transition,finished", _sensor_view_transition_finished_cb, this);
return this;
}
static void _control_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static int _result_cb(int ret, void *data);
char* get_shortcut_error(int err);
+static shortcut_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->shortcut_label = ui_utils_label_add(this->view->layout, "");
+ elm_object_part_content_set(this->view->layout, "shortcut_text", this->shortcut_label);
+
+ this->cBox_label = ui_utils_label_add(this->view->layout, "Allow duplicate");
+ elm_object_part_content_set(this->view->layout, "shortcut_body", this->cBox_label);
+
+ this->cBox = elm_check_add(this->view->layout);
+ evas_object_resize(this->cBox, 20, 20);
+ elm_check_state_set(this->cBox, EINA_FALSE);
+ elm_object_text_set(this->cBox , "Allow duplicate");
+ elm_check_state_pointer_set(this->cBox, NULL);
+ elm_object_part_content_set(this->view->layout, "shortcut_body2", this->cBox);
+ this->state = elm_check_state_get(this->cBox);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function shortcut_view_add
RETVM_IF(NULL == navi, NULL, "navi is null");
- shortcut_view *this = NULL;
this = calloc(1, sizeof(shortcut_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->shortcut_label = ui_utils_label_add(this->view->layout, "");
- elm_object_part_content_set(this->view->layout, "shortcut_text", this->shortcut_label);
-
- this->cBox_label = ui_utils_label_add(this->view->layout, "Allow duplicate");
- elm_object_part_content_set(this->view->layout, "shortcut_body", this->cBox_label);
-
- this->cBox = elm_check_add(this->view->layout);
- evas_object_resize(this->cBox, 20, 20);
- elm_check_state_set(this->cBox, EINA_FALSE);
- elm_object_text_set(this->cBox , "Allow duplicate");
- elm_check_state_pointer_set(this->cBox, NULL);
- elm_object_part_content_set(this->view->layout, "shortcut_body2", this->cBox);
- this->state = elm_check_state_get(this->cBox);
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void signed_app_launch_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static void unsigned_app_launch_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static void app_control_view_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
-
+static smartcard_view *this = NULL;
static char* get_app_control_error(int ret)
{
return error;
}
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->label = ui_utils_label_add(this->view->layout, "");
+ RETVM_IF(!this->label, NULL, "elm_list_add failed");
+ ui_utils_label_set_text(this->label, "press button to launch app", "left");
+ elm_object_part_content_set(this->view->layout, "1txt", this->label);
+
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
smartcard_view *smartcard_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
DBG("smartcard_view_add");
RETVM_IF(NULL == navi, NULL, "navi is null");
- smartcard_view *this = NULL;
this = calloc(1, sizeof(smartcard_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->label = ui_utils_label_add(this->view->layout, "");
- RETVM_IF(!this->label, NULL, "elm_list_add failed");
- ui_utils_label_set_text(this->label, "press button to launch app", "left");
- elm_object_part_content_set(this->view->layout, "1txt", this->label);
-
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
void _sound_device_state_changed_cb(sound_device_h device, sound_device_state_e state, void *user_data);
static bool is_not_supported = false;
-
+static soundmanager_view *this = NULL;
/**
* @function get_soundmanager_error
* @since_tizen 3.0
return err_msg;
}
-
/**
- * @function soundmanager_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description soundmanager View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return soundmanager_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-soundmanager_view *soundmanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- soundmanager_view *this = NULL;
- this = calloc(1, sizeof(soundmanager_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
if(this->view->tbt_info->apptype == TBT_APP_SOUND_MANAGER)
{
elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
return this;
}
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function soundmanager_view_add
+ * @since_tizen 3.0
+ * @description soundmanager View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return soundmanager_view*
+ */
+soundmanager_view *soundmanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(soundmanager_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static bool was_playing;
static sound_view *view;
-
+static sound_view *this = NULL;
static Eina_Bool __progressbar_timer_cb(void *data)
{
}
}
-
/**
- * @function sound_view_add
- * @since_tizen 2.3
- * @description Sound View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return sound_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-sound_view *sound_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
- sound_view *this = NULL;
- int ret;
- this = calloc(1, sizeof(sound_view));
- RETVM_IF(!this, NULL, "calloc failed");
- view = this;
- _tbt_pause_resume_cb = _on_app_pause_resume_cb;
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "5_part_txt_cnt_cnt_btn_btn";
- tbt_info->layout_file = get_edje_path("5_part_txt_cnt1.5_cnt_btn_btn.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int ret;
this->is_feature_supported = true;
this->audio_icon = ui_utils_create_image(this->view->layout, get_resource_path("images/audio-icon.png"));
update_view_controls(this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function sound_view_add
+ * @since_tizen 2.3
+ * @description Sound View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return sound_view*
+ */
+sound_view *sound_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(sound_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ view = this;
+ _tbt_pause_resume_cb = _on_app_pause_resume_cb;
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "5_part_txt_cnt_cnt_btn_btn";
+ tbt_info->layout_file = get_edje_path("5_part_txt_cnt1.5_cnt_btn_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
}
#endif
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
/**
* @function stt_view_add
RETVM_IF(NULL == this->view, NULL, "navi is null");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
this->is_recognition_completed = false;
this->is_unprepared = false;
void _system_settings_motion_changed_cb(system_settings_key_e key, void *user_data);
void _system_settings_flight_mode_changed_cb(system_settings_key_e key, void *user_data);
void _system_settings_lock_state_changed_cb(system_settings_key_e key, void *user_data);
-
+static systemsettings_view *this = NULL;
/**
* @function get_system_settings_error
return err_msg;
}
-
/**
- * @function systemsettings_view_add
- * @since_tizen 2.3
- * @description System settings View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return systemsettings_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-systemsettings_view *systemsettings_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
int ret, value;
int timevalue = 0;
bool bvalue;
- systemsettings_view *this = NULL;
- this = calloc(1, sizeof(systemsettings_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "systemsettings_viewer";
- tbt_info->layout_file = get_edje_path("systemsettings_viewer.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_FONT)
{
ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_settings_font_size_changed_cb, this);
elm_object_part_content_set(this->view->layout, "info_text", this->create_label);
DBG("view complete: %d", value);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function systemsettings_view_add
+ * @since_tizen 2.3
+ * @description System settings View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return systemsettings_view*
+ */
+systemsettings_view *systemsettings_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(systemsettings_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "systemsettings_viewer";
+ tbt_info->layout_file = get_edje_path("systemsettings_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}
static void _mouse_up_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info);
static void _mouse_move_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info);
static void _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info);
+static touch_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ get_screen_resolution(this);
+
+ this->label = ui_utils_label_add(this->view->layout, "");
+ ui_utils_label_set_text(this->label, "Clear: ", "left");
+ elm_object_part_content_set(this->view->layout, "1txt", this->label);
+
+ Evas *evas;
+ evas = evas_object_evas_get(this->view->layout);
+ this->canvas = evas_object_rectangle_add(evas);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt", this->canvas);
+ evas_object_size_hint_weight_set(this->canvas, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(this->canvas, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_color_set(this->canvas, 255, 255, 255, 255);
+ evas_object_repeat_events_set(this->canvas, EINA_TRUE);
+ evas_object_show(this->canvas);
+
+ evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, this);
+ evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, this);
+ evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function touch_view_add
RETVM_IF(NULL == navi, NULL, "navi is null");
RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
- touch_view *this = NULL;
this = calloc(1, sizeof(touch_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "navi is null");
- get_screen_resolution(this);
-
- this->label = ui_utils_label_add(this->view->layout, "");
- ui_utils_label_set_text(this->label, "Clear: ", "left");
- elm_object_part_content_set(this->view->layout, "1txt", this->label);
-
- Evas *evas;
- evas = evas_object_evas_get(this->view->layout);
- this->canvas = evas_object_rectangle_add(evas);
- elm_object_part_content_set(this->view->layout, "1txt_2cnt", this->canvas);
- evas_object_size_hint_weight_set(this->canvas, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(this->canvas, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_color_set(this->canvas, 255, 255, 255, 255);
- evas_object_repeat_events_set(this->canvas, EINA_TRUE);
- evas_object_show(this->canvas);
-
- evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, this);
- evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, this);
- evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static bool _tts_supported_voice_cb(tts_h tts, const char* language, int voice_type, void* user_data);
static char* get_tts_state_str(tts_state_e state);
static void _tts_utterance_completed_cb(tts_h tts, int utt_id, void *user_data);
-
+static tts_view *this = NULL;
/**
- * @function tts_view_add
- * @since_tizen 2.3
- * @description Gps View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return tts_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-tts_view *tts_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- tts_view *this = NULL;
- this = calloc(1, sizeof(tts_view));
- RETVM_IF(!this, NULL, "calloc failed");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "tts_viewer";
- tbt_info->layout_file = get_edje_path("tts_viewer.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->is_utterance_completed = false;
this->is_tts_btn_pressed = false;
elm_table_pack(table, this->btn_tts, 0, 0, 1, 1);
elm_object_part_content_set(this->view->layout, "btn_part", table);
elm_object_text_set(this->btn_tts, ui_utils_text_add("Text to Speech", NULL));
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+/**
+ * @function tts_view_add
+ * @since_tizen 2.3
+ * @description Gps View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return tts_view*
+ */
+tts_view *tts_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ this = calloc(1, sizeof(tts_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "tts_viewer";
+ tbt_info->layout_file = get_edje_path("tts_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _app_destroy_cb(void* this);
static Eina_Bool _ui_view_timer_cb(void *data);
-
+static ui_view *this = NULL;
/**
- * @function ui_view_add
- * @since_tizen 2.3
- * @description Ui View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return ui_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-ui_view *ui_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
- ui_view *this = NULL;
- this = calloc(1, sizeof(ui_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "2_part_cnt_btn";
- tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
-
- common_view* view = common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!view, NULL, "common_view_add failed");
+ RETM_IF(NULL == data, "data is null");
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->x = 0;
this->y = 0;
}
this->timer = ecore_timer_add(1, _ui_view_timer_cb, this);
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function ui_view_add
+ * @since_tizen 2.3
+ * @description Ui View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return ui_view*
+ */
+ui_view *ui_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
+
+ this = calloc(1, sizeof(ui_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view* view = common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!view, NULL, "common_view_add failed");
+
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _view_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
static void app_control_view_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
static char* get_app_control_error(app_control_error_e err_code);
+static widget_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->label = ui_utils_label_add(this->view->layout, "");
+ RETVM_IF(!this->label, NULL, "elm_list_add failed");
+ ui_utils_label_set_text(this->label, "Widget View Data: ", "left");
+ elm_object_part_content_set(this->view->layout, "widget_text", this->label);
+
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+ elm_object_text_set(this->single_btn, ui_utils_text_add("Launch Widget", NULL));
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function widget_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- widget_view *this = NULL;
this = calloc(1, sizeof(widget_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->label = ui_utils_label_add(this->view->layout, "");
- RETVM_IF(!this->label, NULL, "elm_list_add failed");
- ui_utils_label_set_text(this->label, "Widget View Data: ", "left");
- elm_object_part_content_set(this->view->layout, "widget_text", this->label);
-
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
- elm_object_text_set(this->single_btn, ui_utils_text_add("Launch Widget", NULL));
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _wifi_activated_cb(wifi_error_e result, void *data);
static void _wifi_deactivated_cb(wifi_error_e result, void *data);
static void _wifi_button_pressed_cb(void *data, Evas_Object *obj, void *event_info);
+static wifi_view *this = NULL;
+/**
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
+ */
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
+{
+ RETM_IF(NULL == data, "data is null");
+
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->wifi_label = ui_utils_label_add(this->view->layout, "");
+ ui_utils_label_set_text(this->wifi_label, "Wifi is switched On", "left");
+ elm_object_part_content_set(this->view->layout, "wifi_text", this->wifi_label);
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+ elm_object_text_set(this->capture_btn, ui_utils_text_add("Wifi Off", NULL));
+
+ int result;
+ bool is_activated= false;
+ result = wifi_initialize();
+ RETVM_IF(result != WIFI_ERROR_NONE, NULL, "wifi_initialize fail > Error = %s", get_wifi_error(result));
+
+ result = wifi_is_activated(&is_activated);
+ RETVM_IF(result != WIFI_ERROR_NONE, NULL, "wifi_is_activated fail > Error = %s", get_wifi_error(result));
+ if(!is_activated)
+ {
+ elm_object_text_set(this->capture_btn, ui_utils_text_add("Wifi On", NULL));
+ ui_utils_label_set_text(this->wifi_label, "Wifi is switched Off ", "left");
+ }
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
/**
* @function wifi_view_add
RETVM_IF(NULL == navi, NULL, "navi is null");
RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
- wifi_view *this = NULL;
this = calloc(1, sizeof(wifi_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->wifi_label = ui_utils_label_add(this->view->layout, "");
- ui_utils_label_set_text(this->wifi_label, "Wifi is switched On", "left");
- elm_object_part_content_set(this->view->layout, "wifi_text", this->wifi_label);
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
- elm_object_text_set(this->capture_btn, ui_utils_text_add("Wifi Off", NULL));
-
- int result;
- bool is_activated= false;
- result = wifi_initialize();
- RETVM_IF(result != WIFI_ERROR_NONE, NULL, "wifi_initialize fail > Error = %s", get_wifi_error(result));
-
- result = wifi_is_activated(&is_activated);
- RETVM_IF(result != WIFI_ERROR_NONE, NULL, "wifi_is_activated fail > Error = %s", get_wifi_error(result));
- if(!is_activated)
- {
- elm_object_text_set(this->capture_btn, ui_utils_text_add("Wifi On", NULL));
- ui_utils_label_set_text(this->wifi_label, "Wifi is switched Off ", "left");
- }
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
static void _app_destroy_cb(void* this);
static char* get_wifi_direct_error(wifi_direct_error_e err_code);
-
+static wifidirect_info_view *this = NULL;
/**
- * @function _wifidirect_info_view_add
- * @since_tizen 2.3
- * @description Wifidirect Info View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return wifidirect_info_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-wifidirect_info_view *_wifidirect_info_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- int result = 0;
- bool is_persistence_group_enabled;
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
-
- wifidirect_info_view *this = NULL;
- this = calloc(1, sizeof(wifidirect_info_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "wifidirect_viewer";
- tbt_info->layout_file = get_edje_path("wifidirect_info_viewer.edj");
+ RETM_IF(NULL == data, "data is null");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ int result = 0;
+ bool is_persistence_group_enabled;
this->mac_address = NULL;
this->ip_address = NULL;
this->subnet_mask = NULL;
elm_object_part_text_set(this->view->layout, "info7", str);
SAFE_DELETE(str);
}
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function _wifidirect_info_view_add
+ * @since_tizen 2.3
+ * @description Wifidirect Info View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return wifidirect_info_view*
+ */
+wifidirect_info_view *_wifidirect_info_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
+
+ this = calloc(1, sizeof(wifidirect_info_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "wifidirect_viewer";
+ tbt_info->layout_file = get_edje_path("wifidirect_info_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
return this;
}
Evas_Object* wifi_direct_check_button_add(Evas_Object *parent, Evas_Smart_Cb func, void *user_data);
void wifi_direct_check_button_changed_cb(void *data, Evas_Object *obj, void *event_info);
static int result;
-
+static wifidirect_view *this = NULL;
static char* get_wifi_error(wifi_error_e err_code)
{
}
-
-
/**
- * @function wifidirect_view_add
- * @since_tizen 2.3
- * @description Wifidirect View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return wifidirect_view*
+ * @function guide_pop_up_button_callback
+ * @since_tizen 3.0
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-wifidirect_view *wifidirect_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+static void guide_pop_up_button_callback(void *data, Evas_Object *obj, void *event_info)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
- RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
-
- wifidirect_view *this = NULL;
- this = calloc(1, sizeof(wifidirect_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "wifidirect_viewer";
- tbt_info->layout_file = get_edje_path("wifidirect_viewer.edj");
+ RETM_IF(NULL == data, "data is null");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(!this, NULL, "calloc failed");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
this->devices_list = NULL;
this->mac_address = NULL;
this->ip_address = NULL;
return initilize_wifi_direct(this);
}
+}
+
+/**
+ * @function ui_utils_guide_instruction_popup_button
+ * @since_tizen 3.0
+ * @description Pop up Manual Instruction Button
+ * @parameter common_view*: Common View Pointer, const char* txtMessage: Instruction Message to render
+ * @return static void
+ */
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction);
+ RETM_IF(NULL == popup,"popup is NULL");
+
+ ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup);
+}
+
+/**
+ * @function wifidirect_view_add
+ * @since_tizen 2.3
+ * @description Wifidirect View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return wifidirect_view*
+ */
+wifidirect_view *wifidirect_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ RETVM_IF(NULL == tbt_info, NULL, "tbt_info is null");
+
+ this = calloc(1, sizeof(wifidirect_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "wifidirect_viewer";
+ tbt_info->layout_file = get_edje_path("wifidirect_viewer.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", this->view->tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(this->view->navi, instrcuction );
+
return this;
}