-/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#ifndef __IVUG_SLIDER_H__
#define __IVUG_SLIDER_H__
// Error state
SLIDE_STATE_NO_RIGHT,
SLIDE_STATE_ERROR,
+/*
+ CAUTION.
+
+ If you change enumeration, plz modify function - const char *_GetStateString(slide_state_t state), too.
+*/
} slide_state_t;
ivug_slider_zoom_in(Evas_Object *obj);
void
-ivug_slider_zoom_out(Evas_Object *obj);\r
-\r
-void\r
-ivug_slider_update(Evas_Object *obj, Media_Item *newItem);\r
+ivug_slider_zoom_out(Evas_Object *obj);
+
+void
+ivug_slider_update(Evas_Object *obj, Media_Item *newItem);
#ifdef __cplusplus
}
-/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "ivug-common.h"
static bool _start_drm_consume(Slide_Item *si)
{
- return true;\r
+ return true;
}
static bool _stop_drm_consume(Slide_Item *si)
{
- return true;\r
+ return true;
}
static bool _pause_drm_consume(Slide_Item *si)
{
- return true;\r
+ return true;
}
static bool _resume_drm_consume(Slide_Item *si)
-{\r
- return true;\r
-}\r
+{
+ return true;
+}
static sitem_type_t _get_sitem_type(Media_Type mtype)
_photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
{
IV_ASSERT(data != NULL);
-
Slide_Item* si = static_cast<Slide_Item*>(data);
+ MSG_SITEM_HIGH("_photocam_loaded_cb");
//hide progress.
_hide_progressbar(si);
return;
}
+ if ( si->state != SLIDE_STATE_LOADING )
+ {
+ MSG_SITEM_ERROR("Invalid slide state. %s", ivug_get_filename(mdata->filepath));
+ MSG_SITEM_FATAL("state=%d %s (%d,%d,%d,%d)", si->state, mdata->filepath, si->x, si->y, si->w, si->h);
+ }
+
#if 0
typedef enum _Evas_Load_Error
{
si->type = _get_sitem_type(mdata->slide_type);
- evas_object_smart_callback_add(si->photocam, "loaded", _photocam_loaded_cb, si);
-
if ( si->type == SITEM_TYPE_IMAGE )
{
+ evas_object_smart_callback_add(si->photocam, "loaded", _photocam_loaded_cb, si);
+
_hide_videoicon(si);
#ifdef USE_IMAGE_THUMBNAIL
switch(mdata->slide_type)
{
case SLIDE_TYPE_IMAGE:
- MSG_SITEM_HIGH("Set image. %s", ivug_get_filename(mdata->filepath));
-
- if(mdata->bIsDRMContent == EINA_FALSE)
+ if(mdata->bIsDRMContent == false)
{
+ MSG_SITEM_HIGH("Set image. %s", ivug_get_filename(mdata->filepath));
si->state = SLIDE_STATE_READY;
}
else
{
+ MSG_SITEM_HIGH("Set DRM image. %s", ivug_get_filename(mdata->filepath));
si->state = SLIDE_STATE_DRM_CHECKING;
}
break;
static bool _unset_mitem(Slide_Item* si)
-{\r
- si->state = SLIDE_STATE_NONE;\r
+{
+ si->state = SLIDE_STATE_NONE;
// Unswallow photocam/videocam
edje_object_part_unswallow(si->layout, edje_object_part_swallow_get(si->layout, "slider.contents"));
if ( mdata->bIsDRMContent == EINA_TRUE )
{
- _hide_progressbar(si);\r
-
- MSG_SITEM_ERROR("Image loading failed. RO expired File=%s", mdata->filepath);\r
- si->state = SLIDE_STATE_ERROR;\r
-\r
- evas_object_hide(si->photocam);\r
- _show_thumbnail(si, DRM_NO_RIGHT_IMAGE_PATH);\r
-\r
- _call_user_callback(si);\r
-\r
- return false;\r
- }\r
+ _hide_progressbar(si);
+
+ MSG_SITEM_ERROR("Image loading failed. RO expired File=%s", mdata->filepath);
+ si->state = SLIDE_STATE_ERROR;
+
+ evas_object_hide(si->photocam);
+ _show_thumbnail(si, DRM_NO_RIGHT_IMAGE_PATH);
+
+ _call_user_callback(si);
+
+ return false;
+ }
else
{
strncpy(path, mdata->filepath, sizeof(path));
-/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "ivug-common.h"
#include "ivug-slider-item.h"
if ( sd->edge == EDGE::SLIDE_FIT)
{
- MSG_HIGH("Case 1. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+ MSG_HIGH("Case 1. edge=%d, X=%d dx=%d si->x=%d state=%d", sd->edge, dst_x, dx, si->x, sd->slide[PREV_SLIDE]->state);
_ivug_slider_pass_event_to_item(sd, EINA_FALSE);
if ( dst_x >= 0 && sd->slide[PREV_SLIDE]->state == SLIDE_STATE_NONE)
-/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include <ui-gadget-module.h> // ug_destroy_me, ug_send_result
sd->load_idler = NULL;
}
- MSG_SLIDER_HIGH("Add idler for loading.");\r
- sd->load_idler = ecore_idler_add(_idler_loading_func, sd);\r
+ MSG_SLIDER_HIGH("Add idler for loading.");
+ sd->load_idler = ecore_idler_add(_idler_loading_func, sd);
}
static void _ivug_slider_on_center_changed(Evas_Object *obj, Slide_Item *old, Slide_Item *cur)
MSG_SLIDER_ERROR("Invalid state : %s", _GetStateString(cur->state));
}
- MSG_SLIDER_HIGH("Center item changed. State=%s", _GetStateString(cur->state));
+ Media_Item *mitem = NULL;
+
+ mitem = cur->mitem;
+
+ Media_Data *pData = ivug_medialist_get_data(mitem);
+
+ MSG_SLIDER_HIGH("Center item changed. %s State=%s", ivug_get_filename(pData->filepath), _GetStateString(cur->state));
evas_object_smart_callback_call(sd->obj, "slider,item,changed", cur);
}
sd->zoom_level--;
}
-\r
-void\r
-ivug_slider_update(Evas_Object *obj, Media_Item *newItem)\r
-{\r
- if (obj == NULL) {\r
- MSG_SLIDER_HIGH("Slider is NULL");\r
- return;\r
- }\r
- struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);\r
-\r
- MSG_SLIDER_HIGH("Slider update");\r
-\r
- Slide_Item *si = sd->slide[CENTER_SLIDE];\r
-\r
- ivug_slider_item_zoom_reset(si, EINA_FALSE, 0, 0);\r
-\r
- ivug_slider_item_stop(si);\r
-\r
- ivug_slider_item_data_set(si, newItem);\r
-\r
- _do_load(sd);\r
-}\r
-\r
+
+void
+ivug_slider_update(Evas_Object *obj, Media_Item *newItem)
+{
+ if (obj == NULL) {
+ MSG_SLIDER_HIGH("Slider is NULL");
+ return;
+ }
+ struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+ MSG_SLIDER_HIGH("Slider update");
+
+ Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+ ivug_slider_item_zoom_reset(si, EINA_FALSE, 0, 0);
+
+ ivug_slider_item_stop(si);
+
+ ivug_slider_item_data_set(si, newItem);
+
+ _do_load(sd);
+}
+