summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_common_internal.h
blob: 5063fe894d1965d6e2b31e474450e538f18f29bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* 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_Event_Pointer_Data  Efl_Event_Pointer_Data;
typedef struct _Efl_Event_Key_Data      Efl_Event_Key_Data;
typedef struct _Efl_Input_Device_Data   Efl_Input_Device_Data;
typedef struct _Efl_Event_Hold_Data     Efl_Event_Hold_Data;

#ifndef _EVAS_TYPES_EOT_H_
typedef struct _Evas_Modifier Evas_Modifier;
typedef struct _Evas_Lock Evas_Lock;
#endif

struct _Efl_Event_Pointer_Data
{
   Eo             *eo;
   unsigned int    timestamp; /* FIXME: store as double? */
   int             button;
   unsigned int    pressed_buttons;
   int             finger;
   double          radius, radius_x, radius_y;
   double          pressure;
   double          angle;
   Eina_Vector2    cur, prev;
   struct {
      Efl_Orient   dir;
      int          z;
   } wheel;
   Efl_Gfx                    *source; /* could it be ecore? */
   Efl_Input_Device           *device;
   Efl_Pointer_Action          action;
   Efl_Pointer_Flags           button_flags;
   Efl_Event_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 */
   Eina_Bool                   evas_done : 1; /* set by evas */
   Eina_Bool                   fake : 1;
   Eina_Bool                   win_fed : 1;
};

struct _Efl_Event_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_Event_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 *parent;  /* no ref */
   Efl_Input_Device *source;  /* ref */
   Eina_List        *children; /* ref */
   Eina_Stringshare *name;
   Eina_Stringshare *desc;
   Efl_Input_Device_Class klass;
   Efl_Input_Device_Sub_Class subclass;
};

struct _Efl_Event_Hold_Data
{
   Eo               *eo;
   double            timestamp;
   Efl_Event_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 */
};

#endif