evas: move efl_input_device into evas/Efl_Canvas.h
authorCedric Bail <cedric.bail@free.fr>
Thu, 31 Oct 2019 17:20:33 +0000 (13:20 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 11 Nov 2019 02:20:41 +0000 (11:20 +0900)
Summary:
The internal and the API we would like is mostly a canvas API. A lot of the code
in evas is working around the fact that efl_input_device is not defined inside Evas.
This patch is the first step to try to clean this up.

Depends on D10487

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10488

39 files changed:
src/bin/elementary/test_events.c
src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_evas/ecore_evas_drm.h
src/lib/ecore_evas/ecore_evas_util.c
src/lib/edje/Efl_Layout.h
src/lib/edje/edje_callbacks.c
src/lib/edje/edje_private.h
src/lib/efl/Efl.h
src/lib/efl/interfaces/efl_common_internal.h [deleted file]
src/lib/efl/interfaces/efl_interfaces_main.c
src/lib/efl/interfaces/meson.build
src/lib/elementary/efl_ui_widget.c
src/lib/elementary/efl_ui_win.c
src/lib/elementary/elm_priv.h
src/lib/emotion/emotion_smart.c
src/lib/evas/Efl_Canvas.h
src/lib/evas/Evas_Common.h
src/lib/evas/Evas_Eo.h
src/lib/evas/Evas_Internal.h
src/lib/evas/canvas/efl_canvas_pointer.eo [moved from src/lib/efl/interfaces/efl_canvas_pointer.eo with 100% similarity]
src/lib/evas/canvas/efl_canvas_scene.eo [moved from src/lib/efl/interfaces/efl_canvas_scene.eo with 100% similarity]
src/lib/evas/canvas/efl_input_device.c [moved from src/lib/efl/interfaces/efl_input_device.c with 98% similarity]
src/lib/evas/canvas/efl_input_device.eo [moved from src/lib/efl/interfaces/efl_input_device.eo with 100% similarity]
src/lib/evas/canvas/efl_input_event.c
src/lib/evas/canvas/efl_input_focus.c
src/lib/evas/canvas/efl_input_hold.c
src/lib/evas/canvas/efl_input_key.c
src/lib/evas/canvas/efl_input_pointer.c
src/lib/evas/canvas/efl_input_types.eot [moved from src/lib/efl/interfaces/efl_input_types.eot with 100% similarity]
src/lib/evas/canvas/evas_callbacks.c
src/lib/evas/canvas/evas_device.c
src/lib/evas/canvas/evas_events.c
src/lib/evas/canvas/evas_events_legacy.c
src/lib/evas/canvas/evas_focus.c
src/lib/evas/canvas/evas_key_grab.c
src/lib/evas/canvas/evas_main.c
src/lib/evas/canvas/meson.build
src/lib/evas/gesture/efl_canvas_gesture_private.h
src/lib/evas/include/evas_common_private.h

index e1438db..48eac32 100644 (file)
@@ -5,7 +5,7 @@
 #include <Elementary.h>
 
 #define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
+#include "Evas_Internal.h"
 
 #define DEFAULT_TEXT "Click the white rectangle to get started"
 
index cfbf8b5..b8dbd8a 100644 (file)
@@ -24,6 +24,7 @@
 #include "ecore_private.h"
 #include <Ecore_Input.h>
 #include <Ecore_Input_Evas.h>
+#define EFL_INTERNAL_UNSTABLE
 #include <Evas_Internal.h>
 
 #include "Ecore_Evas.h"
@@ -34,9 +35,6 @@
 #include "ecore_evas_extn.h"
 #include "ecore_evas_win32.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #include "ecore_private.h"
 
 #include "efl_tracing.h"
index 401fb1e..63ef7be 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef ECORE_EVAS_DRM_H_
 # define ECORE_EVAS_DRM_H_
 
+#define EFL_INTERNAL_UNSTABLE
 # include "Evas_Internal.h"
 
 typedef struct _Ecore_Evas_Interface_Drm Ecore_Evas_Interface_Drm;
index 4f3e9c4..7b07fdc 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "Ecore_Evas.h"
 #include "ecore_evas_private.h"
+#define EFL_INTERNAL_UNSTABLE
 #include "Evas_Internal.h"
 
 static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate";
index b80c5ce..7323377 100644 (file)
@@ -8,6 +8,9 @@
 #include <Eo.h>
 /* This include has been added to support Eo in Evas */
 #include <Efl.h>
+
+#include <Efl_Canvas.h>
+
 #ifdef EAPI
 # undef EAPI
 #endif
index 11fce6e..5b034b2 100644 (file)
@@ -1,8 +1,5 @@
 #include "edje_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 static void
 _edje_hold_signal_cb(void *data, const Efl_Event *event)
 {
index d376cd6..c2c6794 100644 (file)
@@ -44,7 +44,6 @@
 #include <Eet.h>
 #include <Eo.h>
 #include <Evas.h>
-#include <Evas_Internal.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_File.h>
@@ -65,6 +64,8 @@
 #endif
 
 #include "Edje.h"
+#define EFL_INTERNAL_UNSTABLE
+#include <Evas_Internal.h>
 
 #ifdef EAPI
 # undef EAPI
index f20979b..296fc1b 100644 (file)
@@ -174,13 +174,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
 #include "interfaces/efl_gfx_text_class.eo.h"
 #include "interfaces/efl_gfx_size_class.eo.h"
 
-/* Input events */
-#include "interfaces/efl_input_types.eot.h"
-#include "interfaces/efl_input_device.eo.h"
-
 /* Canvas & UI */
-#include "interfaces/efl_canvas_scene.eo.h"
-#include "interfaces/efl_canvas_pointer.eo.h"
 #include "interfaces/efl_ui_view.eo.h"
 #include "interfaces/efl_ui_property_bind.eo.h"
 #include "interfaces/efl_ui_factory.eo.h"
diff --git a/src/lib/efl/interfaces/efl_common_internal.h b/src/lib/efl/interfaces/efl_common_internal.h
deleted file mode 100644 (file)
index f465c08..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/* This header file is intended for EFL internal use, and is not part of
- * EFL stable API.
- * Place here structs and enums that need to be shared between core EFL
- * components, such as Ecore, Evas, etc...
- */
-
-#ifndef EFL_COMMON_INTERNAL_H
-#define EFL_COMMON_INTERNAL_H
-
-#ifndef EFL_INTERNAL_UNSTABLE
-# error This file can not be included outside EFL
-#endif
-
-#include <Efl.h>
-
-typedef struct _Efl_Input_Pointer_Data  Efl_Input_Pointer_Data;
-typedef struct _Efl_Input_Key_Data      Efl_Input_Key_Data;
-typedef struct _Efl_Input_Device_Data   Efl_Input_Device_Data;
-typedef struct _Efl_Input_Hold_Data     Efl_Input_Hold_Data;
-typedef struct _Efl_Input_Focus_Data    Efl_Input_Focus_Data;
-
-#ifndef _EVAS_TYPES_EOT_H_
-typedef struct _Evas_Modifier Evas_Modifier;
-typedef struct _Evas_Lock Evas_Lock;
-#endif
-
-struct _Efl_Input_Pointer_Data
-{
-   Eo             *eo;
-   unsigned int    timestamp; /* FIXME: store as double? */
-   int             button;
-   unsigned int    pressed_buttons;
-   int             touch_id; /* finger or tool ID */
-   double          radius, radius_x, radius_y;
-   double          pressure, distance, azimuth, tilt, twist;
-   double          angle;
-   /* current, previous positions in window coordinates.
-    * raw can be either un-smoothed, un-predicted x,y or a tablet's raw input.
-    * norm is the normalized value in [0..1] for tablet input.
-    */
-   Eina_Vector2    cur, prev, raw, norm;
-   struct {
-      int          z;
-      Eina_Bool    horizontal;
-   } wheel;
-   Efl_Gfx_Entity                    *source; /* could it be ecore? */
-   Efl_Input_Device           *device;
-   Efl_Pointer_Action          action;
-   Efl_Pointer_Flags           button_flags;
-   Efl_Input_Flags             event_flags;
-   void                       *data; /* evas data - whatever that is */
-   Eina_Bool                   window_pos; /* true if positions are window-relative
-                                              (see input vs. feed: this is "input") */
-   Evas_Modifier              *modifiers;
-   Evas_Lock                  *locks;
-   void                       *legacy; /* DO NOT TOUCH THIS */
-   uint32_t                    value_flags;
-   Eina_Bool                   has_norm : 1; /* not in value_flags */
-   Eina_Bool                   has_raw : 1; /* not in value_flags */
-   Eina_Bool                   evas_done : 1; /* set by evas */
-   Eina_Bool                   fake : 1;
-   Eina_Bool                   win_fed : 1;
-};
-
-struct _Efl_Input_Key_Data
-{
-   Eo                *eo;
-   unsigned int       timestamp; /* FIXME: store as double? */
-
-   Eina_Bool          pressed; /* 1 = pressed/down, 0 = released/up */
-   Eina_Stringshare  *keyname;
-   Eina_Stringshare  *key;
-   Eina_Stringshare  *string;
-   Eina_Stringshare  *compose;
-   unsigned int       keycode;
-
-   void              *data;
-   Evas_Modifier     *modifiers;
-   Evas_Lock         *locks;
-   Efl_Input_Flags    event_flags;
-   Efl_Input_Device  *device;
-   void              *legacy; /* DO NOT TOUCH THIS */
-   Eina_Bool          evas_done : 1; /* set by evas */
-   Eina_Bool          fake : 1;
-   Eina_Bool          win_fed : 1;
-   Eina_Bool          no_stringshare : 1;
-};
-
-struct _Efl_Input_Device_Data
-{
-   Eo               *eo;
-   Eo               *evas; /* Evas */
-   Efl_Input_Device *source;  /* ref */
-   Eina_List        *children; /* ref'ed by efl_parent, not by this list */
-   unsigned int      id;
-   Efl_Input_Device_Type klass;
-   unsigned int      subclass; // Evas_Device_Subclass (unused)
-   unsigned int      pointer_count;
-};
-
-struct _Efl_Input_Hold_Data
-{
-   Eo               *eo;
-   double            timestamp;
-   Efl_Input_Flags   event_flags;
-   Efl_Input_Device *device;
-   void             *data;
-   void             *legacy; /* DO NOT TOUCH THIS */
-   Eina_Bool         hold : 1;
-   Eina_Bool         evas_done : 1; /* set by evas */
-};
-
-struct _Efl_Input_Focus_Data
-{
-   Eo *eo;
-   Efl_Input_Device *device; //The seat
-   Eo *object_wref; // wref on the focused object - Efl.Canvas.Object or Efl.Canvas.
-   double timestamp;
-   Efl_Input_Flags   event_flags;
-};
-
-/* Internal helpers */
-
-static inline const char *
-_efl_input_modifier_to_string(Efl_Input_Modifier mod)
-{
-   switch (mod)
-     {
-      default:
-      case EFL_INPUT_MODIFIER_NONE:    return NULL;
-      case EFL_INPUT_MODIFIER_ALT:     return "Alt";
-      case EFL_INPUT_MODIFIER_CONTROL: return "Control";
-      case EFL_INPUT_MODIFIER_SHIFT:   return "Shift";
-      case EFL_INPUT_MODIFIER_META:    return "Meta";
-      case EFL_INPUT_MODIFIER_ALTGR:   return "AltGr";
-      case EFL_INPUT_MODIFIER_HYPER:   return "Hyper";
-      case EFL_INPUT_MODIFIER_SUPER:   return "Super";
-     }
-}
-
-static inline const char *
-_efl_input_lock_to_string(Efl_Input_Lock lock)
-{
-   switch (lock)
-     {
-      default:
-      case EFL_INPUT_LOCK_NONE:    return NULL;
-      case EFL_INPUT_LOCK_NUM:     return "Num";
-      case EFL_INPUT_LOCK_CAPS:    return "Caps";
-      case EFL_INPUT_LOCK_SCROLL:  return "Scroll";
-      case EFL_INPUT_LOCK_SHIFT:   return "Shift";
-     }
-}
-
-static inline Eina_Bool
-_efl_input_value_has(const Efl_Input_Pointer_Data *pd, Efl_Input_Value key)
-{
-   return (pd->value_flags & (1u << (int) key)) != 0;
-}
-
-static inline void
-_efl_input_value_mark(Efl_Input_Pointer_Data *pd, Efl_Input_Value key)
-{
-   pd->value_flags |= (1u << (int) key);
-}
-
-#define _efl_input_value_mask(key) (1u << (int) key)
-
-#endif
index ead7306..f1bff04 100644 (file)
@@ -47,8 +47,6 @@
 #include "interfaces/efl_gfx_blur.eo.c"
 
 #include "interfaces/efl_gfx_hint.eo.c"
-#include "interfaces/efl_canvas_scene.eo.c"
-#include "interfaces/efl_canvas_pointer.eo.c"
 
 #include "interfaces/efl_screen.eo.c"
 
index 4e3f90e..ccbab1c 100644 (file)
@@ -6,7 +6,6 @@ pub_legacy_eo_files = [
   'efl_gfx_color.eo',
   'efl_gfx_image.eo',
   'efl_gfx_frame_controller.eo',
-  'efl_input_device.eo',
   'efl_ui_draggable.eo',
   'efl_ui_scrollable.eo',
   'efl_ui_scrollbar.eo',
@@ -32,8 +31,6 @@ endforeach
 
 pub_eo_files = [
   'efl_playable.eo',
-  'efl_canvas_scene.eo',
-  'efl_canvas_pointer.eo',
   'efl_config.eo',
   'efl_control.eo',
   'efl_duplicate.eo',
@@ -121,7 +118,6 @@ pub_eo_files += pub_legacy_eo_files
 pub_eo_types_files = [
   'efl_gfx_types.eot',
   'efl_ui_drag_types.eot',
-  'efl_input_types.eot',
   'efl_types.eot',
   'efl_text_types.eot',
 ]
@@ -157,7 +153,6 @@ efl_src += files([
   'efl_gfx_path.c',
   'efl_gfx_shape.c',
   'efl_gfx_color.c',
-  'efl_input_device.c',
   'efl_io_closer.c',
   'efl_io_positioner.c',
   'efl_io_reader.c',
@@ -172,10 +167,6 @@ efl_src += files([
   'efl_model_provider.c',
 ])
 
-#efl_header_src += files([
-#  'efl_common_internal.h'
-#])
-
 install_headers('efl_file.h',
   install_dir : join_paths(dir_package_include, 'interfaces'),
 )
index b8b04a7..9fbc025 100644 (file)
 #include "elm_part_helper.h"
 #include "elm_widget_combobox.h"
 
-/* FIXME: remove this when we don't rely on evas event structs anymore */
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EFL_UI_WIDGET_CLASS
 
 #define MY_CLASS_NAME "Efl_Ui_Widget"
index 85b3360..05c8fe1 100644 (file)
@@ -28,9 +28,6 @@
 
 #include "../evas/canvas/evas_box_eo.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #include "elm_part_helper.h"
 #include "efl_ui_win_part.eo.h"
 #include "elm_plug_eo.h"
index 04b087d..04c0344 100644 (file)
@@ -26,6 +26,7 @@
 
 // Evas internal EO APIs
 # include "Evas.h"
+#define EFL_INTERNAL_UNSTABLE
 # include "Evas_Internal.h"
 # include "Emotion.h"
 
index 9a86bfd..a642386 100644 (file)
@@ -13,6 +13,7 @@
 # include <Eio.h>
 #endif
 
+#define EFL_INTERNAL_UNSTABLE
 #include <Evas_Internal.h>
 
 #include "Emotion.h"
index cd8bf52..dcb3836 100644 (file)
@@ -45,6 +45,19 @@ extern "C" {
 #include <canvas/efl_canvas_animation_types.eot.h>
 #include <gesture/efl_canvas_gesture_types.eot.h>
 
+/* Input events */
+#include "canvas/efl_input_device.eo.h"
+#include "canvas/efl_canvas_pointer.eo.h"
+#include "canvas/efl_canvas_scene.eo.h"
+#include "canvas/efl_input_state.eo.h"
+#include "canvas/efl_input_event.eo.h"
+#include "canvas/efl_input_pointer.eo.h"
+#include "canvas/efl_input_key.eo.h"
+#include "canvas/efl_input_hold.eo.h"
+#include "canvas/efl_input_interface.eo.h"
+#include "canvas/efl_input_focus.eo.h"
+#include "canvas/efl_input_clickable.eo.h"
+
 #include <gesture/efl_canvas_gesture.eo.h>
 #include <gesture/efl_canvas_gesture_touch.eo.h>
 #include <gesture/efl_canvas_gesture_recognizer.eo.h>
index d64217d..3bede59 100644 (file)
@@ -3503,15 +3503,29 @@ typedef Eo Efl_Animation_Group_Sequential;
 #define EFL_ANIMATION_REPEAT_INFINITE -1
 #define EFL_ANIMATION_PLAYER_REPEAT_INFINITE -1
 
-#ifndef _EFL_INPUT_DEVICE_EO_H_
-#define _EFL_INPUT_DEVICE_EO_H_
+// The below type are necessary for legacy API and need to be manually kept in sync with .eo file.
+#ifndef _EFL_INPUT_DEVICE_EO_CLASS_TYPE
+#define _EFL_INPUT_DEVICE_EO_CLASS_TYPE
 typedef Eo Efl_Input_Device;
-//TIZEN ONLY(20190315): FIx for migration
-//typedef unsigned int Efl_Input_Device_Type;
-//
+#endif
+
+#ifndef _EFL_INPUT_DEVICE_EO_TYPES
+#define _EFL_INPUT_DEVICE_EO_TYPES
+typedef enum
+{
+  EFL_INPUT_DEVICE_TYPE_NONE = 0,
+  EFL_INPUT_DEVICE_TYPE_SEAT,
+  EFL_INPUT_DEVICE_TYPE_KEYBOARD,
+  EFL_INPUT_DEVICE_TYPE_MOUSE,
+  EFL_INPUT_DEVICE_TYPE_TOUCH,
+  EFL_INPUT_DEVICE_TYPE_PEN,
+  EFL_INPUT_DEVICE_TYPE_WAND,
+  EFL_INPUT_DEVICE_TYPE_GAMEPAD
+} Efl_Input_Device_Type;
 
 #endif
 
+
 #ifndef _EFL_TEXT_CURSOR_EO_H_
 #define _EFL_TEXT_CURSOR_EO_H_
 
index 5f46511..ddf3b2d 100644 (file)
@@ -185,6 +185,20 @@ struct _Efl_Canvas_Object_Animation_Event
  * @}
  */
 
+/* Input events */
+#include "interfaces/efl_input_types.eot.h"
+#include "canvas/efl_input_device.eo.h"
+#include "canvas/efl_canvas_pointer.eo.h"
+#include "canvas/efl_canvas_scene.eo.h"
+#include "canvas/efl_input_state.eo.h"
+#include "canvas/efl_input_event.eo.h"
+#include "canvas/efl_input_pointer.eo.h"
+#include "canvas/efl_input_key.eo.h"
+#include "canvas/efl_input_hold.eo.h"
+#include "canvas/efl_input_interface.eo.h"
+#include "canvas/efl_input_focus.eo.h"
+#include "canvas/efl_input_clickable.eo.h"
+
 #include "canvas/efl_canvas_animation_types.eot.h"
 
 #include "gesture/efl_canvas_gesture_types.eot.h"
@@ -457,12 +471,3 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x,
 #include "canvas/efl_canvas_vg_gradient.eo.h"
 #include "canvas/efl_canvas_vg_gradient_linear.eo.h"
 #include "canvas/efl_canvas_vg_gradient_radial.eo.h"
-
-#include "canvas/efl_input_state.eo.h"
-#include "canvas/efl_input_event.eo.h"
-#include "canvas/efl_input_pointer.eo.h"
-#include "canvas/efl_input_key.eo.h"
-#include "canvas/efl_input_hold.eo.h"
-#include "canvas/efl_input_interface.eo.h"
-#include "canvas/efl_input_focus.eo.h"
-#include "canvas/efl_input_clickable.eo.h"
index 15e4ed1..baf7cd5 100644 (file)
 extern "C" {
 #endif
 
+
+#ifndef EFL_INTERNAL_UNSTABLE
+# error This file can not be included outside EFL
+#endif
+
+#include <Efl.h>
+
+typedef struct _Efl_Input_Pointer_Data  Efl_Input_Pointer_Data;
+typedef struct _Efl_Input_Key_Data      Efl_Input_Key_Data;
+typedef struct _Efl_Input_Device_Data   Efl_Input_Device_Data;
+typedef struct _Efl_Input_Hold_Data     Efl_Input_Hold_Data;
+typedef struct _Efl_Input_Focus_Data    Efl_Input_Focus_Data;
+
+#ifndef _EVAS_TYPES_EOT_H_
+typedef struct _Evas_Modifier Evas_Modifier;
+typedef struct _Evas_Lock Evas_Lock;
+#endif
+
+struct _Efl_Input_Pointer_Data
+{
+   Eo             *eo;
+   unsigned int    timestamp; /* FIXME: store as double? */
+   int             button;
+   unsigned int    pressed_buttons;
+   int             touch_id; /* finger or tool ID */
+   double          radius, radius_x, radius_y;
+   double          pressure, distance, azimuth, tilt, twist;
+   double          angle;
+   /* current, previous positions in window coordinates.
+    * raw can be either un-smoothed, un-predicted x,y or a tablet's raw input.
+    * norm is the normalized value in [0..1] for tablet input.
+    */
+   Eina_Vector2    cur, prev, raw, norm;
+   struct {
+      int          z;
+      Eina_Bool    horizontal;
+   } wheel;
+   Efl_Gfx_Entity                    *source; /* could it be ecore? */
+   Efl_Input_Device           *device;
+   Efl_Pointer_Action          action;
+   Efl_Pointer_Flags           button_flags;
+   Efl_Input_Flags             event_flags;
+   void                       *data; /* evas data - whatever that is */
+   Eina_Bool                   window_pos; /* true if positions are window-relative
+                                              (see input vs. feed: this is "input") */
+   Evas_Modifier              *modifiers;
+   Evas_Lock                  *locks;
+   void                       *legacy; /* DO NOT TOUCH THIS */
+   uint32_t                    value_flags;
+   Eina_Bool                   has_norm : 1; /* not in value_flags */
+   Eina_Bool                   has_raw : 1; /* not in value_flags */
+   Eina_Bool                   evas_done : 1; /* set by evas */
+   Eina_Bool                   fake : 1;
+   Eina_Bool                   win_fed : 1;
+};
+
+struct _Efl_Input_Key_Data
+{
+   Eo                *eo;
+   unsigned int       timestamp; /* FIXME: store as double? */
+
+   Eina_Bool          pressed; /* 1 = pressed/down, 0 = released/up */
+   Eina_Stringshare  *keyname;
+   Eina_Stringshare  *key;
+   Eina_Stringshare  *string;
+   Eina_Stringshare  *compose;
+   unsigned int       keycode;
+
+   void              *data;
+   Evas_Modifier     *modifiers;
+   Evas_Lock         *locks;
+   Efl_Input_Flags    event_flags;
+   Efl_Input_Device  *device;
+   void              *legacy; /* DO NOT TOUCH THIS */
+   Eina_Bool          evas_done : 1; /* set by evas */
+   Eina_Bool          fake : 1;
+   Eina_Bool          win_fed : 1;
+   Eina_Bool          no_stringshare : 1;
+};
+
+struct _Efl_Input_Device_Data
+{
+   Eo               *eo;
+   Eo               *evas; /* Evas */
+   Efl_Input_Device *source;  /* ref */
+   Eina_List        *children; /* ref'ed by efl_parent, not by this list */
+   unsigned int      id;
+   Efl_Input_Device_Type klass;
+   unsigned int      subclass; // Evas_Device_Subclass (unused)
+   unsigned int      pointer_count;
+};
+
+struct _Efl_Input_Hold_Data
+{
+   Eo               *eo;
+   double            timestamp;
+   Efl_Input_Flags   event_flags;
+   Efl_Input_Device *device;
+   void             *data;
+   void             *legacy; /* DO NOT TOUCH THIS */
+   Eina_Bool         hold : 1;
+   Eina_Bool         evas_done : 1; /* set by evas */
+};
+
+struct _Efl_Input_Focus_Data
+{
+   Eo *eo;
+   Efl_Input_Device *device; //The seat
+   Eo *object_wref; // wref on the focused object - Efl.Canvas.Object or Efl.Canvas.
+   double timestamp;
+   Efl_Input_Flags   event_flags;
+};
+
+/* Internal helpers */
+
+static inline const char *
+_efl_input_modifier_to_string(Efl_Input_Modifier mod)
+{
+   switch (mod)
+     {
+      default:
+      case EFL_INPUT_MODIFIER_NONE:    return NULL;
+      case EFL_INPUT_MODIFIER_ALT:     return "Alt";
+      case EFL_INPUT_MODIFIER_CONTROL: return "Control";
+      case EFL_INPUT_MODIFIER_SHIFT:   return "Shift";
+      case EFL_INPUT_MODIFIER_META:    return "Meta";
+      case EFL_INPUT_MODIFIER_ALTGR:   return "AltGr";
+      case EFL_INPUT_MODIFIER_HYPER:   return "Hyper";
+      case EFL_INPUT_MODIFIER_SUPER:   return "Super";
+     }
+}
+
+static inline const char *
+_efl_input_lock_to_string(Efl_Input_Lock lock)
+{
+   switch (lock)
+     {
+      default:
+      case EFL_INPUT_LOCK_NONE:    return NULL;
+      case EFL_INPUT_LOCK_NUM:     return "Num";
+      case EFL_INPUT_LOCK_CAPS:    return "Caps";
+      case EFL_INPUT_LOCK_SCROLL:  return "Scroll";
+      case EFL_INPUT_LOCK_SHIFT:   return "Shift";
+     }
+}
+
+static inline Eina_Bool
+_efl_input_value_has(const Efl_Input_Pointer_Data *pd, Efl_Input_Value key)
+{
+   return (pd->value_flags & (1u << (int) key)) != 0;
+}
+
+static inline void
+_efl_input_value_mark(Efl_Input_Pointer_Data *pd, Efl_Input_Value key)
+{
+   pd->value_flags |= (1u << (int) key);
+}
+
+#define _efl_input_value_mask(key) (1u << (int) key)
+
 typedef struct _Efl_Canvas_Output Efl_Canvas_Output;
 
 EAPI Efl_Canvas_Output *efl_canvas_output_add(Evas *canvas);
similarity index 98%
rename from src/lib/efl/interfaces/efl_input_device.c
rename to src/lib/evas/canvas/efl_input_device.c
index bd77780..690db76 100644 (file)
@@ -2,10 +2,9 @@
 # include <config.h>
 #endif
 
-#include <Efl.h>
-
+#include "Evas.h"
 #define EFL_INTERNAL_UNSTABLE
-#include "efl_common_internal.h"
+#include "Evas_Internal.h"
 
 #define MY_CLASS EFL_INPUT_DEVICE_CLASS
 
@@ -228,4 +227,4 @@ _efl_input_device_is_pointer_type_get(const Eo *obj EINA_UNUSED, Efl_Input_Devic
 }
 
 
-#include "interfaces/efl_input_device.eo.c"
+#include "efl_input_device.eo.c"
index 3274b31..90bddde 100644 (file)
@@ -5,12 +5,10 @@
 #define EFL_INPUT_EVENT_PROTECTED
 
 #include <Evas.h>
+#define EFL_INTERNAL_UNSTABLE
 #include <Evas_Internal.h>
 #include "canvas/evas_canvas_eo.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EFL_INPUT_EVENT_MIXIN
 
 EOLIAN static void
index d7b18de..cb154a0 100644 (file)
@@ -9,11 +9,6 @@
 
 #include <Evas.h>
 
-#include <Evas_Internal.h>
-
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EFL_INPUT_FOCUS_CLASS
 
 static void
index c23f043..b5ad65b 100644 (file)
@@ -7,9 +7,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EFL_INPUT_HOLD_CLASS
 
 EOLIAN static void
index 07d5a63..79c833c 100644 (file)
@@ -7,9 +7,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EFL_INPUT_KEY_CLASS
 
 EOAPI Eo*
index 8b16c57..33cb80c 100644 (file)
@@ -7,9 +7,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EFL_INPUT_POINTER_CLASS
 
 
index 65b78f2..d19ce68 100644 (file)
@@ -2,9 +2,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 EVAS_MEMPOOL(_mp_pc);
 
 extern Eina_Hash* signals_hash_table;
index c07748e..ce52a0f 100644 (file)
@@ -1,9 +1,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 /* WARNING: This API is not used across EFL, hard to test! */
 
 #ifdef DEBUG_UNTESTED_
index c6cf80d..d124440 100644 (file)
@@ -3,9 +3,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 int _evas_event_counter = 0;
 
 static Eina_List *
index 4018330..97b6f79 100644 (file)
@@ -1,9 +1,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 typedef union {
    Evas_Event_Mouse_Down down;
    Evas_Event_Mouse_Up up;
index d76c104..e11df78 100644 (file)
@@ -3,8 +3,6 @@
 
 #include "evas_common_private.h"
 #include "evas_private.h"
-#include "interfaces/efl_common_internal.h"
-
 
 static int evas_focus_log_domain = -1;
 
index aaf6e6a..5c8969c 100644 (file)
@@ -1,9 +1,6 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 /* private calls */
 
 /* FIXME: this is not optimal, but works. i should have a hash of keys per */
index 76236cc..0e0bcc3 100644 (file)
@@ -16,9 +16,6 @@
 
 #include <Ecore.h>
 
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
 #define MY_CLASS EVAS_CANVAS_CLASS
 
 #ifdef LKDEBUG
@@ -2069,3 +2066,5 @@ _evas_canvas_efl_object_event_callback_array_priority_add(Eo *obj, Evas_Public_D
 
 #include "evas_stack.x"
 #include "canvas/evas_canvas_eo.c"
+#include "efl_canvas_pointer.eo.c"
+#include "efl_canvas_scene.eo.c"
index 758a8db..1edaeca 100644 (file)
@@ -28,6 +28,9 @@ pub_eo_files = [
   'efl_input_hold.eo',
   'efl_input_focus.eo',
   'efl_input_clickable.eo',
+  'efl_input_device.eo',
+  'efl_canvas_pointer.eo',
+  'efl_canvas_scene.eo',
   'efl_canvas_animation.eo',
   'efl_canvas_animation_alpha.eo',
   'efl_canvas_animation_rotate.eo',
@@ -52,7 +55,7 @@ pub_eo_files = [
   'efl_canvas_group.eo',
   'efl_gfx_mapping.eo',
   'efl_canvas_event_grabber.eo',
-  'efl_canvas_text.eo'
+  'efl_canvas_text.eo',
 ]
 
 evas_canvas_eo_files = pub_eo_files
@@ -76,7 +79,8 @@ endforeach
 
 pub_eo_types_files = [
     'evas_canvas3d_types.eot',
-    'efl_canvas_animation_types.eot'
+    'efl_canvas_animation_types.eot',
+    'efl_input_types.eot',
 ]
 
 evas_canvas_eot_files = pub_eo_types_files
@@ -171,6 +175,7 @@ evas_src += files([
   'efl_input_hold.c',
   'efl_input_focus.c',
   'efl_input_clickable.c',
+  'efl_input_device.c',
   'efl_canvas_animation.c',
   'efl_canvas_animation_alpha.c',
   'efl_canvas_animation_rotate.c',
index ceb7ca7..a835c30 100644 (file)
@@ -3,8 +3,6 @@
 
 #include "evas_common_private.h"
 #include "evas_private.h"
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
 
 #include "efl_gesture_events.eo.h"
 
index fdbece3..5316055 100755 (executable)
@@ -54,6 +54,7 @@
 
 #include "Evas.h"
 
+#define EFL_INTERNAL_UNSTABLE
 #include "Evas_Internal.h"
 
 #include "../common/evas_font.h"