/* public calls */
EOLIAN void
-_evas_object_focus_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool focus)
+_evas_object_key_focus_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool focus)
{
int event_id = 0;
if (focus)
{
if (obj->layer->evas->focused)
- evas_obj_focus_set(obj->layer->evas->focused, 0);
+ evas_object_focus_set(obj->layer->evas->focused, 0);
if (obj->layer->evas->focused) goto end;
obj->focused = 1;
}
EOLIAN Eina_Bool
-_evas_object_focus_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
+_evas_object_key_focus_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
return obj->focused;
}
default size.]]
}
}
- @property focus {
+ @property key_focus {
+ [[Indicates that this object is the keyboard event receiver on
+ its canvas.
+
+ Changing focus only affects where (key) input events go.
+ There can be only one object focused at any time. If $focus
+ is $true, $obj will be set as the currently focused object
+ and it will receive all keyboard events that are not
+ exclusive key grabs on other objects.
+ ]]
set {
- [[Sets or unsets a given object as the currently focused one on
- its canvas.
-
- Changing focus only affects where (key) input events go.
- There can be only one object focused at any time. If $focus
- is $true, $obj will be set as the currently focused object
- and it will receive all keyboard events that are not
- exclusive key grabs on other objects.
-
- See also @.key_grab, @.key_ungrab.
- ]]
- /* FIXME-doc
- Example:
- @dontinclude evas-events.c
- @skip evas_object_focus_set
- @until evas_object_focus_set
-
- See the full example @ref Example_Evas_Events "here".
- */
+ legacy: evas_object_focus_set;
}
get {
- [[Retrieve whether an object has the focus.
-
- If the passed object is the currently focused one, $true is
- returned. $false is returned, otherwise.
- ]]
- /* FIXME-doc
- Example:
- @dontinclude evas-events.c
- @skip And again
- @until something is bad
-
- See the full example @ref Example_Evas_Events "here".
- */
+ legacy: evas_object_focus_get;
}
values {
focus: bool; [[$true when set as focused or $false otherwise.]]
Warning: Providing impossible modifier sets creates undefined
behavior.
- See also @.key_ungrab, @.focus.get, @.focus.set,
+ See also @.key_ungrab, @.key_focus.get, @.key_focus.set,
\@ref evas_focus_get, \@ref evas_key_modifier_add.
]]
/* FIXME-doc
Removes a key grab on $obj if $keyname, $modifiers, and
$not_modifiers match.
- See also @.key_grab, @.focus.get, @.focus.set,
+ See also @.key_grab, @.key_focus.get, @.key_focus.set,
\@ref evas_focus_get.
]]
/* FIXME-doc
efl_gfx_size_hint_align_get(eo_obj, &dblx, &dbly);
efl_gfx_size_hint_weight_get(eo_obj, &dblw, &dblh);
efl_gfx_color_get(eo_obj, &r, &g, &b, &a);
- focus = evas_obj_focus_get(eo_obj);
+ focus = evas_object_focus_get(eo_obj);
m = evas_obj_pointer_mode_get(eo_obj);
pass_event = evas_obj_pass_events_get(eo_obj);
repeat_event = evas_obj_repeat_events_get(eo_obj);
efl_gfx_size_set(o_bg, startw, starth);
efl_gfx_stack_layer_set(o_bg, -999);
efl_gfx_visible_set(o_bg, EINA_TRUE);
- evas_obj_focus_set(o_bg, EINA_TRUE);
+ evas_object_focus_set(o_bg, EINA_TRUE);
eo_event_callback_add(o_bg, EFL_EVENT_KEY_DOWN, bg_key_down, NULL);
}