value "focus_highlight_enable" uchar: 0;
value "focus_highlight_animate" uchar: 0;
value "focus_highlight_clip_disable" uchar: 0;
+ value "focus_move_policy" uchar: 0;
value "toolbar_shrink_mode" int: 3;
value "fileselector_expand_enable" uchar: 0;
value "inwin_dialogs_enable" uchar: 1;
value "focus_highlight_enable" uchar: 0;
value "focus_highlight_animate" uchar: 0;
value "focus_highlight_clip_disable" uchar: 0;
+ value "focus_move_policy" uchar: 0;
value "toolbar_shrink_mode" int: 3;
value "fileselector_expand_enable" uchar: 0;
value "inwin_dialogs_enable" uchar: 1;
value "focus_highlight_enable" uchar: 0;
value "focus_highlight_animate" uchar: 0;
value "focus_highlight_clip_disable" uchar: 1;
+ value "focus_move_policy" uchar: 0;
value "toolbar_shrink_mode" int: 3;
value "fileselector_expand_enable" uchar: 1;
value "fileselector_double_tap_navigation_enable" uchar: 1;
ELM_CONFIG_VAL(D, T, focus_highlight_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, focus_highlight_animate, T_UCHAR);
ELM_CONFIG_VAL(D, T, focus_highlight_clip_disable, T_UCHAR);
+ ELM_CONFIG_VAL(D, T, focus_move_policy, T_UCHAR);
ELM_CONFIG_VAL(D, T, toolbar_shrink_mode, T_INT);
ELM_CONFIG_VAL(D, T, fileselector_expand_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, fileselector_double_tap_navigation_enable, T_UCHAR);
_elm_config->focus_highlight_enable = EINA_FALSE;
_elm_config->focus_highlight_animate = EINA_TRUE;
_elm_config->focus_highlight_clip_disable = EINA_FALSE;
+ _elm_config->focus_move_policy = ELM_FOCUS_MOVE_POLICY_CLICK;
_elm_config->toolbar_shrink_mode = 2;
_elm_config->fileselector_expand_enable = EINA_FALSE;
_elm_config->fileselector_double_tap_navigation_enable = EINA_FALSE;
s = getenv("ELM_FOCUS_HIGHLIGHT_CLIP_DISABLE");
if (s) _elm_config->focus_highlight_clip_disable = !!atoi(s);
+ s = getenv("ELM_FOCUS_MOVE_POLICY");
+ if (s) _elm_config->focus_move_policy = !!atoi(s);
+
s = getenv("ELM_TOOLBAR_SHRINK_MODE");
if (s) _elm_config->toolbar_shrink_mode = atoi(s);
_elm_config->focus_highlight_clip_disable = !!disable;
}
+EAPI Elm_Focus_Move_Policy
+elm_config_focus_move_policy_get(void)
+{
+ return _elm_config->focus_move_policy;
+}
+
+EAPI void
+elm_config_focus_move_policy_set(Elm_Focus_Move_Policy policy)
+{
+ _elm_config->focus_move_policy = policy;
+}
EAPI Eina_Bool
elm_config_scroll_bounce_enabled_get(void)
EAPI void elm_config_focus_highlight_clip_disabled_set(Eina_Bool disable);
/**
+ * Focus Movement Policy
+ *
+ * @since 1.10
+ * @ingroup Focus
+ */
+typedef enum
+{
+ ELM_FOCUS_MOVE_POLICY_CLICK,
+ ELM_FOCUS_MOVE_POLICY_IN
+} Elm_Focus_Move_Policy;
+
+/**
+ * Get the focus movement policy
+ *
+ * @return The focus movement policy
+ *
+ * Get how the focus is moved to another object. It can be @c
+ * ELM_FOCUS_MOVE_POLICY_CLICK or @c ELM_FOCUS_MOVE_POLICY_IN. The first means
+ * elementary focus is moved on elementary object click. The second means
+ * elementary focus is moved on elementary object mouse in.
+ *
+ * @see elm_config_focus_move_policy_set()
+ * @since 1.10
+ * @ingroup Focus
+ */
+EAPI Elm_Focus_Move_Policy elm_config_focus_move_policy_get(void);
+
+/**
+ * Set elementary focus movement policy
+ *
+ * @param policy A policy to apply for the focus movement
+ *
+ * @see elm_config_focus_move_policy_get()
+ * @since 1.10
+ * @ingroup Focus
+ */
+EAPI void elm_config_focus_move_policy_set(Elm_Focus_Move_Policy policy);
+
+/**
* Get the system mirrored mode. This determines the default mirrored mode
* of widgets.
*
unsigned char focus_highlight_enable;
unsigned char focus_highlight_animate;
unsigned char focus_highlight_clip_disable; /**< This shows disabled status of focus highlight clip feature. This value is false by default so the focus highlight is clipped. */
+ unsigned char focus_move_policy; /**< This show how the elementary focus is moved to another object. Focus can be moved by click or mouse_in. */
int toolbar_shrink_mode;
unsigned char fileselector_expand_enable;
unsigned char fileselector_double_tap_navigation_enable;
void *event_info EINA_UNUSED)
{
ELM_WIDGET_DATA_GET(data, sd);
- if (sd->still_in)
+ if (sd->still_in &&
+ (_elm_config->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK))
elm_widget_focus_mouse_up_handle(obj);
+
sd->still_in = EINA_FALSE;
}
+static void
+_obj_mouse_in(void *data EINA_UNUSED,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ if (_elm_config->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN)
+ elm_widget_focus_mouse_up_handle(obj);
+}
+
EOLIAN static void
_elm_widget_evas_smart_add(Eo *obj, Elm_Widget_Smart_Data *priv)
{
_obj_mouse_move, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
_obj_mouse_up, obj);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_IN,
+ _obj_mouse_in, obj);
/* just a helper for inheriting classes */
if (priv->resize_obj)
{