10 #define OBJECT_PARANOIA_CHECK
14 #ifndef _FILE_OFFSET_BITS
15 #define _FILE_OFFSET_BITS 64
20 #elif defined __GNUC__
21 # define alloca __builtin_alloca
23 # define alloca __alloca
24 #elif defined _MSC_VER
26 # define alloca _alloca
32 void *alloca (size_t);
43 #include <sys/types.h>
46 #include <sys/param.h>
67 #ifndef _POSIX_HOST_NAME_MAX
68 #define _POSIX_HOST_NAME_MAX 255
72 # include <memcheck.h>
82 #include <Evas_Engine_Buffer.h>
85 #include <Ecore_Evas.h>
86 #include <Ecore_Input.h>
87 #include <Ecore_Input_Evas.h>
88 #include <Ecore_Con.h>
89 #include <Ecore_Ipc.h>
90 #include <Ecore_File.h>
94 #include <Efreet_Mime.h>
102 # define EAPI __declspec(dllexport)
104 # define EAPI __declspec(dllimport)
109 /* BROKEN in gcc 4 on amd64 */
111 # pragma GCC visibility push(hidden)
113 # define EAPI __attribute__ ((visibility("default")))
127 # define EINTERN __attribute__ ((visibility("hidden")))
135 typedef struct _E_Before_Idler E_Before_Idler;
136 typedef struct _E_Rect E_Rect;
138 /* convenience macro to compress code and avoid typos */
139 #define E_FN_DEL(_fn, _h) if (_h) { _fn(_h); _h = NULL; }
140 #define E_INTERSECTS(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy)))
141 #define E_INSIDE(x, y, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && ((x) >= (xx)) && ((y) >= (yy)))
142 #define E_CONTAINS(x, y, w, h, xx, yy, ww, hh) (((xx) >= (x)) && (((x) + (w)) >= ((xx) + (ww))) && ((yy) >= (y)) && (((y) + (h)) >= ((yy) + (hh))))
143 #define E_SPANS_COMMON(x1, w1, x2, w2) (!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
144 #define E_REALLOC(p, s, n) p = (s *)realloc(p, sizeof(s) * n)
145 #define E_NEW(s, n) (s *)calloc(n, sizeof(s))
146 #define E_NEW_BIG(s, n) (s *)malloc(n * sizeof(s))
147 #define E_FREE(p) do { if (p) {free(p); p = NULL;} } while (0)
148 #define E_FREE_LIST(list, free) \
154 EINA_LIST_FREE(list, data) \
163 #define E_CLAMP(x, min, max) (x < min ? min : (x > max ? max : x))
164 #define E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
166 if (E_INTERSECTS(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \
172 if (_w < 0) _w = 0; \
174 if ((_x + _w) > ((_cx) + (_cw))) \
175 _w = (_cx) + (_cw) - _x; \
180 if (_h < 0) _h = 0; \
182 if ((_y + _h) > ((_cy) + (_ch))) \
183 _h = (_cy) + (_ch) - _y; \
191 #define E_REMOTE_OPTIONS 1
192 #define E_REMOTE_OUT 2
194 #define E_REMOTE_IN 4
199 #include "e_includes.h"
201 #include "e_includes.h"
203 EAPI E_Before_Idler *e_main_idler_before_add(int (*func) (void *data), void *data, int once);
204 EAPI void e_main_idler_before_del(E_Before_Idler *eb);
207 struct _E_Before_Idler
209 int (*func) (void *data);
211 unsigned char once : 1;
212 unsigned char delete_me : 1;
220 extern EAPI E_Path *path_data;
221 extern EAPI E_Path *path_images;
222 extern EAPI E_Path *path_fonts;
223 extern EAPI E_Path *path_themes;
224 extern EAPI E_Path *path_icons;
225 extern EAPI E_Path *path_modules;
226 extern EAPI E_Path *path_backgrounds;
227 extern EAPI E_Path *path_messages;
228 extern EAPI int restart;
229 extern EAPI int good;
230 extern EAPI int evil;
231 extern EAPI int starting;
232 extern EAPI int stopping;
234 extern EAPI Eina_Bool x_fatal;
236 extern EAPI unsigned long e_alert_composite_win;