forked from enlightenment/efl
efl_input_focus: add event_flags
Summary: It appears that it could be interesting to know if a focus event has already been procecced or not. However, a focus event based on scrolling activity is not possible, therefore, error about that. ref T7652 Reviewers: cedric, zmike, stefan_schmidt Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7652 Differential Revision: https://phab.enlightenment.org/D7732
This commit is contained in:
parent
a50edaf17b
commit
5253229aa1
|
@ -116,6 +116,7 @@ struct _Efl_Input_Focus_Data
|
||||||
Efl_Input_Device *device; //The seat
|
Efl_Input_Device *device; //The seat
|
||||||
Eo *object_wref; // wref on the focused object - Efl.Canvas.Object or Efl.Canvas.
|
Eo *object_wref; // wref on the focused object - Efl.Canvas.Object or Efl.Canvas.
|
||||||
double timestamp;
|
double timestamp;
|
||||||
|
Efl_Input_Flags event_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Internal helpers */
|
/* Internal helpers */
|
||||||
|
|
|
@ -130,6 +130,22 @@ _efl_input_focus_efl_input_event_reset(Eo *obj, Efl_Input_Focus_Data *pd)
|
||||||
pd->eo = obj;
|
pd->eo = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EOLIAN static void
|
||||||
|
_efl_input_focus_efl_input_event_event_flags_set(Eo *obj EINA_UNUSED, Efl_Input_Focus_Data *pd, Efl_Input_Flags flags)
|
||||||
|
{
|
||||||
|
if (flags == EFL_INPUT_FLAGS_SCROLLING)
|
||||||
|
ERR("A focus event cannot be created based on scrolling");
|
||||||
|
else
|
||||||
|
pd->event_flags |= flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static Efl_Input_Flags
|
||||||
|
_efl_input_focus_efl_input_event_event_flags_get(const Eo *obj EINA_UNUSED, Efl_Input_Focus_Data *pd)
|
||||||
|
{
|
||||||
|
return pd->event_flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Internal EO APIs */
|
/* Internal EO APIs */
|
||||||
|
|
||||||
#define EFL_INPUT_FOCUS_EXTRA_CLASS_OPS \
|
#define EFL_INPUT_FOCUS_EXTRA_CLASS_OPS \
|
||||||
|
|
|
@ -17,6 +17,7 @@ class Efl.Input.Focus extends Efl.Object implements Efl.Input.Event
|
||||||
Efl.Object.destructor;
|
Efl.Object.destructor;
|
||||||
Efl.Input.Event.device { get; set; }
|
Efl.Input.Event.device { get; set; }
|
||||||
Efl.Input.Event.reset;
|
Efl.Input.Event.reset;
|
||||||
|
Efl.Input.Event.event_flags { get; set;}
|
||||||
Efl.Duplicate.duplicate;
|
Efl.Duplicate.duplicate;
|
||||||
[[Creates a copy of this event. @Efl.Input.Event.fake is $true.
|
[[Creates a copy of this event. @Efl.Input.Event.fake is $true.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue