Efl: Rename event flags to processed and scrolling

From on_hold and on_scroll
This commit is contained in:
Jean-Philippe Andre 2016-06-10 13:10:22 +09:00
parent 79abba52c5
commit 9fdf584d1a
7 changed files with 42 additions and 34 deletions

View File

@ -30,6 +30,14 @@ enum Efl.Event.Flags
{
/* Evas.Event_Flags */
none = 0, [[No fancy flags set]]
on_hold = (1 << 0), [[This event is being delivered but should be put "on hold" until the on hold flag is unset. The event should be used for informational purposes and maybe some indications visually, but not actually perform anything]]
on_scroll = (1 << 1), [[This event flag indicates the event occurs while scrolling; for example, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything]]
processed = (1 << 0), [[This event is being delivered and has been processed,
so it should be put "on hold" until the flag is unset.
The event should be used for informational purposes
and maybe some indications visually, but not
actually perform anything.]]
scrolling = (1 << 1), [[This event flag indicates the event occurs while
scrolling; for example, DOWN event occurs during
scrolling. The event should be used for informational
purposes and maybe some indications visually, but not
actually perform anything.]]
}

View File

@ -352,8 +352,8 @@ typedef Efl_Pointer_Flags Evas_Button_Flags;
typedef Efl_Event_Flags Evas_Event_Flags;
#define EVAS_EVENT_FLAG_NONE EFL_EVENT_FLAGS_NONE
#define EVAS_EVENT_FLAG_ON_HOLD EFL_EVENT_FLAGS_ON_HOLD
#define EVAS_EVENT_FLAG_ON_SCROLL EFL_EVENT_FLAGS_ON_SCROLL
#define EVAS_EVENT_FLAG_ON_HOLD EFL_EVENT_FLAGS_PROCESSED
#define EVAS_EVENT_FLAG_ON_SCROLL EFL_EVENT_FLAGS_SCROLLING
typedef Efl_Gfx_Size_Hint_Aspect Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set */

View File

@ -16,13 +16,13 @@ interface Efl.Event.Input (Efl.Event)
flags: Efl.Event.Flags;
}
}
@property on_hold {
@property processed {
[[$true if @.event_flags indicates the event is on hold.]]
values {
val: bool;
}
}
@property on_scroll {
@property scrolling {
[[$true if @.event_flags indicates the event happened while scrolling.]]
values {
val: bool;

View File

@ -207,33 +207,33 @@ _efl_event_key_efl_event_input_event_flags_get(Eo *obj EINA_UNUSED, Efl_Event_Ke
}
EOLIAN static void
_efl_event_key_efl_event_input_on_hold_set(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd, Eina_Bool val)
_efl_event_key_efl_event_input_processed_set(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd, Eina_Bool val)
{
if (val)
pd->event_flags |= EFL_EVENT_FLAGS_ON_HOLD;
pd->event_flags |= EFL_EVENT_FLAGS_PROCESSED;
else
pd->event_flags &= ~EFL_EVENT_FLAGS_ON_HOLD;
pd->event_flags &= ~EFL_EVENT_FLAGS_PROCESSED;
}
EOLIAN static Eina_Bool
_efl_event_key_efl_event_input_on_hold_get(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd)
_efl_event_key_efl_event_input_processed_get(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd)
{
return !!(pd->event_flags & EFL_EVENT_FLAGS_ON_HOLD);
return !!(pd->event_flags & EFL_EVENT_FLAGS_PROCESSED);
}
EOLIAN static void
_efl_event_key_efl_event_input_on_scroll_set(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd, Eina_Bool val)
_efl_event_key_efl_event_input_scrolling_set(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd, Eina_Bool val)
{
if (val)
pd->event_flags |= EFL_EVENT_FLAGS_ON_SCROLL;
pd->event_flags |= EFL_EVENT_FLAGS_SCROLLING;
else
pd->event_flags &= ~EFL_EVENT_FLAGS_ON_SCROLL;
pd->event_flags &= ~EFL_EVENT_FLAGS_SCROLLING;
}
EOLIAN static Eina_Bool
_efl_event_key_efl_event_input_on_scroll_get(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd)
_efl_event_key_efl_event_input_scrolling_get(Eo *obj EINA_UNUSED, Efl_Event_Key_Data *pd)
{
return !!(pd->event_flags & EFL_EVENT_FLAGS_ON_SCROLL);
return !!(pd->event_flags & EFL_EVENT_FLAGS_SCROLLING);
}
EOLIAN static void

View File

@ -62,10 +62,10 @@ class Efl.Event.Key (Eo.Base, Efl.Event, Efl.Input.State, Efl.Event.Input)
Efl.Event.Input.fake.get;
Efl.Event.Input.event_flags.set;
Efl.Event.Input.event_flags.get;
Efl.Event.Input.on_hold.set;
Efl.Event.Input.on_hold.get;
Efl.Event.Input.on_scroll.set;
Efl.Event.Input.on_scroll.get;
Efl.Event.Input.processed.set;
Efl.Event.Input.processed.get;
Efl.Event.Input.scrolling.set;
Efl.Event.Input.scrolling.get;
Efl.Event.Input.device.set;
Efl.Event.Input.device.get;
Efl.Input.State.modifier_enabled.get;

View File

@ -377,33 +377,33 @@ _efl_event_pointer_triple_click_get(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data
}
EOLIAN static void
_efl_event_pointer_efl_event_input_on_hold_set(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd, Eina_Bool val)
_efl_event_pointer_efl_event_input_processed_set(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd, Eina_Bool val)
{
if (val)
pd->event_flags |= EFL_EVENT_FLAGS_ON_HOLD;
pd->event_flags |= EFL_EVENT_FLAGS_PROCESSED;
else
pd->event_flags &= ~EFL_EVENT_FLAGS_ON_HOLD;
pd->event_flags &= ~EFL_EVENT_FLAGS_PROCESSED;
}
EOLIAN static Eina_Bool
_efl_event_pointer_efl_event_input_on_hold_get(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd)
_efl_event_pointer_efl_event_input_processed_get(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd)
{
return !!(pd->event_flags & EFL_EVENT_FLAGS_ON_HOLD);
return !!(pd->event_flags & EFL_EVENT_FLAGS_PROCESSED);
}
EOLIAN static void
_efl_event_pointer_efl_event_input_on_scroll_set(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd, Eina_Bool val)
_efl_event_pointer_efl_event_input_scrolling_set(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd, Eina_Bool val)
{
if (val)
pd->event_flags |= EFL_EVENT_FLAGS_ON_SCROLL;
pd->event_flags |= EFL_EVENT_FLAGS_SCROLLING;
else
pd->event_flags &= ~EFL_EVENT_FLAGS_ON_SCROLL;
pd->event_flags &= ~EFL_EVENT_FLAGS_SCROLLING;
}
EOLIAN static Eina_Bool
_efl_event_pointer_efl_event_input_on_scroll_get(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd)
_efl_event_pointer_efl_event_input_scrolling_get(Eo *obj EINA_UNUSED, Efl_Event_Pointer_Data *pd)
{
return !!(pd->event_flags & EFL_EVENT_FLAGS_ON_SCROLL);
return !!(pd->event_flags & EFL_EVENT_FLAGS_SCROLLING);
}
EOLIAN static Eina_Bool

View File

@ -137,10 +137,10 @@ class Efl.Event.Pointer (Eo.Base, Efl.Event, Efl.Input.State, Efl.Event.Input)
Efl.Event.Input.fake.get;
Efl.Event.Input.event_flags.set;
Efl.Event.Input.event_flags.get;
Efl.Event.Input.on_hold.set;
Efl.Event.Input.on_hold.get;
Efl.Event.Input.on_scroll.set;
Efl.Event.Input.on_scroll.get;
Efl.Event.Input.processed.set;
Efl.Event.Input.processed.get;
Efl.Event.Input.scrolling.set;
Efl.Event.Input.scrolling.get;
Efl.Event.Input.device.set;
Efl.Event.Input.device.get;
Efl.Input.State.modifier_enabled.get;