jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=01d48863286a78cdf8654806806cf17b3f448c2f

commit 01d48863286a78cdf8654806806cf17b3f448c2f
Author: Jean-Philippe Andre <[email protected]>
Date:   Tue May 16 17:41:09 2017 +0900

    evas: Add seat arg to modifier/lock EO APIs
    
    This now matches the new seat-related set of APIs present as EAPI.
---
 src/lib/elementary/efl_ui_win.c         | 10 ++++++----
 src/lib/evas/canvas/efl_input_key.c     | 22 ++++++++++++++--------
 src/lib/evas/canvas/efl_input_pointer.c | 22 ++++++++++++++--------
 src/lib/evas/canvas/efl_input_state.eo  |  2 ++
 4 files changed, 36 insertions(+), 20 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index dcd41a4..0c7f244 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6557,19 +6557,21 @@ 
_efl_ui_win_elm_interface_atspi_component_extents_get(Eo *obj, Efl_Ui_Win_Data *
 }
 
 EOLIAN static Eina_Bool
-_efl_ui_win_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *pd, Efl_Input_Modifier mod)
+_efl_ui_win_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *pd,
+                                                 Efl_Input_Modifier mod, const 
Efl_Input_Device *seat)
 {
    const Evas_Modifier *m = evas_key_modifier_get(pd->evas);
    const char *name = _efl_input_modifier_to_string(mod);
-   return evas_key_modifier_is_set(m, name);
+   return evas_seat_key_modifier_is_set(m, name, seat);
 }
 
 EOLIAN static Eina_Bool
-_efl_ui_win_efl_input_state_lock_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *pd, Efl_Input_Lock lock)
+_efl_ui_win_efl_input_state_lock_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *pd,
+                                             Efl_Input_Lock lock, const 
Efl_Input_Device *seat)
 {
    const Evas_Lock *m = evas_key_lock_get(pd->evas);
    const char *name = _efl_input_lock_to_string(lock);
-   return evas_key_lock_is_set(m, name);
+   return evas_seat_key_lock_is_set(m, name, seat);
 }
 
 // See evas_inline.x
diff --git a/src/lib/evas/canvas/efl_input_key.c 
b/src/lib/evas/canvas/efl_input_key.c
index 7f6d794..ade0e41 100644
--- a/src/lib/evas/canvas/efl_input_key.c
+++ b/src/lib/evas/canvas/efl_input_key.c
@@ -240,28 +240,34 @@ _efl_input_key_efl_input_event_device_get(Eo *obj 
EINA_UNUSED, Efl_Input_Key_Dat
 }
 
 EOLIAN static Eina_Bool
-_efl_input_key_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Key_Data *pd, Efl_Input_Modifier mod)
+_efl_input_key_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Key_Data *pd,
+                                                    Efl_Input_Modifier mod, 
const Efl_Input_Device *seat)
 {
-   Efl_Input_Device *seat;
    const char *name;
 
    if (!pd->modifiers) return EINA_FALSE;
-   seat = efl_input_device_seat_get(pd->device);
-   if (!seat) return EINA_FALSE;
+   if (!seat)
+     {
+        seat = efl_input_device_seat_get(pd->device);
+        if (!seat) return EINA_FALSE;
+     }
    name = _efl_input_modifier_to_string(mod);
    if (!name) return EINA_FALSE;
    return evas_seat_key_modifier_is_set(pd->modifiers, name, seat);
 }
 
 EOLIAN static Eina_Bool
-_efl_input_key_efl_input_state_lock_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Key_Data *pd, Efl_Input_Lock lock)
+_efl_input_key_efl_input_state_lock_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Key_Data *pd,
+                                                Efl_Input_Lock lock, const 
Efl_Input_Device *seat)
 {
-   Efl_Input_Device *seat;
    const char *name;
 
    if (!pd->locks) return EINA_FALSE;
-   seat = efl_input_device_seat_get(pd->device);
-   if (!seat) return EINA_FALSE;
+   if (!seat)
+     {
+        seat = efl_input_device_seat_get(pd->device);
+        if (!seat) return EINA_FALSE;
+     }
    name = _efl_input_lock_to_string(lock);
    if (!name) return EINA_FALSE;
    return evas_seat_key_lock_is_set(pd->locks, name, seat);
diff --git a/src/lib/evas/canvas/efl_input_pointer.c 
b/src/lib/evas/canvas/efl_input_pointer.c
index 6eec18e..02b0727 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -323,28 +323,34 @@ _efl_input_pointer_tool_set(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd, int
 }
 
 EOLIAN static Eina_Bool
-_efl_input_pointer_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd, Efl_Input_Modifier mod)
+_efl_input_pointer_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd,
+                                                        Efl_Input_Modifier 
mod, const Efl_Input_Device *seat)
 {
-   Efl_Input_Device *seat;
    const char *name;
 
    if (!pd->modifiers) return EINA_FALSE;
-   seat = efl_input_device_seat_get(pd->device);
-   if (!seat) return EINA_FALSE;
+   if (!seat)
+     {
+        seat = efl_input_device_seat_get(pd->device);
+        if (!seat) return EINA_FALSE;
+     }
    name = _efl_input_modifier_to_string(mod);
    if (!name) return EINA_FALSE;
    return evas_seat_key_modifier_is_set(pd->modifiers, name, seat);
 }
 
 EOLIAN static Eina_Bool
-_efl_input_pointer_efl_input_state_lock_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd, Efl_Input_Lock lock)
+_efl_input_pointer_efl_input_state_lock_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd,
+                                                    Efl_Input_Lock lock, const 
Efl_Input_Device *seat)
 {
-   Efl_Input_Device *seat;
    const char *name;
 
    if (!pd->locks) return EINA_FALSE;
-   seat = efl_input_device_seat_get(pd->device);
-   if (!seat) return EINA_FALSE;
+   if (!seat)
+     {
+        seat = efl_input_device_seat_get(pd->device);
+        if (!seat) return EINA_FALSE;
+     }
    name = _efl_input_lock_to_string(lock);
    if (!name) return EINA_FALSE;
    return evas_seat_key_lock_is_set(pd->locks, name, seat);
diff --git a/src/lib/evas/canvas/efl_input_state.eo 
b/src/lib/evas/canvas/efl_input_state.eo
index 41a0ed5..19f5c18 100644
--- a/src/lib/evas/canvas/efl_input_state.eo
+++ b/src/lib/evas/canvas/efl_input_state.eo
@@ -10,6 +10,7 @@ interface Efl.Input.State ()
          get {}
          keys {
             mod: Efl.Input.Modifier; [[The modifier key to test.]]
+            seat: const(Efl.Input.Device) @optional; [[The seat device, may be 
$null]]
          }
          values {
             is_set: bool; [[$true if the key modifier is pressed.]]
@@ -20,6 +21,7 @@ interface Efl.Input.State ()
          get {}
          keys {
             lock: Efl.Input.Lock; [[The lock key to test.]]
+            seat: const(Efl.Input.Device) @optional; [[The seat device, may be 
$null]]
          }
          values {
             is_set: bool; [[$true if the key lock is on.]]

-- 


Reply via email to