forked from enlightenment/efl
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
This commit is contained in:
parent
72be0842ab
commit
7dc98ab3d0
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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'),
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
// Evas internal EO APIs
|
||||
# include "Evas.h"
|
||||
#define EFL_INTERNAL_UNSTABLE
|
||||
# include "Evas_Internal.h"
|
||||
# include "Emotion.h"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# include <Eio.h>
|
||||
#endif
|
||||
|
||||
#define EFL_INTERNAL_UNSTABLE
|
||||
#include <Evas_Internal.h>
|
||||
|
||||
#include "Emotion.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>
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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*
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
|
||||
#include "Evas.h"
|
||||
|
||||
#define EFL_INTERNAL_UNSTABLE
|
||||
#include "Evas_Internal.h"
|
||||
|
||||
#include "../common/evas_font.h"
|
||||
|
|
Loading…
Reference in New Issue