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.
This commit is contained in:
Cedric Bail 2013-03-11 21:11:44 +01:00 committed by Cedric BAIL
parent 1f95cbdc7b
commit 32661a5ac4
22 changed files with 173 additions and 132 deletions

View File

@ -16,6 +16,10 @@ lib/ecore_evas/ecore_evas_deprecated.c \
lib/ecore_evas/ecore_evas_ews.c \
lib/ecore_evas/ecore_evas_module.c \
lib/ecore_evas/ecore_evas_private.h \
lib/ecore_evas/ecore_evas_extn.h \
lib/ecore_evas/ecore_evas_wayland.h \
lib/ecore_evas/ecore_evas_win32.h \
lib/ecore_evas/ecore_evas_x11.h \
lib/ecore_evas/ecore_evas_util.c
lib_ecore_evas_libecore_evas_la_CPPFLAGS = \

View File

@ -1,9 +1,8 @@
#ifndef _ECORE_EVAS_H
#define _ECORE_EVAS_H
#include "Ecore_Evas_Types.h"
#include <Evas.h>
#include <Ecore_Evas_Types.h>
#ifdef EAPI
# undef EAPI

View File

@ -21,12 +21,17 @@
# include <Evil.h>
#endif
#include "Ecore.h"
#include <Ecore.h>
#include "ecore_private.h"
#include "Ecore_Input.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
#include "ecore_evas_x11.h"
#include "ecore_evas_wayland.h"
#include "ecore_evas_extn.h"
#include "ecore_evas_win32.h"
EAPI Eina_Bool _ecore_evas_app_comp_sync = 1;
EAPI int _ecore_evas_log_dom = -1;

View File

@ -2,8 +2,17 @@
# include <config.h>
#endif
#include "ecore_evas_buffer.h"
#include <stdlib.h>
#include <Evas.h>
#include <Evas_Engine_Buffer.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include "Ecore_Evas.h"
#include "ecore_evas_buffer.h"
#include "ecore_evas_private.h"
static void
_ecore_evas_buffer_free(Ecore_Evas *ee)

View File

@ -1,16 +1,6 @@
#ifndef _ECORE_EVAS_BUFFER_PRIVATE_H_
#define _ECORE_EVAS_BUFFER_PRIVATE_H_
#include <stdlib.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
typedef struct _Ecore_Evas_Engine_Buffer_Data Ecore_Evas_Engine_Buffer_Data;
struct _Ecore_Evas_Engine_Buffer_Data {

View File

@ -7,8 +7,8 @@
#include <Ecore.h>
#include "ecore_private.h"
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
/* Ecore_Evas WinCE support was removed. However we keep the functions

View File

@ -6,15 +6,14 @@
#include <string.h>
#include <sys/types.h>
#include <Eina.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Evas.h>
#include <Evas_Engine_Buffer.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
EAPI int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE = 0;
EAPI int ECORE_EVAS_EWS_EVENT_ADD = 0;

View File

@ -0,0 +1,15 @@
#ifndef ECORE_EVAS_EXTN_H_
# define ECORE_EVAS_EXTN_H_
typedef struct _Ecore_Evas_Interface_Extn Ecore_Evas_Interface_Extn;
struct _Ecore_Evas_Interface_Extn {
Ecore_Evas_Interface base;
void (*data_lock)(Ecore_Evas *ee);
void (*data_unlock)(Ecore_Evas *ee);
Eina_Bool (*connect)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
Eina_Bool (*listen)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
};
#endif

View File

@ -2,6 +2,9 @@
# include <config.h>
#endif
#include <Ecore.h>
#include "ecore_private.h"
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
@ -9,7 +12,7 @@ static Eina_Hash *_registered_engines = NULL;
static Eina_List *_engines_paths = NULL;
static Eina_List *_engines_available = NULL;
#if defined(__CEGCC__) || defined(__MINGW32CE__) || defined(_WIN32)
#ifdef _WIN32
# define ECORE_EVAS_ENGINE_NAME "module.dll"
#else
# define ECORE_EVAS_ENGINE_NAME "module.so"

View File

@ -1,14 +1,6 @@
#ifndef _ECORE_EVAS_PRIVATE_H
#define _ECORE_EVAS_PRIVATE_H
#include "Ecore_Evas_Types.h"
#include <Evas.h>
#include <Ecore.h>
#include <ecore_private.h>
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#define ECORE_MAGIC_EVAS 0x76543211
/** Log domain macros and variables **/
@ -53,14 +45,6 @@ typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func;
typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface;
/* Engines interfaces */
typedef struct _Ecore_Evas_Interface_Extn Ecore_Evas_Interface_Extn;
typedef struct _Ecore_Evas_Interface_X11 Ecore_Evas_Interface_X11;
typedef struct _Ecore_Evas_Interface_Software_X11 Ecore_Evas_Interface_Software_X11;
typedef struct _Ecore_Evas_Interface_Gl_X11 Ecore_Evas_Interface_Gl_X11;
typedef struct _Ecore_Evas_Interface_Wayland Ecore_Evas_Interface_Wayland;
typedef struct _Ecore_Evas_Interface_Win32 Ecore_Evas_Interface_Win32;
struct _Ecore_Evas_Engine_Func
{
void (*fn_free) (Ecore_Evas *ee);
@ -133,64 +117,6 @@ struct _Ecore_Evas_Interface
unsigned int version;
};
struct _Ecore_Evas_Interface_X11 {
Ecore_Evas_Interface base;
void (*leader_set)(Ecore_Evas *ee, Ecore_X_Window win);
Ecore_X_Window (*leader_get)(Ecore_Evas *ee);
void (*leader_default_set)(Ecore_Evas *ee);
void (*shape_input_rectangle_set)(Ecore_Evas *ee, int x, int y, int w, int h);
void (*shape_input_rectangle_add)(Ecore_Evas *ee, int x, int y, int w, int h);
void (*shape_input_rectangle_subtract)(Ecore_Evas *ee, int x, int y, int w, int h);
void (*shape_input_empty)(Ecore_Evas *ee);
void (*shape_input_reset)(Ecore_Evas *ee);
void (*shape_input_apply)(Ecore_Evas *ee);
};
struct _Ecore_Evas_Interface_Software_X11 {
Ecore_Evas_Interface base;
Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
Eina_Bool (*resize_get)(const Ecore_Evas *ee);
void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
};
struct _Ecore_Evas_Interface_Gl_X11 {
Ecore_Evas_Interface base;
Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
Eina_Bool (*resize_get)(const Ecore_Evas *ee);
void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
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));
};
struct _Ecore_Evas_Interface_Extn {
Ecore_Evas_Interface base;
void (*data_lock)(Ecore_Evas *ee);
void (*data_unlock)(Ecore_Evas *ee);
Eina_Bool (*connect)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
Eina_Bool (*listen)(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
};
struct _Ecore_Evas_Interface_Wayland {
Ecore_Evas_Interface base;
void (*resize)(Ecore_Evas *ee, int location);
void (*move)(Ecore_Evas *ee, int x, int y);
void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y);
void (*type_set)(Ecore_Evas *ee, int type);
Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee);
};
struct _Ecore_Evas_Interface_Win32 {
Ecore_Evas_Interface base;
Ecore_Win32_Window* (*window_get)(const Ecore_Evas *ee);
};
struct _Ecore_Evas_Engine
{
Ecore_Evas_Engine_Func *func;

View File

@ -9,8 +9,8 @@
#include <Ecore_Getopt.h>
#include "ecore_private.h"
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate";

View File

@ -0,0 +1,16 @@
#ifndef ECORE_EVAS_WAYLAND_H_
# define ECORE_EVAS_WAYLAND_H_
typedef struct _Ecore_Evas_Interface_Wayland Ecore_Evas_Interface_Wayland;
struct _Ecore_Evas_Interface_Wayland {
Ecore_Evas_Interface base;
void (*resize)(Ecore_Evas *ee, int location);
void (*move)(Ecore_Evas *ee, int x, int y);
void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y);
void (*type_set)(Ecore_Evas *ee, int type);
Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee);
};
#endif

View File

@ -0,0 +1,12 @@
#ifndef ECORE_EVAS_WIN32_H
# define ECORE_EVAS_WIN32_H
typedef struct _Ecore_Evas_Interface_Win32 Ecore_Evas_Interface_Win32;
struct _Ecore_Evas_Interface_Win32 {
Ecore_Evas_Interface base;
Ecore_Win32_Window* (*window_get)(const Ecore_Evas *ee);
};
#endif

View File

@ -0,0 +1,41 @@
#ifndef ECORE_EVAS_X11_H_
# define ECORE_EVAS_X11_H_
typedef struct _Ecore_Evas_Interface_X11 Ecore_Evas_Interface_X11;
typedef struct _Ecore_Evas_Interface_Software_X11 Ecore_Evas_Interface_Software_X11;
typedef struct _Ecore_Evas_Interface_Gl_X11 Ecore_Evas_Interface_Gl_X11;
struct _Ecore_Evas_Interface_X11 {
Ecore_Evas_Interface base;
void (*leader_set)(Ecore_Evas *ee, Ecore_X_Window win);
Ecore_X_Window (*leader_get)(Ecore_Evas *ee);
void (*leader_default_set)(Ecore_Evas *ee);
void (*shape_input_rectangle_set)(Ecore_Evas *ee, int x, int y, int w, int h);
void (*shape_input_rectangle_add)(Ecore_Evas *ee, int x, int y, int w, int h);
void (*shape_input_rectangle_subtract)(Ecore_Evas *ee, int x, int y, int w, int h);
void (*shape_input_empty)(Ecore_Evas *ee);
void (*shape_input_reset)(Ecore_Evas *ee);
void (*shape_input_apply)(Ecore_Evas *ee);
};
struct _Ecore_Evas_Interface_Software_X11 {
Ecore_Evas_Interface base;
Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
Eina_Bool (*resize_get)(const Ecore_Evas *ee);
void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
};
struct _Ecore_Evas_Interface_Gl_X11 {
Ecore_Evas_Interface base;
Ecore_X_Window (*window_get)(const Ecore_Evas *ee);
void (*resize_set)(Ecore_Evas *ee, Eina_Bool on);
Eina_Bool (*resize_get)(const Ecore_Evas *ee);
void (*extra_event_window_add)(Ecore_Evas *ee, Ecore_X_Window win);
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));
};
#endif

View File

@ -2,17 +2,17 @@
# include <config.h>
#endif
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include "Ecore.h"
#include <Ecore.h>
#include "ecore_private.h"
#include "Ecore_Input.h"
#include "Ecore_Input_Evas.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include <Ecore_Cocoa.h>
#include <Evas_Engine_GL_Cocoa.h>
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
// FIXME: this engine has lots of problems. only 1 window at a time, drawRect looks wrong, doesnt handle resizes and more

View File

@ -25,10 +25,18 @@
#include <sys/file.h>
#include <unistd.h>
#include <Evas.h>
#include <Evas_Engine_Buffer.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Ecore_Input.h>
#include <Ecore_Ipc.h>
#include "ecore_private.h" // FIXME: Because of ECORE_MAGIC
#include "ecore_evas_private.h"
#include "ecore_evas_buffer.h"
#include <Evas_Engine_Buffer.h>
#include "ecore_evas_extn.h"
static const char *interface_extn_name = "extn";
static const int interface_extn_version = 1;

View File

@ -6,15 +6,17 @@
#include <sys/types.h>
#include <dirent.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Ecore_Fb.h>
#include <ecore_evas_private.h>
#include <ecore_fb_private.h>
#include <ecore_private.h>
#include <Eina.h>
#include <Evas_Engine_FB.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include <Ecore_Fb.h>
#include "ecore_fb_private.h"
#include <Ecore_Evas.h>
#include "ecore_evas_private.h"
static int _ecore_evas_init_count = 0;

View File

@ -3,15 +3,16 @@
#endif
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include <Ecore_Psl1ght.h>
#include <Evas_Engine_PSL1GHT.h>
#include <Ecore_Evas.h>
#include "ecore_evas_private.h"
static int _ecore_evas_init_count = 0;
static Ecore_Evas *psl1ght_ee = NULL;

View File

@ -2,23 +2,23 @@
# include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include <SDL/SDL.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include <Ecore_Sdl.h>
#include <Evas_Engine_Buffer.h>
#ifdef BUILD_ECORE_EVAS_OPENGL_SDL
# include <Evas_Engine_GL_SDL.h>
# include <Evas_Engine_GL_SDL.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <SDL/SDL.h>
#include <Ecore_Evas.h>
#include "ecore_evas_private.h"
/*
* SDL only handle one window at a time. That's by definition, there is nothing wrong here.
*

View File

@ -15,11 +15,16 @@
#endif
#include <Eina.h>
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include <Ecore_Wayland.h>
#include <Ecore_Evas.h>
#include "ecore_evas_private.h"
#include "ecore_evas_wayland.h"
typedef struct _Ecore_Evas_Engine_Wl_Data Ecore_Evas_Engine_Wl_Data;
struct _Ecore_Evas_Engine_Wl_Data

View File

@ -6,12 +6,15 @@
#include <Ecore.h>
#include "ecore_private.h"
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include "Ecore_Win32.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include <Ecore_Win32.h>
#include "ecore_win32_private.h"
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
#include "ecore_evas_win32.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN

View File

@ -2,14 +2,14 @@
# include <config.h>
#endif
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#include <stdlib.h>
#include <string.h>
#include <Eina.h>
#include <Ecore.h>
#include "ecore_private.h"
#include <Ecore_Input.h>
#include <Ecore_Input_Evas.h>
#include <Ecore_X.h>
#include <Ecore_X_Atoms.h>
@ -22,10 +22,13 @@
# include <Evas_Engine_GL_X11.h>
#endif
#include <Ecore_Evas.h>
#include "ecore_evas_private.h"
#include "ecore_evas_x11.h"
#define EDBG(...) \
EINA_LOG(_ecore_evas_log_dom, EINA_LOG_LEVEL_DBG + 1, __VA_ARGS__);
static int _ecore_evas_init_count = 0;
static Ecore_Event_Handler *ecore_evas_event_handlers[13];