summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-11 21:11:44 +0100
committerCedric BAIL <cedric.bail@samsung.com>2013-03-12 15:58:43 +0900
commit32661a5ac456a4de47fb812a9ea22b4efa2c9edc (patch)
treef1ddfaefebd4887a070cdc454f918480f7b3c385 /src/lib/ecore_evas
parent1f95cbdc7b924ab5100dd399afbbae0a1e55d109 (diff)
ecore_evas: re-order inclusion of header to fix compilation on Windows.
It is a very tricky things to get header order right on windows. Having that order only in .c files simplify the work a lot. So let's try to do it with Ecore_Evas after it rewrite and split into modules.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/Ecore_Evas.h3
-rw-r--r--src/lib/ecore_evas/ecore_evas.c11
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c11
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.h10
-rw-r--r--src/lib/ecore_evas/ecore_evas_deprecated.c2
-rw-r--r--src/lib/ecore_evas/ecore_evas_ews.c7
-rw-r--r--src/lib/ecore_evas/ecore_evas_extn.h15
-rw-r--r--src/lib/ecore_evas/ecore_evas_module.c5
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h74
-rw-r--r--src/lib/ecore_evas/ecore_evas_util.c2
-rw-r--r--src/lib/ecore_evas/ecore_evas_wayland.h16
-rw-r--r--src/lib/ecore_evas/ecore_evas_win32.h12
-rw-r--r--src/lib/ecore_evas/ecore_evas_x11.h41
13 files changed, 112 insertions, 97 deletions
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 839d7a6d50..7d73cf82f5 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -1,9 +1,8 @@
1#ifndef _ECORE_EVAS_H 1#ifndef _ECORE_EVAS_H
2#define _ECORE_EVAS_H 2#define _ECORE_EVAS_H
3 3
4#include "Ecore_Evas_Types.h"
5
6#include <Evas.h> 4#include <Evas.h>
5#include <Ecore_Evas_Types.h>
7 6
8#ifdef EAPI 7#ifdef EAPI
9# undef EAPI 8# undef EAPI
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 15b95736f3..8635c97e64 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -21,12 +21,17 @@
21# include <Evil.h> 21# include <Evil.h>
22#endif 22#endif
23 23
24#include "Ecore.h" 24#include <Ecore.h>
25#include "ecore_private.h" 25#include "ecore_private.h"
26#include "Ecore_Input.h" 26#include <Ecore_Input.h>
27#include <Ecore_Input_Evas.h>
27 28
28#include "ecore_evas_private.h"
29#include "Ecore_Evas.h" 29#include "Ecore_Evas.h"
30#include "ecore_evas_private.h"
31#include "ecore_evas_x11.h"
32#include "ecore_evas_wayland.h"
33#include "ecore_evas_extn.h"
34#include "ecore_evas_win32.h"
30 35
31EAPI Eina_Bool _ecore_evas_app_comp_sync = 1; 36EAPI Eina_Bool _ecore_evas_app_comp_sync = 1;
32EAPI int _ecore_evas_log_dom = -1; 37EAPI int _ecore_evas_log_dom = -1;
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index c76af25ada..a3cd572475 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -2,8 +2,17 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include "ecore_evas_buffer.h" 5#include <stdlib.h>
6
7#include <Evas.h>
6#include <Evas_Engine_Buffer.h> 8#include <Evas_Engine_Buffer.h>
9#include <Ecore.h>
10#include "ecore_private.h"
11#include <Ecore_Input.h>
12
13#include "Ecore_Evas.h"
14#include "ecore_evas_buffer.h"
15#include "ecore_evas_private.h"
7 16
8static void 17static void
9_ecore_evas_buffer_free(Ecore_Evas *ee) 18_ecore_evas_buffer_free(Ecore_Evas *ee)
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.h b/src/lib/ecore_evas/ecore_evas_buffer.h
index 06f82f9fea..e065d8a5f9 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.h
+++ b/src/lib/ecore_evas/ecore_evas_buffer.h
@@ -1,16 +1,6 @@
1#ifndef _ECORE_EVAS_BUFFER_PRIVATE_H_ 1#ifndef _ECORE_EVAS_BUFFER_PRIVATE_H_
2#define _ECORE_EVAS_BUFFER_PRIVATE_H_ 2#define _ECORE_EVAS_BUFFER_PRIVATE_H_
3 3
4#include <stdlib.h>
5
6#include <Ecore.h>
7#include "ecore_private.h"
8#include <Ecore_Input.h>
9
10#include "ecore_evas_private.h"
11#include "Ecore_Evas.h"
12
13
14typedef struct _Ecore_Evas_Engine_Buffer_Data Ecore_Evas_Engine_Buffer_Data; 4typedef struct _Ecore_Evas_Engine_Buffer_Data Ecore_Evas_Engine_Buffer_Data;
15 5
16struct _Ecore_Evas_Engine_Buffer_Data { 6struct _Ecore_Evas_Engine_Buffer_Data {
diff --git a/src/lib/ecore_evas/ecore_evas_deprecated.c b/src/lib/ecore_evas/ecore_evas_deprecated.c
index 20a57ebf80..1b40807e53 100644
--- a/src/lib/ecore_evas/ecore_evas_deprecated.c
+++ b/src/lib/ecore_evas/ecore_evas_deprecated.c
@@ -7,8 +7,8 @@
7#include <Ecore.h> 7#include <Ecore.h>
8#include "ecore_private.h" 8#include "ecore_private.h"
9 9
10#include "ecore_evas_private.h"
11#include "Ecore_Evas.h" 10#include "Ecore_Evas.h"
11#include "ecore_evas_private.h"
12 12
13 13
14/* Ecore_Evas WinCE support was removed. However we keep the functions 14/* Ecore_Evas WinCE support was removed. However we keep the functions
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c
index 936b70a415..ea5c983005 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -6,15 +6,14 @@
6#include <string.h> 6#include <string.h>
7#include <sys/types.h> 7#include <sys/types.h>
8 8
9#include <Eina.h>
10#include <Ecore.h>
11#include "ecore_private.h"
12#include <Evas.h> 9#include <Evas.h>
13#include <Evas_Engine_Buffer.h> 10#include <Evas_Engine_Buffer.h>
11#include <Ecore.h>
12#include "ecore_private.h"
14#include <Ecore_Input.h> 13#include <Ecore_Input.h>
15 14
16#include "ecore_evas_private.h"
17#include "Ecore_Evas.h" 15#include "Ecore_Evas.h"
16#include "ecore_evas_private.h"
18 17
19EAPI int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE = 0; 18EAPI int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE = 0;
20EAPI int ECORE_EVAS_EWS_EVENT_ADD = 0; 19EAPI int ECORE_EVAS_EWS_EVENT_ADD = 0;
diff --git a/src/lib/ecore_evas/ecore_evas_extn.h b/src/lib/ecore_evas/ecore_evas_extn.h
new file mode 100644
index 0000000000..540f1384a7
--- /dev/null
+++ b/src/lib/ecore_evas/ecore_evas_extn.h
@@ -0,0 +1,15 @@
1#ifndef ECORE_EVAS_EXTN_H_
2# define ECORE_EVAS_EXTN_H_
3
4typedef struct _Ecore_Evas_Interface_Extn Ecore_Evas_Interface_Extn;
5
6struct _Ecore_Evas_Interface_Extn {
7 Ecore_Evas_Interface base;
8
9 void (*data_lock)(Ecore_Evas *ee);
10 void (*data_unlock)(Ecore_Evas *ee);
11 Eina_Bool (*connect)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
12 Eina_Bool (*listen)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
13};
14
15#endif
diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 4160dedc70..0194bd2973 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -2,6 +2,9 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include <Ecore.h>
6#include "ecore_private.h"
7
5#include "Ecore_Evas.h" 8#include "Ecore_Evas.h"
6#include "ecore_evas_private.h" 9#include "ecore_evas_private.h"
7 10
@@ -9,7 +12,7 @@ static Eina_Hash *_registered_engines = NULL;
9static Eina_List *_engines_paths = NULL; 12static Eina_List *_engines_paths = NULL;
10static Eina_List *_engines_available = NULL; 13static Eina_List *_engines_available = NULL;
11 14
12#if defined(__CEGCC__) || defined(__MINGW32CE__) || defined(_WIN32) 15#ifdef _WIN32
13# define ECORE_EVAS_ENGINE_NAME "module.dll" 16# define ECORE_EVAS_ENGINE_NAME "module.dll"
14#else 17#else
15# define ECORE_EVAS_ENGINE_NAME "module.so" 18# define ECORE_EVAS_ENGINE_NAME "module.so"
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 793461fe73..f789c3f20b 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -1,14 +1,6 @@
1#ifndef _ECORE_EVAS_PRIVATE_H 1#ifndef _ECORE_EVAS_PRIVATE_H
2#define _ECORE_EVAS_PRIVATE_H 2#define _ECORE_EVAS_PRIVATE_H
3 3
4#include "Ecore_Evas_Types.h"
5
6#include <Evas.h>
7#include <Ecore.h>
8#include <ecore_private.h>
9#include <Ecore_Input.h>
10#include <Ecore_Input_Evas.h>
11
12#define ECORE_MAGIC_EVAS 0x76543211 4#define ECORE_MAGIC_EVAS 0x76543211
13 5
14/** Log domain macros and variables **/ 6/** Log domain macros and variables **/
@@ -53,14 +45,6 @@ typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func;
53typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface; 45typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface;
54 46
55/* Engines interfaces */ 47/* Engines interfaces */
56typedef struct _Ecore_Evas_Interface_Extn Ecore_Evas_Interface_Extn;
57typedef struct _Ecore_Evas_Interface_X11 Ecore_Evas_Interface_X11;
58typedef struct _Ecore_Evas_Interface_Software_X11 Ecore_Evas_Interface_Software_X11;
59typedef struct _Ecore_Evas_Interface_Gl_X11 Ecore_Evas_Interface_Gl_X11;
60typedef struct _Ecore_Evas_Interface_Wayland Ecore_Evas_Interface_Wayland;
61typedef struct _Ecore_Evas_Interface_Win32 Ecore_Evas_Interface_Win32;
62
63
64struct _Ecore_Evas_Engine_Func 48struct _Ecore_Evas_Engine_Func
65{ 49{
66 void (*fn_free) (Ecore_Evas *ee); 50 void (*fn_free) (Ecore_Evas *ee);
@@ -133,64 +117,6 @@ struct _Ecore_Evas_Interface
133 unsigned int version; 117 unsigned int version;
134}; 118};
135 119
136struct _Ecore_Evas_Interface_X11 {
137 Ecore_Evas_Interface base;
138
139 void (*leader_set)(Ecore_Evas *ee, Ecore_X_Window win);
140 Ecore_X_Window (*leader_get)(Ecore_Evas *ee);
141 void (*leader_default_set)(Ecore_Evas *ee);
142 void (*shape_input_rectangle_set)(Ecore_Evas *ee, int x, int y, int w, int h);
143 void (*shape_input_rectangle_add)(Ecore_Evas *ee, int x, int y, int w, int h);
144 void (*shape_input_rectangle_subtract)(Ecore_Evas *ee, int x, int y, int w, int h);
145 void (*shape_input_empty)(Ecore_Evas *ee);
146 void (*shape_input_reset)(Ecore_Evas *ee);
147 void (*shape_input_apply)(Ecore_Evas *ee);
148};
149
150struct _Ecore_Evas_Interface_Software_X11 {
151 Ecore_Evas_Interface base;
152
153 Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
154 void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
155 Eina_Bool (*resize_get)(const Ecore_Evas *ee);
156 void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
157};
158
159struct _Ecore_Evas_Interface_Gl_X11 {
160 Ecore_Evas_Interface base;
161
162 Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
163 void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
164 Eina_Bool (*resize_get)(const Ecore_Evas *ee);
165 void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
166 void (*pre_post_swap_callback_set)(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e));
167};
168
169struct _Ecore_Evas_Interface_Extn {
170 Ecore_Evas_Interface base;
171
172 void (*data_lock)(Ecore_Evas *ee);
173 void (*data_unlock)(Ecore_Evas *ee);
174 Eina_Bool (*connect)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
175 Eina_Bool (*listen)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
176};
177
178struct _Ecore_Evas_Interface_Wayland {
179 Ecore_Evas_Interface base;
180
181 void (*resize)(Ecore_Evas *ee, int location);
182 void (*move)(Ecore_Evas *ee, int x, int y);
183 void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y);
184 void (*type_set)(Ecore_Evas *ee, int type);
185 Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee);
186};
187
188struct _Ecore_Evas_Interface_Win32 {
189 Ecore_Evas_Interface base;
190
191 Ecore_Win32_Window* (*window_get)(const Ecore_Evas *ee);
192};
193
194struct _Ecore_Evas_Engine 120struct _Ecore_Evas_Engine
195{ 121{
196 Ecore_Evas_Engine_Func *func; 122 Ecore_Evas_Engine_Func *func;
diff --git a/src/lib/ecore_evas/ecore_evas_util.c b/src/lib/ecore_evas/ecore_evas_util.c
index 824464021d..e50c8de69a 100644
--- a/src/lib/ecore_evas/ecore_evas_util.c
+++ b/src/lib/ecore_evas/ecore_evas_util.c
@@ -9,8 +9,8 @@
9#include <Ecore_Getopt.h> 9#include <Ecore_Getopt.h>
10#include "ecore_private.h" 10#include "ecore_private.h"
11 11
12#include "ecore_evas_private.h"
13#include "Ecore_Evas.h" 12#include "Ecore_Evas.h"
13#include "ecore_evas_private.h"
14 14
15static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate"; 15static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate";
16 16
diff --git a/src/lib/ecore_evas/ecore_evas_wayland.h b/src/lib/ecore_evas/ecore_evas_wayland.h
new file mode 100644
index 0000000000..ba21718470
--- /dev/null
+++ b/src/lib/ecore_evas/ecore_evas_wayland.h
@@ -0,0 +1,16 @@
1#ifndef ECORE_EVAS_WAYLAND_H_
2# define ECORE_EVAS_WAYLAND_H_
3
4typedef struct _Ecore_Evas_Interface_Wayland Ecore_Evas_Interface_Wayland;
5
6struct _Ecore_Evas_Interface_Wayland {
7 Ecore_Evas_Interface base;
8
9 void (*resize)(Ecore_Evas *ee, int location);
10 void (*move)(Ecore_Evas *ee, int x, int y);
11 void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y);
12 void (*type_set)(Ecore_Evas *ee, int type);
13 Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee);
14};
15
16#endif
diff --git a/src/lib/ecore_evas/ecore_evas_win32.h b/src/lib/ecore_evas/ecore_evas_win32.h
new file mode 100644
index 0000000000..86cfa1830e
--- /dev/null
+++ b/src/lib/ecore_evas/ecore_evas_win32.h
@@ -0,0 +1,12 @@
1#ifndef ECORE_EVAS_WIN32_H
2# define ECORE_EVAS_WIN32_H
3
4typedef struct _Ecore_Evas_Interface_Win32 Ecore_Evas_Interface_Win32;
5
6struct _Ecore_Evas_Interface_Win32 {
7 Ecore_Evas_Interface base;
8
9 Ecore_Win32_Window* (*window_get)(const Ecore_Evas *ee);
10};
11
12#endif
diff --git a/src/lib/ecore_evas/ecore_evas_x11.h b/src/lib/ecore_evas/ecore_evas_x11.h
new file mode 100644
index 0000000000..10d4fe8a1b
--- /dev/null
+++ b/src/lib/ecore_evas/ecore_evas_x11.h
@@ -0,0 +1,41 @@
1#ifndef ECORE_EVAS_X11_H_
2# define ECORE_EVAS_X11_H_
3
4typedef struct _Ecore_Evas_Interface_X11 Ecore_Evas_Interface_X11;
5typedef struct _Ecore_Evas_Interface_Software_X11 Ecore_Evas_Interface_Software_X11;
6typedef struct _Ecore_Evas_Interface_Gl_X11 Ecore_Evas_Interface_Gl_X11;
7
8struct _Ecore_Evas_Interface_X11 {
9 Ecore_Evas_Interface base;
10
11 void (*leader_set)(Ecore_Evas *ee, Ecore_X_Window win);
12 Ecore_X_Window (*leader_get)(Ecore_Evas *ee);
13 void (*leader_default_set)(Ecore_Evas *ee);
14 void (*shape_input_rectangle_set)(Ecore_Evas *ee, int x, int y, int w, int h);
15 void (*shape_input_rectangle_add)(Ecore_Evas *ee, int x, int y, int w, int h);
16 void (*shape_input_rectangle_subtract)(Ecore_Evas *ee, int x, int y, int w, int h);
17 void (*shape_input_empty)(Ecore_Evas *ee);
18 void (*shape_input_reset)(Ecore_Evas *ee);
19 void (*shape_input_apply)(Ecore_Evas *ee);
20};
21
22struct _Ecore_Evas_Interface_Software_X11 {
23 Ecore_Evas_Interface base;
24
25 Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
26 void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
27 Eina_Bool (*resize_get)(const Ecore_Evas *ee);
28 void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
29};
30
31struct _Ecore_Evas_Interface_Gl_X11 {
32 Ecore_Evas_Interface base;
33
34 Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
35 void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
36 Eina_Bool (*resize_get)(const Ecore_Evas *ee);
37 void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
38 void (*pre_post_swap_callback_set)(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e));
39};
40
41#endif