forked from enlightenment/efl
Merge branch 'devs/bu5hm4n/remove-old-focus-api'
This removes the old focus api from elm_widget. This sadly brings a few breaks with it that will be fixed in the next few weeks. There is currently no item-content focus in gengrid, genlist, list. custom focus chains are not supported right now, calling the api of it will result in NOPs. Inline windows are currently also not getting focus, even though they should.
This commit is contained in:
commit
e85da3d956
|
@ -147,8 +147,14 @@ elm_public_eolian_files = \
|
|||
# Private classes (not exposed or shipped)
|
||||
elm_private_eolian_files = \
|
||||
lib/elementary/efl_ui_internal_text_interactive.eo \
|
||||
lib/elementary/efl_ui_focus_layer.eo \
|
||||
lib/elementary/efl_ui_focus_composition.eo \
|
||||
lib/elementary/efl_ui_focus_composition_adapter.eo \
|
||||
lib/elementary/efl_ui_win_part.eo \
|
||||
tests/elementary/focus_test.eo \
|
||||
tests/elementary/focus_test_sub_main.eo \
|
||||
lib/elementary/efl_ui_focus_rectangle.eo \
|
||||
lib/elementary/elm_calendar_item.eo \
|
||||
$(NULL)
|
||||
|
||||
# Legacy classes - not part of public EO API
|
||||
|
@ -700,6 +706,8 @@ lib_elementary_libelementary_la_SOURCES = \
|
|||
lib/elementary/efl_ui_focus_object.c \
|
||||
lib/elementary/efl_ui_focus_manager_root_focus.c \
|
||||
lib/elementary/efl_ui_textpath.c \
|
||||
lib/elementary/efl_ui_focus_layer.c \
|
||||
lib/elementary/efl_ui_focus_composition.c \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
|
|
@ -15,14 +15,6 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void *
|
||||
_efl_ui_box_list_data_get(const Eina_List *list)
|
||||
{
|
||||
Evas_Object_Box_Option *opt = eina_list_data_get(list);
|
||||
|
||||
return opt->obj;
|
||||
}
|
||||
|
||||
static void
|
||||
_child_added_cb_proxy(void *data, const Efl_Event *event)
|
||||
{
|
||||
|
@ -41,66 +33,6 @@ _child_removed_cb_proxy(void *data, const Efl_Event *event)
|
|||
efl_event_callback_legacy_call(box, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_box_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_box_elm_widget_focus_next(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
list_data_get = eina_list_data_get;
|
||||
else
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
Evas_Object_Box_Data *bd =
|
||||
evas_object_smart_data_get(wd->resize_obj);
|
||||
|
||||
items = bd->children;
|
||||
list_data_get = _efl_ui_box_list_data_get;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_box_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_box_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
list_data_get = eina_list_data_get;
|
||||
else
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
Evas_Object_Box_Data *bd =
|
||||
evas_object_smart_data_get(wd->resize_obj);
|
||||
|
||||
items = bd->children;
|
||||
list_data_get = _efl_ui_box_list_data_get;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
return elm_widget_focus_list_direction_get
|
||||
(obj, base, items, list_data_get, degree, direction, direction_item, weight);
|
||||
}
|
||||
|
||||
static void
|
||||
_sizing_eval(Evas_Object *obj, Efl_Ui_Box_Data *sd)
|
||||
{
|
||||
|
|
|
@ -18,10 +18,6 @@ class Efl.Ui.Box (Elm.Widget, Efl.Pack.Linear, Efl.Pack.Layout,
|
|||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Efl.Container.content_iterate;
|
||||
Efl.Container.content_count;
|
||||
Efl.Ui.Direction.direction { get; set; }
|
||||
|
|
|
@ -389,18 +389,6 @@ _efl_ui_button_efl_ui_autorepeat_autorepeat_gap_timeout_get(Eo *obj EINA_UNUSED,
|
|||
return sd->ar_gap_timeout;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_button_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_button_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN const Elm_Atspi_Action *
|
||||
_efl_ui_button_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Efl_Ui_Button_Data *pd EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -18,8 +18,6 @@ class Efl.Ui.Button (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Autorepeat,
|
|||
Efl.Ui.Autorepeat.autorepeat_enabled { set; get; }
|
||||
Efl.Ui.Autorepeat.autorepeat_supported { get;}
|
||||
Elm.Widget.on_access_activate;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.widget_event;
|
||||
|
|
|
@ -417,42 +417,6 @@ _efl_ui_clock_efl_ui_translatable_translation_update(Eo *obj, Efl_Ui_Clock_Data
|
|||
efl_ui_translatable_translation_update(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
static Eina_List *
|
||||
_clock_items_get(const Evas_Object *obj)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
Clock_Field *field;
|
||||
unsigned int idx;
|
||||
Clock_Field *sorted_fields[EFL_UI_CLOCK_TYPE_COUNT];
|
||||
|
||||
EFL_UI_CLOCK_DATA_GET(obj, sd);
|
||||
|
||||
for (idx = 0; idx < EFL_UI_CLOCK_TYPE_COUNT; idx++)
|
||||
{
|
||||
field = sd->field_list + idx;
|
||||
sorted_fields[field->location] = field;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < EFL_UI_CLOCK_TYPE_COUNT; idx++)
|
||||
{
|
||||
field = sorted_fields[idx];
|
||||
if (field->fmt_exist && field->visible)
|
||||
items = eina_list_append(items, field->item_obj);
|
||||
}
|
||||
|
||||
// ACCESS
|
||||
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
|
||||
items = eina_list_append(items, sd->access_obj);
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_clock_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_clock_pause_set(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd, Eina_Bool paused)
|
||||
{
|
||||
|
@ -484,34 +448,6 @@ _efl_ui_clock_edit_mode_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
|||
return sd->edit_mode;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_clock_elm_widget_focus_next(Eo *obj, Efl_Ui_Clock_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
const Eina_List *items;
|
||||
Eina_List *(*list_free)(Eina_List *list);
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
Eina_Bool int_ret;
|
||||
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
items = _clock_items_get(obj);
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = eina_list_free;
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
|
||||
if (list_free) list_free((Eina_List *)items);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_clock_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Clock_Data *sd, Elm_Object_Item *item EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -225,8 +225,6 @@ class Efl.Ui.Clock (Efl.Ui.Layout)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.on_focus_update;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
|
|
|
@ -109,55 +109,6 @@ _efl_ui_flip_elm_widget_theme_apply(Eo *obj, Efl_Ui_Flip_Data *sd EINA_UNUSED)
|
|||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_flip_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_flip_elm_widget_focus_next(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
|
||||
/* attempt to cycle focus on in sub-items */
|
||||
if (sd->state)
|
||||
return elm_obj_widget_focus_next_get(sd->front.content, dir, next, next_item);
|
||||
else
|
||||
return elm_obj_widget_focus_next_get(sd->back.content, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_flip_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
if (!elm_widget_can_focus_get(obj))
|
||||
return EINA_TRUE;
|
||||
else
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_flip_elm_widget_focus_direction(Eo *obj, Efl_Ui_Flip_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
|
||||
Eina_List *l = NULL;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
list_data_get = eina_list_data_get;
|
||||
|
||||
if (sd->front.content)
|
||||
l = eina_list_append(l, sd->front.content);
|
||||
if (sd->back.content)
|
||||
l = eina_list_append(l, sd->back.content);
|
||||
|
||||
ret = elm_widget_focus_list_direction_get
|
||||
(obj, base, l, list_data_get, degree, direction, direction_item, weight);
|
||||
|
||||
eina_list_free(l);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_changed_size_hints_cb(void *data,
|
||||
Evas *e EINA_UNUSED,
|
||||
|
@ -2223,7 +2174,7 @@ _content_removed(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *content)
|
|||
Eina_Bool state;
|
||||
|
||||
evas_object_smart_member_del(content);
|
||||
// if its not the front or back object just return.
|
||||
// if its not the front or back object just return.
|
||||
if ((pd->front.content != content) ||
|
||||
(pd->back.content != content))
|
||||
return;
|
||||
|
@ -2368,28 +2319,28 @@ _efl_ui_flip_class_constructor(Efl_Class *klass)
|
|||
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EAPI void
|
||||
elm_flip_interaction_direction_hitsize_set(Efl_Ui_Flip *obj, Elm_Flip_Direction dir, double hitsize)
|
||||
{
|
||||
Efl_Ui_Dir uidir = _flip_dir_to_efl_ui_dir(dir);
|
||||
efl_ui_flip_interaction_direction_hitsize_set(obj, uidir, hitsize);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EAPI double
|
||||
elm_flip_interaction_direction_hitsize_get(Efl_Ui_Flip *obj, Elm_Flip_Direction dir)
|
||||
{
|
||||
Efl_Ui_Dir uidir = _flip_dir_to_efl_ui_dir(dir);
|
||||
return efl_ui_flip_interaction_direction_hitsize_get(obj, uidir);
|
||||
}
|
||||
|
||||
EOAPI void
|
||||
EOAPI void
|
||||
elm_flip_interaction_direction_enabled_set(Efl_Ui_Flip *obj, Elm_Flip_Direction dir, Eina_Bool enabled)
|
||||
{
|
||||
Efl_Ui_Dir uidir = _flip_dir_to_efl_ui_dir(dir);
|
||||
efl_ui_flip_interaction_direction_enabled_set(obj, uidir, enabled);
|
||||
}
|
||||
|
||||
EOAPI Eina_Bool
|
||||
EOAPI Eina_Bool
|
||||
elm_flip_interaction_direction_enabled_get(Efl_Ui_Flip *obj, Elm_Flip_Direction dir)
|
||||
{
|
||||
Efl_Ui_Dir uidir = _flip_dir_to_efl_ui_dir(dir);
|
||||
|
|
|
@ -179,7 +179,7 @@ class Efl.Ui.Flip (Elm.Widget, Efl.Pack.Linear, Efl.Part)
|
|||
[[Runs the flip animation to front or back.
|
||||
|
||||
Flips the front and back contents using the $mode animation.
|
||||
This effectively hides the currently visible content and shows
|
||||
This effectively hides the currently visible content and shows
|
||||
he hidden one.
|
||||
|
||||
There a number of possible animations to use for the flipping,
|
||||
|
@ -229,12 +229,8 @@ class Efl.Ui.Flip (Elm.Widget, Efl.Pack.Linear, Efl.Part)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Efl.Container.content_iterate;
|
||||
Efl.Container.content_count;
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
#include "efl_ui_focus_composition.eo.h"
|
||||
#include "efl_ui_focus_composition_adapter.eo.h"
|
||||
|
||||
#define MY_CLASS EFL_UI_FOCUS_COMPOSITION_MIXIN
|
||||
|
||||
typedef struct {
|
||||
Eina_List *order, *targets_ordered;
|
||||
Eina_List *register_target, *registered_targets;
|
||||
Eina_List *adapters;
|
||||
Efl_Ui_Focus_Manager *registered;
|
||||
} Efl_Ui_Focus_Composition_Data;
|
||||
|
||||
static void
|
||||
_state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd)
|
||||
{
|
||||
if (!pd->registered && pd->registered_targets)
|
||||
{
|
||||
Efl_Ui_Focus_Object *o;
|
||||
//remove all of them
|
||||
EINA_LIST_FREE(pd->registered_targets, o)
|
||||
{
|
||||
efl_ui_focus_manager_calc_unregister(pd->registered, o);
|
||||
}
|
||||
}
|
||||
else if (pd->registered)
|
||||
{
|
||||
Eina_List *n;
|
||||
Efl_Ui_Focus_Object *o;
|
||||
//remove all of them
|
||||
EINA_LIST_FREE(pd->registered_targets, o)
|
||||
{
|
||||
efl_ui_focus_manager_calc_unregister(pd->registered, o);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(pd->register_target, n, o)
|
||||
{
|
||||
efl_ui_focus_manager_calc_register(pd->registered, o, obj, NULL);
|
||||
pd->registered_targets = eina_list_append(pd->registered_targets, o);
|
||||
}
|
||||
|
||||
efl_ui_focus_manager_calc_update_order(pd->registered, obj, eina_list_clone(pd->targets_ordered));
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_composition_composition_elements_set(Eo *obj, Efl_Ui_Focus_Composition_Data *pd, Eina_List *logical_order)
|
||||
{
|
||||
Efl_Ui_Focus_Composition_Adapter *adapter;
|
||||
Evas_Object *elem;
|
||||
Eina_List *n;
|
||||
|
||||
pd->targets_ordered = eina_list_free(pd->targets_ordered);
|
||||
pd->register_target = eina_list_free(pd->register_target);
|
||||
|
||||
pd->order = eina_list_free(pd->order);
|
||||
pd->order = logical_order;
|
||||
|
||||
//get rid of all adapter objects
|
||||
EINA_LIST_FREE(pd->adapters, adapter)
|
||||
{
|
||||
efl_del(adapter);
|
||||
}
|
||||
|
||||
//now build a composition_elements list
|
||||
EINA_LIST_FOREACH(logical_order, n, elem)
|
||||
{
|
||||
Efl_Ui_Focus_Object *o = elem;
|
||||
|
||||
EINA_SAFETY_ON_NULL_GOTO(elem, cont);
|
||||
|
||||
if (!efl_isa(elem, ELM_WIDGET_CLASS))
|
||||
{
|
||||
if (efl_isa(elem, EFL_UI_FOCUS_OBJECT_MIXIN))
|
||||
{
|
||||
pd->register_target = eina_list_append(pd->register_target , o);
|
||||
}
|
||||
else if (efl_isa(elem, EFL_GFX_INTERFACE))
|
||||
{
|
||||
o = efl_add(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, NULL, efl_ui_focus_composition_adapter_canvas_object_set(efl_added, elem));
|
||||
|
||||
pd->adapters = eina_list_append(pd->adapters, o);
|
||||
pd->register_target = eina_list_append(pd->register_target , o);
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_SAFETY_ERROR("List contains element that is not EFL_UI_FOCUS_OBJECT_MIXIN or EFL_GFX_INTERFACE or ELM_WIDGET_CLASS");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
pd->targets_ordered = eina_list_append(pd->targets_ordered, o);
|
||||
cont:
|
||||
continue;
|
||||
}
|
||||
_state_apply(obj, pd);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_List*
|
||||
_efl_ui_focus_composition_composition_elements_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd)
|
||||
{
|
||||
return eina_list_clone(pd->order);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_focus_composition_elm_widget_focus_state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd, Elm_Widget_Focus_State current_state, Elm_Widget_Focus_State *configured_state, Elm_Widget *redirect)
|
||||
{
|
||||
Eina_Bool registered;
|
||||
|
||||
configured_state->logical = EINA_TRUE;
|
||||
|
||||
//shortcut for having the same configurations
|
||||
if (current_state.manager == configured_state->manager && !current_state.manager)
|
||||
return !!current_state.manager;
|
||||
|
||||
if (configured_state->logical == current_state.logical &&
|
||||
configured_state->manager == current_state.manager &&
|
||||
configured_state->parent == current_state.parent)
|
||||
return !!current_state.manager;
|
||||
|
||||
registered = elm_obj_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect);
|
||||
|
||||
if (registered)
|
||||
pd->registered = configured_state->manager;
|
||||
else
|
||||
pd->registered = NULL;
|
||||
|
||||
_state_apply(obj, pd);
|
||||
|
||||
return registered;
|
||||
}
|
||||
|
||||
#include "efl_ui_focus_composition.eo.c"
|
||||
|
||||
typedef struct {
|
||||
Evas_Object *object;
|
||||
} Efl_Ui_Focus_Composition_Adapter_Data;
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_composition_adapter_canvas_object_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Adapter_Data *pd, Efl_Canvas_Object *v)
|
||||
{
|
||||
pd->object = v;
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Canvas_Object*
|
||||
_efl_ui_focus_composition_adapter_canvas_object_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Adapter_Data *pd)
|
||||
{
|
||||
return pd->object;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Rect
|
||||
_efl_ui_focus_composition_adapter_efl_ui_focus_object_focus_geometry_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Adapter_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return efl_gfx_geometry_get(pd->object);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_composition_adapter_efl_ui_focus_object_focus_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Adapter_Data *pd, Eina_Bool focus)
|
||||
{
|
||||
efl_ui_focus_object_focus_set(efl_super(obj, EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS), focus);
|
||||
|
||||
evas_object_focus_set(pd->object, efl_ui_focus_object_focus_get(obj));
|
||||
}
|
||||
|
||||
#include "efl_ui_focus_composition_adapter.eo.c"
|
|
@ -0,0 +1,26 @@
|
|||
mixin Efl.Ui.Focus.Composition (Efl.Interface, Elm.Widget ) {
|
||||
[[This defines the inheriting widget as Composition widget.
|
||||
|
||||
A composition widget is a widget that is just the logical parent of a other set of widgets thet can be used as interaction.
|
||||
]]
|
||||
methods {
|
||||
@property composition_elements @protected {
|
||||
[[Set the order of elements that will be used for composition
|
||||
|
||||
Elements of the list can be either A Elm.Widget, A Efl.Ui.Focus.Object, or a Efl.Gfx.
|
||||
|
||||
If the element is a Efl.Gfx, then the geometry is used as focus geomtry, the focus property is redirected to the evas focus property. The mixin will take care of reistering.
|
||||
|
||||
If the element is a Efl.Ui.Focus.Object, then the mixin will take care of registering the element.
|
||||
|
||||
For the case that the element is a Elm.Widget nothing is done and the widget is just part of the order.
|
||||
]]
|
||||
values {
|
||||
logical_order : list<Efl.Gfx> @owned; [[The order to use]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Elm.Widget.focus_state_apply;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
class Efl.Ui.Focus.Composition.Adapter (Efl.Object, Efl.Ui.Focus.Object)
|
||||
{
|
||||
methods {
|
||||
@property canvas_object {
|
||||
values {
|
||||
v : Efl.Canvas.Object;
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Ui.Focus.Object.focus_geometry {get;}
|
||||
Efl.Ui.Focus.Object.focus {set;}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#define EFL_UI_FOCUS_LAYER_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
#include "efl_ui_focus_layer.eo.h"
|
||||
|
||||
#define MY_CLASS EFL_UI_FOCUS_LAYER_MIXIN
|
||||
|
||||
typedef struct {
|
||||
Efl_Ui_Focus_Manager *registered_manager;
|
||||
Efl_Ui_Focus_Manager *manager;
|
||||
Eina_Bool cycle;
|
||||
Eina_Bool enable_on_visible;
|
||||
} Efl_Ui_Focus_Layer_Data;
|
||||
|
||||
EOLIAN static Efl_Ui_Focus_Manager*
|
||||
_efl_ui_focus_layer_elm_widget_focus_manager_create(Eo *obj, Efl_Ui_Focus_Layer_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
|
||||
{
|
||||
return efl_add(EFL_UI_FOCUS_MANAGER_ROOT_FOCUS_CLASS, obj, efl_ui_focus_manager_root_set(efl_added, root));
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_layer_efl_gfx_visible_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v)
|
||||
{
|
||||
efl_gfx_visible_set(efl_super(obj, MY_CLASS), v);
|
||||
|
||||
if (pd->enable_on_visible)
|
||||
{
|
||||
efl_ui_focus_layer_enable_set(obj, v);
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Ui_Focus_Object*
|
||||
_efl_ui_focus_layer_efl_ui_focus_manager_move(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Efl_Ui_Focus_Direction direction)
|
||||
{
|
||||
Eo *ret = efl_ui_focus_manager_move(pd->manager, direction);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
//ret is NULL here, if we do not want to cycle return NULL, which will result in obj beeing unset
|
||||
if (!pd->cycle)
|
||||
return NULL;
|
||||
|
||||
if ((direction == EFL_UI_FOCUS_DIRECTION_PREVIOUS ) || (direction == EFL_UI_FOCUS_DIRECTION_NEXT))
|
||||
efl_ui_focus_manager_focus_set(pd->manager, obj);
|
||||
|
||||
return efl_ui_focus_manager_focus_get(obj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_layer_efl_object_destructor(Eo *obj, Efl_Ui_Focus_Layer_Data *pd EINA_UNUSED)
|
||||
{
|
||||
efl_ui_focus_layer_enable_set(obj, EINA_FALSE);
|
||||
efl_destructor(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Ui_Focus_Manager*
|
||||
_efl_ui_focus_layer_efl_ui_focus_user_manager_get(Eo *obj, Efl_Ui_Focus_Layer_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return elm_widget_top_get(obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_focus_layer_elm_widget_focus_state_apply(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Layer_Data *pd EINA_UNUSED, Elm_Widget_Focus_State current_state EINA_UNUSED, Elm_Widget_Focus_State *configured_state EINA_UNUSED, Elm_Widget *redirect EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Object*
|
||||
_efl_ui_focus_layer_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Layer_Data *pd)
|
||||
{
|
||||
pd->manager = elm_obj_widget_focus_manager_create(obj, obj);
|
||||
|
||||
efl_composite_attach(obj, pd->manager);
|
||||
|
||||
pd->enable_on_visible = EINA_TRUE;
|
||||
pd->cycle = EINA_TRUE;
|
||||
|
||||
return efl_constructor(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_layer_enable_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v)
|
||||
{
|
||||
if (v)
|
||||
{
|
||||
pd->registered_manager = elm_widget_top_get(obj);
|
||||
|
||||
efl_ui_focus_manager_redirect_set(pd->registered_manager, obj);
|
||||
efl_ui_focus_manager_focus_set(pd->manager, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (efl_ui_focus_manager_redirect_get(pd->registered_manager) == obj)
|
||||
efl_ui_focus_manager_redirect_set(pd->registered_manager, NULL);
|
||||
pd->registered_manager = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_focus_layer_enable_get(Eo *obj, Efl_Ui_Focus_Layer_Data *pd)
|
||||
{
|
||||
if (!pd->registered_manager) return EINA_FALSE;
|
||||
return (efl_ui_focus_manager_redirect_get(pd->registered_manager) == obj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_layer_behaviour_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool enable_on_visible, Eina_Bool cycle)
|
||||
{
|
||||
pd->enable_on_visible = enable_on_visible;
|
||||
pd->cycle = cycle;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_layer_behaviour_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool *enable_on_visible, Eina_Bool *cycle)
|
||||
{
|
||||
*cycle = pd->cycle;
|
||||
*enable_on_visible = pd->enable_on_visible;
|
||||
}
|
||||
|
||||
#include "efl_ui_focus_layer.eo.c"
|
|
@ -0,0 +1,31 @@
|
|||
mixin Efl.Ui.Focus.Layer (Efl.Interface, Elm.Widget, Efl.Gfx, Efl.Ui.Focus.Manager) {
|
||||
[[This defines the inheriting widget as focus layer
|
||||
|
||||
A focus layer is a layer that will, for the time of existance or visibility, be the upper most layer that gets input, and handles all focus related events, its NOT possible to escape this layer with focus movement.
|
||||
|
||||
Once the object is hidden or destructed the focus will go back to the mainwindow, where it has been before.
|
||||
]]
|
||||
methods {
|
||||
@property enable @protected {
|
||||
values {
|
||||
v : bool; [[$true to set enable the layer $false to disable it]]
|
||||
}
|
||||
}
|
||||
@property behaviour @protected {
|
||||
[[Constructor for setting the behaviour of the layer]]
|
||||
values {
|
||||
enable_on_visible : bool; [[$true means layer will set itself once the inheriting widget gets visible, $false means the layer does not get enabled automatically]]
|
||||
cycle : bool; [[If $true the focus will cycle in the layer, if $false]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Elm.Widget.focus_manager_create;
|
||||
Elm.Widget.focus_state_apply;
|
||||
Efl.Gfx.visible {set;}
|
||||
Efl.Ui.Focus.Manager.move;
|
||||
Efl.Ui.Focus.User.manager { get; }
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
}
|
||||
}
|
|
@ -1,17 +1,4 @@
|
|||
enum Efl.Ui.Focus.Direction {
|
||||
[[Those values are describing a direction from the position of view from
|
||||
one item.
|
||||
|
||||
@since 1.20
|
||||
]]
|
||||
right = 0, [[Coordinate-wise the next element on the right-hand side]]
|
||||
left = 1, [[Coordinate-wise the next element on the left-hand side]]
|
||||
down = 2, [[Coordinate-wise the next element downward]]
|
||||
up = 3, [[Coorinate-wise the next element upwards]]
|
||||
next = 4, [[Logically-wise the next item in the logical tree]]
|
||||
prev = 5, [[Logically-wise the prev item in the logical tree]]
|
||||
last = 6 [[Last value for this enum, do not use]]
|
||||
}
|
||||
import elm_general;
|
||||
|
||||
struct Efl.Ui.Focus.Relations {
|
||||
[[Structure holding the graph of relations between focussable objects.
|
||||
|
@ -144,6 +131,9 @@ interface Efl.Ui.Focus.Manager {
|
|||
To not break the assertion that there should be always a focused element, you should focus a other element immidiatly after calling that.
|
||||
]]
|
||||
}
|
||||
pop_history_stack {
|
||||
[[Removes the most upper history element, and gives the focus to the next one below]]
|
||||
}
|
||||
}
|
||||
events {
|
||||
redirect,changed : Efl.Ui.Focus.Manager; [[Emitted when the redirect
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define DIM_EFL_UI_FOCUS_DIRECTION(dim,neg) dim*2+neg
|
||||
#define NODE_DIRECTIONS_COUNT 4
|
||||
|
||||
#define DIRECTION_CHECK(dir) (dir >= 0 && dir < EFL_UI_FOCUS_DIRECTION_LAST)
|
||||
#define DIRECTION_CHECK(dir) (dir >= EFL_UI_FOCUS_DIRECTION_PREVIOUS && dir < EFL_UI_FOCUS_DIRECTION_LAST)
|
||||
|
||||
//#define CALC_DEBUG
|
||||
#define DEBUG_TUPLE(obj) efl_name_get(obj), efl_class_name_get(obj)
|
||||
|
@ -24,6 +24,8 @@ static int _focus_log_domain = -1;
|
|||
#define F_INF(...) EINA_LOG_DOM_INFO(_focus_log_domain, __VA_ARGS__)
|
||||
#define F_DBG(...) EINA_LOG_DOM_DBG(_focus_log_domain, __VA_ARGS__)
|
||||
|
||||
#define DIRECTION_ACCESS(V, ID) ((V)->graph.directions[(ID) - 2])
|
||||
|
||||
typedef struct {
|
||||
Eina_Bool positive;
|
||||
Efl_Ui_Focus_Object *anchor;
|
||||
|
@ -85,7 +87,7 @@ _complement(Efl_Ui_Focus_Direction dir)
|
|||
|
||||
COMP(EFL_UI_FOCUS_DIRECTION_RIGHT, EFL_UI_FOCUS_DIRECTION_LEFT)
|
||||
COMP(EFL_UI_FOCUS_DIRECTION_UP, EFL_UI_FOCUS_DIRECTION_DOWN)
|
||||
COMP(EFL_UI_FOCUS_DIRECTION_PREV, EFL_UI_FOCUS_DIRECTION_NEXT)
|
||||
COMP(EFL_UI_FOCUS_DIRECTION_PREVIOUS, EFL_UI_FOCUS_DIRECTION_NEXT)
|
||||
|
||||
#undef COMP
|
||||
|
||||
|
@ -101,11 +103,11 @@ border_partners_set(Node *node, Efl_Ui_Focus_Direction direction, Eina_List *lis
|
|||
{
|
||||
Node *partner;
|
||||
Eina_List *lnode;
|
||||
Border *border = &G(node).directions[direction];
|
||||
Border *border = &DIRECTION_ACCESS(node, direction);
|
||||
|
||||
EINA_LIST_FREE(border->partners, partner)
|
||||
{
|
||||
Border *comp_border = &G(partner).directions[_complement(direction)];
|
||||
Border *comp_border = &DIRECTION_ACCESS(partner, _complement(direction));
|
||||
|
||||
comp_border->partners = eina_list_remove(comp_border->partners, node);
|
||||
}
|
||||
|
@ -114,7 +116,7 @@ border_partners_set(Node *node, Efl_Ui_Focus_Direction direction, Eina_List *lis
|
|||
|
||||
EINA_LIST_FOREACH(border->partners, lnode, partner)
|
||||
{
|
||||
Border *comp_border = &G(partner).directions[_complement(direction)];
|
||||
Border *comp_border = &DIRECTION_ACCESS(partner,_complement(direction));
|
||||
|
||||
comp_border->partners = eina_list_append(comp_border->partners, node);
|
||||
}
|
||||
|
@ -164,7 +166,7 @@ node_item_free(Node *item)
|
|||
Node *n;
|
||||
Eina_List *l;
|
||||
//free the graph items
|
||||
for(int i = 0;i < NODE_DIRECTIONS_COUNT; i++)
|
||||
for(int i = EFL_UI_FOCUS_DIRECTION_UP;i < NODE_DIRECTIONS_COUNT; i++)
|
||||
{
|
||||
border_partners_set(item, i, NULL);
|
||||
}
|
||||
|
@ -373,7 +375,7 @@ _debug_node(Node *node)
|
|||
|
||||
printf("NODE %s-%s\n", DEBUG_TUPLE(node->focusable));
|
||||
|
||||
#define DIR_LIST(dir) G(node).directions[dir].partners
|
||||
#define DIR_LIST(dir) DIRECTION_ACCESS(node,dir).partners
|
||||
|
||||
#define DIR_OUT(dir)\
|
||||
tmp = DIR_LIST(dir); \
|
||||
|
@ -492,9 +494,20 @@ _node_new_geometery_cb(void *data, const Efl_Event *event)
|
|||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
_object_del_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
/*
|
||||
* Lets just implicitly delete items that are deleted
|
||||
* Otherwise we have later just a bunch of errors
|
||||
*/
|
||||
efl_ui_focus_manager_calc_unregister(data, event->object);
|
||||
}
|
||||
|
||||
EFL_CALLBACKS_ARRAY_DEFINE(focusable_node,
|
||||
{EFL_GFX_EVENT_RESIZE, _node_new_geometery_cb},
|
||||
{EFL_GFX_EVENT_MOVE, _node_new_geometery_cb},
|
||||
{EFL_EVENT_DEL, _object_del_cb},
|
||||
);
|
||||
|
||||
//=============================
|
||||
|
@ -780,12 +793,12 @@ _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_
|
|||
pd->focus_stack = eina_list_remove(pd->focus_stack, node);
|
||||
|
||||
//add all neighbors of the node to the dirty list
|
||||
for(int i = 0; i < 4; i++)
|
||||
for(int i = EFL_UI_FOCUS_DIRECTION_UP; i < NODE_DIRECTIONS_COUNT; i++)
|
||||
{
|
||||
Node *partner;
|
||||
Eina_List *n;
|
||||
|
||||
EINA_LIST_FOREACH(node->graph.directions[i].partners, n, partner)
|
||||
EINA_LIST_FOREACH(DIRECTION_ACCESS(node, i).partners, n, partner)
|
||||
{
|
||||
dirty_add(obj, pd, partner);
|
||||
}
|
||||
|
@ -884,10 +897,10 @@ _iterator_next(Border_Elements_Iterator *it, void **data)
|
|||
|
||||
EINA_ITERATOR_FOREACH(it->real_iterator, node)
|
||||
{
|
||||
for(int i = 0 ;i < NODE_DIRECTIONS_COUNT; i++)
|
||||
for(int i = EFL_UI_FOCUS_DIRECTION_UP ;i < NODE_DIRECTIONS_COUNT; i++)
|
||||
{
|
||||
if (node->type != NODE_TYPE_ONLY_LOGICAL &&
|
||||
!node->graph.directions[i].partners)
|
||||
!DIRECTION_ACCESS(node, i).partners)
|
||||
{
|
||||
*data = node->focusable;
|
||||
return EINA_TRUE;
|
||||
|
@ -973,7 +986,7 @@ _coords_movement(Efl_Ui_Focus_Manager_Calc_Data *pd, Node *upper, Efl_Ui_Focus_D
|
|||
//we are searching which of the partners is lower to the history
|
||||
EINA_LIST_REVERSE_FOREACH(pd->focus_stack, node_list, candidate)
|
||||
{
|
||||
if (eina_list_data_find(G(upper).directions[direction].partners, candidate))
|
||||
if (eina_list_data_find(DIRECTION_ACCESS(upper, direction).partners, candidate))
|
||||
{
|
||||
//this is the next accessable part
|
||||
return candidate;
|
||||
|
@ -982,7 +995,7 @@ _coords_movement(Efl_Ui_Focus_Manager_Calc_Data *pd, Node *upper, Efl_Ui_Focus_D
|
|||
|
||||
//if we haven't found anything in the history, use the widget with the smallest distance
|
||||
{
|
||||
Eina_List *lst = G(upper).directions[direction].partners;
|
||||
Eina_List *lst = DIRECTION_ACCESS(upper, direction).partners;
|
||||
Eina_List *n;
|
||||
Node *node, *min = NULL;
|
||||
Eina_Vector2 elem, other;
|
||||
|
@ -1146,7 +1159,7 @@ _request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Fo
|
|||
|
||||
dirty_flush(obj, pd, upper);
|
||||
|
||||
if (direction == EFL_UI_FOCUS_DIRECTION_PREV
|
||||
if (direction == EFL_UI_FOCUS_DIRECTION_PREVIOUS
|
||||
|| direction == EFL_UI_FOCUS_DIRECTION_NEXT)
|
||||
dir = _logical_movement(pd, upper, direction);
|
||||
else
|
||||
|
@ -1326,7 +1339,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui
|
|||
n = eina_hash_find(pd->node_hash, &old_candidate);
|
||||
|
||||
if (direction == EFL_UI_FOCUS_DIRECTION_NEXT ||
|
||||
direction == EFL_UI_FOCUS_DIRECTION_PREV)
|
||||
direction == EFL_UI_FOCUS_DIRECTION_PREVIOUS)
|
||||
{
|
||||
if (n)
|
||||
{
|
||||
|
@ -1447,7 +1460,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Mana
|
|||
|
||||
dirty_flush(obj, pd, n);
|
||||
|
||||
#define DIR_CLONE(dir) _convert(G(n).directions[dir].partners);
|
||||
#define DIR_CLONE(dir) _convert(DIRECTION_ACCESS(n,dir).partners);
|
||||
|
||||
res->right = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_RIGHT);
|
||||
res->left = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_LEFT);
|
||||
|
@ -1519,4 +1532,22 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_reset_history(Eo *obj EINA_UNUSE
|
|||
pd->focus_stack = eina_list_free(pd->focus_stack);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_manager_calc_efl_ui_focus_manager_pop_history_stack(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd)
|
||||
{
|
||||
Node *last;
|
||||
|
||||
if (!pd->focus_stack) return;
|
||||
//remove last element
|
||||
last = eina_list_last_data_get(pd->focus_stack);
|
||||
pd->focus_stack = eina_list_remove(pd->focus_stack, last);
|
||||
//unfocus it
|
||||
efl_ui_focus_object_focus_set(last->focusable, EINA_FALSE);
|
||||
|
||||
//get now the highest, and unfocus that!
|
||||
last = eina_list_last_data_get(pd->focus_stack);
|
||||
if (last) efl_ui_focus_object_focus_set(last->focusable, EINA_TRUE);
|
||||
}
|
||||
|
||||
|
||||
#include "efl_ui_focus_manager_calc.eo.c"
|
||||
|
|
|
@ -99,6 +99,7 @@ class Efl.Ui.Focus.Manager.Calc (Efl.Object, Efl.Ui.Focus.Manager) {
|
|||
Efl.Ui.Focus.Manager.fetch;
|
||||
Efl.Ui.Focus.Manager.logical_end;
|
||||
Efl.Ui.Focus.Manager.reset_history;
|
||||
Efl.Ui.Focus.Manager.pop_history_stack;
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.finalize;
|
||||
Efl.Object.provider_find;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
#include "efl_ui_focus_rectangle.eo.h"
|
||||
|
||||
#define MY_CLASS EFL_UI_FOCUS_MANAGER_ROOT_FOCUS_CLASS
|
||||
|
||||
typedef struct {
|
||||
|
@ -27,12 +29,12 @@ _trap(Efl_Ui_Focus_Manager_Root_Focus_Data *pd, Efl_Ui_Focus_Object *obj)
|
|||
static void
|
||||
_state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd)
|
||||
{
|
||||
if (!pd->none_logicals && pd->rect_registered)
|
||||
if (pd->none_logicals && pd->rect_registered)
|
||||
{
|
||||
efl_ui_focus_manager_calc_unregister(obj, pd->rect);
|
||||
pd->rect_registered = EINA_FALSE;
|
||||
}
|
||||
else if (pd->none_logicals && !pd->rect_registered)
|
||||
else if (!pd->none_logicals && !pd->rect_registered)
|
||||
{
|
||||
efl_ui_focus_manager_calc_register(obj, pd->rect, pd->root, NULL);
|
||||
pd->rect_registered = EINA_TRUE;
|
||||
|
@ -42,14 +44,15 @@ _state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd)
|
|||
EOLIAN static Eina_Bool
|
||||
_efl_ui_focus_manager_root_focus_efl_ui_focus_manager_calc_register(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Object *parent, Efl_Ui_Focus_Manager *redirect)
|
||||
{
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
if (efl_ui_focus_manager_calc_register(efl_super(obj, MY_CLASS), child, parent, redirect))
|
||||
{
|
||||
pd->none_logicals = eina_list_append(pd->none_logicals, child);
|
||||
return EINA_TRUE;
|
||||
ret = EINA_TRUE;
|
||||
}
|
||||
if (child != pd->rect)
|
||||
_state_eval(obj, pd);
|
||||
return EINA_FALSE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -132,7 +135,11 @@ _efl_ui_focus_manager_root_focus_efl_object_finalize(Eo *obj, Efl_Ui_Focus_Manag
|
|||
ret = efl_finalize(efl_super(obj, MY_CLASS));
|
||||
|
||||
pd->root = efl_ui_focus_manager_root_get(obj);
|
||||
pd->rect = evas_object_rectangle_add(evas_object_evas_get(pd->root));
|
||||
|
||||
pd->rect = efl_add(EFL_UI_FOCUS_RECTANGLE_CLASS, evas_object_evas_get(pd->root));
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(pd->rect, NULL);
|
||||
|
||||
pd->iterator_list = eina_list_append(pd->iterator_list, pd->root);
|
||||
|
||||
_state_eval(obj, pd);
|
||||
|
@ -142,3 +149,36 @@ _efl_ui_focus_manager_root_focus_efl_object_finalize(Eo *obj, Efl_Ui_Focus_Manag
|
|||
|
||||
|
||||
#include "efl_ui_focus_manager_root_focus.eo.c"
|
||||
/* focus rectnangle implementation */
|
||||
typedef struct {
|
||||
Eina_Bool focus;
|
||||
} Efl_Ui_Focus_Rectangle_Data;
|
||||
|
||||
EOLIAN static Eina_Rect
|
||||
_efl_ui_focus_rectangle_efl_ui_focus_object_focus_geometry_get(Eo *obj, Efl_Ui_Focus_Rectangle_Data *pd EINA_UNUSED)
|
||||
{
|
||||
Eina_Rect geom;
|
||||
|
||||
evas_object_geometry_get(obj, &geom.x, &geom.y, &geom.w, &geom.h);
|
||||
|
||||
return geom;
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_focus_rectangle_efl_ui_focus_object_focus_set(Eo *obj, Efl_Ui_Focus_Rectangle_Data *pd, Eina_Bool focus)
|
||||
{
|
||||
efl_ui_focus_object_focus_set(efl_super(obj, EFL_UI_FOCUS_RECTANGLE_CLASS), focus);
|
||||
|
||||
pd->focus = focus;
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_focus_rectangle_efl_ui_focus_object_focus_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Rectangle_Data *pd)
|
||||
{
|
||||
return pd->focus;
|
||||
}
|
||||
|
||||
|
||||
#include "efl_ui_focus_rectangle.eo.c"
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
class Efl.Ui.Focus.Rectangle (Efl.Canvas.Rectangle, Efl.Ui.Focus.Object)
|
||||
{
|
||||
implements {
|
||||
Efl.Ui.Focus.Object.focus_geometry {get;}
|
||||
Efl.Ui.Focus.Object.focus {set; get;}
|
||||
}
|
||||
}
|
|
@ -53,51 +53,6 @@ _sizing_eval(Evas_Object *obj,
|
|||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_frame_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_frame_elm_widget_focus_next(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *content;
|
||||
|
||||
content = elm_layout_content_get(obj, NULL);
|
||||
|
||||
if (!content) return EINA_FALSE;
|
||||
|
||||
else
|
||||
{
|
||||
/* attempt to follow focus cycle into sub-object */
|
||||
return elm_obj_widget_focus_next_get(content, dir, next, next_item);
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_frame_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_frame_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Evas_Object *content;
|
||||
|
||||
content = elm_layout_content_get(obj, NULL);
|
||||
|
||||
if (!content) return EINA_FALSE;
|
||||
|
||||
else
|
||||
{
|
||||
/* Try to cycle focus on content */
|
||||
return elm_obj_widget_focus_direction_get
|
||||
(content, base, degree, direction, direction_item, weight);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -57,10 +57,6 @@ class Efl.Ui.Frame (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Text, Efl.Text.Markup,
|
|||
Efl.Object.constructor;
|
||||
class.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Efl.Text.text { get; set; }
|
||||
Efl.Text.Markup.markup { get; set; }
|
||||
Efl.Ui.Translatable.translatable_text { get; set; }
|
||||
|
|
|
@ -20,90 +20,6 @@ struct _Custom_Table_Data
|
|||
EFL_CALLBACKS_ARRAY_DEFINE(subobj_callbacks,
|
||||
{ EFL_EVENT_DEL, _subobj_del_cb });
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_grid_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_grid_elm_widget_focus_next(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_Bool int_ret;
|
||||
|
||||
const Eina_List *items;
|
||||
Eina_List *(*list_free)(Eina_List *list);
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
items = evas_object_table_children_get
|
||||
(wd->resize_obj);
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = eina_list_free;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
|
||||
|
||||
if (list_free) list_free((Eina_List *)items);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_grid_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_grid_elm_widget_focus_direction(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_Bool int_ret;
|
||||
|
||||
const Eina_List *items;
|
||||
Eina_List *(*list_free)(Eina_List *list);
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
items = evas_object_table_children_get
|
||||
(wd->resize_obj);
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = eina_list_free;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_direction_get
|
||||
(obj, base, items, list_data_get, degree, direction, direction_item, weight);
|
||||
|
||||
if (list_free)
|
||||
list_free((Eina_List *)items);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
||||
{
|
||||
|
|
|
@ -5,10 +5,6 @@ class Efl.Ui.Grid (Elm.Widget, Efl.Pack.Grid, Efl.Pack.Layout,
|
|||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
Efl.Container.content_iterate;
|
||||
Efl.Container.content_count;
|
||||
|
|
|
@ -385,14 +385,6 @@ _efl_ui_layout_elm_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd)
|
|||
return theme_apply;
|
||||
}
|
||||
|
||||
static void *
|
||||
_efl_ui_layout_list_data_get(const Eina_List *list)
|
||||
{
|
||||
Efl_Ui_Layout_Sub_Object_Data *sub_d = eina_list_data_get(list);
|
||||
|
||||
return sub_d->obj;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
|
||||
{
|
||||
|
@ -422,73 +414,6 @@ _efl_ui_layout_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
if (!elm_widget_can_focus_get(obj))
|
||||
return EINA_TRUE;
|
||||
else
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
_access_focus_list_sort_cb(const void *data1, const void *data2)
|
||||
{
|
||||
Evas_Coord_Point p1, p2;
|
||||
Evas_Object *obj1, *obj2;
|
||||
|
||||
obj1 = ((Efl_Ui_Layout_Sub_Object_Data *)data1)->obj;
|
||||
obj2 = ((Efl_Ui_Layout_Sub_Object_Data *)data2)->obj;
|
||||
|
||||
evas_object_geometry_get(obj1, &p1.x, &p1.y, NULL, NULL);
|
||||
evas_object_geometry_get(obj2, &p2.x, &p2.y, NULL, NULL);
|
||||
|
||||
if (p1.y == p2.y)
|
||||
{
|
||||
return p1.x - p2.x;
|
||||
}
|
||||
|
||||
return p1.y - p2.y;
|
||||
}
|
||||
|
||||
static const Eina_List *
|
||||
_access_focus_list_sort(Eina_List *origin)
|
||||
{
|
||||
Eina_List *l, *temp = NULL;
|
||||
Efl_Ui_Layout_Sub_Object_Data *sub_d;
|
||||
|
||||
EINA_LIST_FOREACH(origin, l, sub_d)
|
||||
temp = eina_list_sorted_insert(temp, _access_focus_list_sort_cb, sub_d);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/* WARNING: if you're making a widget *not* supposed to have focusable
|
||||
* child objects, but still inheriting from elm_layout, just set its
|
||||
* focus_next smart function back to NULL */
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_focus_next(Eo *obj, Efl_Ui_Layout_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
list_data_get = eina_list_data_get;
|
||||
else
|
||||
{
|
||||
items = sd->subs;
|
||||
list_data_get = _efl_ui_layout_list_data_get;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
|
||||
if (_elm_config->access_mode)
|
||||
items = _access_focus_list_sort((Eina_List *)items);
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_widget_sub_object_add(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Evas_Object *sobj)
|
||||
{
|
||||
|
@ -543,38 +468,6 @@ _efl_ui_layout_elm_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Layout_Data *sd,
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
if (!elm_widget_can_focus_get(obj))
|
||||
return EINA_TRUE;
|
||||
else
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_focus_direction(Eo *obj, Efl_Ui_Layout_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
if (!sd->subs) return EINA_FALSE;
|
||||
|
||||
/* Focus chain (This block is different from elm_win cycle) */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
list_data_get = eina_list_data_get;
|
||||
else
|
||||
{
|
||||
items = sd->subs;
|
||||
list_data_get = _efl_ui_layout_list_data_get;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_direction_get
|
||||
(obj, base, items, list_data_get, degree, direction, direction_item, weight);
|
||||
}
|
||||
|
||||
static void
|
||||
_edje_signal_callback(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
|
|
|
@ -58,12 +58,8 @@ class Efl.Ui.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
|||
Efl.Canvas.Layout_Group.group_data { get; }
|
||||
Efl.Canvas.Layout_Group.group_size_min { get; }
|
||||
Efl.Canvas.Layout_Group.group_size_max { get; }
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.on_focus_update;
|
||||
|
|
|
@ -92,48 +92,6 @@ _efl_ui_panes_elm_widget_theme_apply(Eo *obj, Efl_Ui_Panes_Data *sd)
|
|||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_panes_elm_widget_focus_next(Eo *obj, Efl_Ui_Panes_Data *sd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
Eina_List *items = NULL;
|
||||
Eina_List *(*list_free)(Eina_List *list);
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
Evas_Object *left = NULL;
|
||||
Evas_Object *right = NULL;
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = (Eina_List *)elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
left = elm_layout_content_get(obj, "left");
|
||||
if (left)
|
||||
items = eina_list_append(items, left);
|
||||
|
||||
right = elm_layout_content_get(obj, "right");
|
||||
if (right)
|
||||
items = eina_list_append(items, right);
|
||||
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = eina_list_free;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_next_get
|
||||
(obj, (const Eina_List *)items, list_data_get, dir, next, next_item);
|
||||
|
||||
if (list_free) list_free((Eina_List *)items);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_on_clicked(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
|
@ -517,12 +475,6 @@ _efl_ui_panes_fixed_get(Eo *obj EINA_UNUSED, Efl_Ui_Panes_Data *sd)
|
|||
return sd->fixed;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_panes_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Panes_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_panes_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -47,8 +47,6 @@ class Efl.Ui.Panes (Efl.Ui.Layout, Efl.Ui.Direction,
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $vertical.]] }
|
||||
Efl.Part.part;
|
||||
|
|
|
@ -608,18 +608,6 @@ elm_progressbar_inverted_get(const Evas_Object *obj)
|
|||
return _is_inverted(dir);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_progressbar_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_progressbar_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_progressbar_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -50,8 +50,6 @@ class Efl.Ui.Progressbar (Efl.Ui.Layout, Efl.Ui.Range, Efl.Ui.Direction)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Efl.Ui.Range.range_value { get; set; }
|
||||
|
|
|
@ -1399,18 +1399,6 @@ _efl_ui_slider_indicator_visible_mode_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Dat
|
|||
return sd->indicator_visible_mode;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_slider_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_slider_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_slider_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Slider_Data *sd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
|
||||
{
|
||||
|
@ -1447,7 +1435,7 @@ _efl_ui_slider_efl_access_value_value_and_text_set(Eo *obj, Efl_Ui_Slider_Data *
|
|||
double oldval = sd->val;
|
||||
|
||||
if (value < sd->val_min) value = sd->val_min;
|
||||
if (value > sd->val_max) value = sd->val_max;
|
||||
if (value > sd->val_max) value = sd->val_max;
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_SLIDER_DRAG_START, NULL);
|
||||
sd->val = value;
|
||||
|
|
|
@ -117,8 +117,6 @@ class Efl.Ui.Slider (Efl.Ui.Layout, Efl.Ui.Range, Efl.Ui.Direction,
|
|||
Efl.Canvas.Group.group_calculate;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.on_access_activate;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.widget_event;
|
||||
Efl.Ui.Range.range_value { get; set; }
|
||||
|
|
|
@ -2795,7 +2795,7 @@ _selection_handlers_offset_calc(Evas_Object *obj, Evas_Object *handler, Evas_Coo
|
|||
EFL_UI_TEXT_DATA_GET(obj, sd);
|
||||
|
||||
evas_object_geometry_get(sd->entry_edje, &ex, &ey, NULL, NULL);
|
||||
efl_text_cursor_geometry_get(obj,
|
||||
efl_text_cursor_geometry_get(obj,
|
||||
efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN),
|
||||
EFL_TEXT_CURSOR_TYPE_BEFORE,
|
||||
&cx, &cy, &cw, &ch,
|
||||
|
@ -4068,18 +4068,6 @@ _efl_ui_text_elm_widget_on_access_activate(Eo *obj, Efl_Ui_Text_Data *_pd EINA_U
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_text_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_text_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_text_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
@ -4722,7 +4710,7 @@ _update_text_cursors(Eo *obj)
|
|||
x = y = w = h = -1;
|
||||
xx = yy = ww = hh = -1;
|
||||
_decoration_calc_offset(sd, &x, &y);
|
||||
bidi_cursor = efl_text_cursor_geometry_get(obj,
|
||||
bidi_cursor = efl_text_cursor_geometry_get(obj,
|
||||
efl_text_cursor_get(text_obj, EFL_TEXT_CURSOR_GET_MAIN),
|
||||
EFL_TEXT_CURSOR_TYPE_BEFORE, &xx, &yy, &ww, &hh, &xx2, &yy2,
|
||||
NULL, NULL);
|
||||
|
@ -5006,8 +4994,8 @@ _anchors_create(Eo *obj, Efl_Ui_Text_Data *sd)
|
|||
Eo *text_obj = edje_object_part_swallow_get(sd->entry_edje, "elm.text");
|
||||
_anchors_clear_all(obj, sd);
|
||||
|
||||
start = efl_text_cursor_new(text_obj);
|
||||
end = efl_text_cursor_new(text_obj);
|
||||
start = efl_text_cursor_new(text_obj);
|
||||
end = efl_text_cursor_new(text_obj);
|
||||
|
||||
/* Retrieve all annotations in the text. */
|
||||
efl_text_cursor_paragraph_first(obj, start);
|
||||
|
|
|
@ -359,13 +359,11 @@ class Efl.Ui.Text (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
|||
Efl.Canvas.Layout_Signal.signal_callback_del;
|
||||
Efl.Canvas.Layout_Signal.signal_emit;
|
||||
Elm.Widget.on_access_activate;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.focus_region { get; }
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Interface_Scrollable.policy { set; }
|
||||
Elm.Interface_Scrollable.bounce_allow { set; }
|
||||
Elm.Interface.Atspi_Accessible.state_set { get; }
|
||||
|
|
|
@ -361,18 +361,6 @@ _efl_ui_video_remember_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Video_Data *sd)
|
|||
return sd->remember;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_video_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Video_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_video_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Video_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_video_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -64,8 +64,6 @@ class Efl.Ui.Video (Efl.Ui.Layout, Efl.File,
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Efl.File.file { get; set; }
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
}
|
||||
|
|
|
@ -1223,23 +1223,14 @@ _elm_win_focus_in(Ecore_Evas *ee)
|
|||
ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
|
||||
if (sd->type != ELM_WIN_FAKE)
|
||||
{
|
||||
if (!elm_obj_widget_focus_order_get(obj))
|
||||
Efl_Ui_Focus_Manager *man = sd->obj;
|
||||
while(efl_ui_focus_manager_redirect_get(man))
|
||||
{
|
||||
elm_obj_widget_focus_steal(obj, NULL);
|
||||
man = efl_ui_focus_manager_redirect_get(man);
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Object *newest = NULL;
|
||||
unsigned int newest_focus_order = 0;
|
||||
|
||||
newest = elm_widget_newest_focus_order_get
|
||||
(obj, &newest_focus_order, EINA_TRUE);
|
||||
if (newest &&
|
||||
(_elm_widget_onscreen_is(newest) || (newest == obj)))
|
||||
elm_obj_widget_focus_restore(obj);
|
||||
else
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
}
|
||||
Evas_Object *focused = efl_ui_focus_manager_focus_get(man);
|
||||
elm_obj_widget_on_focus_update(focused, NULL);
|
||||
}
|
||||
|
||||
evas_object_smart_callback_call(obj, SIG_FOCUS_IN, NULL);
|
||||
|
@ -1634,68 +1625,6 @@ _elm_win_state_change(Ecore_Evas *ee)
|
|||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_elm_widget_focus_next(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
/* Focus chain */
|
||||
if (wd->subobjs)
|
||||
{
|
||||
if (!(items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
items = wd->subobjs;
|
||||
if (!items)
|
||||
return EINA_FALSE;
|
||||
}
|
||||
list_data_get = eina_list_data_get;
|
||||
|
||||
elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
|
||||
|
||||
if (*next) return EINA_TRUE;
|
||||
}
|
||||
*next = (Evas_Object *)obj;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_elm_widget_focus_direction(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
/* Focus chain */
|
||||
if (wd->subobjs)
|
||||
{
|
||||
if (!(items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
items = wd->subobjs;
|
||||
|
||||
list_data_get = eina_list_data_get;
|
||||
|
||||
return elm_widget_focus_list_direction_get
|
||||
(obj, base, items, list_data_get, degree, direction, direction_item, weight);
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Win_Data *sd, Elm_Object_Item *item EINA_UNUSED)
|
||||
{
|
||||
|
@ -1727,7 +1656,7 @@ _key_action_move(Evas_Object *obj, const char *params)
|
|||
Efl_Ui_Focus_Object *o;
|
||||
|
||||
if (!strcmp(dir, "previous"))
|
||||
focus_dir = EFL_UI_FOCUS_DIRECTION_PREV;
|
||||
focus_dir = EFL_UI_FOCUS_DIRECTION_PREVIOUS;
|
||||
else if (!strcmp(dir, "next"))
|
||||
focus_dir = EFL_UI_FOCUS_DIRECTION_NEXT;
|
||||
else if (!strcmp(dir, "left"))
|
||||
|
@ -1750,7 +1679,7 @@ _key_action_move(Evas_Object *obj, const char *params)
|
|||
efl_ui_focus_manager_focus_set(obj, root);
|
||||
}
|
||||
|
||||
if (!o && focus_dir == EFL_UI_FOCUS_DIRECTION_PREV)
|
||||
if (!o && focus_dir == EFL_UI_FOCUS_DIRECTION_PREVIOUS)
|
||||
{
|
||||
Efl_Ui_Focus_Manager_Logical_End_Detail last;
|
||||
Efl_Ui_Focus_Manager *rec_manager = obj;
|
||||
|
@ -2758,7 +2687,8 @@ _win_img_hide(void *data,
|
|||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_obj_widget_focus_hide_handle(data);
|
||||
Efl_Ui_Win *real_win = elm_widget_top_get(data);
|
||||
efl_ui_focus_manager_redirect_set(real_win, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2778,7 +2708,9 @@ _win_img_focus_in(void *data,
|
|||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_obj_widget_focus_steal(data, NULL);
|
||||
Efl_Ui_Win *real_win = elm_widget_top_get(data);
|
||||
efl_ui_focus_manager_redirect_set(real_win, data);
|
||||
efl_ui_focus_manager_focus_set(data, efl_ui_focus_manager_root_get(data));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2787,7 +2719,8 @@ _win_img_focus_out(void *data,
|
|||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_obj_widget_focused_object_clear(data);
|
||||
Efl_Ui_Win *real_win = elm_widget_top_get(data);
|
||||
efl_ui_focus_manager_redirect_set(real_win, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3679,11 +3612,7 @@ _elm_win_translate(void)
|
|||
void
|
||||
_elm_win_focus_reconfigure(void)
|
||||
{
|
||||
const Eina_List *l;
|
||||
Evas_Object *obj;
|
||||
|
||||
EINA_LIST_FOREACH(_elm_win_list, l, obj)
|
||||
elm_obj_widget_focus_reconfigure(obj);
|
||||
/* FOCUS-FIXME */
|
||||
}
|
||||
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
|
@ -5041,6 +4970,8 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Elm_W
|
|||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
|
||||
if (getenv("ELM_FIRST_FRAME"))
|
||||
evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
|
||||
_elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
|
||||
|
@ -6692,12 +6623,20 @@ _on_atspi_bus_connected(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUS
|
|||
efl_access_window_created_signal_emit(win);
|
||||
if (elm_win_focus_get(win))
|
||||
{
|
||||
Evas_Object *target;
|
||||
efl_access_window_activated_signal_emit(win);
|
||||
/** Reemit focused event to inform atspi clients about currently
|
||||
* focused object **/
|
||||
unsigned int order = 0;
|
||||
Evas_Object *target;
|
||||
target = elm_widget_newest_focus_order_get(win, &order, EINA_TRUE);
|
||||
{
|
||||
Efl_Ui_Focus_Manager *m;
|
||||
|
||||
m = win;
|
||||
|
||||
while (efl_ui_focus_manager_redirect_get(m))
|
||||
m = efl_ui_focus_manager_redirect_get(m);
|
||||
|
||||
target = efl_ui_focus_manager_focus_get(m);
|
||||
}
|
||||
if (target)
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(target, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
|
||||
}
|
||||
|
|
|
@ -822,10 +822,6 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Efl.Access.Window,
|
|||
Efl.Gfx.Stack.raise; [[Places the window at the top of the stack, so
|
||||
that it's not covered by any other window.]]
|
||||
Efl.Gfx.Stack.lower; [[This action is ignored by the Window.]]
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus { get; }
|
||||
Elm.Widget.focus_highlight_style { get; set; }
|
||||
|
|
|
@ -38,11 +38,9 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
};
|
||||
#undef ELM_PRIV_CTXPOPUP_SIGNALS
|
||||
|
||||
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
||||
static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
|
||||
|
||||
static const Elm_Action key_actions[] = {
|
||||
{"move", _key_action_move},
|
||||
{"escape", _key_action_escape},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -61,81 +59,6 @@ _elm_ctxpopup_efl_ui_translatable_translation_update(Eo *obj, Elm_Ctxpopup_Data
|
|||
efl_ui_translatable_translation_update(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_ctxpopup_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_ctxpopup_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_ctxpopup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
if (!sd)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!elm_obj_widget_focus_next_get(sd->box, dir, next, next_item))
|
||||
{
|
||||
elm_obj_widget_focused_object_clear(sd->box);
|
||||
elm_obj_widget_focus_next_get(sd->box, dir, next, next_item);
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_ctxpopup_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_Bool int_ret;
|
||||
|
||||
Eina_List *l = NULL;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
if (!sd)
|
||||
return EINA_FALSE;
|
||||
|
||||
list_data_get = eina_list_data_get;
|
||||
|
||||
l = eina_list_append(l, sd->box);
|
||||
|
||||
int_ret = elm_widget_focus_list_direction_get
|
||||
(obj, base, l, list_data_get, degree, direction, direction_item, weight);
|
||||
eina_list_free(l);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_move(Evas_Object *obj, const char *params)
|
||||
{
|
||||
ELM_CTXPOPUP_DATA_GET(obj, sd);
|
||||
const char *dir = params;
|
||||
|
||||
if (!sd->box) return EINA_FALSE;
|
||||
|
||||
_elm_widget_focus_auto_show(obj);
|
||||
if (!strcmp(dir, "previous"))
|
||||
elm_obj_widget_focus_cycle(sd->box, ELM_FOCUS_PREVIOUS);
|
||||
else if (!strcmp(dir, "next"))
|
||||
elm_obj_widget_focus_cycle(sd->box, ELM_FOCUS_NEXT);
|
||||
else if (!strcmp(dir, "left"))
|
||||
elm_obj_widget_focus_cycle(sd->box, ELM_FOCUS_LEFT);
|
||||
else if (!strcmp(dir, "right"))
|
||||
elm_obj_widget_focus_cycle(sd->box, ELM_FOCUS_RIGHT);
|
||||
else if (!strcmp(dir, "up"))
|
||||
elm_obj_widget_focus_cycle(sd->box, ELM_FOCUS_UP);
|
||||
else if (!strcmp(dir, "down"))
|
||||
elm_obj_widget_focus_cycle(sd->box, ELM_FOCUS_DOWN);
|
||||
else return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
|
@ -1608,12 +1531,6 @@ _elm_ctxpopup_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNU
|
|||
{
|
||||
static Elm_Atspi_Action atspi_actions[] = {
|
||||
{ "escape", "escape", NULL, _key_action_escape},
|
||||
{ "move,previous", "move", "previous", _key_action_move},
|
||||
{ "move,next", "move", "next", _key_action_move},
|
||||
{ "move,left", "move", "left", _key_action_move},
|
||||
{ "move,right", "move", "right", _key_action_move},
|
||||
{ "move,up", "move", "up", _key_action_move},
|
||||
{ "move,down", "move", "down", _key_action_move},
|
||||
{ NULL, NULL, NULL, NULL }
|
||||
};
|
||||
return &atspi_actions[0];
|
||||
|
|
|
@ -3064,43 +3064,6 @@ _elm_fileselector_elm_interface_fileselector_sort_method_get(Eo *obj EINA_UNUSED
|
|||
return sd->sort_type;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
|
||||
if (sd->up_button) items = eina_list_append(items, sd->up_button);
|
||||
if (sd->home_button) items = eina_list_append(items, sd->home_button);
|
||||
if (sd->files_view) items = eina_list_append(items, sd->files_view);
|
||||
if (sd->path_entry) items = eina_list_append(items, sd->path_entry);
|
||||
if (sd->name_entry) items = eina_list_append(items, sd->name_entry);
|
||||
if (sd->filter_hoversel) items = eina_list_append(items, sd->filter_hoversel);
|
||||
if (sd->cancel_button) items = eina_list_append(items, sd->cancel_button);
|
||||
if (sd->ok_button) items = eina_list_append(items, sd->ok_button);
|
||||
|
||||
if (_elm_config->access_mode)
|
||||
return elm_widget_focus_list_next_get(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
|
||||
if (!elm_widget_focus_list_next_get(obj, items, eina_list_data_get, dir, next, next_item))
|
||||
*next = (Evas_Object *)obj;
|
||||
|
||||
eina_list_free(items);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_elm_widget_focus_state_apply(Eo *obj, Elm_Fileselector_Data *pd, Elm_Widget_Focus_State current_state, Elm_Widget_Focus_State *configured_state, Elm_Widget *redirect)
|
||||
{
|
||||
|
@ -3111,29 +3074,6 @@ _elm_fileselector_elm_widget_focus_state_apply(Eo *obj, Elm_Fileselector_Data *p
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
|
||||
if (sd->up_button) items = eina_list_append(items, sd->up_button);
|
||||
if (sd->home_button) items = eina_list_append(items, sd->home_button);
|
||||
if (sd->files_view) items = eina_list_append(items, sd->files_view);
|
||||
if (sd->path_entry) items = eina_list_append(items, sd->path_entry);
|
||||
if (sd->name_entry) items = eina_list_append(items, sd->name_entry);
|
||||
if (sd->filter_hoversel) items = eina_list_append(items, sd->filter_hoversel);
|
||||
if (sd->cancel_button) items = eina_list_append(items, sd->cancel_button);
|
||||
if (sd->ok_button) items = eina_list_append(items, sd->ok_button);
|
||||
|
||||
elm_widget_focus_list_direction_get
|
||||
(obj, base, items, eina_list_data_get, degree, direction, direction_item, weight);
|
||||
|
||||
eina_list_free(items);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_fileselector_text_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, const char *part, const char *label)
|
||||
{
|
||||
|
|
|
@ -159,54 +159,6 @@ _elm_fileselector_entry_elm_layout_sizing_eval(Eo *obj, Elm_Fileselector_Entry_D
|
|||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_entry_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_entry_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_entry_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *chain[2];
|
||||
Evas_Object *to_focus;
|
||||
unsigned char i;
|
||||
|
||||
/* Direction */
|
||||
if (dir == ELM_FOCUS_PREVIOUS)
|
||||
{
|
||||
chain[0] = sd->button;
|
||||
chain[1] = sd->entry;
|
||||
}
|
||||
else if (dir == ELM_FOCUS_NEXT)
|
||||
{
|
||||
chain[0] = sd->entry;
|
||||
chain[1] = sd->button;
|
||||
}
|
||||
else
|
||||
return EINA_FALSE;
|
||||
|
||||
i = elm_widget_focus_get(chain[1]);
|
||||
|
||||
if (elm_obj_widget_focus_next_get(chain[i], dir, next, next_item)) return EINA_TRUE;
|
||||
|
||||
i = !i;
|
||||
|
||||
if (elm_obj_widget_focus_next_get(chain[i], dir, &to_focus, next_item))
|
||||
{
|
||||
*next = to_focus;
|
||||
return !!i;
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Ui_Theme_Apply
|
||||
_elm_fileselector_entry_elm_widget_theme_apply(Eo *obj, Elm_Fileselector_Entry_Data *sd)
|
||||
{
|
||||
|
|
|
@ -1658,84 +1658,6 @@ _elm_multibuttonentry_efl_canvas_group_group_del(Eo *obj, Elm_Multibuttonentry_D
|
|||
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_multibuttonentry_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Multibuttonentry_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return _elm_multibuttonentry_smart_focus_direction_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_multibuttonentry_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Multibuttonentry_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Eina_List *items = NULL;
|
||||
|
||||
items = eina_list_append(items, sd->box);
|
||||
|
||||
ret = elm_widget_focus_list_direction_get
|
||||
(obj, base, items, eina_list_data_get, degree, direction, direction_item, weight);
|
||||
eina_list_free(items);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_multibuttonentry_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Multibuttonentry_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return _elm_multibuttonentry_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_multibuttonentry_elm_widget_focus_next(Eo *obj, Elm_Multibuttonentry_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
Eina_List *items = NULL;
|
||||
Eina_List *l = NULL;
|
||||
Elm_Object_Item *eo_item;
|
||||
Evas_Object *ao;
|
||||
Evas_Object *po;
|
||||
|
||||
if (!elm_widget_focus_get(obj))
|
||||
{
|
||||
*next = (Evas_Object *)obj;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
if (sd->label)
|
||||
{
|
||||
po = (Evas_Object *)edje_object_part_object_get(sd->label, "elm.text");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
int_ret = elm_widget_focus_get(ao);
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH (sd->items, l, eo_item)
|
||||
{
|
||||
ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(elm_layout_edje_get(VIEW(item)), "elm.btn.text");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
int_ret = int_ret || elm_widget_focus_get(ao);
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
if (sd->entry)
|
||||
{
|
||||
int_ret = int_ret || elm_widget_focus_get(sd->entry);
|
||||
/* elm_widget_list_focus_liset_next_get() check parent of item
|
||||
because parent sd->entry is not multibuttnentry but sd->box
|
||||
so append sd->box instead of sd->entry, is this proper? */
|
||||
items = eina_list_append(items, sd->box);
|
||||
}
|
||||
|
||||
if (int_ret)
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_access_obj_process(Evas_Object *obj, Eina_Bool is_access)
|
||||
{
|
||||
|
|
|
@ -90,19 +90,9 @@ _resize_object_reset(Evas_Object *obj, Elm_Naviframe_Item_Data *it)
|
|||
static void
|
||||
_prev_page_focus_recover(Elm_Naviframe_Item_Data *it)
|
||||
{
|
||||
Evas_Object *newest;
|
||||
unsigned int order = 0;
|
||||
Elm_Naviframe *n = it->base->widget;
|
||||
|
||||
newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
|
||||
if (newest)
|
||||
elm_object_focus_set(newest, EINA_TRUE);
|
||||
else
|
||||
{
|
||||
if (elm_object_focus_allow_get(VIEW(it)))
|
||||
elm_object_focus_set(VIEW(it), EINA_TRUE);
|
||||
else
|
||||
elm_object_focus_set(WIDGET(it), EINA_TRUE);
|
||||
}
|
||||
efl_ui_focus_manager_focus_set(efl_ui_focus_user_manager_get(n), n);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -1378,76 +1368,6 @@ _on_obj_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
|
|||
_item_dispmode_set(it, dispmode);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *ao;
|
||||
|
||||
Eina_List *l = NULL;
|
||||
Elm_Object_Item *eo_top_it;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_top_it = elm_naviframe_top_item_get(obj);
|
||||
if (!eo_top_it) goto end;
|
||||
|
||||
list_data_get = eina_list_data_get;
|
||||
|
||||
ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_it, top_it);
|
||||
l = eina_list_append(l, VIEW(top_it));
|
||||
|
||||
/* access */
|
||||
if (_elm_config->access_mode)
|
||||
{
|
||||
ao = _access_object_get(top_it, TITLE_ACCESS_PART);
|
||||
if (ao) l = eina_list_append(l, ao);
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next, next_item);
|
||||
eina_list_free(l);
|
||||
|
||||
end:
|
||||
if (!int_ret)
|
||||
{
|
||||
*next = obj;
|
||||
int_ret = !elm_widget_focus_get(obj);
|
||||
}
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_naviframe_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_naviframe_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_Bool int_ret;
|
||||
|
||||
Eina_List *l = NULL;
|
||||
Elm_Object_Item *eo_top_it;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
eo_top_it = elm_naviframe_top_item_get(obj);
|
||||
if (!eo_top_it) return EINA_FALSE;
|
||||
|
||||
list_data_get = eina_list_data_get;
|
||||
|
||||
ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_it, top_it);
|
||||
l = eina_list_append(l, VIEW(top_it));
|
||||
|
||||
int_ret = elm_widget_focus_list_direction_get
|
||||
(obj, base, l, list_data_get, degree, direction, direction_item, weight);
|
||||
|
||||
eina_list_free(l);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_naviframe_efl_canvas_group_group_add(Eo *obj, Elm_Naviframe_Data *priv)
|
||||
{
|
||||
|
@ -1611,7 +1531,6 @@ _item_push_helper(Elm_Naviframe_Item_Data *item)
|
|||
evas_object_show(VIEW(item));
|
||||
|
||||
ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_item, top_item);
|
||||
if (top_item) elm_obj_widget_focused_object_clear(VIEW(top_item));
|
||||
_resize_object_reset(obj, item);
|
||||
if (top_item)
|
||||
{
|
||||
|
@ -1752,7 +1671,6 @@ _elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Ite
|
|||
|
||||
if (top_inserted)
|
||||
{
|
||||
elm_obj_widget_focused_object_clear(VIEW(after));
|
||||
elm_widget_tree_unfocusable_set(VIEW(after), EINA_TRUE);
|
||||
_resize_object_reset(obj, it);
|
||||
evas_object_show(VIEW(it));
|
||||
|
@ -2071,12 +1989,6 @@ _elm_naviframe_event_enabled_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
|
|||
return !sd->freeze_events;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_naviframe_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_naviframe_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,6 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
||||
static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
|
||||
static void _parent_geom_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED);
|
||||
static void _block_clicked_cb(void *data, const Efl_Event *event);
|
||||
|
@ -54,7 +53,6 @@ static void _timeout_cb(void *data, const Efl_Event *event);
|
|||
static void _hide_effect_finished_cb(void *data, const Efl_Event *event);
|
||||
|
||||
static const Elm_Action key_actions[] = {
|
||||
{"move", _key_action_move},
|
||||
{"escape", _key_action_escape},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -1394,106 +1392,6 @@ err:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_popup_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Popup_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_popup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *ao;
|
||||
Eina_List *items = NULL;
|
||||
Eina_Iterator *base_it;
|
||||
|
||||
/* access */
|
||||
if (_elm_config->access_mode)
|
||||
{
|
||||
if (sd->title_text)
|
||||
{
|
||||
ao = _access_object_get(obj, ACCESS_TITLE_PART);
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
ao = _access_object_get(obj, ACCESS_BODY_PART);
|
||||
if (ao) items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
base_it = efl_content_iterate(sd->main_layout);
|
||||
EINA_ITERATOR_FOREACH(base_it, ao)
|
||||
if (ao) items = eina_list_append(items, ao);
|
||||
eina_iterator_free(base_it);
|
||||
|
||||
if (!elm_widget_focus_list_next_get(sd->main_layout, items, eina_list_data_get, dir, next, next_item))
|
||||
*next = sd->main_layout;
|
||||
eina_list_free(items);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_popup_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Popup_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_popup_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Evas_Object *ao;
|
||||
Eina_List *items = NULL;
|
||||
Eina_Iterator *base_it;
|
||||
|
||||
/* access */
|
||||
if (_elm_config->access_mode)
|
||||
{
|
||||
if (sd->title_text)
|
||||
{
|
||||
ao = _access_object_get(obj, ACCESS_TITLE_PART);
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
ao = _access_object_get(obj, ACCESS_BODY_PART);
|
||||
if (ao) items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
base_it = efl_content_iterate(sd->main_layout);
|
||||
EINA_ITERATOR_FOREACH(base_it, ao)
|
||||
if (ao) items = eina_list_append(items, ao);
|
||||
eina_iterator_free(base_it);
|
||||
|
||||
elm_widget_focus_list_direction_get
|
||||
(sd->main_layout, base, items, eina_list_data_get, degree, direction, direction_item, weight);
|
||||
eina_list_free(items);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_move(Evas_Object *obj, const char *params)
|
||||
{
|
||||
const char *dir = params;
|
||||
|
||||
_elm_widget_focus_auto_show(obj);
|
||||
if (!strcmp(dir, "previous"))
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
|
||||
else if (!strcmp(dir, "next"))
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
|
||||
else if (!strcmp(dir, "left"))
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_LEFT);
|
||||
else if (!strcmp(dir, "right"))
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_RIGHT);
|
||||
else if (!strcmp(dir, "up"))
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_UP);
|
||||
else if (!strcmp(dir, "down"))
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_DOWN);
|
||||
else return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -535,9 +535,19 @@ _access_highlight_next_get(Evas_Object *obj, Elm_Focus_Direction dir)
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = elm_obj_widget_focus_next_get(obj, dir, &target, NULL);
|
||||
if (ret && target)
|
||||
_elm_access_highlight_set(target);
|
||||
Efl_Ui_Focus_Relations *rel;
|
||||
|
||||
rel = efl_ui_focus_manager_fetch(efl_ui_focus_user_manager_get(obj), obj);
|
||||
|
||||
if (rel)
|
||||
{
|
||||
if (dir == ELM_FOCUS_NEXT)
|
||||
_elm_access_highlight_set(rel->next);
|
||||
else
|
||||
_elm_access_highlight_set(rel->prev);
|
||||
|
||||
free(rel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -690,7 +700,10 @@ _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir)
|
|||
elm_widget_focus_region_show(comming);
|
||||
}
|
||||
else
|
||||
elm_obj_widget_focus_cycle(obj, dir);
|
||||
{
|
||||
elm_widget_focus_set(obj, EINA_TRUE);
|
||||
efl_ui_focus_manager_move(elm_widget_top_get(obj), dir);
|
||||
}
|
||||
}
|
||||
|
||||
action_by = ELM_ACCESS_ACTION_FIRST;
|
||||
|
|
|
@ -640,18 +640,6 @@ _elm_actionslider_selected_label_get(Eo *obj, Elm_Actionslider_Data *sd)
|
|||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_actionslider_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Actionslider_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_actionslider_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Actionslider_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_actionslider_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -71,8 +71,6 @@ class Elm.Actionslider (Efl.Ui.Layout, Efl.Ui.Selectable)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
Efl.Part.part;
|
||||
}
|
||||
|
|
|
@ -31,13 +31,6 @@ _focus_order_flush(Eo *obj, Elm_Box_Data *pd EINA_UNUSED)
|
|||
efl_ui_focus_manager_calc_update_order(wpd->focus.manager, obj, order);
|
||||
}
|
||||
|
||||
static void *
|
||||
_elm_box_list_data_get(const Eina_List *list)
|
||||
{
|
||||
Evas_Object_Box_Option *opt = eina_list_data_get(list);
|
||||
return opt->obj;
|
||||
}
|
||||
|
||||
static void
|
||||
_child_added_cb_proxy(void *data, const Efl_Event *event)
|
||||
{
|
||||
|
@ -54,66 +47,6 @@ _child_removed_cb_proxy(void *data, const Efl_Event *event)
|
|||
efl_event_callback_legacy_call(box, ELM_BOX_EVENT_CHILD_REMOVED, child);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_box_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Box_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_box_elm_widget_focus_next(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
list_data_get = eina_list_data_get;
|
||||
else
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
Evas_Object_Box_Data *bd =
|
||||
evas_object_smart_data_get(wd->resize_obj);
|
||||
|
||||
items = bd->children;
|
||||
list_data_get = _elm_box_list_data_get;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_box_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Box_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_box_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Box_Data *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
const Eina_List *items;
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
list_data_get = eina_list_data_get;
|
||||
else
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
Evas_Object_Box_Data *bd =
|
||||
evas_object_smart_data_get(wd->resize_obj);
|
||||
|
||||
items = bd->children;
|
||||
list_data_get = _elm_box_list_data_get;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
return elm_widget_focus_list_direction_get
|
||||
(obj, base, items, list_data_get, degree, direction, direction_item, weight);
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Ui_Theme_Apply
|
||||
_elm_box_elm_widget_theme_apply(Eo *obj, Elm_Box_Data *sd EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -249,10 +249,6 @@ class Elm.Box (Elm.Widget)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.focus_state_apply;
|
||||
|
|
|
@ -79,44 +79,6 @@ _on_mouse_up(void *data,
|
|||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
}
|
||||
|
||||
/* overriding layout's focus_next() in order to just cycle through the
|
||||
* content's tree */
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_bubble_elm_widget_focus_next(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *content;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
if ((elm_widget_can_focus_get(obj)) &&
|
||||
(!wd->focused))
|
||||
{
|
||||
// ACCESS
|
||||
*next = (Evas_Object *)obj;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
content = elm_layout_content_get(obj, NULL);
|
||||
if (!content) return EINA_FALSE;
|
||||
|
||||
/* attempt to follow focus cycle into sub-object */
|
||||
return elm_obj_widget_focus_next_get(content, dir, next, next_item);
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_bubble_elm_widget_focus_direction(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Evas_Object *content;
|
||||
|
||||
content = elm_layout_content_get(obj, NULL);
|
||||
|
||||
if (!content) return EINA_FALSE;
|
||||
|
||||
/* Try Focus cycle in subitem */
|
||||
return elm_obj_widget_focus_direction_get
|
||||
(content, base, degree, direction, direction_item, weight);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_bubble_text_set(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, const char *part, const char *label)
|
||||
{
|
||||
|
@ -262,18 +224,6 @@ _elm_bubble_pos_get(Eo *obj EINA_UNUSED, Elm_Bubble_Data *sd)
|
|||
return sd->pos;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_bubble_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Bubble_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_bubble_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Bubble_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_bubble_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -38,10 +38,6 @@ class Elm.Bubble (Efl.Ui.Layout, Efl.Ui.Clickable)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Efl.Part.part;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,13 @@
|
|||
|
||||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
||||
#define EFL_UI_FOCUS_COMPOSITION_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
#include "elm_widget_calendar.h"
|
||||
#include "efl_ui_focus_composition.eo.h"
|
||||
#include "elm_calendar_item.eo.h"
|
||||
|
||||
#define MY_CLASS ELM_CALENDAR_CLASS
|
||||
|
||||
|
@ -124,11 +127,9 @@ _eina_tmpstr_steal(Eina_Tmpstr *s)
|
|||
}
|
||||
#endif
|
||||
|
||||
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
||||
static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
|
||||
|
||||
static const Elm_Action key_actions[] = {
|
||||
{"move", _key_action_move},
|
||||
{"activate", _key_action_activate},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -479,6 +480,30 @@ _access_calendar_register(Evas_Object *obj)
|
|||
_access_calendar_item_register(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_flush_calendar_composite_elements(Evas_Object *obj, Elm_Calendar_Data *sd)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
int max_day = _maxdays_get(&sd->shown_time, 0);
|
||||
|
||||
#define EXTEND(v) \
|
||||
if (v) items = eina_list_append(items, v); \
|
||||
|
||||
EXTEND(sd->month_access);
|
||||
EXTEND(sd->dec_btn_month);
|
||||
EXTEND(sd->inc_btn_month);
|
||||
EXTEND(sd->year_access);
|
||||
EXTEND(sd->dec_btn_year);
|
||||
EXTEND(sd->inc_btn_year);
|
||||
|
||||
#undef EXTEND
|
||||
|
||||
for (int i = sd->first_day_it; i <= max_day; ++i)
|
||||
items = eina_list_append(items, sd->items[i]);
|
||||
|
||||
efl_ui_focus_composition_elements_set(obj, items);
|
||||
}
|
||||
|
||||
static void
|
||||
_populate(Evas_Object *obj)
|
||||
{
|
||||
|
@ -702,6 +727,8 @@ _populate(Evas_Object *obj)
|
|||
|
||||
elm_layout_thaw(obj);
|
||||
edje_object_message_signal_process(elm_layout_edje_get(obj));
|
||||
|
||||
_flush_calendar_composite_elements(obj, sd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1403,242 +1430,6 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_move(Evas_Object *obj, const char *params)
|
||||
{
|
||||
ELM_CALENDAR_DATA_GET(obj, sd);
|
||||
const char *dir = params;
|
||||
Eina_Bool ret, double_spinner = EINA_FALSE;
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
_elm_widget_focus_auto_show(obj);
|
||||
if (!strcmp(dir, "prior"))
|
||||
{
|
||||
if (_update_data(obj, EINA_TRUE, -1)) _populate(obj);
|
||||
}
|
||||
else if (!strcmp(dir, "next"))
|
||||
{
|
||||
if (_update_data(obj, EINA_TRUE, 1)) _populate(obj);
|
||||
}
|
||||
else if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_NONE)
|
||||
&& ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
|
||||
|| (sd->selected)))
|
||||
{
|
||||
if (edje_object_part_exists(wd->resize_obj, ELM_CALENDAR_BUTTON_YEAR_RIGHT))
|
||||
double_spinner = EINA_TRUE;
|
||||
|
||||
if (!strcmp(dir, "left"))
|
||||
{
|
||||
if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
|
||||
|| ((sd->shown_time.tm_year == sd->selected_time.tm_year)
|
||||
&& (sd->shown_time.tm_mon == sd->selected_time.tm_mon)))
|
||||
{
|
||||
//Double spinner case.
|
||||
if (double_spinner)
|
||||
{
|
||||
if (elm_object_focus_get(sd->inc_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_year, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->dec_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_month, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//Give focus to dec_btn_month when left key down on the inc_btn_month.
|
||||
//Leave focus, if key down on dec_btn_month.
|
||||
if (elm_object_focus_get(sd->inc_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_month, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->dec_btn_month)) return EINA_FALSE;
|
||||
|
||||
//If key move from the left edge of the calendar,
|
||||
//Leave the focus policy on window.
|
||||
if (sd->focused_it % ELM_DAY_LAST == 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
//Focus on the day before the day.
|
||||
ret = _update_focused_it(obj, sd->focused_it - 1);
|
||||
if (!ret) return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(dir, "right"))
|
||||
{
|
||||
if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
|
||||
|| ((sd->shown_time.tm_year == sd->selected_time.tm_year)
|
||||
&& (sd->shown_time.tm_mon == sd->selected_time.tm_mon)))
|
||||
{
|
||||
//Double spinner case.
|
||||
if (double_spinner)
|
||||
{
|
||||
if (elm_object_focus_get(sd->inc_btn_year)) return EINA_FALSE;
|
||||
else if (elm_object_focus_get(sd->dec_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_year, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->inc_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_year, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//Give focus to inc_btn_month when right key down on the dec_btn_month.
|
||||
if (elm_object_focus_get(sd->dec_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_month, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->inc_btn_month)) return EINA_FALSE;
|
||||
|
||||
//If key move from the right edge of the calendar,
|
||||
//Leave the focus policy on window.
|
||||
if (sd->focused_it % ELM_DAY_LAST == ELM_DAY_LAST - 1)
|
||||
return EINA_FALSE;
|
||||
|
||||
//Focus on the day after the day.
|
||||
ret = _update_focused_it(obj, sd->focused_it + 1);
|
||||
if (!ret) return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(dir, "up"))
|
||||
{
|
||||
if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
|
||||
|| ((sd->shown_time.tm_year == sd->selected_time.tm_year)
|
||||
&& (sd->shown_time.tm_mon == sd->selected_time.tm_mon)))
|
||||
{
|
||||
//double spinner case.
|
||||
if (double_spinner)
|
||||
{
|
||||
if (elm_object_focus_get(sd->inc_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_year, EINA_FALSE);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->dec_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_year, EINA_FALSE);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//If the dec_btn_month, or inc_btn_month has focus.
|
||||
//Focus unset and leave the focus policy on window.
|
||||
if (elm_object_focus_get(sd->dec_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_month, EINA_FALSE);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->inc_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_month, EINA_FALSE);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
//If the focus item is the first week of month.
|
||||
if ((sd->focused_it >= 0) && (sd->focused_it < ELM_DAY_LAST))
|
||||
{
|
||||
//Give focus to inc_btn_month(right side located button)
|
||||
//If the focused item is smaller than 4.
|
||||
//Otherwise, give focus to dec_btn_month.
|
||||
if (sd->focused_it > (ELM_DAY_LAST / 2))
|
||||
//Double spinner case.
|
||||
if (double_spinner)
|
||||
elm_object_focus_set(sd->inc_btn_year, EINA_TRUE);
|
||||
else
|
||||
elm_object_focus_set(sd->inc_btn_month, EINA_TRUE);
|
||||
else
|
||||
elm_object_focus_set(sd->dec_btn_month, EINA_TRUE);
|
||||
|
||||
_update_unfocused_it(obj, sd->focused_it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
//Focus on the last week day.
|
||||
ret = _update_focused_it(obj, sd->focused_it - ELM_DAY_LAST);
|
||||
if (!ret)
|
||||
{
|
||||
//If focused day is not available(not belongs to current month)
|
||||
//Take a focus from item and give the focus to suitable button.
|
||||
if (sd->focused_it >= ELM_DAY_LAST && sd->focused_it < (ELM_DAY_LAST * 2))
|
||||
{
|
||||
if (sd->focused_it > (ELM_DAY_LAST + (ELM_DAY_LAST / 2)))
|
||||
//Double spinner case.
|
||||
if (double_spinner)
|
||||
elm_object_focus_set(sd->inc_btn_year, EINA_TRUE);
|
||||
else
|
||||
elm_object_focus_set(sd->inc_btn_month, EINA_TRUE);
|
||||
else
|
||||
elm_object_focus_set(sd->dec_btn_month, EINA_TRUE);
|
||||
|
||||
_update_unfocused_it(obj, sd->focused_it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!strcmp(dir, "down"))
|
||||
{
|
||||
if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
|
||||
|| ((sd->shown_time.tm_year == sd->selected_time.tm_year)
|
||||
&& (sd->shown_time.tm_mon == sd->selected_time.tm_mon)))
|
||||
{
|
||||
//double spinner case.
|
||||
if (double_spinner)
|
||||
{
|
||||
if (elm_object_focus_get(sd->inc_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_year, EINA_FALSE);
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
_update_focused_it(obj, (ELM_DAY_LAST - 1));
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (elm_object_focus_get(sd->dec_btn_year))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_year, EINA_FALSE);
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
_update_focused_it(obj, sd->first_day_it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//If the XXX_btn_month has focus.
|
||||
//Set as false to button focus and give to focus to first item of the calendar.
|
||||
//Otherwise, Give the focus to last day of first week of calendar.
|
||||
if (elm_object_focus_get(sd->dec_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->dec_btn_month, EINA_FALSE);
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
_update_focused_it(obj, sd->first_day_it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if(elm_object_focus_get(sd->inc_btn_month))
|
||||
{
|
||||
elm_object_focus_set(sd->inc_btn_month, EINA_FALSE);
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
_update_focused_it(obj, (ELM_DAY_LAST - 1));
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
//Focus on the next week day.
|
||||
ret = _update_focused_it(obj, sd->focused_it + ELM_DAY_LAST);
|
||||
if (!ret) return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else return EINA_FALSE;
|
||||
}
|
||||
else return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_calendar_elm_widget_on_focus_update(Eo *obj, Elm_Calendar_Data *sd, Elm_Object_Item *item EINA_UNUSED)
|
||||
{
|
||||
|
@ -1751,6 +1542,12 @@ _elm_calendar_efl_canvas_group_group_add(Eo *obj, Elm_Calendar_Data *priv)
|
|||
// ACCESS
|
||||
if ((_elm_config->access_mode != ELM_ACCESS_MODE_OFF))
|
||||
_access_calendar_spinner_register(obj);
|
||||
|
||||
// Items for composition
|
||||
for (int i = 0; i < 42; ++i)
|
||||
{
|
||||
priv->items[i] = efl_add(ELM_CALENDAR_ITEM_CLASS, obj, elm_calendar_item_day_number_set(efl_added, i));
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -1779,55 +1576,6 @@ _elm_calendar_efl_canvas_group_group_del(Eo *obj, Elm_Calendar_Data *sd)
|
|||
|
||||
static Eina_Bool _elm_calendar_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_calendar_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_calendar_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_calendar_elm_widget_focus_next(Eo *obj, Elm_Calendar_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
int maxdays, day, i;
|
||||
Eina_List *items = NULL;
|
||||
Evas_Object *ao;
|
||||
Evas_Object *po;
|
||||
|
||||
items = eina_list_append(items, sd->month_access);
|
||||
items = eina_list_append(items, sd->dec_btn_month);
|
||||
items = eina_list_append(items, sd->inc_btn_month);
|
||||
|
||||
items = eina_list_append(items, sd->year_access);
|
||||
items = eina_list_append(items, sd->dec_btn_year);
|
||||
items = eina_list_append(items, sd->inc_btn_year);
|
||||
|
||||
day = 0;
|
||||
maxdays = _maxdays_get(&sd->shown_time, 0);
|
||||
for (i = 0; i < 42; i++)
|
||||
{
|
||||
if ((!day) && (i == sd->first_day_it)) day = 1;
|
||||
if ((day) && (day <= maxdays))
|
||||
{
|
||||
char pname[14];
|
||||
snprintf(pname, sizeof(pname), "cit_%i.access", i);
|
||||
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(elm_layout_edje_get(obj), pname);
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
static void
|
||||
_access_obj_process(Evas_Object *obj, Eina_Bool is_access)
|
||||
{
|
||||
|
@ -2310,12 +2058,6 @@ EOLIAN static const Elm_Atspi_Action*
|
|||
_elm_calendar_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Calendar_Data *sd EINA_UNUSED)
|
||||
{
|
||||
static Elm_Atspi_Action atspi_actions[] = {
|
||||
{ "move,prior", "move", "prior", _key_action_move},
|
||||
{ "move,next", "move", "next", _key_action_move},
|
||||
{ "move,left", "move", "left", _key_action_move},
|
||||
{ "move,right", "move", "right", _key_action_move},
|
||||
{ "move,up", "move", "up", _key_action_move},
|
||||
{ "move,down", "move", "down", _key_action_move},
|
||||
{ "activate", "activate", NULL, _key_action_activate},
|
||||
{ NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
@ -2333,3 +2075,51 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_calendar, Elm_Calendar_Data)
|
|||
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_calendar)
|
||||
|
||||
#include "elm_calendar.eo.c"
|
||||
|
||||
typedef struct {
|
||||
int v;
|
||||
Evas_Object *part;
|
||||
} Elm_Calendar_Item_Data;
|
||||
|
||||
EOLIAN static void
|
||||
_elm_calendar_item_day_number_set(Eo *obj, Elm_Calendar_Item_Data *pd, int i)
|
||||
{
|
||||
char pname[14];
|
||||
Evas_Object *po;
|
||||
|
||||
pd->v = i;
|
||||
snprintf(pname, sizeof(pname), "cit_%i.access", i);
|
||||
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(elm_layout_edje_get(efl_parent_get(obj)), pname);
|
||||
|
||||
if (_elm_config->access_mode != ELM_ACCESS_MODE_ON)
|
||||
pd->part = po;
|
||||
else
|
||||
pd->part = evas_object_data_get(po, "_part_access_obj");
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(pd->part);
|
||||
}
|
||||
|
||||
EOLIAN static int
|
||||
_elm_calendar_item_day_number_get(Eo *obj EINA_UNUSED, Elm_Calendar_Item_Data *pd)
|
||||
{
|
||||
return pd->v;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_calendar_item_efl_ui_focus_object_focus_set(Eo *obj, Elm_Calendar_Item_Data *pd, Eina_Bool focus)
|
||||
{
|
||||
efl_ui_focus_object_focus_set(efl_super(obj, ELM_CALENDAR_ITEM_CLASS), focus);
|
||||
|
||||
_update_focused_it(efl_parent_get(obj), pd->v);
|
||||
evas_object_focus_set(pd->part, efl_ui_focus_object_focus_get(obj));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Rect
|
||||
_elm_calendar_item_efl_ui_focus_object_focus_geometry_get(Eo *obj EINA_UNUSED, Elm_Calendar_Item_Data *pd)
|
||||
{
|
||||
return efl_gfx_geometry_get(pd->part);
|
||||
}
|
||||
|
||||
#include "elm_calendar_item.eo.c"
|
||||
|
|
|
@ -72,7 +72,7 @@ struct Elm.Calendar.Mark; [[Item handle for a calendar mark.
|
|||
with @Elm.Calendar.mark_del.
|
||||
]]
|
||||
|
||||
class Elm.Calendar (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
||||
class Elm.Calendar (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface.Atspi_Widget_Action)
|
||||
{
|
||||
[[Calendar widget
|
||||
|
||||
|
@ -413,10 +413,7 @@ class Elm.Calendar (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
|||
Efl.Object.constructor;
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
class Elm.Calendar.Item (Efl.Object, Efl.Ui.Focus.Object)
|
||||
{
|
||||
methods {
|
||||
@property day_number {
|
||||
values {
|
||||
i : int;
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Ui.Focus.Object.focus {set;}
|
||||
Efl.Ui.Focus.Object.focus_geometry {get;}
|
||||
}
|
||||
}
|
|
@ -3,10 +3,12 @@
|
|||
#endif
|
||||
|
||||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||
#define EFL_UI_FOCUS_COMPOSITION_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
#include "elm_widget_clock.h"
|
||||
#include "efl_ui_focus_composition.eo.h"
|
||||
|
||||
#define MY_CLASS ELM_CLOCK_CLASS
|
||||
|
||||
|
@ -338,6 +340,48 @@ _access_time_register(Evas_Object *obj, Eina_Bool is_access)
|
|||
|
||||
}
|
||||
|
||||
static Evas_Object*
|
||||
_part_get(Evas_Object *part, const char *part_name)
|
||||
{
|
||||
Evas_Object *po;
|
||||
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(part, part_name);
|
||||
|
||||
if (_elm_config->access_mode != ELM_ACCESS_MODE_ON)
|
||||
return po;
|
||||
|
||||
return evas_object_data_get(po, "_part_access_obj");
|
||||
}
|
||||
|
||||
static void
|
||||
_flush_clock_composite_elements(Evas_Object *obj, Elm_Clock_Data *sd)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
int i;
|
||||
|
||||
if (sd->edit)
|
||||
{
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
if ((!sd->seconds) && (i >= 4)) break;
|
||||
if (sd->digedit & (1 << i))
|
||||
{
|
||||
items = eina_list_append(items, _part_get(sd->digit[i], "access.t"));
|
||||
items = eina_list_append(items, _part_get(sd->digit[i], "access.b"));
|
||||
}
|
||||
}
|
||||
|
||||
if (sd->am_pm)
|
||||
{
|
||||
items = eina_list_append(items, _part_get(sd->am_pm_obj, "access.t"));
|
||||
items = eina_list_append(items, _part_get(sd->am_pm_obj, "access.b"));
|
||||
}
|
||||
}
|
||||
|
||||
efl_ui_focus_composition_elements_set(obj, items);
|
||||
}
|
||||
|
||||
static void
|
||||
_time_update(Evas_Object *obj, Eina_Bool theme_update)
|
||||
{
|
||||
|
@ -468,6 +512,7 @@ _time_update(Evas_Object *obj, Eina_Bool theme_update)
|
|||
sd->cur.am_pm = sd->am_pm;
|
||||
sd->cur.edit = sd->edit;
|
||||
sd->cur.digedit = sd->digedit;
|
||||
_flush_clock_composite_elements(obj, sd);
|
||||
}
|
||||
if (sd->hrs != sd->cur.hrs)
|
||||
{
|
||||
|
@ -701,65 +746,6 @@ _elm_clock_efl_canvas_group_group_del(Eo *obj, Elm_Clock_Data *sd)
|
|||
|
||||
static Eina_Bool _elm_clock_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_clock_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Clock_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return _elm_clock_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_clock_elm_widget_focus_next(Eo *obj, Elm_Clock_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *ao, *po;
|
||||
Eina_List *items = NULL;
|
||||
|
||||
|
||||
if (!sd->edit)
|
||||
{
|
||||
*next = (Evas_Object *)obj;
|
||||
return !elm_widget_highlight_get(obj);
|
||||
}
|
||||
else if (!elm_widget_highlight_get(obj))
|
||||
{
|
||||
*next = (Evas_Object *)obj;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
if ((!sd->seconds) && (i >= 4)) break;
|
||||
if (sd->digedit & (1 << i))
|
||||
{
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(sd->digit[i], "access.t");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
items = eina_list_append(items, ao);
|
||||
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(sd->digit[i], "access.b");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
}
|
||||
|
||||
if (sd->am_pm)
|
||||
{
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(sd->am_pm_obj, "access.t");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
items = eina_list_append(items, ao);
|
||||
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(sd->am_pm_obj, "access.b");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
items = eina_list_append(items, ao);
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
static void
|
||||
_access_obj_process(Evas_Object *obj, Eina_Bool is_access)
|
||||
{
|
||||
|
@ -941,12 +927,6 @@ _elm_clock_pause_get(Eo *obj EINA_UNUSED, Elm_Clock_Data *sd)
|
|||
return sd->paused;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_clock_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Clock_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_clock_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ enum Elm.Clock.Edit_Mode
|
|||
all = (1 << 6) - 1 [[All digits should be editable.]]
|
||||
}
|
||||
|
||||
class Elm.Clock (Efl.Ui.Layout)
|
||||
class Elm.Clock (Efl.Ui.Layout, Efl.Ui.Focus.Composition)
|
||||
{
|
||||
[[Digital clock widget
|
||||
|
||||
|
@ -163,10 +163,7 @@ class Elm.Clock (Efl.Ui.Layout)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
}
|
||||
events {
|
||||
|
|
|
@ -537,58 +537,6 @@ _elm_code_widget_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
|
|||
_elm_code_widget_refresh(widget, NULL);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_code_widget_cursor_key_will_move(Elm_Code_Widget *widget, const char *key)
|
||||
{
|
||||
Elm_Code_Widget_Data *pd;
|
||||
Elm_Code_Line *line;
|
||||
|
||||
pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
|
||||
line = elm_code_file_line_get(pd->code->file, pd->cursor_line);
|
||||
|
||||
if (!line)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!strcmp(key, "Up"))
|
||||
return pd->cursor_line > 1;
|
||||
else if (!strcmp(key, "Down"))
|
||||
return pd->cursor_line < elm_code_file_lines_get(pd->code->file);
|
||||
else if (!strcmp(key, "Left"))
|
||||
return pd->cursor_col > 1 || pd->cursor_line > 1;
|
||||
else if (!strcmp(key, "Right"))
|
||||
return pd->cursor_col < elm_code_widget_line_text_column_width_get(widget, line) + 1 ||
|
||||
pd->cursor_line < elm_code_file_lines_get(pd->code->file);
|
||||
else
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_code_widget_update_focus_directions(Elm_Code_Widget *obj)
|
||||
{
|
||||
if (_elm_code_widget_cursor_key_will_move(obj, "Up"))
|
||||
elm_obj_widget_focus_next_object_set(obj, obj, ELM_FOCUS_UP);
|
||||
else
|
||||
elm_obj_widget_focus_next_object_set(obj, NULL, ELM_FOCUS_UP);
|
||||
|
||||
if (_elm_code_widget_cursor_key_will_move(obj, "Down"))
|
||||
elm_obj_widget_focus_next_object_set(obj, obj, ELM_FOCUS_DOWN);
|
||||
else
|
||||
elm_obj_widget_focus_next_object_set(obj, NULL, ELM_FOCUS_DOWN);
|
||||
|
||||
if (_elm_code_widget_cursor_key_will_move(obj, "Left"))
|
||||
elm_obj_widget_focus_next_object_set(obj, obj, ELM_FOCUS_LEFT);
|
||||
else
|
||||
elm_obj_widget_focus_next_object_set(obj, NULL, ELM_FOCUS_LEFT);
|
||||
|
||||
if (_elm_code_widget_cursor_key_will_move(obj, "Right"))
|
||||
elm_obj_widget_focus_next_object_set(obj, obj, ELM_FOCUS_RIGHT);
|
||||
else
|
||||
elm_obj_widget_focus_next_object_set(obj, NULL, ELM_FOCUS_RIGHT);
|
||||
|
||||
elm_obj_widget_focus_next_object_set(obj, obj, ELM_FOCUS_PREVIOUS);
|
||||
elm_obj_widget_focus_next_object_set(obj, obj, ELM_FOCUS_NEXT);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_code_widget_cursor_ensure_visible(Elm_Code_Widget *widget)
|
||||
{
|
||||
|
@ -618,8 +566,7 @@ _elm_code_widget_cursor_ensure_visible(Elm_Code_Widget *widget)
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd, unsigned int col, unsigned int line,
|
||||
Eina_Bool was_key)
|
||||
_elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd, unsigned int col, unsigned int line)
|
||||
{
|
||||
Elm_Code *code;
|
||||
Elm_Code_Line *line_obj;
|
||||
|
@ -637,9 +584,6 @@ _elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
|
|||
if (position < length && text[position] == '\t')
|
||||
pd->cursor_col = elm_code_widget_line_text_column_width_to_position(widget, line_obj, position);
|
||||
|
||||
if (!was_key)
|
||||
_elm_code_widget_update_focus_directions(widget);
|
||||
|
||||
efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_CURSOR_CHANGED, widget);
|
||||
_elm_code_widget_cursor_ensure_visible(widget);
|
||||
|
||||
|
@ -954,7 +898,7 @@ _elm_code_widget_clicked_editable_cb(Elm_Code_Widget *widget, unsigned int row,
|
|||
else if (col <= 0)
|
||||
col = 1;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row, EINA_FALSE);
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1119,7 +1063,7 @@ _elm_code_widget_cursor_move_home(Elm_Code_Widget *widget)
|
|||
if (pd->cursor_col <= 1)
|
||||
return;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, 1, pd->cursor_line, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, 1, pd->cursor_line);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1136,7 +1080,7 @@ _elm_code_widget_cursor_move_end(Elm_Code_Widget *widget)
|
|||
if (pd->cursor_col > lastcol + 1)
|
||||
return;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, lastcol + 1, pd->cursor_line, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, lastcol + 1, pd->cursor_line);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1159,7 +1103,7 @@ _elm_code_widget_cursor_move_up(Elm_Code_Widget *widget)
|
|||
if (col > column_width + 1)
|
||||
col = column_width + 1;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1182,7 +1126,7 @@ _elm_code_widget_cursor_move_down(Elm_Code_Widget *widget)
|
|||
if (col > column_width + 1)
|
||||
col = column_width + 1;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1202,7 +1146,7 @@ _elm_code_widget_cursor_move_left(Elm_Code_Widget *widget)
|
|||
return;
|
||||
}
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, pd->cursor_col-1, pd->cursor_line, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, pd->cursor_col-1, pd->cursor_line);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1230,7 +1174,7 @@ _elm_code_widget_cursor_move_right(Elm_Code_Widget *widget)
|
|||
if (elm_code_line_text_get(line, NULL)[position] == '\t')
|
||||
next_col = pd->cursor_col + pd->tabstop;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, next_col, pd->cursor_line, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, next_col, pd->cursor_line);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
@ -1266,7 +1210,7 @@ _elm_code_widget_cursor_move_pageup(Elm_Code_Widget *widget)
|
|||
if (col > column_width + 1)
|
||||
col = column_width + 1;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1292,7 +1236,7 @@ _elm_code_widget_cursor_move_pagedown(Elm_Code_Widget *widget)
|
|||
if (col > column_width + 1)
|
||||
col = column_width + 1;
|
||||
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row, EINA_TRUE);
|
||||
_elm_code_widget_cursor_move(widget, pd, col, row);
|
||||
}
|
||||
|
||||
static Elm_Code_Widget_Change_Info *
|
||||
|
@ -1603,8 +1547,6 @@ _elm_code_widget_key_down_cb(void *data, Evas *evas EINA_UNUSED,
|
|||
if (!pd->editable || (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
|
||||
return;
|
||||
|
||||
_elm_code_widget_update_focus_directions(widget);
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
if (evas_key_modifier_is_set(ev->modifiers, "Super"))
|
||||
#else
|
||||
|
@ -1702,7 +1644,6 @@ _elm_code_widget_focused_event_cb(void *data, Evas_Object *obj,
|
|||
pd->focussed = EINA_TRUE;
|
||||
elm_layout_signal_emit(pd->cursor_rect, "elm,action,focus", "elm");
|
||||
|
||||
_elm_code_widget_update_focus_directions(widget);
|
||||
_elm_code_widget_refresh(obj, NULL);
|
||||
}
|
||||
|
||||
|
@ -1751,20 +1692,6 @@ _elm_code_widget_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Code_Widget_Da
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_code_widget_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED,
|
||||
Elm_Code_Widget_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_code_widget_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED,
|
||||
Elm_Code_Widget_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_code_widget_setup_palette(Evas_Object *o)
|
||||
{
|
||||
|
@ -2186,7 +2113,7 @@ _elm_code_widget_tab_inserts_spaces_get(Eo *obj EINA_UNUSED, Elm_Code_Widget_Dat
|
|||
EOLIAN static void
|
||||
_elm_code_widget_cursor_position_set(Eo *obj, Elm_Code_Widget_Data *pd, unsigned int row, unsigned int col)
|
||||
{
|
||||
_elm_code_widget_cursor_move(obj, pd, col, row, EINA_FALSE);
|
||||
_elm_code_widget_cursor_move(obj, pd, col, row);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -301,8 +301,6 @@ class Elm.Code_Widget (Efl.Ui.Layout, Efl.Access.Text)
|
|||
Efl.Object.constructor;
|
||||
Efl.Object.finalize;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
}
|
||||
constructors {
|
||||
.code;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Elm.Color.Item(Elm.Widget.Item, Elm.Interface.Atspi_Widget_Action)
|
||||
class Elm.Color.Item(Elm.Widget.Item, Efl.Ui.Focus.Object, Elm.Interface.Atspi_Widget_Action)
|
||||
{
|
||||
[[Elementary color item class]]
|
||||
legacy_prefix: elm_color_item;
|
||||
|
@ -42,6 +42,8 @@ class Elm.Color.Item(Elm.Widget.Item, Elm.Interface.Atspi_Widget_Action)
|
|||
Elm.Widget.Item.access_register;
|
||||
Elm.Widget.Item.signal_emit;
|
||||
Elm.Widget.Item.focus { get; set; }
|
||||
Efl.Ui.Focus.Object.focus { set; }
|
||||
Efl.Ui.Focus.Object.focus_geometry { get; }
|
||||
Elm.Interface.Atspi_Accessible.state_set { get; }
|
||||
Elm.Interface.Atspi_Accessible.name { get; }
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||
#define EFL_ACCESS_COMPONENT_PROTECTED
|
||||
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
||||
#define EFL_UI_FOCUS_COMPOSITION_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
#include "elm_widget_colorselector.h"
|
||||
#include "efl_ui_focus_composition.eo.h"
|
||||
|
||||
#define MY_CLASS ELM_COLORSELECTOR_CLASS
|
||||
|
||||
|
@ -192,6 +194,28 @@ static const Elm_Action key_actions[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
_flush_color_children(Eo *obj, Elm_Colorselector_Data *pd)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
|
||||
if (pd->mode == ELM_COLORSELECTOR_ALL) {
|
||||
items = eina_list_append(items, pd->picker);
|
||||
items = eina_list_merge(items, eina_list_clone(pd->items));
|
||||
items = eina_list_append(items, pd->col_bars_area);
|
||||
} else if (pd->mode == ELM_COLORSELECTOR_BOTH) {
|
||||
items = eina_list_merge(items, eina_list_clone(pd->items));
|
||||
items = eina_list_append(items, pd->col_bars_area);
|
||||
} else if (pd->mode == ELM_COLORSELECTOR_COMPONENTS) {
|
||||
items = eina_list_append(items, pd->col_bars_area);
|
||||
} else if (pd->mode == ELM_COLORSELECTOR_PALETTE) {
|
||||
items = eina_list_merge(items, eina_list_clone(pd->items));
|
||||
} else if (pd->mode == ELM_COLORSELECTOR_PICKER) {
|
||||
items = eina_list_append(items, pd->picker);
|
||||
}
|
||||
efl_ui_focus_composition_elements_set(obj, items);
|
||||
}
|
||||
|
||||
enum Palette_Box_Direction
|
||||
{
|
||||
PALETTE_BOX_UP,
|
||||
|
@ -947,7 +971,7 @@ _create_colorpicker(Evas_Object *obj)
|
|||
|
||||
sd->spinners[i] = spinner;
|
||||
}
|
||||
|
||||
|
||||
elm_layout_content_set(sd->picker, "elm.swallow.red", sd->spinners[0]);
|
||||
elm_layout_text_set(sd->picker, "elm.label.red", E_("R:"));
|
||||
elm_layout_content_set(sd->picker, "elm.swallow.green", sd->spinners[1]);
|
||||
|
@ -1949,9 +1973,10 @@ _elm_colorselector_efl_canvas_group_group_add(Eo *obj, Elm_Colorselector_Data *p
|
|||
priv->grab.xroot = -1;
|
||||
#endif
|
||||
priv->grab.in = EINA_TRUE;
|
||||
|
||||
elm_layout_sizing_eval(obj);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
||||
_flush_color_children(obj, priv);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -2169,55 +2194,6 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
|||
|
||||
static Eina_Bool _elm_colorselector_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_colorselector_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Colorselector_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_colorselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Colorselector_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return _elm_colorselector_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_colorselector_elm_widget_focus_next(Eo *obj, Elm_Colorselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
Eina_List *l;
|
||||
Elm_Object_Item *eo_item;
|
||||
int i = 0;
|
||||
|
||||
if (!sd) return EINA_FALSE;
|
||||
|
||||
if ((sd->mode == ELM_COLORSELECTOR_PALETTE) ||
|
||||
(sd->mode == ELM_COLORSELECTOR_ALL)||
|
||||
(sd->mode == ELM_COLORSELECTOR_BOTH))
|
||||
{
|
||||
if (!sd->items) return EINA_FALSE;
|
||||
EINA_LIST_FOREACH(sd->items, l, eo_item)
|
||||
{
|
||||
Elm_Widget_Item_Data *witem = efl_data_scope_get(eo_item, ELM_WIDGET_ITEM_CLASS);
|
||||
items = eina_list_append(items, witem->access_obj);
|
||||
}
|
||||
}
|
||||
if ((sd->mode == ELM_COLORSELECTOR_COMPONENTS) ||
|
||||
(sd->mode == ELM_COLORSELECTOR_ALL) ||
|
||||
(sd->mode == ELM_COLORSELECTOR_BOTH))
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
items = eina_list_append(items, sd->cb_data[i]->lbt);
|
||||
items = eina_list_append(items, sd->cb_data[i]->access_obj);
|
||||
items = eina_list_append(items, sd->cb_data[i]->rbt);
|
||||
}
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
static void
|
||||
_access_obj_process(Evas_Object *obj, Eina_Bool is_access)
|
||||
{
|
||||
|
@ -2389,6 +2365,7 @@ _elm_colorselector_mode_set(Eo *obj, Elm_Colorselector_Data *sd, Elm_Colorselect
|
|||
|
||||
_colors_set(obj, sd->r, sd->g, sd->b, sd->a, EINA_TRUE);
|
||||
elm_layout_sizing_eval(obj);
|
||||
_flush_color_children(obj, sd);
|
||||
}
|
||||
|
||||
EOLIAN static Elm_Colorselector_Mode
|
||||
|
@ -2719,6 +2696,20 @@ _elm_color_item_elm_interface_atspi_accessible_name_get(Eo *eo_it, Elm_Color_Ite
|
|||
return it->base->accessible_name;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Rect
|
||||
_elm_color_item_efl_ui_focus_object_focus_geometry_get(Eo *obj EINA_UNUSED, Elm_Color_Item_Data *pd)
|
||||
{
|
||||
return efl_gfx_geometry_get(pd->color_obj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_color_item_efl_ui_focus_object_focus_set(Eo *obj, Elm_Color_Item_Data *pd, Eina_Bool focus)
|
||||
{
|
||||
efl_ui_focus_object_focus_set(efl_super(obj, ELM_COLOR_ITEM_CLASS), focus);
|
||||
evas_object_focus_set(pd->color_obj, focus);
|
||||
elm_object_item_focus_set(obj, focus);
|
||||
}
|
||||
|
||||
/* Standard widget overrides */
|
||||
|
||||
ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_colorselector, Elm_Colorselector_Data)
|
||||
|
|
|
@ -12,8 +12,8 @@ enum Elm.Colorselector.Mode
|
|||
all [[All possible color selector is displayed.]]
|
||||
}
|
||||
|
||||
class Elm.Colorselector (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
||||
Efl.Ui.Clickable)
|
||||
class Elm.Colorselector (Efl.Ui.Layout, Efl.Ui.Focus.Composition,
|
||||
Elm.Interface.Atspi_Widget_Action, Efl.Ui.Clickable)
|
||||
{
|
||||
[[Elementary colorselector class]]
|
||||
legacy_prefix: elm_colorselector;
|
||||
|
@ -109,9 +109,6 @@ class Elm.Colorselector (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_highlight_geometry { get; }
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.widget_event;
|
||||
|
|
|
@ -660,7 +660,7 @@ _show_region_job(void *data)
|
|||
|
||||
ELM_CONFORMANT_DATA_GET(data, sd);
|
||||
|
||||
focus_obj = elm_obj_widget_focused_object_get(data);
|
||||
focus_obj = elm_object_focused_object_get(data);
|
||||
if (focus_obj)
|
||||
{
|
||||
Eina_Rect r = elm_widget_focus_region_get(focus_obj);
|
||||
|
@ -710,7 +710,7 @@ _autoscroll_objects_update(void *data)
|
|||
|
||||
ELM_CONFORMANT_DATA_GET(data, sd);
|
||||
|
||||
sub = elm_obj_widget_focused_object_get(data);
|
||||
sub = elm_object_focused_object_get(data);
|
||||
//Look up for top most scroller in the focus object hierarchy
|
||||
//inside Conformant.
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ enum Elm.Ctxpopup.Direction
|
|||
unknown [[Ctxpopup does not determine it's direction yet.]]
|
||||
}
|
||||
|
||||
class Elm.Ctxpopup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
||||
class Elm.Ctxpopup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Elm.Interface.Atspi_Widget_Action,
|
||||
Efl.Ui.Menu)
|
||||
{
|
||||
[[Elementary context popup class]]
|
||||
|
@ -202,10 +202,6 @@ class Elm.Ctxpopup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.widget_parent { set; }
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
|
|
|
@ -594,12 +594,6 @@ _elm_dayselector_weekdays_names_get(const Eo *obj, Elm_Dayselector_Data *sd EINA
|
|||
return weekdays;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_dayselector_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Dayselector_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_dayselector_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -152,7 +152,6 @@ class Elm.Dayselector (Efl.Ui.Layout)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
Efl.Part.part;
|
||||
}
|
||||
|
|
|
@ -923,38 +923,6 @@ _elm_diskselector_elm_widget_on_focus_update(Eo *obj, Elm_Diskselector_Data *_pd
|
|||
|
||||
static Eina_Bool _elm_diskselector_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_diskselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Diskselector_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return _elm_diskselector_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_diskselector_elm_widget_focus_next(Eo *obj, Elm_Diskselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
Eina_List *elist = NULL;
|
||||
Elm_Diskselector_Item_Data *it;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, elist, it)
|
||||
items = eina_list_append(items, it->base->access_obj);
|
||||
|
||||
if (!sd->round)
|
||||
{
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
if (!elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item))
|
||||
{
|
||||
elm_obj_widget_focused_object_clear((Evas_Object *)obj);
|
||||
elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_move(Evas_Object *obj, const char *params)
|
||||
{
|
||||
|
|
|
@ -201,9 +201,7 @@ class Elm.Diskselector (Elm.Widget, Elm.Interface_Scrollable,
|
|||
Efl.Gfx.position { set; }
|
||||
Efl.Gfx.size { set; }
|
||||
Efl.Canvas.Group.group_member_add;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.on_focus_update;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
|
|
|
@ -5431,18 +5431,6 @@ _elm_entry_elm_widget_on_access_activate(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSE
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_entry_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Entry_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_entry_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Entry_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_entry_select_allow_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, Eina_Bool allow)
|
||||
{
|
||||
|
|
|
@ -958,13 +958,11 @@ class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
|||
Efl.Canvas.Layout_Signal.signal_callback_del;
|
||||
Efl.Canvas.Layout_Signal.signal_emit;
|
||||
Elm.Widget.on_access_activate;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.focus_region { get; }
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Interface_Scrollable.policy { set; }
|
||||
Elm.Interface_Scrollable.bounce_allow { set; }
|
||||
Elm.Interface.Atspi_Accessible.state_set { get; }
|
||||
|
|
|
@ -35,12 +35,8 @@ class Elm.Fileselector (Efl.Ui.Layout, Elm.Interface.Fileselector,
|
|||
class.constructor;
|
||||
class.destructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_state_apply;
|
||||
Elm.Interface.Fileselector.selected_models { get; }
|
||||
Elm.Interface.Fileselector.selected_model_get;
|
||||
|
|
|
@ -7,10 +7,7 @@ class Elm.Fileselector_Entry (Efl.Ui.Layout, Elm.Interface.Fileselector,
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Interface.Fileselector.selected_model_get;
|
||||
Elm.Interface.Fileselector.selected_model_set;
|
||||
Elm.Interface.Fileselector.folder_only { get; set; }
|
||||
|
|
|
@ -881,18 +881,6 @@ _elm_flipselector_efl_ui_spin_interval_get(Eo *obj EINA_UNUSED, Elm_Flipselector
|
|||
return sd->first_interval;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_flipselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_flipselector_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_flipselector_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -128,8 +128,6 @@ class Elm.Flipselector (Efl.Ui.Layout, Efl.Ui.Spin,
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.widget_event;
|
||||
Efl.Ui.Spin.min_max { get; set; }
|
||||
Efl.Ui.Spin.step { get; set; }
|
||||
|
|
|
@ -129,16 +129,16 @@ enum Elm.Wrap.Type
|
|||
last [[Sentinel value to indicate last enum field during iteration]]
|
||||
}
|
||||
|
||||
enum Elm.Focus_Direction
|
||||
enum Efl.Ui.Focus.Direction
|
||||
{
|
||||
[[ Focus directions. ]]
|
||||
legacy: elm_focus;
|
||||
previous, [[ previous direction ]]
|
||||
next, [[ next direction ]]
|
||||
up, [[ up direction ]]
|
||||
down, [[ down direction ]]
|
||||
right, [[ right direction ]]
|
||||
left, [[ left direction ]]
|
||||
previous = 0, [[ previous direction ]]
|
||||
next = 1, [[ next direction ]]
|
||||
up = 2, [[ up direction ]]
|
||||
down = 3, [[ down direction ]]
|
||||
right = 4, [[ right direction ]]
|
||||
left = 5, [[ left direction ]]
|
||||
last = 6
|
||||
}
|
||||
|
||||
enum Elm.Focus.Region.Show_Mode
|
||||
|
|
|
@ -20,6 +20,14 @@
|
|||
|
||||
#include "elm_general.eot.h"
|
||||
|
||||
#define ELM_FOCUS_PREVIOUS EFL_UI_FOCUS_DIRECTION_PREVIOUS
|
||||
#define ELM_FOCUS_NEXT EFL_UI_FOCUS_DIRECTION_NEXT
|
||||
#define ELM_FOCUS_UP EFL_UI_FOCUS_DIRECTION_UP
|
||||
#define ELM_FOCUS_DOWN EFL_UI_FOCUS_DIRECTION_DOWN
|
||||
#define ELM_FOCUS_RIGHT EFL_UI_FOCUS_DIRECTION_RIGHT
|
||||
#define ELM_FOCUS_LEFT EFL_UI_FOCUS_DIRECTION_LEFT
|
||||
typedef Efl_Ui_Focus_Direction Elm_Focus_Direction;
|
||||
|
||||
/**
|
||||
* Defines couple of standard Evas_Object layers to be used
|
||||
* with evas_object_layer_set().
|
||||
|
|
|
@ -3565,70 +3565,6 @@ end:
|
|||
|
||||
static Eina_Bool _elm_gengrid_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_gengrid_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return _elm_gengrid_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_gengrid_elm_widget_focus_next(Eo *obj, Elm_Gengrid_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
Elm_Gen_Item *it;
|
||||
|
||||
EINA_INLIST_FOREACH(sd->items, it)
|
||||
{
|
||||
if (it->realized)
|
||||
items = eina_list_append(items, it->base->access_obj);
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_gengrid_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_gengrid_elm_widget_focus_direction(Eo *obj, Elm_Gengrid_Data *sd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Eina_List *items = NULL, *l = NULL;
|
||||
Elm_Object_Item *eo_item = NULL;
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
double c_weight = 0.0;
|
||||
|
||||
items = elm_gengrid_realized_items_get(obj);
|
||||
eo_item = elm_object_focused_item_get(base);
|
||||
if (eo_item)
|
||||
{
|
||||
ELM_GENGRID_ITEM_DATA_GET(eo_item, base_item);
|
||||
base = VIEW(base_item);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(items, l, eo_item)
|
||||
{
|
||||
ELM_GENGRID_ITEM_DATA_GET(eo_item, item);
|
||||
|
||||
c_weight = _elm_widget_focus_direction_weight_get(base, VIEW(item), degree);
|
||||
if ((c_weight == -1.0) ||
|
||||
((c_weight != 0.0) && (*weight != -1.0) &&
|
||||
((int)(*weight * 100000000) < (int)(c_weight * 100000000))))
|
||||
{
|
||||
*direction = (Evas_Object *)obj;
|
||||
*direction_item = eo_item;
|
||||
*weight = c_weight;
|
||||
ret = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
eina_list_free(items);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_mirrored_set(Evas_Object *obj,
|
||||
Eina_Bool rtl)
|
||||
|
|
|
@ -548,11 +548,7 @@ class Elm.Gengrid (Efl.Ui.Layout, Elm.Interface_Scrollable,
|
|||
Efl.Gfx.size { set; }
|
||||
Efl.Canvas.Group.group_member_add;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.focus_region { get; }
|
||||
Elm.Widget.widget_event;
|
||||
|
|
|
@ -2882,6 +2882,7 @@ _elm_genlist_item_content_focus_set(Elm_Gen_Item *it, Elm_Focus_Direction dir)
|
|||
EINA_LIST_FOREACH(it->item_focus_chain, l, focused_obj)
|
||||
if (elm_object_focus_get(focused_obj)) break;
|
||||
|
||||
/* FOCUS-FIXME
|
||||
if (focused_obj && (dir != ELM_FOCUS_PREVIOUS))
|
||||
{
|
||||
Evas_Object *nextfocus;
|
||||
|
@ -2895,6 +2896,7 @@ _elm_genlist_item_content_focus_set(Elm_Gen_Item *it, Elm_Focus_Direction dir)
|
|||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (!l) l = it->item_focus_chain;
|
||||
|
||||
|
@ -3355,69 +3357,6 @@ _elm_genlist_elm_widget_on_focus_update(Eo *obj, Elm_Genlist_Data *sd, Elm_Objec
|
|||
|
||||
static Eina_Bool _elm_genlist_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_genlist_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Genlist_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return _elm_genlist_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_genlist_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Genlist_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_genlist_elm_widget_focus_next(Eo *obj, Elm_Genlist_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Coord x, y, w, h;
|
||||
Evas_Coord sx, sy, sw, sh;
|
||||
Item_Block *itb;
|
||||
Eina_List *items = NULL;
|
||||
Eina_Bool done = EINA_FALSE;
|
||||
int ret;
|
||||
|
||||
evas_object_geometry_get(sd->obj, &sx, &sy, &sw, &sh);
|
||||
|
||||
EINA_INLIST_FOREACH(sd->blocks, itb)
|
||||
{
|
||||
if (itb->realized)
|
||||
{
|
||||
Eina_List *l;
|
||||
Elm_Gen_Item *it;
|
||||
|
||||
done = EINA_TRUE;
|
||||
EINA_LIST_FOREACH(itb->items, l, it)
|
||||
{
|
||||
if (it->realized)
|
||||
{
|
||||
evas_object_geometry_get(it->base->view, &x, &y, &w, &h);
|
||||
|
||||
/* check item which displays more than half of its size */
|
||||
if (it->base->access_obj &&
|
||||
ELM_RECTS_INTERSECT
|
||||
(x + (w / 2), y + (h / 2), 0, 0, sx, sy, sw, sh))
|
||||
items = eina_list_append(items, it->base->access_obj);
|
||||
|
||||
if (!it->base->access_order) continue;
|
||||
|
||||
Eina_List *subl;
|
||||
Evas_Object *subo;
|
||||
EINA_LIST_FOREACH(it->base->access_order, subl, subo)
|
||||
items = eina_list_append(items, subo);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (done) break;
|
||||
}
|
||||
|
||||
ret = elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
eina_list_free(items);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_mirrored_set(Evas_Object *obj,
|
||||
Eina_Bool rtl)
|
||||
|
|
|
@ -533,13 +533,10 @@ class Elm.Genlist (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
|||
Efl.Gfx.size { set; }
|
||||
Efl.Canvas.Group.group_member_add;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_highlight_geometry { get; }
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Widget.focused_item { get; }
|
||||
|
|
|
@ -22,88 +22,6 @@ _focus_order_flush(Eo *obj)
|
|||
efl_ui_focus_manager_calc_update_order(wpd->focus.manager, obj, order);
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_grid_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_grid_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
const Eina_List *items;
|
||||
Eina_List *(*list_free)(Eina_List *list);
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
Eina_Bool int_ret;
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
items = evas_object_grid_children_get(wd->resize_obj);
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = eina_list_free;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
|
||||
|
||||
if (list_free) list_free((Eina_List *)items);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_grid_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_grid_elm_widget_focus_direction(Eo *obj, void *_pd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
const Eina_List *items;
|
||||
Eina_List *(*list_free)(Eina_List *list);
|
||||
void *(*list_data_get)(const Eina_List *list);
|
||||
|
||||
Eina_Bool int_ret;
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
/* Focus chain */
|
||||
/* TODO: Change this to use other chain */
|
||||
if ((items = elm_obj_widget_focus_custom_chain_get(obj)))
|
||||
{
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
items = evas_object_grid_children_get(wd->resize_obj);
|
||||
list_data_get = eina_list_data_get;
|
||||
list_free = eina_list_free;
|
||||
|
||||
if (!items) return EINA_FALSE;
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_direction_get(obj, base, items, list_data_get,
|
||||
degree, direction, direction_item, weight);
|
||||
|
||||
if (list_free) list_free((Eina_List *)items);
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
||||
{
|
||||
|
|
|
@ -55,10 +55,6 @@ class Elm.Grid (Elm.Widget)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -698,24 +698,6 @@ elm_hover_add(Evas_Object *parent)
|
|||
return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added));
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Ui_Focus_Manager*
|
||||
_elm_hover_elm_widget_focus_manager_create(Eo *obj EINA_UNUSED, Elm_Hover_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
|
||||
{
|
||||
Efl_Ui_Focus_Manager *manager;
|
||||
|
||||
manager = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, obj,
|
||||
efl_ui_focus_manager_root_set(efl_added, root)
|
||||
);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_hover_elm_widget_focus_state_apply(Eo *obj EINA_UNUSED, Elm_Hover_Data *pd EINA_UNUSED, Elm_Widget_Focus_State current_state EINA_UNUSED, Elm_Widget_Focus_State *configured_state EINA_UNUSED, Elm_Widget *redirect EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_elm_hover_efl_object_constructor(Eo *obj, Elm_Hover_Data *pd)
|
||||
{
|
||||
|
@ -860,19 +842,6 @@ _elm_hover_dismiss(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED)
|
|||
elm_layout_signal_emit(obj, "elm,action,dismiss", "elm");
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_hover_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Hover_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_hover_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Hover_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static void
|
||||
_elm_hover_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ enum Elm.Hover.Axis
|
|||
both [[ELM_HOVER_AXIS_BOTH -- both.]]
|
||||
}
|
||||
|
||||
class Elm.Hover (Efl.Ui.Layout, Efl.Ui.Clickable, Elm.Interface.Atspi_Widget_Action, Efl.Ui.Focus.Manager)
|
||||
class Elm.Hover (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Ui.Clickable, Elm.Interface.Atspi_Widget_Action)
|
||||
{
|
||||
[[Elementary hover class]]
|
||||
legacy_prefix: elm_hover;
|
||||
|
@ -67,11 +67,7 @@ class Elm.Hover (Efl.Ui.Layout, Efl.Ui.Clickable, Elm.Interface.Atspi_Widget_Act
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Elm.Widget.widget_parent { get; set; }
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.focus_manager_create;
|
||||
Elm.Widget.focus_state_apply;
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
Efl.Part.part;
|
||||
}
|
||||
|
|
|
@ -1135,55 +1135,6 @@ _elm_index_efl_canvas_group_group_del(Eo *obj, Elm_Index_Data *sd)
|
|||
|
||||
static Eina_Bool _elm_index_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_index_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Index_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return _elm_index_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_index_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Index_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_index_elm_widget_focus_next(Eo *obj, Elm_Index_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
Eina_List *items = NULL;
|
||||
Eina_List *l = NULL;
|
||||
Elm_Object_Item *eo_item;
|
||||
Evas_Object *ao;
|
||||
Evas_Object *po;
|
||||
|
||||
if (!sd->autohide_disabled)
|
||||
elm_layout_signal_emit((Evas_Object *)obj, "elm,state,active", "elm");
|
||||
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(elm_layout_edje_get(obj), "access");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
items = eina_list_append(items, ao);
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, eo_item)
|
||||
{
|
||||
ELM_INDEX_ITEM_DATA_GET(eo_item, it);
|
||||
if (it->level != 0) continue;
|
||||
items = eina_list_append(items, it->base->access_obj);
|
||||
}
|
||||
|
||||
int_ret = elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
eina_list_free(items);
|
||||
|
||||
// to hide index item, if there is nothing to focus on autohide disable mode
|
||||
if ((!sd->autohide_disabled) && (!int_ret))
|
||||
elm_layout_signal_emit((Evas_Object *)obj, "elm,state,inactive", "elm");
|
||||
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_access_obj_process(Evas_Object *obj, Eina_Bool is_access)
|
||||
{
|
||||
|
|
|
@ -198,10 +198,7 @@ class Elm.Index (Efl.Ui.Layout, Efl.Ui.Direction,
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $vertical.]] }
|
||||
Elm.Interface.Atspi_Accessible.children { get; }
|
||||
}
|
||||
|
|
|
@ -27,8 +27,7 @@ static const Elm_Layout_Part_Alias_Description _content_aliases[] =
|
|||
};
|
||||
|
||||
typedef struct {
|
||||
Efl_Ui_Focus_Manager *manager, *registered_manager;
|
||||
Eina_Bool registered;
|
||||
|
||||
} Elm_Inwin_Data;
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -48,31 +47,6 @@ _elm_inwin_elm_layout_sizing_eval(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
|
|||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_inwin_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Inwin_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_inwin_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Inwin_Data *pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *content;
|
||||
|
||||
content = elm_layout_content_get(obj, NULL);
|
||||
|
||||
/* attempt to follow focus cycle into sub-object */
|
||||
if (content)
|
||||
{
|
||||
elm_obj_widget_focus_next_get(content, dir, next, next_item);
|
||||
if (*next) return EINA_TRUE;
|
||||
}
|
||||
|
||||
*next = (Evas_Object *)obj;
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_inwin_efl_canvas_group_group_add(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
|
||||
{
|
||||
|
@ -103,20 +77,6 @@ elm_win_inwin_add(Evas_Object *parent)
|
|||
return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added));
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static Efl_Ui_Focus_Manager*
|
||||
_elm_inwin_elm_widget_focus_manager_create(Eo *obj EINA_UNUSED, Elm_Inwin_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
|
||||
{
|
||||
Efl_Ui_Focus_Manager *manager;
|
||||
|
||||
manager = efl_add(EFL_UI_FOCUS_MANAGER_ROOT_FOCUS_CLASS, obj,
|
||||
efl_ui_focus_manager_root_set(efl_added, root)
|
||||
);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static Eo *
|
||||
_elm_inwin_efl_object_constructor(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
|
||||
{
|
||||
|
@ -134,10 +94,6 @@ _elm_inwin_efl_object_constructor(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
|
|||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_GLASS_PANE);
|
||||
|
||||
pd->manager = elm_obj_widget_focus_manager_create(obj, obj);
|
||||
|
||||
efl_composite_attach(obj, pd->manager);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -155,40 +111,6 @@ _elm_inwin_activate(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
|
|||
elm_object_focus_set(obj, EINA_TRUE);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_inwin_efl_gfx_visible_set(Eo *obj, Elm_Inwin_Data *pd, Eina_Bool v)
|
||||
{
|
||||
efl_gfx_visible_set(efl_super(obj, MY_CLASS), v);
|
||||
|
||||
if (v && !pd->registered)
|
||||
{
|
||||
pd->registered_manager = efl_ui_focus_user_manager_get(obj);
|
||||
|
||||
efl_ui_focus_manager_redirect_set(pd->registered_manager, obj);
|
||||
efl_ui_focus_manager_focus_set(pd->manager, obj);
|
||||
pd->registered = EINA_TRUE;
|
||||
}
|
||||
else if (!v && pd->registered)
|
||||
{
|
||||
efl_ui_focus_manager_redirect_set(pd->registered_manager, NULL);
|
||||
pd->registered = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Ui_Focus_Object*
|
||||
_elm_inwin_efl_ui_focus_manager_move(Eo *obj, Elm_Inwin_Data *pd, Efl_Ui_Focus_Direction direction)
|
||||
{
|
||||
Eo *ret = efl_ui_focus_manager_move(pd->manager , direction);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if ((direction == EFL_UI_FOCUS_DIRECTION_PREV) || (direction == EFL_UI_FOCUS_DIRECTION_NEXT))
|
||||
efl_ui_focus_manager_focus_set(pd->manager, obj);
|
||||
|
||||
return efl_ui_focus_manager_focus_get(obj);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_inwin_efl_container_content_set(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED, Efl_Gfx *content)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Elm.Inwin (Efl.Ui.Layout, Efl.Ui.Focus.Manager, Efl.Container)
|
||||
class Elm.Inwin (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Container)
|
||||
{
|
||||
[[Elementary inwin class]]
|
||||
legacy_prefix: elm_inwin;
|
||||
|
@ -22,11 +22,6 @@ class Elm.Inwin (Efl.Ui.Layout, Efl.Ui.Focus.Manager, Efl.Container)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.widget_parent { set; }
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_manager_create;
|
||||
Efl.Gfx.visible { set; }
|
||||
Efl.Ui.Focus.Manager.move;
|
||||
Efl.Container.content { get; set; }
|
||||
Efl.Container.content_unset;
|
||||
}
|
||||
|
|
|
@ -615,18 +615,6 @@ _elm_label_slide_duration_get(Eo *obj EINA_UNUSED, Elm_Label_Data *sd)
|
|||
return sd->slide_duration;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_label_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Label_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_label_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Label_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_label_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
|
|
|
@ -124,8 +124,6 @@ class Elm.Label (Efl.Ui.Layout)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
Efl.Part.part;
|
||||
}
|
||||
|
|
|
@ -291,6 +291,7 @@ _elm_list_item_content_focus_set(Elm_List_Item_Data *it, Elm_Focus_Direction dir
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/* FOCUS-FIXME
|
||||
if (dir != ELM_FOCUS_PREVIOUS)
|
||||
{
|
||||
Evas_Object *nextfocus;
|
||||
|
@ -309,7 +310,7 @@ _elm_list_item_content_focus_set(Elm_List_Item_Data *it, Elm_Focus_Direction dir
|
|||
if (idx >= focus_objs) idx = 0;
|
||||
focused = focus_chain[idx];
|
||||
}
|
||||
|
||||
*/
|
||||
elm_object_focus_set(focused, EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -2341,39 +2342,6 @@ _resize_cb(void *data,
|
|||
|
||||
static Eina_Bool _elm_list_smart_focus_next_enable = EINA_FALSE;
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_list_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_List_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return _elm_list_smart_focus_next_enable;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_list_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_List_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_list_elm_widget_focus_next(Eo *obj, Elm_List_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Eina_List *items = NULL;
|
||||
Eina_List *elist = NULL;
|
||||
Elm_Object_Item *eo_it;
|
||||
|
||||
if (_elm_config->access_mode != ELM_ACCESS_MODE_ON) return EINA_FALSE;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, elist, eo_it)
|
||||
{
|
||||
ELM_LIST_ITEM_DATA_GET(eo_it, it);
|
||||
items = eina_list_append(items, it->base->access_obj);
|
||||
if (it->icon) items = eina_list_append(items, it->icon);
|
||||
if (it->end) items = eina_list_append(items, it->end);
|
||||
}
|
||||
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_list_efl_canvas_group_group_add(Eo *obj, Elm_List_Data *priv)
|
||||
{
|
||||
|
|
|
@ -434,11 +434,8 @@ class Elm.List (Efl.Ui.Layout, Elm.Interface_Scrollable,
|
|||
Efl.Gfx.size { set; }
|
||||
Efl.Canvas.Group.group_member_add;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_highlight_geometry { get; }
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.on_focus_update;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
|
|
|
@ -1611,35 +1611,115 @@ elm_cache_all_flush(void)
|
|||
EAPI Eina_Bool
|
||||
elm_object_focus_get(const Evas_Object *obj)
|
||||
{
|
||||
Efl_Ui_Focus_Manager *m;
|
||||
Efl_Ui_Focus_Object *focused_child;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
||||
|
||||
if (!elm_widget_is(obj))
|
||||
return evas_object_focus_get(obj);
|
||||
|
||||
m = efl_ui_focus_user_manager_get(obj);
|
||||
|
||||
//no manager means not registered
|
||||
if (!m) return EINA_FALSE;
|
||||
|
||||
//first ensure that the manager where we are registered in is in the redirect chain
|
||||
while(m != elm_widget_top_get(obj))
|
||||
{
|
||||
Efl_Ui_Focus_Manager *m_low = efl_ui_focus_user_manager_get(m);
|
||||
|
||||
if (efl_ui_focus_manager_redirect_get(m_low) != m) return EINA_FALSE;
|
||||
|
||||
m = m_low;
|
||||
}
|
||||
//assertion: our redirect manager m is in the redirect chain
|
||||
m = efl_ui_focus_user_manager_get(obj);
|
||||
|
||||
//if there is a redirect manager
|
||||
if (!!efl_ui_focus_manager_redirect_get(m)) return EINA_FALSE;
|
||||
|
||||
//now take the focused object and walk down the parents, if this is
|
||||
focused_child = efl_ui_focus_manager_focus_get(m);
|
||||
|
||||
while(focused_child)
|
||||
{
|
||||
if (focused_child == obj) return EINA_TRUE;
|
||||
|
||||
focused_child = efl_ui_focus_user_parent_get(focused_child);
|
||||
}
|
||||
|
||||
return elm_widget_focus_get(obj);
|
||||
}
|
||||
|
||||
static void _elm_widget_focus(Evas_Object *obj);
|
||||
|
||||
static void
|
||||
_manager_changed(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
_elm_widget_focus(event->object);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_widget_focus(Evas_Object *obj)
|
||||
{
|
||||
Efl_Ui_Focus_Manager *m, *m2 = obj;
|
||||
Efl_Ui_Focus_Object *o;
|
||||
|
||||
m = elm_widget_top_get(obj);
|
||||
m2 = efl_ui_focus_user_manager_get(obj);
|
||||
|
||||
o = efl_key_data_get(m, "__delayed_focus_set");
|
||||
efl_event_callback_del(o, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed, NULL);
|
||||
efl_key_data_set(m, "__delayed_focus_set", NULL);
|
||||
|
||||
if (!m2)
|
||||
{
|
||||
efl_key_data_set(m, "__delayed_focus_set", obj);
|
||||
efl_event_callback_add(obj, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
//build the chain of redirects
|
||||
do
|
||||
{
|
||||
Efl_Ui_Focus_Manager *new_manager;;
|
||||
new_manager = efl_ui_focus_user_manager_get(m2);
|
||||
//new manager is in a higher hirarchy than m2
|
||||
//so we set m2 as redirect in new_manager
|
||||
efl_ui_focus_manager_redirect_set(new_manager, m2);
|
||||
m2 = new_manager;
|
||||
}
|
||||
while(m && m2 && m != m2);
|
||||
|
||||
//now set the focus
|
||||
efl_ui_focus_manager_focus_set(efl_ui_focus_user_manager_get(obj), obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_focus_set(Evas_Object *obj,
|
||||
Eina_Bool focus)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
|
||||
if (elm_widget_is(obj))
|
||||
// ugly, but, special case for inlined windows
|
||||
if (efl_isa(obj, EFL_UI_WIN_CLASS))
|
||||
{
|
||||
if (focus == elm_widget_focus_get(obj)) return;
|
||||
|
||||
// ugly, but, special case for inlined windows
|
||||
if (efl_isa(obj, EFL_UI_WIN_CLASS))
|
||||
Evas_Object *inlined = elm_win_inlined_image_object_get(obj);
|
||||
if (inlined)
|
||||
{
|
||||
Evas_Object *inlined = elm_win_inlined_image_object_get(obj);
|
||||
|
||||
if (inlined)
|
||||
{
|
||||
evas_object_focus_set(inlined, focus);
|
||||
return;
|
||||
}
|
||||
evas_object_focus_set(inlined, focus);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (elm_widget_is(obj))
|
||||
{
|
||||
if (focus)
|
||||
elm_obj_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
|
||||
_elm_widget_focus(obj);
|
||||
else
|
||||
elm_obj_widget_focused_object_clear(obj);
|
||||
{
|
||||
if (efl_ui_focus_manager_focus_get(efl_ui_focus_user_manager_get(obj)) == obj)
|
||||
efl_ui_focus_manager_pop_history_stack(efl_ui_focus_user_manager_get(obj));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1664,42 +1744,43 @@ elm_object_focus_allow_get(const Evas_Object *obj)
|
|||
|
||||
EAPI void
|
||||
elm_object_focus_custom_chain_set(Evas_Object *obj,
|
||||
Eina_List *objs)
|
||||
Eina_List *objs EINA_UNUSED)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_custom_chain_set(obj, objs);
|
||||
ERR("Focus-chain not supported");
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_focus_custom_chain_unset(Evas_Object *obj)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_custom_chain_unset(obj);
|
||||
ERR("Focus-chain not supported");
|
||||
}
|
||||
|
||||
EAPI const Eina_List *
|
||||
elm_object_focus_custom_chain_get(const Evas_Object *obj)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||
return elm_obj_widget_focus_custom_chain_get(obj);
|
||||
ERR("Focus-chain not supported");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_focus_custom_chain_append(Evas_Object *obj,
|
||||
Evas_Object *child,
|
||||
Evas_Object *relative_child)
|
||||
Evas_Object *child EINA_UNUSED,
|
||||
Evas_Object *relative_child EINA_UNUSED)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_custom_chain_append(obj, child, relative_child);
|
||||
ERR("Focus-chain not supported");
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_focus_custom_chain_prepend(Evas_Object *obj,
|
||||
Evas_Object *child,
|
||||
Evas_Object *relative_child)
|
||||
Evas_Object *child EINA_UNUSED,
|
||||
Evas_Object *relative_child EINA_UNUSED)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_custom_chain_prepend(obj, child, relative_child);
|
||||
ERR("Focus-chain not supported");
|
||||
}
|
||||
|
||||
EINA_DEPRECATED EAPI void
|
||||
|
@ -1713,49 +1794,61 @@ EAPI void
|
|||
elm_object_focus_next(Evas_Object *obj,
|
||||
Elm_Focus_Direction dir)
|
||||
{
|
||||
Elm_Widget *top = elm_object_top_widget_get(obj);
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_cycle(obj, dir);
|
||||
|
||||
efl_ui_focus_manager_move(top, dir);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
elm_object_focus_next_object_get(const Evas_Object *obj,
|
||||
Elm_Focus_Direction dir)
|
||||
{
|
||||
Elm_Widget *top = elm_object_top_widget_get(obj);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||
return elm_obj_widget_focus_next_object_get(obj, dir);
|
||||
|
||||
return efl_ui_focus_manager_request_move(top, dir);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_focus_next_object_set(Evas_Object *obj,
|
||||
Evas_Object *next,
|
||||
Elm_Focus_Direction dir)
|
||||
Evas_Object *next EINA_UNUSED,
|
||||
Elm_Focus_Direction dir EINA_UNUSED)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_next_object_set(obj, next, dir);
|
||||
ERR("setting explicit objects not allowed not supported");
|
||||
}
|
||||
|
||||
EAPI Elm_Object_Item *
|
||||
elm_object_focus_next_item_get(const Evas_Object *obj,
|
||||
Elm_Focus_Direction dir)
|
||||
Elm_Focus_Direction dir EINA_UNUSED)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||
return elm_obj_widget_focus_next_item_get(obj, dir);
|
||||
/* FOCUS-FIXME */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_focus_next_item_set(Evas_Object *obj,
|
||||
Elm_Object_Item *next_item,
|
||||
Elm_Focus_Direction dir)
|
||||
Elm_Object_Item *next_item EINA_UNUSED,
|
||||
Elm_Focus_Direction dir EINA_UNUSED)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_next_item_set(obj, next_item, dir);
|
||||
/* FOCUS-FIXME */
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
elm_object_focused_object_get(const Evas_Object *obj)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||
return elm_obj_widget_focused_object_get(obj);
|
||||
Efl_Ui_Focus_Manager *man = elm_object_top_widget_get(obj);
|
||||
|
||||
while(efl_ui_focus_manager_redirect_get(man))
|
||||
{
|
||||
man = efl_ui_focus_manager_redirect_get(man);
|
||||
}
|
||||
|
||||
return efl_ui_focus_manager_focus_get(man);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -1799,7 +1892,7 @@ EAPI void
|
|||
elm_object_focus_move_policy_automatic_set(Evas_Object *obj, Eina_Bool automatic)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||
elm_obj_widget_focus_move_policy_automatic_set(obj, automatic);
|
||||
return elm_obj_widget_focus_move_policy_automatic_set(obj, automatic);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -179,11 +179,7 @@ class Elm.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_focus_update;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
Elm.Widget.widget_event;
|
||||
|
|
|
@ -69,7 +69,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
|||
This pops an item that is on the top(visible) of the naviframe, makes it
|
||||
disappear, then deletes the item. The item that was underneath it on the
|
||||
stack will become visible.
|
||||
|
||||
|
||||
When pop transition animation is in progress, new pop operation is blocked until current pop operation
|
||||
is complete.
|
||||
]]
|
||||
|
@ -98,7 +98,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
|||
|
||||
The item pushed becomes one page of the naviframe, this item will be
|
||||
deleted when it is popped.
|
||||
|
||||
|
||||
When push transition animation is in progress, pop operation is blocked until push is complete.
|
||||
|
||||
The following styles are available for this item:
|
||||
|
@ -144,11 +144,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Efl.Gfx.visible { set; }
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.widget_event;
|
||||
|
|
|
@ -358,43 +358,6 @@ _parent_hide_cb(void *data,
|
|||
evas_object_hide(data);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_notify_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_notify_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *cur;
|
||||
|
||||
if (!sd->content) return EINA_FALSE;
|
||||
|
||||
cur = sd->content;
|
||||
|
||||
/* Try to cycle focus on content */
|
||||
return elm_obj_widget_focus_next_get(cur, dir, next, next_item);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_notify_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_notify_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
|
||||
{
|
||||
Evas_Object *cur;
|
||||
|
||||
if (!sd->content) return EINA_FALSE;
|
||||
|
||||
cur = sd->content;
|
||||
|
||||
return elm_obj_widget_focus_direction_get(cur, base, degree, direction, direction_item, weight);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_notify_content_set(Eo *obj, Elm_Notify_Data *sd, const char *part, Evas_Object *content)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Elm.Notify (Elm.Widget, Efl.Container, Efl.Part)
|
||||
class Elm.Notify (Elm.Widget, Efl.Ui.Focus.Layer, Efl.Container, Efl.Part)
|
||||
{
|
||||
[[Elementary notification class]]
|
||||
legacy_prefix: elm_notify;
|
||||
|
@ -83,12 +83,8 @@ class Elm.Notify (Elm.Widget, Efl.Container, Efl.Part)
|
|||
Efl.Gfx.visible { set; }
|
||||
Efl.Gfx.position { set; }
|
||||
Efl.Gfx.size { set; }
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.widget_parent { get; set; }
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Efl.Container.content { get; set; }
|
||||
Efl.Container.content_unset;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
||||
#define EFL_UI_FOCUS_LAYER_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
|
@ -261,63 +262,6 @@ _elm_panel_elm_widget_theme_apply(Eo *obj, Elm_Panel_Data *sd)
|
|||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_panel_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Panel_Data *_pd EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_panel_elm_widget_focus_next(Eo *obj, Elm_Panel_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
Evas_Object *cur;
|
||||
Eina_List *items = NULL;
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
if (!sd->content) return EINA_FALSE;
|
||||
|
||||
if (sd->scrollable)
|
||||
{
|
||||
if (sd->hidden) return EINA_FALSE;
|
||||
|
||||
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
|
||||
{
|
||||
Evas_Object *ao = _access_object_get(obj, ACCESS_OUTLINE_PART);
|
||||
if (ao) items = eina_list_append(items, ao);
|
||||
items = eina_list_append(items, sd->content);
|
||||
|
||||
ret = elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
eina_list_free(items);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return elm_obj_widget_focus_next_get(sd->content, dir, next, next_item);
|
||||
}
|
||||
|
||||
cur = sd->content;
|
||||
|
||||
/* Try to Focus cycle in subitem */
|
||||
if (!sd->hidden) return elm_obj_widget_focus_next_get(cur, dir, next, next_item);
|
||||
|
||||
/* access */
|
||||
if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
|
||||
{
|
||||
Evas_Object *ao, *po;
|
||||
po = (Evas_Object *)edje_object_part_object_get
|
||||
(wd->resize_obj, "btn_icon");
|
||||
ao = evas_object_data_get(po, "_part_access_obj");
|
||||
_elm_access_highlight_set(ao);
|
||||
}
|
||||
|
||||
/* Return */
|
||||
*next = (Evas_Object *)obj;
|
||||
return !elm_widget_focus_get(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_box_layout_cb(Evas_Object *o,
|
||||
Evas_Object_Box_Data *priv,
|
||||
|
@ -492,16 +436,14 @@ _panel_toggle(void *data EINA_UNUSED,
|
|||
elm_layout_signal_emit(obj, "elm,action,hide", "elm");
|
||||
sd->hidden = EINA_TRUE;
|
||||
evas_object_repeat_events_set(obj, EINA_TRUE);
|
||||
if (sd->content && elm_widget_focus_get(sd->content))
|
||||
{
|
||||
elm_obj_widget_focused_object_clear(obj);
|
||||
elm_obj_widget_focus_steal(obj, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
//if the panel is hidden, make this thing unfocusable
|
||||
elm_widget_tree_unfocusable_set(obj, sd->hidden);
|
||||
edje_object_message_signal_process(wd->resize_obj);
|
||||
}
|
||||
|
||||
efl_ui_focus_layer_enable_set(obj, !sd->hidden);
|
||||
efl_event_callback_legacy_call(obj, ELM_PANEL_EVENT_TOGGLED, NULL);
|
||||
}
|
||||
|
||||
|
@ -1029,6 +971,8 @@ _elm_panel_efl_object_constructor(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED)
|
|||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_PANEL);
|
||||
|
||||
efl_ui_focus_layer_behaviour_set(obj, EINA_FALSE, EINA_FALSE);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ enum Elm.Panel.Orient
|
|||
right [[Panel (dis)appears from the right]]
|
||||
}
|
||||
|
||||
class Elm.Panel (Efl.Ui.Layout, Elm.Interface_Scrollable,
|
||||
class Elm.Panel (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Elm.Interface_Scrollable,
|
||||
Elm.Interface.Atspi_Widget_Action)
|
||||
{
|
||||
[[Elementary panel class]]
|
||||
|
@ -80,8 +80,6 @@ class Elm.Panel (Efl.Ui.Layout, Elm.Interface_Scrollable,
|
|||
Efl.Gfx.size { set; }
|
||||
Efl.Canvas.Group.group_member_add;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.widget_event;
|
||||
|
|
|
@ -23,7 +23,7 @@ enum Elm.Popup.Orient
|
|||
}
|
||||
|
||||
|
||||
class Elm.Popup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
||||
class Elm.Popup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Elm.Interface.Atspi_Widget_Action)
|
||||
{
|
||||
[[Elementary popup class]]
|
||||
legacy_prefix: elm_popup;
|
||||
|
@ -168,12 +168,8 @@ class Elm.Popup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.on_access_update;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.widget_parent { set; }
|
||||
Efl.Ui.Translatable.translation_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
|
|
|
@ -471,30 +471,6 @@ _elm_prefs_efl_canvas_group_group_del(Eo *obj, Elm_Prefs_Data *sd)
|
|||
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_prefs_elm_widget_focus_next(Eo *obj, Elm_Prefs_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
|
||||
{
|
||||
const Eina_List *items;
|
||||
|
||||
ELM_PREFS_CHECK(obj) EINA_FALSE;
|
||||
|
||||
items = elm_obj_widget_focus_custom_chain_get(obj);
|
||||
if (items)
|
||||
{
|
||||
return elm_widget_focus_list_next_get
|
||||
(obj, items, eina_list_data_get, dir, next, next_item);
|
||||
}
|
||||
|
||||
if (sd->root && sd->root->w_obj)
|
||||
{
|
||||
return elm_obj_widget_focus_next_get(sd->root->w_obj, dir, next, next_item);
|
||||
}
|
||||
|
||||
if (next) *next = NULL;
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
elm_prefs_add(Evas_Object *parent)
|
||||
{
|
||||
|
|
|
@ -216,7 +216,6 @@ class Elm.Prefs (Elm.Widget, Efl.File)
|
|||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Efl.File.file { get; set; }
|
||||
Elm.Widget.focus_next;
|
||||
}
|
||||
events {
|
||||
page,changed; [[Called when page changed]]
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue