evas: Make efl_input_device_seat_id_get() more useful
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 24 May 2017 04:12:51 +0000 (13:12 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 24 May 2017 06:24:13 +0000 (15:24 +0900)
And cleanup the EO file a little bit.

src/lib/efl/interfaces/efl_input_device.c
src/lib/efl/interfaces/efl_input_device.eo

index b5f1bb7..b1f6c04 100644 (file)
@@ -109,10 +109,11 @@ _efl_input_device_seat_id_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, un
 }
 
 EOLIAN static unsigned int
-_efl_input_device_seat_id_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
+_efl_input_device_seat_id_get(Eo *obj, Efl_Input_Device_Data *pd)
 {
-   EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->klass != EFL_INPUT_DEVICE_CLASS_SEAT, 0);
-   return pd->id;
+   if (pd->klass == EFL_INPUT_DEVICE_CLASS_SEAT)
+     return pd->id;
+   return efl_input_device_seat_id_get(efl_input_device_seat_get(obj));
 }
 
 EOLIAN static Efl_Input_Device *
index 3513e2d..5a10d08 100644 (file)
@@ -38,7 +38,6 @@ enum Efl.Input.Device.Sub_Class
 }
 
 
-/* This represents Evas_Device */
 /* FIXME: no children and no Evas */
 
 class Efl.Input.Device (Efl.Object)
@@ -48,7 +47,6 @@ class Efl.Input.Device (Efl.Object)
      @since 1.18
    ]]
    methods {
-      /* FIXME: device_class makes compilation error because of class_get() */
       @property device_type {
         [[Device type property]]
          values {
@@ -81,8 +79,6 @@ class Efl.Input.Device (Efl.Object)
       }
       @property parent {
         [[Device parent property]]
-         set {}
-         get {}
          values {
             parent: Efl.Input.Device; [[Parent input device]]
          }
@@ -105,10 +101,9 @@ class Efl.Input.Device (Efl.Object)
       }
       @property seat_id {
          [[Seat id number
+
            @since 1.20
          ]]
-          set{}
-          get{}
           values {
              id: uint; [[The id of the seat]]
           }