*/
Evas_Object *ui_utils_create_image(Evas_Object *parent, const char *file_path);
+/*
+ * @brief Add naviframe widget
+ * @since_tizen 2.3
+ * @param[in] parent Parent widget
+ * @param[in] back_cb Hardware back button callback
+ * @param[in] cb_data Data to pass to back_cb
+ * @return Naviframe on success, otherwise NULL
+ */
+Evas_Object *ui_utils_create_image_camera(Evas_Object *parent, const char *file_path);
+
/*
* @brief Add naviframe widget
* @since_tizen 2.3
.parent = "CBHM",
.apptype = TBT_APP_CBHM_COUNT_GET,
.icon_name = "dummy",
- .info = "1.Type text in the Editor <br/>2.Copy text to ClipBoard <br/>3.Repeat the previous two steps <br/>4.Click Get Count button <br/>5.The number of items in ClipBoard should be displayed. <br/>6. You can cross check it by Clicking Show ClipBoard button",
+ .info = "1.Type text in the Editor <br/>2.Copy text to ClipBoard <br/>3.Repeat the previous two steps <br/>4.Click Show Count button <br/>5.The number of items in ClipBoard should be displayed. <br/>6. You can cross check it by Clicking Show ClipBoard button",
.result = 0
},
#endif
return image;
}
+ /**
+ * @function ui_utils_create_image_camera
+ * @since_tizen 2.3
+ * @description Ui Utils Create Image
+ * @parameter Evas_Object*: Evas Object Pointer, const char*: Const char Pointer
+ * @return Evas_Object*
+ */
+Evas_Object *ui_utils_create_image_camera(Evas_Object *parent, const char *file_path)
+{
+ RETVM_IF(NULL == parent, NULL, "create_image_camera parent is NULL");
+
+ Evas_Object *image = NULL;
+ image = elm_image_add(parent);
+ RETVM_IF(NULL == image, NULL, "elm_image_add is NULL");
+ elm_image_preload_disabled_set(image, EINA_TRUE);
+ bool result = (EINA_TRUE == elm_image_file_set(image, file_path, NULL));
+ if(!result)
+ {
+ ERR("error with elm_image_file_set, image name %s", file_path);
+ evas_object_del(image);
+ return NULL;
+ }
+ elm_image_orient_set(image,ELM_IMAGE_ORIENT_90);
+ elm_image_no_scale_set(image, EINA_FALSE);
+ elm_image_resizable_set(image, EINA_TRUE, EINA_TRUE);
+ elm_image_smooth_set(image, EINA_FALSE);
+ elm_image_aspect_fixed_set(image, EINA_TRUE);
+ elm_image_editable_set(image, EINA_FALSE);
+ evas_object_show(image);
+
+ return image;
+}
+
/**
* @function ui_utils_navi_add
camera_state_e state;
result = camera_get_state(this->camera, &state);
RETM_IF(result != CAMERA_ERROR_NONE, "camera_get_state fail > Error = %s", get_camera_error(result));
-
if (state != CAMERA_STATE_PREVIEW && this->view->tbt_info->apptype != TBT_APP_CAMERA_RECORD)
{
result = camera_start_preview(this->camera);
view = (camera_view*) data;
RETM_IF(NULL == view, "view is NULL");
+ int angle =0;
+ camera_attr_get_lens_orientation(view->camera,&angle );
+ DBG("angle %ddegree",angle);
+
result = camera_start_preview(view->camera);
RETM_IF(result != CAMERA_ERROR_NONE, "camera_start_preview fail > Error = %s", get_camera_error(result));
if ((view->view->tbt_info->apptype == TBT_APP_CAMERA_CAPTURE)
|| (view->view->tbt_info->apptype == TBT_APP_CAMERA_HDR_CAPTURE))
{
- view->image = ui_utils_create_image(view->view->layout, view->file_path);
- RETM_IF(NULL == view->image, "ui_utils_create_image fail > Error = %s", view->file_path);
-
+ if(angle == 0) //Emulator check
+ {
+ view->image = ui_utils_create_image(view->view->layout, view->file_path);
+ RETM_IF(NULL == view->image, "ui_utils_create_image fail > Error = %s", view->file_path);
+ }
+ else
+ {
+ view->image = ui_utils_create_image_camera(view->view->layout, view->file_path);
+ RETM_IF(NULL == view->image, "ui_utils_create_image_camera fail > Error = %s", view->file_path);
+ }
elm_object_part_content_set(view->view->layout, "video_view", view->image);
}
}
if(this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_TITLE)
{
- ret = notification_set_text(g_NotificationHandle,NOTIFICATION_TEXT_TYPE_TITLE, "IDS_APP_BODY_IM_TITLE", "I'm Title", NOTIFICATION_VARIABLE_TYPE_NONE);
+ ret = notification_set_text(g_NotificationHandle,NOTIFICATION_TEXT_TYPE_TITLE, "I'm Title",NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "package_manager_set_event_cb failed : %s", get_notification_error(ret));
ret = notification_post(g_NotificationHandle);