.parent = "Package Manager Status",
.apptype = TBT_APP_PACKAGE_MANAGER,
.icon_name = "dummy",
- .info = "1.Uninstall package from Application manager<br/>"
- "2. install package in device from sdb shell<br/> "
- "3.Update is re-install same package on the device",
+ .info = "To install sample package please follow steps:<br/>"
+ "1.sdb shell<br/>"
+ "2.cd /home/owner/apps_rw/org.tizen.tbtcoreapp/res/package<br/>"
+ "Run command pkgcmd -iqt tpk -p native-testapp-itc-1.0.0-arm.tpk in sdb shell <br/>"
+ "<b>Note:While installation you can see in package status that package status and state changes</b>"
+ "Uninstall package from Application manager<br/>",
.result = 0
},
#endif
static void _app_destroy_cb(void* this);
static Eina_Bool _animation_view_timer_cb(void *data);
+static animation_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);
+
+ create_transit_button(this);
+
+ if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_FADE)
+ {
+ elm_transit_go(create_transit(this->button_lefttop, EINA_TRUE, EINA_TRUE));
+ elm_transit_go(create_transit(this->button_rightbottom, EINA_TRUE, EINA_TRUE));
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_POINT)
+ {
+ transit_point_animation(this);
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_DIMENSION)
+ {
+ transit_dimension_animation(this);
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_RECT)
+ {
+ transit_rect_animation(this);
+ }
+ else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_ROTATE)
+ {
+ transit_rotation_animation(this);
+ }
+
+ this->timer = ecore_timer_add(5, _animation_view_timer_cb, this);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function animation_view_add
{
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");
}
#endif
-
- get_screen_resolution(this);
-
- create_transit_button(this);
-
- if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_FADE)
- {
- elm_transit_go(create_transit(this->button_lefttop, EINA_TRUE, EINA_TRUE));
- elm_transit_go(create_transit(this->button_rightbottom, EINA_TRUE, EINA_TRUE));
- }
- else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_POINT)
- {
- transit_point_animation(this);
- }
- else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_DIMENSION)
- {
- transit_dimension_animation(this);
- }
- else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_RECT)
- {
- transit_rect_animation(this);
- }
- else if(this->view->tbt_info->apptype == TBT_APP_ANIMATION_ROTATE)
- {
- transit_rotation_animation(this);
- }
-
- this->timer = ecore_timer_add(5, _animation_view_timer_cb, this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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);
+ }
+ create_main_view(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function attachpanel_view_add
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");
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- this->attach_panel = NULL;
+ this->attach_panel = NULL;
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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)
{
evas_object_smart_callback_add(parent, "unfocused", win_focus_out_cb, NULL);
}
-autofill_view *autofill_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+/**
+ * @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)
{
- RETVM_IF(NULL == navi, NULL, "navi is null");
-
- autofill_view *this = NULL;
- this = calloc(1, sizeof(autofill_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 = "autofill_viewer";
- tbt_info->layout_file = get_edje_path("autofill_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(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
add_control_layout(this, this->view->layout);
int ret;
DBG("Succeeded to connect");
else
DBG("Failed to connect. error code: 0x%X, error message: '%s'", ret, get_error_message(ret));
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+autofill_view *autofill_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(autofill_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 = "autofill_viewer";
+ tbt_info->layout_file = get_edje_path("autofill_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
return ret;
}
+static bluetooth_view *this = NULL;
/**
- * @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, "bluetooth_text", this->create_label);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void _bt_hdp_data_received_cb(unsigned int channel, const char *data, unsigned int size, void *user_data);
static void _on_app_pause_resume_cb(bool resume);
-
-
+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");
-
- _tbt_pause_resume_cb = _on_app_pause_resume_cb;
-
- 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;
- this->is_set_visible = false;
+ RETM_IF(NULL == data, "data is null");
- #ifdef DEVICE_TYPE_WEARABLE
- if(get_device_type() == DEVICE_WEARABLE_320_X_320)
- {
- elm_theme_overlay_add(NULL, get_edje_path("custom_button.edj"));
- }
- #endif
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- if(tbt_info->apptype == TBT_APP_BT_CLIENT_PAIRED || tbt_info->apptype == TBT_APP_BT_OPP_CLIENT)
+ if(event_info)
{
- tbt_info->layout_group = "bluetooth_viewer_cancel_check";
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
}
- else
- {
- tbt_info->layout_group = "bluetooth_viewer";
- }
- tbt_info->layout_file = get_edje_path("bluetooth_viewer.edj");
-
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "view is null");
-
- this->bluetooth_label = ui_utils_label_add(this->view->layout, "Bluetooth");
+ int result;
+ this->bluetooth_label = ui_utils_label_add(this->view->layout, "Bluetooth");
elm_object_part_content_set(this->view->layout, "bluetooth_text", this->bluetooth_label);
this->bluetooth_list = elm_list_add(this->view->layout);
evas_object_data_set(this->bluetooth_list, "bluetooth_view", this);
elm_object_part_content_set(this->view->layout, "bluetooth_list", this->bluetooth_list);
- if(strcmp(tbt_info->layout_group, "bluetooth_viewer_cancel_check") == 0)
+ if(strcmp(this->view->tbt_info->layout_group, "bluetooth_viewer_cancel_check") == 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);
update_view_controls(this);
view = this;
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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");
+
+ _tbt_pause_resume_cb = _on_app_pause_resume_cb;
+
+ 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;
+ this->is_set_visible = false;
+
+ #ifdef DEVICE_TYPE_WEARABLE
+ if(get_device_type() == DEVICE_WEARABLE_320_X_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 = "bluetooth_viewer_cancel_check";
+ }
+ else
+ {
+ tbt_info->layout_group = "bluetooth_viewer";
+ }
+ tbt_info->layout_file = get_edje_path("bluetooth_viewer.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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
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);
+ }
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
/**
* @function bluetoothle_view_add
* @since_tizen 2.3
{
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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void _camera_face_detected_cb(camera_detected_face_s *faces, int count, void *user_data);
char* get_camera_error(int error_code);
char* get_recorder_error(int error_code);
-
+static camera_view *this = NULL;
/**
- * @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)
+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");
+ RETM_IF(NULL == data, "data is null");
- camera_view *this = NULL;
- this = calloc(1, sizeof(camera_view));
- RETVM_IF(NULL == this, NULL, "calloc failed");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- this->camera = NULL;
- this->player = NULL;
- this->recorder = NULL;
- this->file_path = NULL;
- this->recording = 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_X_320 || (get_device_type() == DEVICE_WEARABLE_CIRCLE))
- {
- 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 = "camera_viewer";
- tbt_info->layout_file = get_edje_path("camera_viewer.edj");
- }
- else if (tbt_info->apptype == TBT_APP_CAMERA_FACE_DETECT)
- {
- tbt_info->layout_group = "camera_face";
- tbt_info->layout_file = get_edje_path("camera_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");
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
evas_object_size_hint_weight_set(this->view->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(this->view->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
update_view_controls(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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)
+{
+ 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->camera = NULL;
+ this->player = NULL;
+ this->recorder = NULL;
+ this->file_path = NULL;
+ this->recording = 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_X_320 || (get_device_type() == DEVICE_WEARABLE_CIRCLE))
+ {
+ 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 = "camera_viewer";
+ tbt_info->layout_file = get_edje_path("camera_viewer.edj");
+ }
+ else if (tbt_info->apptype == TBT_APP_CAMERA_FACE_DETECT)
+ {
+ tbt_info->layout_group = "camera_face";
+ tbt_info->layout_file = get_edje_path("camera_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
static void update(cbhm_view *this);
static void _app_destroy_cb(void* this);
+static cbhm_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 nRet;
+ char msg[100];
+ nRet = cbhm_open_service(&(this->cbhm_handle));
+ RETVM_IF_CLEANUP(nRet != CBHM_ERROR_NONE, NULL, "cbhm_open_service failed", SAFE_DELETE(this->view); SAFE_DELETE(this));
+ RETVM_IF_CLEANUP(this->cbhm_handle == NULL, NULL, "cbhm_handle is NULL", SAFE_DELETE(this->view); SAFE_DELETE(this));
+
+ this->apptype = this->view->tbt_info->apptype;
+ this->lat_label = ui_utils_label_add(this->view->layout, "???");
+ this->lon_label = ui_utils_label_add(this->view->layout, "???");
+
+ elm_label_line_wrap_set(this->lat_label, ELM_WRAP_CHAR);
+ elm_label_line_wrap_set(this->lat_label, ELM_WRAP_CHAR);
+
+ ui_utils_label_set_text(this->lat_label, "", "left");
+ ui_utils_label_set_text(this->lon_label, "", "left");
+
+ elm_object_part_content_set(this->view->layout, "_title",
+ this->lat_label);
+ elm_object_part_content_set(this->view->layout, "_callback",
+ this->lon_label);
+
+ Evas_Object *table = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part",
+ table);
+
+
+ if(this->apptype == TBT_APP_CBHM_CHANGE_CALLBACK || this->apptype == TBT_APP_CBHM_COUNT_GET || this->apptype == TBT_APP_CBHM_SELECTION_GET)
+ {
+ //Create an editfield
+ this->editfield = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "Trial Text");
+ elm_entry_input_panel_language_set(this->editfield, ELM_INPUT_PANEL_LANG_AUTOMATIC);
+ snprintf(msg, sizeof(msg), "Editor - Please click and type here");
+ elm_object_part_text_set(this->editfield, PART_ENTRY_GUIDE, msg);
+ elm_object_part_content_set(this->view->layout, "_edittext", this->editfield);
+ }
+ __is_cbhm_test_running = true;
+ this->callbackAdded = false;
+ this->monitorAdded = false;
+ update(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function get_selection_type
RETVM_IF(NULL == navi, NULL, "navi is null");
- int nRet;
- char msg[100];
- cbhm_view *this = NULL;
-
this = calloc(1, sizeof(cbhm_view));
RETVM_IF(!this, NULL, "calloc failed");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- nRet = cbhm_open_service(&(this->cbhm_handle));
- RETVM_IF_CLEANUP(nRet != CBHM_ERROR_NONE, NULL, "cbhm_open_service failed", SAFE_DELETE(this->view); SAFE_DELETE(this));
- RETVM_IF_CLEANUP(this->cbhm_handle == NULL, NULL, "cbhm_handle is NULL", SAFE_DELETE(this->view); SAFE_DELETE(this));
-
- this->apptype = tbt_info->apptype;
- this->lat_label = ui_utils_label_add(this->view->layout, "???");
- this->lon_label = ui_utils_label_add(this->view->layout, "???");
-
- elm_label_line_wrap_set(this->lat_label, ELM_WRAP_CHAR);
- elm_label_line_wrap_set(this->lat_label, ELM_WRAP_CHAR);
-
- ui_utils_label_set_text(this->lat_label, "", "left");
- ui_utils_label_set_text(this->lon_label, "", "left");
-
- elm_object_part_content_set(this->view->layout, "_title",
- this->lat_label);
- elm_object_part_content_set(this->view->layout, "_callback",
- this->lon_label);
-
- Evas_Object *table = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part",
- table);
-
-
- if(this->apptype == TBT_APP_CBHM_CHANGE_CALLBACK || this->apptype == TBT_APP_CBHM_COUNT_GET || this->apptype == TBT_APP_CBHM_SELECTION_GET)
- {
- //Create an editfield
- this->editfield = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "Trial Text");
- elm_entry_input_panel_language_set(this->editfield, ELM_INPUT_PANEL_LANG_AUTOMATIC);
- snprintf(msg, sizeof(msg), "Editor - Please click and type here");
- elm_object_part_text_set(this->editfield, PART_ENTRY_GUIDE, msg);
- elm_object_part_content_set(this->view->layout, "_edittext", this->editfield);
- }
- __is_cbhm_test_running = true;
- this->callbackAdded = false;
- this->monitorAdded = false;
- update(this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
#ifdef DEVICE_TYPE_MOBILE
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 );
update_view_controls(view);
return 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");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "connection_viewer";
- tbt_info->layout_file = get_edje_path("connection_viewer.edj");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- 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");
+ 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, "");
+ this->connection_label = ui_utils_label_add(this->view->layout, "");
elm_label_line_wrap_set(this->connection_label, ELM_WRAP_WORD);
int result;
connection_profile_h profile_h = NULL;
//ui_utils_guide_instruction_popup_button(navi, "1.Please Change connection status to flight mode or some other mode<br/>2.Please press back button and again open connection view<br/>3.You will see updated connection status<br/><b>Note:You can also refer info section</b>");
-
+
result = connection_create(&g_hConenctionHandle);
RETVM_IF(result != CONNECTION_ERROR_NONE && result!= CONNECTION_ERROR_NOT_SUPPORTED, NULL, "connection_create fail > Error = %s", get_connection_error(result));
break;
}
}
-
-
if ( eConnectionProfileType == CONNECTION_PROFILE_TYPE_CELLULAR )
{
connection_cellular_state_e eFindCellularState = -1;
default:
ui_utils_label_set_text(this->connection_label, "Unknown status", "left");
break;
-
}
}
else
ui_utils_label_set_text(this->connection_label, "Profile is not cellular type", "left");
}
}
-
else
{
ui_utils_label_set_text(this->connection_label, "Connection is not created", "left");
}
elm_object_part_content_set(this->view->layout, "connection_view", this->connection_label);
- return this;
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "connection_viewer";
+ tbt_info->layout_file = get_edje_path("connection_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- 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;
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>");
ui_utils_label_set_text(this->info_label, resultc, "left");
elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
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->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);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function datacontrol_view_add
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- 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);
-
- 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
if(this->view->tbt_info->apptype == TBT_APP_DC_INSERT ||
this->view->tbt_info->apptype == TBT_APP_DC_DELETE ||
{
data_consumer_map_create(this);
}
-
return this;
}
};
static void _app_destroy_cb(void* this);
+static display_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->width_label = ui_utils_label_add(this->view->layout, "Width: ");
+ this->height_label = ui_utils_label_add(this->view->layout, "Height: ");
+
+ char buf[MAX_LENGTH] = {'\0'};
+ snprintf(buf, MAX_LENGTH, "Screen Width: %d", this->width);
+ ui_utils_label_set_text(this->width_label, buf, "left");
+ snprintf(buf, MAX_LENGTH, "Screen Height: %d", this->height);
+ ui_utils_label_set_text(this->height_label, buf, "left");
+
+ elm_object_part_content_set(this->view->layout, "width_text", this->width_label);
+ elm_object_part_content_set(this->view->layout, "height_text", this->height_label);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function display_view_add
{
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));
tbt_info->layout_file = get_edje_path("display_viewer.edj");
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
RETVM_IF(NULL == this->view, NULL, "navi is null");
- int res;
+ 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");
res = system_info_get_platform_int("tizen.org/feature/screen.height", &this->height);
RETVM_IF(res != 0, NULL, "tizen.org/feature/screen.height");
- this->width_label = ui_utils_label_add(this->view->layout, "Width: ");
- this->height_label = ui_utils_label_add(this->view->layout, "Height: ");
-
-
- char buf[MAX_LENGTH] = {'\0'};
- snprintf(buf, MAX_LENGTH, "Screen Width: %d", this->width);
- ui_utils_label_set_text(this->width_label, buf, "left");
- snprintf(buf, MAX_LENGTH, "Screen Height: %d", this->height);
- ui_utils_label_set_text(this->height_label, buf, "left");
-
-
- elm_object_part_content_set(this->view->layout, "width_text", this->width_label);
- elm_object_part_content_set(this->view->layout, "height_text", this->height_label);
-
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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");
-
- tbt_info->layout_group = "efl_test";
- tbt_info->layout_file = get_edje_path("efl_callback_viewer.edj");
+ RETM_IF(NULL == data, "data is null");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- 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);
+ }
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);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "efl_test";
+ tbt_info->layout_file = get_edje_path("efl_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void _app_suspended_state_changed_cb(app_event_info_h event_info, void *user_data);
static void _app_destroy_cb(void* this);
-
+static event_view *this = NULL;
/**
* @function _app_language_event_cb
#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");
+ RETM_IF(NULL == data, "data 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");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- tbt_info->layout_group = "event_viewer";
- tbt_info->layout_file = get_edje_path("event_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(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;
result = ui_app_add_event_handler(&this->language_handler, APP_EVENT_LANGUAGE_CHANGED, _app_language_event_cb, this);
RETVM_IF(result != APP_ERROR_NONE, false, "service_app_add_event_handler(language_handler) fail > Error = %d", result);
-
result = ui_app_add_event_handler(&this->suspended_state_handler, APP_EVENT_SUSPENDED_STATE_CHANGED, _app_suspended_state_changed_cb, this);
RETVM_IF(result != APP_ERROR_NONE, false, "_app_suspended_state_changed_cb(suspended_state_handler) fail > Error = %d", result);
ui_utils_label_set_text(this->low_memory_label, "Low Memory: ", "left");
elm_object_part_content_set(this->view->layout, "low_memory_text", this->low_memory_label);
#endif
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "event_viewer";
+ tbt_info->layout_file = get_edje_path("event_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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;
+/**
+ * @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, "feature_view", this->list);
+
+ feature_summary_list_prepare(this);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function feature_view_add
{
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");
- 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, "feature_view", this->list);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
- feature_summary_list_prepare(this);
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");
+ RETM_IF(NULL == data, "data 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");
-
- tbt_info->layout_group = "gps_viewer";
- tbt_info->layout_file = get_edje_path("gps_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 = 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, "lat_text", this->lat_label);
elm_object_part_content_set(this->view->layout, "lon_text", this->lon_label);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "gps_viewer";
+ tbt_info->layout_file = get_edje_path("gps_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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, "graphics_view", this->gl_layout);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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));
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
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, "graphics_view", this->gl_layout);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
};
static void _app_destroy_cb(void* this);
+int x,y,w,h;
+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);
+ }
+ 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);
+
+ //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);
+
+ 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, "image_view", this->image);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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);
-
- //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);
-
- 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, "image_view", this->image);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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("ime_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);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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("ime_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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 = "input_viewer";
- tbt_info->layout_file = get_edje_path("input_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);
+ }
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, "");
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");
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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");
+
+ // input_view *this = 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 = "input_viewer";
+ tbt_info->layout_file = get_edje_path("input_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
static char *_gl_text_get_cb(void *data, Evas_Object *obj, const char *part);
Elm_Object_Item* _iotcon_elm_genlist_item_append(Evas_Object* list, char *item_text, Evas_Smart_Cb func, void* data);
#endif
-
+static iotcon_view *this = NULL;
#ifdef USE_GENLIST
static void _gl_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
{
}
#endif
-
/**
- * @function iotcon_view_add
+ * @function guide_pop_up_button_callback
* @since_tizen 3.0
- * @description IoTcon View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return iotcon_view*
+ * @description Callback for OK press by user
+ * @parameter void *data, Evas_Object *obj, void *event_info
+ * @return void
*/
-iotcon_view *iotcon_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");
-
- iotcon_view *this = NULL;
- this = calloc(1, sizeof(iotcon_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 = "iotcon_viewer";
- tbt_info->layout_file = get_edje_path("iotcon_viewer.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);
+ }
this->iotcon_label = ui_utils_label_add(this->view->layout, "");
ui_utils_label_set_text(this->iotcon_label, "", "left");
elm_object_part_content_set(this->view->layout, "iotcon_text", this->iotcon_label);
}
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @function iotcon_view_add
+ * @since_tizen 3.0
+ * @description IoTcon View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return iotcon_view*
+ */
+iotcon_view *iotcon_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(iotcon_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 = "iotcon_viewer";
+ tbt_info->layout_file = get_edje_path("iotcon_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void _on_app_pause_resume_cb(bool resume);
static bool was_playing;
static local_view *view;
-
+static local_view *this = NULL;
/**
* @function get_system_error
}
-
/**
- * @function local_view_add
- * @since_tizen 2.3
- * @description Local View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return local_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
*/
-local_view *local_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");
- local_view *this = NULL;
-
- _tbt_pause_resume_cb = _on_app_pause_resume_cb;
- _tbt_app_terminate_cb = _app_destroy_cb;
- this = calloc(1, sizeof(local_view));
- RETVM_IF(!this, NULL, "calloc failed");
-
- view = this;
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "video_player";
- tbt_info->layout_file = get_edje_path("video_player.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);
+ }
#ifdef DEVICE_TYPE_WEARABLE
if(get_device_type() == DEVICE_WEARABLE_320_X_320 || (get_device_type() == DEVICE_WEARABLE_CIRCLE))
{
update_view_controls(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @function local_view_add
+ * @since_tizen 2.3
+ * @description Local View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return local_view*
+ */
+local_view *local_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ _tbt_pause_resume_cb = _on_app_pause_resume_cb;
+ _tbt_app_terminate_cb = _app_destroy_cb;
+ this = calloc(1, sizeof(local_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ view = this;
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "video_player";
+ tbt_info->layout_file = get_edje_path("video_player.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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
+
return this;
}
return err_msg;
}
+static mediakey_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 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, "Media Key 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, "Media Key Type[Press audiojack key]");
+ elm_label_line_wrap_set(this->mediakey2_label, ELM_WRAP_WORD);
+
+ elm_object_part_content_set(this->view->layout, "media_text", this->mediakey_label);
+ elm_object_part_content_set(this->view->layout, "media_key", this->mediakey2_label);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
/**
* @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");
RETVM_IF(NULL == this->view, NULL, "navi is null");
//ui_utils_guide_instruction_popup_button(navi, "1.Please Insert Audio Jack with media key button<br/>2.Press that key and you can see media key status changes<br/><b>Note:You can also refer info section</b>");
-
- 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, "Media Key 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, "Media Key Type[Press audiojack key]");
- elm_label_line_wrap_set(this->mediakey2_label, ELM_WRAP_WORD);
-
- elm_object_part_content_set(this->view->layout, "media_text", this->mediakey_label);
- elm_object_part_content_set(this->view->layout, "media_key", this->mediakey2_label);
-
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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 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->is_mock_event = false;
+ 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_object_evas_get(this->view->layout);
+ this->canvas = evas_object_rectangle_add(evas);
+ this->evas = evas_object_evas_get(this->canvas);
+
+ 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_data_set(this->canvas, "mock_view", this);
+
+ evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, NULL);
+ evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL);
+ evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, NULL);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function mock_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- mock_view *this = NULL;
this = calloc(1, sizeof(mock_view));
RETVM_IF(!this, NULL, "calloc failed");
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->is_mock_event = false;
- 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_object_evas_get(this->view->layout);
- this->canvas = evas_object_rectangle_add(evas);
- this->evas = evas_object_evas_get(this->canvas);
-
- 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_data_set(this->canvas, "mock_view", this);
-
- evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, NULL);
- evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL);
- evas_object_event_callback_add(this->canvas, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, NULL);
-
- 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
#include "view/tbt-motion-detection-view.h"
#include "view/tbt-common-view.h"
+static motion_detection_view *this = NULL;
+int x,y,w,h;
enum
{
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);
+/**
+ * @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->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);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function motion_detection_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int x,y,w,h;
+ // 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;
+ // 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);
-
- 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);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
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);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void _app_destroy_cb(void* this);
static void multiclass_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);
-
+multiclass_view *this = NULL;
static char* get_app_control_error(int ret)
{
char* error = NULL;
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, "ui_utils_label_add failed");
+ ui_utils_label_set_text(this->label, "press button to launch app", "left");
+ elm_object_part_content_set(this->view->layout, "multiclass_text", this->label);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
multiclass_view *multiclass_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- multiclass_view *this = NULL;
this = calloc(1, sizeof(multiclass_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, "ui_utils_label_add failed");
- ui_utils_label_set_text(this->label, "press button to launch app", "left");
- elm_object_part_content_set(this->view->layout, "multiclass_text", this->label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", 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);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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);
-
- 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
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 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);
+ }
+ Evas_Object *tabbar;
+ Elm_Object_Item *nf_it;
+ Evas_Object *nf = this->view->navi;
+
+ nf_it = elm_naviframe_top_item_get(nf);
+ elm_naviframe_item_style_set(nf_it, "tabbar");
+
+
+ #ifdef DEVICE_TYPE_MOBILE
+ tabbar = create_2_text_with_title_tabbar(nf, this);
+ elm_object_item_part_content_set(nf_it, "tabbar", tabbar);
+ #else
+ tabbar = wearable_create_2_text_with_title_tabbar(nf, this);
+ #endif
+
+
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ is_tab_1_clicked = true;
+ this->nfc_label = ui_utils_label_add(this->view->layout, "NFC Read");
+ elm_object_part_content_set(this->view->layout, "nfc_text", this->nfc_label);
+
+ this->nfc_list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->nfc_list, NULL, "elm_list_add failed");
+ evas_object_data_set(this->nfc_list, "nfc_view", this);
+ elm_object_part_content_set(this->view->layout, "nfc_list", this->nfc_list);
+
+ initialize_nfc(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function nfc_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- nfc_view *this = NULL;
this = calloc(1, sizeof(nfc_view));
RETVM_IF(!this, NULL, "calloc failed");
if(tbt_info->apptype == TBT_APP_NFC_TAG)
{
- ui_utils_guide_instruction_popup_button(navi, "1. Please Touch NFC Tag with Phone it shows nfc attach<br/>2.Now remove phone from the nfc tag it shows nfc detach<b>Note:You can also refer info section</b><br/>");
+ // ui_utils_guide_instruction_popup_button(navi, "1. Please Touch NFC Tag with Phone it shows nfc attach<br/>2.Now remove phone from the nfc tag it shows nfc detach<b>Note:You can also refer info section</b><br/>");
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)
{
- ui_utils_guide_instruction_popup_button(navi, "1. Please Touch One phone with other Phone it shows nfc attach<br/>2.Now remove phone from each other it shows nfc detach<b>Note:You can also refer info section</b><br/>");
+ // ui_utils_guide_instruction_popup_button(navi, "1. Please Touch One phone with other Phone it shows nfc attach<br/>2.Now remove phone from each other it shows nfc detach<b>Note:You can also refer info section</b><br/>");
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");
- Evas_Object *tabbar;
- Elm_Object_Item *nf_it;
- Evas_Object *nf = this->view->navi;
-
- nf_it = elm_naviframe_top_item_get(nf);
- elm_naviframe_item_style_set(nf_it, "tabbar");
-
-
- #ifdef DEVICE_TYPE_MOBILE
- tabbar = create_2_text_with_title_tabbar(nf, this);
- elm_object_item_part_content_set(nf_it, "tabbar", tabbar);
- #else
- tabbar = wearable_create_2_text_with_title_tabbar(nf, this);
- #endif
-
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- is_tab_1_clicked = true;
- this->nfc_label = ui_utils_label_add(this->view->layout, "NFC Read");
- elm_object_part_content_set(this->view->layout, "nfc_text", this->nfc_label);
-
- this->nfc_list = elm_list_add(this->view->layout);
- RETVM_IF(!this->nfc_list, NULL, "elm_list_add failed");
- evas_object_data_set(this->nfc_list, "nfc_view", this);
- elm_object_part_content_set(this->view->layout, "nfc_list", this->nfc_list);
-
-
- initialize_nfc(this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void _app_destroy_cb(void* this);
notification_h g_NotificationHandle;
+static notification_view *this = NULL;
/**
* @function get_notification_error
}
/**
- * @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");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "notification_viewer";
- tbt_info->layout_file = get_edje_path("notification_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;
g_NotificationHandle = notification_create(NOTIFICATION_TYPE_NOTI);
if(this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_TITLE)
return this;
}
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "notification_viewer";
+ tbt_info->layout_file = get_edje_path("notification_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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;
/**
- * @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");
+ RETM_IF(NULL == data, "data 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 = "nsd_dnssd_viewer";
- tbt_info->layout_file = get_edje_path("nsd_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->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);
dns_sd_api(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "nsd_dnssd_viewer";
+ tbt_info->layout_file = get_edje_path("nsd_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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 = "nsd_ssdp_viewer";
- tbt_info->layout_file = get_edje_path("nsd_viewer.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);
+ }
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);
evas_object_show(this->info_list);
ssdp_api(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "nsd_ssdp_viewer";
+ tbt_info->layout_file = get_edje_path("nsd_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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;
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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");
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");
-
- 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
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 void _oauth2_auth_grant_cb(oauth2_response_h response, void *user_data);
-
+static oauth2_view *this = NULL;
/**
- * @function oauth2_view_add
- * @since_tizen 2.3
- * @description Oauth2 View Add
- * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
- * @return oauth2_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
*/
-oauth2_view *oauth2_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");
- oauth2_view *this = NULL;
- this = calloc(1, sizeof(oauth2_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 = "oauth2_viewer";
- tbt_info->layout_file = get_edje_path("oauth2_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");
- RETVM_IF(NULL == this->view->layout, 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->oauth2_mgr = NULL;
this->google_name = NULL;
this->google_pic = NULL;
evas_object_show(this->google_desc_obj);
this->google_img_text = ui_utils_label_add(this->view->layout, "Image");
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @function oauth2_view_add
+ * @since_tizen 2.3
+ * @description Oauth2 View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return oauth2_view*
+ */
+oauth2_view *oauth2_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(oauth2_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 = "oauth2_viewer";
+ tbt_info->layout_file = get_edje_path("oauth2_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");
+ RETVM_IF(NULL == this->view->layout, NULL, "navi is null");
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return 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);
package_manager_h g_pstPkgMngr;
+static packagemanager_view *this = NULL;
/**
* @function get_package_manager_error
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, "packagemanager_text", this->packagemanager_label);
+ elm_object_part_content_set(this->view->layout, "packagemanager_state", this->packagemanagerstate_label);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
/**
* @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");
- ui_utils_guide_instruction_popup_button(navi, "To install sample package please follow steps:<br/>1.sdb shell<br/>2.cd /home/owner/apps_rw/org.tizen.tbtcoreapp/res/package<br/>Run command pkgcmd -iqt tpk -p native-testapp-itc-1.0.0-arm.tpk in sdb shell <br/><b>Note:While installation you can see in package status that package status and state changes</b>");
+ // ui_utils_guide_instruction_popup_button(navi, "To install sample package please follow steps:<br/>1.sdb shell<br/>2.cd /home/owner/apps_rw/org.tizen.tbtcoreapp/res/package<br/>Run command pkgcmd -iqt tpk -p native-testapp-itc-1.0.0-arm.tpk in sdb shell <br/><b>Note:While installation you can see in package status that package status and state changes</b>");
//ui_utils_guide_instruction_popup_button(navi, "1.Please Uninstall package from Application manager.<br/>2.Please install package in device manually from sdb shell.<br/>3.Update is re-install same package on the device<br/><b>Note:You can also refer info section</b>");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
- 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, "packagemanager_text", this->packagemanager_label);
- elm_object_part_content_set(this->view->layout, "packagemanager_state", this->packagemanagerstate_label);
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;
/**
* @function get_app_control_error
* @since_tizen 2.3
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, "pick_text", this->label);
+
+ this->data_list = elm_list_add(this->view->layout);
+ RETVM_IF(!this->data_list, NULL, "elm_list_add failed");
+ evas_object_data_set(this->data_list, "data_view", this);
+ elm_object_part_content_set(this->view->layout, "pick_list", this->data_list);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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, "pick_text", this->label);
-
- this->data_list = elm_list_add(this->view->layout);
- RETVM_IF(!this->data_list, NULL, "elm_list_add failed");
- evas_object_data_set(this->data_list, "data_view", this);
- elm_object_part_content_set(this->view->layout, "pick_list", this->data_list);
-
- 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static void deliver_message(void* user_data);
static void display_message(void* user_data);
static void create_list_view(void* user_data);
+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");
-
- _tbt_app_resume_cb = on_app_resume_cb;
+ RETM_IF(NULL == data, "data is null");
- 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");
+ Evas_Object *obj_to_del = data;
+ evas_object_del(obj_to_del);
- //get appID and appSecret from file
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
char auth_file_path[256]={'\0',};
+ //get appID and appSecret from file
snprintf(auth_file_path, sizeof(auth_file_path), "%s/%s",TBT_LOGGING_DIR,"tbt_push_auth.xml");
DBG("auth_file_path file set = %s", auth_file_path);
create_notification_template();
- 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;
}
elm_object_disabled_set(this->active_noti_push_btn, true);
elm_object_disabled_set(this->delay_push_btn, true);
elm_object_disabled_set(this->normal_push_btn, true);
elm_object_disabled_set(this->disconnect_btn, true);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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");
+
+ _tbt_app_resume_cb = on_app_resume_cb;
+
+ 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
radio_h g_pstRadio;
static bool is_not_supported = false;
-
+static radio_view *this = NULL;
/**
* @function get_radio_type_error
* @since_tizen 3.0
}
/**
- * @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");
- this->view = calloc(1, sizeof(common_view));
- RETVM_IF(!this->view, NULL, "calloc failed");
-
- tbt_info->layout_group = "radio_viewer";
- tbt_info->layout_file = get_edje_path("radio_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;
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, "radio_text", this->radio_label);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "radio_viewer";
+ tbt_info->layout_file = get_edje_path("radio_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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");
-
+ 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 = "runtimeinfo_viewer";
- tbt_info->layout_file = get_edje_path("runtimeinfo_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(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;
}
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "runtimeinfo_viewer";
+ tbt_info->layout_file = get_edje_path("runtimeinfo_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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 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->status_text = ui_utils_label_add(this->view->layout, "");
+ elm_object_part_content_set(this->view->layout, "status_text", this->status_text);
+
+ 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, "info_view", this);
+ elm_object_part_content_set(this->view->layout, "info_view", this->info_list);
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+
+ 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 %d", 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 %d", ret);
+ RETVM_IF(height <= 0, NULL, "height is zero or negative");
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function screenmirror_sink_view_add
{
RETVM_IF(NULL == navi, NULL, "navi 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));
common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
RETVM_IF(NULL == this->view, NULL, "this->view is null");
- this->status_text = ui_utils_label_add(this->view->layout, "");
- elm_object_part_content_set(this->view->layout, "status_text", this->status_text);
-
- 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, "info_view", this);
- elm_object_part_content_set(this->view->layout, "info_view", this->info_list);
-
- Evas_Object *control = add_control_layout(this, this->view->layout);
- elm_object_part_content_set(this->view->layout, "controlr_part", control);
-
-
- 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 %d", 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 %d", ret);
- RETVM_IF(height <= 0, NULL, "height is zero or negative");
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
// this->display_object = elm_win_add(this->view->layout,"test", ELM_WIN_BASIC);
// elm_win_borderless_set(this->display_object, EINA_TRUE);
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 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);
+ }
+
+ elm_object_part_content_set(this->view->layout, "gl_view", this->glview);
+ elm_object_part_content_set(this->view->layout, "value_view", this->genlist);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function sensor_view_add
DBG("Inside sensor_view_add");
RETVM_IF(NULL == navi, NULL, "navi is null");
- sensor_view *this = NULL;
this = calloc(1, sizeof(sensor_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->sensor_info = this->view->tbt_info;
+
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
+this->sensor_info = this->view->tbt_info;
if(is_sensor_supported(this) == false)
{
sensor_value_items_create(this);
sensor_value_items_prepare(this);
-
- elm_object_part_content_set(this->view->layout, "gl_view", this->glview);
- elm_object_part_content_set(this->view->layout, "value_view", this->genlist);
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);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function shortcut_view_add
*/
shortcut_view *shortcut_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
-
-
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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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, value;
- 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 = "sound_manager_viewer";
- tbt_info->layout_file = get_edje_path("sound_manager_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;
if(this->view->tbt_info->apptype == TBT_APP_SOUND_MANAGER)
{
//ui_utils_guide_instruction_popup_button(navi, "* Please Insert/Remove Audio jack to change status<br/><b>Note:You can also refer info section</b><br/>");
RETVM_IF(!this->view, NULL,"Sound Device is not supported");
}
elm_object_part_content_set(this->view->layout, "sound_manager_text", this->info_label);
- }
+ }
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "sound_manager_viewer";
+ tbt_info->layout_file = get_edje_path("sound_manager_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
static bool was_playing;
static sound_view *view;
-
+static sound_view *this = NULL;
/**
* @function get_sound_manager_error
}
}
-
/**
- * @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");
-
- 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 = "sound_player";
- tbt_info->layout_file = get_edje_path("sound_player.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 ret;
this->audio_icon = ui_utils_create_image(this->view->layout, get_resource_path("images/audio-icon.png"));
RETVM_IF(NULL == this->audio_icon, false, "create of layout elements failed");
elm_object_part_content_set(this->view->layout, "icon_view", this->audio_icon);
update_view_controls(this);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "sound_player";
+ tbt_info->layout_file = get_edje_path("sound_player.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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
static bool is_not_supported = false;
static bool is_external = false;
-
+static storage_view *this = NULL;
/**
* @function get_storage_error
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;
+ this->info_label = ui_utils_label_add(this->view->layout, "Please Change SD Card state[Remove/Insert]");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ ret = storage_foreach_device_supported(storage_device_supported_cb_p, this);
+ RETVM_IF(ret != STORAGE_ERROR_NONE && ret != STORAGE_ERROR_NOT_SUPPORTED, NULL, "storage_foreach_device_supported failed : %s", get_storage_type_error(ret));
+ if(ret == STORAGE_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Storage is not supported");
+ RETVM_IF(!this->view, NULL,"Storage is not supported");
+ }
+
+ if(is_external == false)
+ {
+ ui_utils_label_set_text(this->info_label, "Please insert SDCard", "left");
+ elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+
+ }
+ ret = storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, _storage_state_changed_cb, this);
+ RETVM_IF(ret != STORAGE_ERROR_NONE, NULL, "storage_set_changed_cb failed : %s", get_storage_type_error(ret));
+
+ elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
/**
* @function storage_device_supported_cb_p
* @description callback for supported devices
storage_view *storage_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- int ret;
- storage_view *this = NULL;
+
this = calloc(1, sizeof(storage_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->info_label = ui_utils_label_add(this->view->layout, "Please Change SD Card state[Remove/Insert]");
- elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
-
- ret = storage_foreach_device_supported(storage_device_supported_cb_p, this);
- RETVM_IF(ret != STORAGE_ERROR_NONE && ret != STORAGE_ERROR_NOT_SUPPORTED, NULL, "storage_foreach_device_supported failed : %s", get_storage_type_error(ret));
- if(ret == STORAGE_ERROR_NOT_SUPPORTED)
- {
- is_not_supported = true;
- Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
- elm_object_text_set(popup, "Storage is not supported");
- RETVM_IF(!this->view, NULL,"Storage is not supported");
- }
-
- if(is_external == false)
- {
- ui_utils_label_set_text(this->info_label, "Please insert SDCard", "left");
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
-
- }
- ret = storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, _storage_state_changed_cb, this);
- RETVM_IF(ret != STORAGE_ERROR_NONE, NULL, "storage_set_changed_cb failed : %s", get_storage_type_error(ret));
-
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
static bool _stt_result_time_cb(stt_h stt, int index, stt_result_time_event_e event, const char* text, long start_time, long end_time, void* user_data);
static bool _stt_supported_language_cb(stt_h stt, const char* language, void* user_data);
static void _stt_error_cb(stt_h stt, stt_error_e reason, void *user_data);
-
+static stt_view *this = NULL;
/**
- * @function stt_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 stt_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
*/
-stt_view *stt_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");
- stt_view *this = NULL;
- this = calloc(1, sizeof(stt_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);
- tbt_info->layout_group = "stt_viewer";
- tbt_info->layout_file = get_edje_path("stt_viewer.edj");
-
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
-
- RETVM_IF(NULL == this->view, NULL, "navi is null");
-
- this->is_recognition_completed = false;
+ if(event_info)
+ {
+ Elm_Object_Item *item = event_info;
+ elm_genlist_item_selected_set(item, EINA_FALSE);
+ }
+ this->is_recognition_completed = false;
this->is_unprepared = false;
this->res_path = app_get_resource_path();
}
else if(this->view->tbt_info->apptype == TBT_APP_STT_ERROR)
{
- ui_utils_label_set_text(this->input_text, "Disconnect Internet (Turn off wifi or Input a command 'vconftool set -t int memory/dnet/status 0 -f' in target shell), Then press Speak button", "left");
+ ui_utils_label_set_text(this->input_text, "Disconnect Internet.Then press Speak button", "left");
ui_utils_label_set_text(this->recognized_text, "", "left");
}
this->btn_stt = ui_utils_push_button_add(this, this->view->layout, "Speak", _btn_stt_pressed_cb);
elm_object_part_content_set(this->view->layout, "btn_part", this->btn_stt);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+/**
+ * @function stt_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 stt_view*
+ */
+stt_view *stt_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(stt_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 = "stt_viewer";
+ tbt_info->layout_file = get_edje_path("stt_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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
+
return this;
}
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)
{
DBG("TBT_APP_SYSTEM_SETTINGS_FONT");
DBG("view complete: %d", value);
+ // return this;
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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, "cursor_text", 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, "touch_view", 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);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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, "cursor_text", 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, "touch_view", 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);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
- 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);
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 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->is_utterance_completed = false;
+ this->is_tts_btn_pressed = false;
+
+ this->txt_label = ui_utils_label_add(this->view->layout, "");
+ ui_utils_label_set_text(this->txt_label, "Text: The quick brown fox jumps over the lazy dog", "left");
+ elm_object_part_content_set(this->view->layout, "txt_part", this->txt_label);
+
+ this->btn_tts = ui_utils_push_button_add(this, this->view->layout, "Text to Speech", _btn_tts_pressed_cb);
+ elm_object_part_content_set(this->view->layout, "btn_part", this->btn_tts);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function tts_view_add
{
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(NULL == this->view, NULL, "navi is null");
- this->is_utterance_completed = false;
- this->is_tts_btn_pressed = false;
-
- this->txt_label = ui_utils_label_add(this->view->layout, "");
- ui_utils_label_set_text(this->txt_label, "Text: The quick brown fox jumps over the lazy dog", "left");
- elm_object_part_content_set(this->view->layout, "txt_part", this->txt_label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
- this->btn_tts = ui_utils_push_button_add(this, this->view->layout, "Text to Speech", _btn_tts_pressed_cb);
- elm_object_part_content_set(this->view->layout, "btn_part", this->btn_tts);
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");
+ RETM_IF(NULL == data, "data is null");
- tbt_info->layout_group = "ui_viewer";
- tbt_info->layout_file = get_edje_path("ui_viewer.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");
+ 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);
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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 = "ui_viewer";
+ tbt_info->layout_file = get_edje_path("ui_viewer.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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
return this;
}
bool usb_cb_hit = false;
usb_host_context_h hCtxHandle;
usb_host_hotplug_h hHandle;
+static usbhost_view *this = NULL;
/**
* @function get_usbhost_error
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);
+ }
+ elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function usbhost_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
int ret, value;
- usbhost_view *this = NULL;
+
this = calloc(1, sizeof(usbhost_view));
RETVM_IF(!this, NULL, "calloc failed");
ui_utils_label_set_text(this->info_label, "Callback Not Hit !!!", "left");
}
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}
static void _vc_state_changed_cb(vc_state_e previous, vc_state_e current, void* user_data);
static void _vc_service_state_changed_cb(vc_service_state_e previous, vc_service_state_e current, void* user_data);
static void start_voice_control(void* data);
+static voice_control_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->voice_control_label = ui_utils_label_add(this->view->layout, "Voice control");
+ ui_utils_label_set_text(this->voice_control_label, "Voice control", "left");
+ elm_object_part_content_set(this->view->layout, "label", this->voice_control_label);
+
+ start_voice_control(this);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @function voice_control_view_add
{
RETVM_IF(NULL == navi, NULL, "navi is null");
- voice_control_view *this = NULL;
this = calloc(1, sizeof(voice_control_view));
RETVM_IF(!this, NULL, "calloc failed");
this->view = calloc(1, sizeof(common_view));
RETVM_IF(NULL == this->view, NULL, "navi is null");
- this->voice_control_label = ui_utils_label_add(this->view->layout, "Voice control");
- ui_utils_label_set_text(this->voice_control_label, "Voice control", "left");
- elm_object_part_content_set(this->view->layout, "label", this->voice_control_label);
-
- start_voice_control(this);
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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, "pick_text", this->label);
+
+
+ Evas_Object *control = add_control_layout(this, this->view->layout);
+ elm_object_part_content_set(this->view->layout, "controlr_part", control);
+
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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, "pick_text", this->label);
-
-
- 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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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, "Wifi Off");
+
+ 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, "Wifi On");
+ ui_utils_label_set_text(this->wifi_label, "Wifi is switched Off ", "left");
+ }
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
/**
* @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, "Wifi Off");
-
- 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, "Wifi On");
- ui_utils_label_set_text(this->wifi_label, "Wifi is switched Off ", "left");
- }
+ char instrcuction[2048]={'\0',};
+ snprintf(instrcuction, sizeof(instrcuction), "%s%s", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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");
+ RETM_IF(NULL == data, "data is null");
- wifidirect_info_view *this = NULL;
- this = calloc(1, sizeof(wifidirect_info_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");
-
- 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");
+ 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;
SAFE_DELETE(str);
}
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(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");
+ 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 = "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");
+ 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);
}
+}
+
+static void guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction)
+{
+ RETM_IF(NULL == view, "view is NULL");
+
+ Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide");
+ RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL");
+
+ elm_object_text_set(guide_popup_btn, txtInstruction);
+ ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn);
+}
+
+/**
+ * @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", tbt_info->info, "<br/><b>Note:You can also refer info section</b>");
+ guide_instruction_popup_button(navi, instrcuction );
+
return this;
}