summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2019-10-31 13:20:33 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-31 13:29:56 -0400
commit7dc98ab3d01b47f14552ca021d49b49b24fb7057 (patch)
tree483e5fe2f047c1ab3cbe0c55de4d38793625d44a
parent72be0842ab514b43124f6fd17066039ccf78cec5 (diff)
downloadefl-7dc98ab3d01b47f14552ca021d49b49b24fb7057.tar.gz
evas: move efl_input_device into evas/Efl_Canvas.h
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
-rw-r--r--src/bin/elementary/test_events.c2
-rw-r--r--src/lib/ecore_evas/ecore_evas.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas_drm.h1
-rw-r--r--src/lib/ecore_evas/ecore_evas_util.c1
-rw-r--r--src/lib/edje/Efl_Layout.h3
-rw-r--r--src/lib/edje/edje_callbacks.c3
-rw-r--r--src/lib/edje/edje_private.h3
-rw-r--r--src/lib/efl/Efl.h6
-rw-r--r--src/lib/efl/interfaces/efl_common_internal.h169
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c2
-rw-r--r--src/lib/efl/interfaces/meson.build9
-rw-r--r--src/lib/elementary/efl_ui_widget.c4
-rw-r--r--src/lib/elementary/efl_ui_win.c3
-rw-r--r--src/lib/elementary/elm_priv.h1
-rw-r--r--src/lib/emotion/emotion_smart.c1
-rw-r--r--src/lib/evas/Efl_Canvas.h13
-rw-r--r--src/lib/evas/Evas_Common.h22
-rw-r--r--src/lib/evas/Evas_Eo.h23
-rw-r--r--src/lib/evas/Evas_Internal.h160
-rw-r--r--src/lib/evas/canvas/efl_canvas_pointer.eo (renamed from src/lib/efl/interfaces/efl_canvas_pointer.eo)0
-rw-r--r--src/lib/evas/canvas/efl_canvas_scene.eo (renamed from src/lib/efl/interfaces/efl_canvas_scene.eo)0
-rw-r--r--src/lib/evas/canvas/efl_input_device.c (renamed from src/lib/efl/interfaces/efl_input_device.c)7
-rw-r--r--src/lib/evas/canvas/efl_input_device.eo (renamed from src/lib/efl/interfaces/efl_input_device.eo)0
-rw-r--r--src/lib/evas/canvas/efl_input_event.c4
-rw-r--r--src/lib/evas/canvas/efl_input_focus.c5
-rw-r--r--src/lib/evas/canvas/efl_input_hold.c3
-rw-r--r--src/lib/evas/canvas/efl_input_key.c3
-rw-r--r--src/lib/evas/canvas/efl_input_pointer.c3
-rw-r--r--src/lib/evas/canvas/efl_input_types.eot (renamed from src/lib/efl/interfaces/efl_input_types.eot)0
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c3
-rw-r--r--src/lib/evas/canvas/evas_device.c3
-rw-r--r--src/lib/evas/canvas/evas_events.c3
-rw-r--r--src/lib/evas/canvas/evas_events_legacy.c3
-rw-r--r--src/lib/evas/canvas/evas_focus.c2
-rw-r--r--src/lib/evas/canvas/evas_key_grab.c3
-rw-r--r--src/lib/evas/canvas/evas_main.c5
-rw-r--r--src/lib/evas/canvas/meson.build9
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_private.h2
-rw-r--r--src/lib/evas/include/evas_common_private.h1
39 files changed, 231 insertions, 258 deletions
diff --git a/src/bin/elementary/test_events.c b/src/bin/elementary/test_events.c
index e1438db3cb..48eac326ed 100644
--- a/src/bin/elementary/test_events.c
+++ b/src/bin/elementary/test_events.c
@@ -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"
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 9d2d4d10f1..d3c26ddb19 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -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"
#ifndef O_BINARY
diff --git a/src/lib/ecore_evas/ecore_evas_drm.h b/src/lib/ecore_evas/ecore_evas_drm.h
index 401fb1e8f7..63ef7bed0c 100644
--- a/src/lib/ecore_evas/ecore_evas_drm.h
+++ b/src/lib/ecore_evas/ecore_evas_drm.h
@@ -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;
diff --git a/src/lib/ecore_evas/ecore_evas_util.c b/src/lib/ecore_evas/ecore_evas_util.c
index 4f3e9c4baa..7b07fdc699 100644
--- a/src/lib/ecore_evas/ecore_evas_util.c
+++ b/src/lib/ecore_evas/ecore_evas_util.c
@@ -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";
diff --git a/src/lib/edje/Efl_Layout.h b/src/lib/edje/Efl_Layout.h
index 123ce3053d..8387984485 100644
--- a/src/lib/edje/Efl_Layout.h
+++ b/src/lib/edje/Efl_Layout.h
@@ -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
diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c
index 11fce6ef24..5b034b2606 100644
--- a/src/lib/edje/edje_callbacks.c
+++ b/src/lib/edje/edje_callbacks.c
@@ -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)
{
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index d12c1d128f..c3e4e1659a 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -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
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index f20979bd52..296fc1b359 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -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
index f465c08f80..0000000000
--- a/src/lib/efl/interfaces/efl_common_internal.h
+++ /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
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index ead730689f..f1bff04ff5 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -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"
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index 4e3f90ef01..ccbab1c1bd 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -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'),
)
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 61c8c62119..96cecc68c7 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -21,10 +21,6 @@
#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"
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index d6253f12f7..e6fb0191b4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -26,9 +26,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"
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index fede13fa67..0d71bd0b08 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -23,6 +23,7 @@
// Evas internal EO APIs
# include "Evas.h"
+#define EFL_INTERNAL_UNSTABLE
# include "Evas_Internal.h"
# include "Emotion.h"
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 9a86bfd689..a642386fbe 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -13,6 +13,7 @@
# include <Eio.h>
#endif
+#define EFL_INTERNAL_UNSTABLE
#include <Evas_Internal.h>
#include "Emotion.h"
diff --git a/src/lib/evas/Efl_Canvas.h b/src/lib/evas/Efl_Canvas.h
index cd8bf52693..dcb3836218 100644
--- a/src/lib/evas/Efl_Canvas.h
+++ b/src/lib/evas/Efl_Canvas.h
@@ -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>
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 1ae09bf259..f68f544dd3 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3488,13 +3488,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;
-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_
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 5f46511e84..ddf3b2d2b0 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -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"
diff --git a/src/lib/evas/Evas_Internal.h b/src/lib/evas/Evas_Internal.h
index 15e4ed1e80..baf7cd5b16 100644
--- a/src/lib/evas/Evas_Internal.h
+++ b/src/lib/evas/Evas_Internal.h
@@ -32,6 +32,166 @@
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);
diff --git a/src/lib/efl/interfaces/efl_canvas_pointer.eo b/src/lib/evas/canvas/efl_canvas_pointer.eo
index f0c363a953..f0c363a953 100644
--- a/src/lib/efl/interfaces/efl_canvas_pointer.eo
+++ b/src/lib/evas/canvas/efl_canvas_pointer.eo
diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo b/src/lib/evas/canvas/efl_canvas_scene.eo
index b31f0ba3b4..b31f0ba3b4 100644
--- a/src/lib/efl/interfaces/efl_canvas_scene.eo
+++ b/src/lib/evas/canvas/efl_canvas_scene.eo
diff --git a/src/lib/efl/interfaces/efl_input_device.c b/src/lib/evas/canvas/efl_input_device.c
index bd77780e00..690db7698d 100644
--- a/src/lib/efl/interfaces/efl_input_device.c
+++ b/src/lib/evas/canvas/efl_input_device.c
@@ -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"
diff --git a/src/lib/efl/interfaces/efl_input_device.eo b/src/lib/evas/canvas/efl_input_device.eo
index dda39b1877..dda39b1877 100644
--- a/src/lib/efl/interfaces/efl_input_device.eo
+++ b/src/lib/evas/canvas/efl_input_device.eo
diff --git a/src/lib/evas/canvas/efl_input_event.c b/src/lib/evas/canvas/efl_input_event.c
index 3274b31a8e..90bddde143 100644
--- a/src/lib/evas/canvas/efl_input_event.c
+++ b/src/lib/evas/canvas/efl_input_event.c
@@ -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
diff --git a/src/lib/evas/canvas/efl_input_focus.c b/src/lib/evas/canvas/efl_input_focus.c
index d7b18dec53..cb154a0017 100644
--- a/src/lib/evas/canvas/efl_input_focus.c
+++ b/src/lib/evas/canvas/efl_input_focus.c
@@ -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
diff --git a/src/lib/evas/canvas/efl_input_hold.c b/src/lib/evas/canvas/efl_input_hold.c
index c23f043ad1..b5ad65b644 100644
--- a/src/lib/evas/canvas/efl_input_hold.c
+++ b/src/lib/evas/canvas/efl_input_hold.c
@@ -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
diff --git a/src/lib/evas/canvas/efl_input_key.c b/src/lib/evas/canvas/efl_input_key.c
index 07d5a63776..79c833ccda 100644
--- a/src/lib/evas/canvas/efl_input_key.c
+++ b/src/lib/evas/canvas/efl_input_key.c
@@ -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*
diff --git a/src/lib/evas/canvas/efl_input_pointer.c b/src/lib/evas/canvas/efl_input_pointer.c
index 8b16c5767a..33cb80ce68 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -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
diff --git a/src/lib/efl/interfaces/efl_input_types.eot b/src/lib/evas/canvas/efl_input_types.eot
index a716686528..a716686528 100644
--- a/src/lib/efl/interfaces/efl_input_types.eot
+++ b/src/lib/evas/canvas/efl_input_types.eot
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 65b78f2bcd..d19ce686da 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -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;
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index 660f657158..5f5e1aaba8 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -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_
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 46a765e32c..bb8c9346fb 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -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 *
diff --git a/src/lib/evas/canvas/evas_events_legacy.c b/src/lib/evas/canvas/evas_events_legacy.c
index 4675735727..1204800631 100644
--- a/src/lib/evas/canvas/evas_events_legacy.c
+++ b/src/lib/evas/canvas/evas_events_legacy.c
@@ -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;
diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index d76c1042dc..e11df7887d 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -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;
diff --git a/src/lib/evas/canvas/evas_key_grab.c b/src/lib/evas/canvas/evas_key_grab.c
index aaf6e6a2d0..5c8969ccb4 100644
--- a/src/lib/evas/canvas/evas_key_grab.c
+++ b/src/lib/evas/canvas/evas_key_grab.c
@@ -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 */
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 92c9ed2334..6d4c07c95e 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -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
@@ -2052,3 +2049,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"
diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build
index 758a8db064..1edaeca69e 100644
--- a/src/lib/evas/canvas/meson.build
+++ b/src/lib/evas/canvas/meson.build
@@ -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',
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_private.h b/src/lib/evas/gesture/efl_canvas_gesture_private.h
index ceb7ca7d42..a835c3093d 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_private.h
+++ b/src/lib/evas/gesture/efl_canvas_gesture_private.h
@@ -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"
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 59eb800724..5fecf3f157 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -54,6 +54,7 @@
#include "Evas.h"
+#define EFL_INTERNAL_UNSTABLE
#include "Evas_Internal.h"
#include "../common/evas_font.h"