forked from enlightenment/efl
Efl.Canvas.Object: Remove focus,in/out events.
Since this object already inherist Efl.Input.Interface there's no need to have those events reimplemented.
This commit is contained in:
parent
b77f0086f5
commit
6572ad9e02
|
@ -439,8 +439,8 @@ EFL_CALLBACKS_ARRAY_DEFINE(edje_callbacks,
|
||||||
{ EFL_EVENT_POINTER_WHEEL, _edje_mouse_wheel_signal_cb });
|
{ EFL_EVENT_POINTER_WHEEL, _edje_mouse_wheel_signal_cb });
|
||||||
|
|
||||||
EFL_CALLBACKS_ARRAY_DEFINE(edje_focus_callbacks,
|
EFL_CALLBACKS_ARRAY_DEFINE(edje_focus_callbacks,
|
||||||
{ EFL_CANVAS_OBJECT_EVENT_FOCUS_IN, _edje_focus_in_signal_cb },
|
{ EFL_EVENT_FOCUS_IN, _edje_focus_in_signal_cb },
|
||||||
{ EFL_CANVAS_OBJECT_EVENT_FOCUS_OUT, _edje_focus_out_signal_cb });
|
{ EFL_EVENT_FOCUS_OUT, _edje_focus_out_signal_cb });
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp)
|
_edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp)
|
||||||
|
|
|
@ -636,10 +636,4 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator,
|
||||||
Efl.Gfx.Map.map_enable.set;
|
Efl.Gfx.Map.map_enable.set;
|
||||||
Efl.Gfx.Map.map_enable.get;
|
Efl.Gfx.Map.map_enable.get;
|
||||||
}
|
}
|
||||||
events {
|
|
||||||
focus,in; [[Focus In Event ]]
|
|
||||||
focus,out; [[Focus Out Event ]]
|
|
||||||
focus,device,in: Efl.Input.Device; [[Focus In event that contains the seat device that this object was focused. @since 1.19]]
|
|
||||||
focus,device,out: Efl.Input.Device; [[Focus Out event that contains the seat device that this object was unfocused.@since 1.19]]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ DEFINE_EVAS_CALLBACKS(_legacy_evas_callback_table, EVAS_CALLBACK_LAST,
|
||||||
EVAS_OBJECT_EVENT_FREE,
|
EVAS_OBJECT_EVENT_FREE,
|
||||||
EFL_EVENT_KEY_DOWN,
|
EFL_EVENT_KEY_DOWN,
|
||||||
EFL_EVENT_KEY_UP,
|
EFL_EVENT_KEY_UP,
|
||||||
EFL_CANVAS_OBJECT_EVENT_FOCUS_IN,
|
EFL_EVENT_FOCUS_IN,
|
||||||
EFL_CANVAS_OBJECT_EVENT_FOCUS_OUT,
|
EFL_EVENT_FOCUS_OUT,
|
||||||
EFL_GFX_EVENT_SHOW,
|
EFL_GFX_EVENT_SHOW,
|
||||||
EFL_GFX_EVENT_HIDE,
|
EFL_GFX_EVENT_HIDE,
|
||||||
EFL_GFX_EVENT_MOVE,
|
EFL_GFX_EVENT_MOVE,
|
||||||
|
@ -93,7 +93,8 @@ typedef enum {
|
||||||
EFL_EVENT_TYPE_STRUCT,
|
EFL_EVENT_TYPE_STRUCT,
|
||||||
EFL_EVENT_TYPE_POINTER,
|
EFL_EVENT_TYPE_POINTER,
|
||||||
EFL_EVENT_TYPE_KEY,
|
EFL_EVENT_TYPE_KEY,
|
||||||
EFL_EVENT_TYPE_HOLD
|
EFL_EVENT_TYPE_HOLD,
|
||||||
|
EFL_EVENT_TYPE_FOCUS
|
||||||
} Efl_Event_Info_Type;
|
} Efl_Event_Info_Type;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -147,6 +148,10 @@ _evas_event_efl_event_info_type(Evas_Callback_Type type)
|
||||||
case EVAS_CALLBACK_DEVICE_CHANGED: /* Efl.Input.Device */
|
case EVAS_CALLBACK_DEVICE_CHANGED: /* Efl.Input.Device */
|
||||||
return EFL_EVENT_TYPE_OBJECT;
|
return EFL_EVENT_TYPE_OBJECT;
|
||||||
|
|
||||||
|
case EVAS_CALLBACK_FOCUS_IN:
|
||||||
|
case EVAS_CALLBACK_FOCUS_OUT:
|
||||||
|
return EFL_EVENT_TYPE_FOCUS;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EFL_EVENT_TYPE_NULL;
|
return EFL_EVENT_TYPE_NULL;
|
||||||
}
|
}
|
||||||
|
@ -164,6 +169,7 @@ _eo_evas_object_cb(void *data, const Efl_Event *event)
|
||||||
if (!info->func) return;
|
if (!info->func) return;
|
||||||
evas = evas_object_evas_get(event->object);
|
evas = evas_object_evas_get(event->object);
|
||||||
|
|
||||||
|
event_info = event->info;
|
||||||
switch (info->efl_event_type)
|
switch (info->efl_event_type)
|
||||||
{
|
{
|
||||||
case EFL_EVENT_TYPE_POINTER:
|
case EFL_EVENT_TYPE_POINTER:
|
||||||
|
@ -178,12 +184,13 @@ _eo_evas_object_cb(void *data, const Efl_Event *event)
|
||||||
event_info = efl_input_hold_legacy_info_fill(efl_event_info, &event_flags);
|
event_info = efl_input_hold_legacy_info_fill(efl_event_info, &event_flags);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EFL_EVENT_TYPE_FOCUS:
|
||||||
|
event_info = NULL;
|
||||||
case EFL_EVENT_TYPE_NULL:
|
case EFL_EVENT_TYPE_NULL:
|
||||||
case EFL_EVENT_TYPE_STRUCT:
|
case EFL_EVENT_TYPE_STRUCT:
|
||||||
case EFL_EVENT_TYPE_OBJECT:
|
case EFL_EVENT_TYPE_OBJECT:
|
||||||
info->func(info->data, evas, event->object, event->info);
|
info->func(info->data, evas, event->object, event_info);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ _evas_focus_dispatch_event(Evas_Object_Protected_Data *obj, Efl_Input_Device *se
|
||||||
Efl_Input_Focus_Data *ev_data;
|
Efl_Input_Focus_Data *ev_data;
|
||||||
Efl_Input_Focus *evt;
|
Efl_Input_Focus *evt;
|
||||||
Evas_Callback_Type cb_evas, cb_obj_evas;
|
Evas_Callback_Type cb_evas, cb_obj_evas;
|
||||||
const Efl_Event_Description *efl_object_focus_event, *efl_object_focus_device_event;
|
const Efl_Event_Description *efl_object_focus_event;
|
||||||
|
|
||||||
evt = efl_input_instance_get(EFL_INPUT_FOCUS_CLASS, NULL, (void **) &ev_data);
|
evt = efl_input_instance_get(EFL_INPUT_FOCUS_CLASS, NULL, (void **) &ev_data);
|
||||||
if (!evt) return;
|
if (!evt) return;
|
||||||
|
@ -82,27 +82,20 @@ _evas_focus_dispatch_event(Evas_Object_Protected_Data *obj, Efl_Input_Device *se
|
||||||
{
|
{
|
||||||
cb_obj_evas = EVAS_CALLBACK_FOCUS_IN;
|
cb_obj_evas = EVAS_CALLBACK_FOCUS_IN;
|
||||||
cb_evas = EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN;
|
cb_evas = EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN;
|
||||||
efl_object_focus_event = EFL_CANVAS_OBJECT_EVENT_FOCUS_IN;
|
efl_object_focus_event = EFL_EVENT_FOCUS_IN;
|
||||||
efl_object_focus_device_event = EFL_CANVAS_OBJECT_EVENT_FOCUS_DEVICE_IN;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cb_obj_evas = EVAS_CALLBACK_FOCUS_OUT;
|
cb_obj_evas = EVAS_CALLBACK_FOCUS_OUT;
|
||||||
cb_evas = EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT;
|
cb_evas = EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT;
|
||||||
efl_object_focus_event = EFL_CANVAS_OBJECT_EVENT_FOCUS_OUT;
|
efl_object_focus_event = EFL_EVENT_FOCUS_OUT;
|
||||||
efl_object_focus_device_event = EFL_CANVAS_OBJECT_EVENT_FOCUS_DEVICE_OUT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seat == obj->layer->evas->default_seat)
|
|
||||||
{
|
|
||||||
evas_object_event_callback_call(obj->object, obj,
|
evas_object_event_callback_call(obj->object, obj,
|
||||||
cb_obj_evas,
|
cb_obj_evas,
|
||||||
NULL, _evas_object_event_new(),
|
evt, _evas_object_event_new(),
|
||||||
efl_object_focus_event);
|
efl_object_focus_event);
|
||||||
}
|
evas_event_callback_call(obj->layer->evas->evas, cb_evas, evt);
|
||||||
evas_event_callback_call(obj->layer->evas->evas,
|
|
||||||
cb_evas, evt);
|
|
||||||
efl_event_callback_call(obj->object, efl_object_focus_device_event, seat);
|
|
||||||
efl_del(evt);
|
efl_del(evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue