2013-02-12 ChunEon Park (Hermet)
* replace elm_object_domain_translatable_text_part_set(), elm_object_translatable_text_part_get() with elm_object_domain)translatable_part_text_set(), elm_object_translatable_part_text_get().
+
+2013-02-14 ChunEon Park (Hermet)
+
+ * added 2 APIs elm_object_orientation_mode_disabled_set(), elm_object_orientation_mode_disabled_get()
* Add elm_glview, elm_gengrid smart callback - "language,changed".
* Add APIs - elm_object_item_domain_translatable_part_text_set(), elm_object_item_translatable_part_text_get().
* Add APIs - elm_object_domain_translatable_part_text_set(), elm_object_translatable_part_text_get().
+ * Add APIs - elm_object_orientation_mode_disabled_set(), elm_object_orientation_mode_disabled_get().
Improvements:
return _elm_widget_item_translatable_part_text_get((Elm_Widget_Item *)it, part);
}
-
EAPI void
elm_object_access_info_set(Evas_Object *obj, const char *txt)
{
}
EAPI void
+elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled)
+{
+ elm_widget_orientation_mode_disabled_set(obj, disabled);
+}
+
+EAPI Eina_Bool
+elm_object_orientation_mode_disabled_get(const Evas_Object *obj)
+{
+ return elm_widget_orientation_mode_disabled_get(obj);
+}
+
+EAPI void
elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
{
_elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt);
* @ingroup General
*/
EAPI void *elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data);
+
+/**
+ * Disable the orientation mode of a given widget.
+ *
+ * Orientation Mode is used for widgets to change it's styles or to send signals
+ * whenever it's window degree is changed. If the orientation mode is enabled
+ * and the widget has different looks and styles for the window degree(0, 90,
+ * 180, 270), it will apply a style that is readied for the current degree,
+ * otherwise, it will send signals to it's own edje to change it's states if
+ * the style doesn't be readied.
+ *
+ * @param obj The Elementary object to operate on orientation mode.
+ * @param disabled The state to put in in: @c EINA_TRUE for disabled,
+ * @c EINA_FALSE for enabled.
+ *
+ * @since 1.8
+ *
+ * @ingroup General
+ */
+EAPI void elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+
+/**
+ * Get the orientation mode of a give widget.
+ *
+ * @param obj The Elementary widget to query for its style
+ * @return @c EINA_TRUE, if the widget orientation mode is disabled,
+ * @c EINA_FALSE if the orientation mode is enabled (or on errors)
+ *
+ * @see elm_object_orientation_mode_disabled_set()
+ *
+ * @since 1.8
+ *
+ * @ingroup General
+ */
+EAPI Eina_Bool elm_object_orientation_mode_disabled_get(const Evas_Object *obj);
+
elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
{
ELM_WIDGET_CHECK(obj);
- eo_do(obj, elm_wdg_display_mode_set(dispmode));
+ eo_do((Eo *) obj, elm_wdg_display_mode_set(dispmode));
}
static void
}
+EAPI void
+elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled)
+{
+ ELM_WIDGET_CHECK(obj);
+ eo_do((Eo *) obj, elm_wdg_orientation_mode_disabled_set(disabled));
+}
+
+static void
+_elm_widget_orientation_mode_disabled_set(Eo *obj __UNUSED__, void *_pd, va_list *list)
+{
+ Eina_Bool disabled = va_arg(*list, int);
+ Elm_Widget_Smart_Data *sd = _pd;
+ disabled = !!disabled;
+ sd->orientation_disabled = disabled;
+}
+
+EAPI Eina_Bool
+elm_widget_orientation_mode_disabled_get(const Evas_Object *obj)
+{
+ ELM_WIDGET_CHECK(obj) EINA_FALSE;
+ Eina_Bool ret;
+ eo_do((Eo *) obj, elm_wdg_orientation_mode_disabled_get(&ret));
+ return ret;
+}
+
+static void
+_elm_widget_orientation_mode_disabled_get(Eo *obj __UNUSED__, void *_pd, va_list *list)
+{
+ Eina_Bool *ret = (Eina_Bool *)va_arg(*list, int);
+ Elm_Widget_Smart_Data *sd = _pd;
+ *ret = sd->orientation_disabled;
+}
+
+
+EAPI void
+elm_widget_orientation_set(Evas_Object *obj, int rotation)
+{
+ ELM_WIDGET_CHECK(obj);
+ eo_do((Eo *) obj, elm_wdg_orientation_set(rotation));
+}
+
+static void
+_elm_widget_orientation_set(Eo *obj __UNUSED__, void *_pd, va_list *list)
+{
+ Evas_Object *child;
+ Eina_List *l;
+ int rotation = va_arg(*list, int);
+ Elm_Widget_Smart_Data *sd = _pd;
+ if (sd->orientation_disabled) return;
+
+ if (sd->resize_obj && _elm_widget_is(sd->resize_obj))
+ elm_widget_orientation_set(sd->resize_obj, rotation);
+ if (sd->hover_obj && _elm_widget_is(sd->hover_obj))
+ elm_widget_orientation_set(sd->hover_obj, rotation);
+
+ EINA_LIST_FOREACH (sd->subobjs, l, child)
+ elm_widget_orientation_set(child, rotation);
+}
+
+
/**
* @internal
*
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME_OBJECT_SET), _elm_widget_theme_object_set),
+ EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_SET), _elm_widget_orientation_set),
+ EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_SET), _elm_widget_orientation_mode_disabled_set),
+ EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_GET), _elm_widget_orientation_mode_disabled_get),
+
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_SET), _elm_widget_focus_custom_chain_set),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_GET), _elm_widget_focus_custom_chain_get),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_UNSET), _elm_widget_focus_custom_chain_unset),
EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_FOCUS_REGION_GET, "Get the focus region of the given widget."),
EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_THEME_OBJECT_SET, "description here"),
+ EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_ORIENTATION_SET, "description here"),
+ EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_SET, "description here"),
+ EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_GET, "description here"),
EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_SET, "Set custom focus chain."),
EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_GET, "Get custom focus chain."),
Eina_Bool still_in : 1;
Eina_Bool can_access : 1;
Eina_Bool highlighted : 1;
+ Eina_Bool orientation_disabled : 1;
} Elm_Widget_Smart_Data;
/**
EAPI Evas_Object *elm_widget_content_part_unset(Evas_Object *obj, const char *part);
EAPI void elm_widget_access_info_set(Evas_Object *obj, const char *txt);
EAPI const char *elm_widget_access_info_get(const Evas_Object *obj);
+EAPI void elm_widget_orientation_set(Evas_Object *obj, int rotation);
+EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj);
EAPI Elm_Widget_Item *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size);
EAPI void _elm_widget_item_free(Elm_Widget_Item *item);
EAPI Evas_Object *_elm_widget_item_widget_get(const Elm_Widget_Item *item);
ELM_WIDGET_SUB_ID_FOCUS_REGION_GET,
ELM_WIDGET_SUB_ID_THEME_OBJECT_SET,
+ ELM_WIDGET_SUB_ID_ORIENTATION_SET,
+ ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_SET,
+ ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_GET,
+
/* internal */
ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_SET,
ELM_WIDGET_SUB_ID_FOCUS_CUSTOM_CHAIN_GET,
*/
#define elm_wdg_can_focus_child_list_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_CAN_FOCUS_CHILD_LIST_GET), EO_TYPECHECK(Eina_List **, ret)
+/**
+ * @def elm_wdg_orientation_set
+ * @since 1.8
+ *
+ * No description supplied by the EAPI.
+ *
+ * @param[out] ret
+ *
+ */
+#define elm_wdg_orientation_set(rotation) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_SET), EO_TYPECHECK(int, rotation)
+
+/**
+ * @def elm_wdg_orientation_mode_disabled_set
+ * @since 1.8
+ *
+ * No description supplied by the EAPI.
+ *
+ * @param[out] ret
+ *
+ */
+#define elm_wdg_orientation_mode_disabled_set(disabled) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_SET), EO_TYPECHECK(Eina_Bool, disabled)
+
+/**
+ * @def elm_wdg_orientation_mode_disabled_get
+ * @since 1.8
+ *
+ * No description supplied by the EAPI.
+ *
+ * @param[out] ret
+ *
+ */
+#define elm_wdg_orientation_mode_disabled_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
+
#endif
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
#endif
+ elm_widget_orientation_set(obj, rotation);
evas_object_smart_callback_call(obj, SIG_ROTATION_CHANGED, NULL);
}