fix up include system so u canhave one struct directly reference another (put


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 18 years ago
parent 1491d5428c
commit e88c2ac1a6
  1. 5
      TODO
  2. 1
      src/bin/Makefile.am
  3. 95
      src/bin/e.h
  4. 8
      src/bin/e_apps.h
  5. 5
      src/bin/e_atoms.h
  6. 2
      src/bin/e_border.c
  7. 39
      src/bin/e_border.h
  8. 4
      src/bin/e_box.h
  9. 3
      src/bin/e_canvas.h
  10. 71
      src/bin/e_config.h
  11. 8
      src/bin/e_container.h
  12. 9
      src/bin/e_desk.h
  13. 8
      src/bin/e_error.h
  14. 7
      src/bin/e_file.h
  15. 3
      src/bin/e_focus.h
  16. 3
      src/bin/e_hints.h
  17. 3
      src/bin/e_icon.h
  18. 4
      src/bin/e_iconify.h
  19. 29
      src/bin/e_includes.h
  20. 3
      src/bin/e_init.h
  21. 3
      src/bin/e_int_menus.h
  22. 8
      src/bin/e_ipc.h
  23. 8
      src/bin/e_main.c
  24. 8
      src/bin/e_manager.h
  25. 25
      src/bin/e_menu.h
  26. 8
      src/bin/e_module.h
  27. 7
      src/bin/e_object.c
  28. 22
      src/bin/e_object.h
  29. 10
      src/bin/e_path.h
  30. 3
      src/bin/e_place.h
  31. 3
      src/bin/e_pointer.h
  32. 3
      src/bin/e_resist.h
  33. 8
      src/bin/e_startup.h
  34. 3
      src/bin/e_user.h
  35. 3
      src/bin/e_utils.h
  36. 7
      src/bin/e_zone.c
  37. 11
      src/bin/e_zone.h
  38. 15
      src/lib/E.h
  39. 1
      src/lib/e_main.c
  40. 8
      src/lib/e_private.h

@ -29,14 +29,13 @@ Current freeze issues are:
ISSUES:
* left mouse menu segv's at times
* pager module doesnt shut down properly (disable and create window - segv)
* pager module doesnt handle window deletes
* pager module causes window resizes to be slower than normal
* virtual desktops need fixign to work with zones properly
* virtual desktops need fixing to work with zones properly
* all modules need to respect zones
* container resize needs to re-evalute zone geometry
* zone geometyr change needs to propagate to modules
* zone geometry change needs to propagate to modules
* need desktop module geometry managing system (central)
* dropshadow is not optimal and has extreme edge bugs
* e_apps polling/updates is broken

@ -10,6 +10,7 @@ bin_PROGRAMS = enlightenment enlightenment_remote enlightenment_eapp
ENLIGHTENMENTHEADERS = \
e.h \
e_includes.h \
e_file.h \
e_user.h \
e_manager.h \

@ -43,41 +43,40 @@
# endif
#endif
#include "e_object.h"
#include "e_file.h"
#include "e_user.h"
#include "e_manager.h"
#include "e_path.h"
#include "e_ipc.h"
#include "e_error.h"
#include "e_container.h"
#include "e_zone.h"
#include "e_desk.h"
#include "e_border.h"
#include "e_pointer.h"
#include "e_config.h"
#include "e_menu.h"
#include "e_icon.h"
#include "e_box.h"
#include "e_init.h"
#include "e_int_menus.h"
#include "e_module.h"
#include "e_apps.h"
#include "e_atoms.h"
#include "e_utils.h"
#include "e_canvas.h"
#include "e_focus.h"
#include "e_place.h"
#include "e_resist.h"
#include "e_startup.h"
#include "e_iconify.h"
#include "e_hints.h"
typedef struct _E_Before_Idler E_Before_Idler;
typedef struct _E_Rect E_Rect;
/* convenience macro to compress code and avoid typos */
#define E_FN_DEL(_fn, _h) if (_h) { _fn(_h); _h = NULL; }
#define E_INTERSECTS(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy)))
#define E_SPANS_COMMON(x1, w1, x2, w2) (!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
#define E_REALLOC(p, s, n) p = realloc(p, sizeof(s) * n)
#define E_NEW(s, n) calloc(n, sizeof(s))
#define E_NEW_BIG(s, n) malloc(n * sizeof(s))
#define E_FREE(p) { if (p) {free(p); p = NULL;} }
#define E_TYPEDEFS 1
#include "e_includes.h"
#undef E_TYPEDEFS
#include "e_includes.h"
EAPI E_Before_Idler *e_main_idler_before_add(int (*func) (void *data), void *data, int once);
EAPI void e_main_idler_before_del(E_Before_Idler *eb);
struct _E_Before_Idler
{
int (*func) (void *data);
void *data;
unsigned char once : 1;
unsigned char delete_me : 1;
};
struct _E_Rect
{
int x, y, w, h;
};
extern EAPI E_Path *path_data;
extern EAPI E_Path *path_images;
extern EAPI E_Path *path_fonts;
@ -86,40 +85,4 @@ extern EAPI E_Path *path_icons;
extern EAPI E_Path *path_init;
extern EAPI int restart;
/* convenience macro to compress code and avoid typos */
#define E_FN_DEL(_fn, _h) \
if (_h) \
{ \
_fn(_h); \
_h = NULL; \
}
#define E_INTERSECTS(x, y, w, h, xx, yy, ww, hh) \
(((x) < ((xx) + (ww))) && \
((y) < ((yy) + (hh))) && \
(((x) + (w)) > (xx)) && \
(((y) + (h)) > (yy)))
#define E_SPANS_COMMON(x1, w1, x2, w2) \
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
#define E_REALLOC(p, s, n) \
p = realloc(p, sizeof(s) * n)
#define E_NEW(s, n) \
calloc(n, sizeof(s))
#define E_NEW_BIG(s, n) \
malloc(n * sizeof(s))
#define E_FREE(p) \
{ if (p) {free(p); p = NULL;} }
typedef struct _E_Rect E_Rect;
struct _E_Rect
{
int x, y, w, h;
};
#endif

@ -1,5 +1,4 @@
#ifndef E_APPS_H
#define E_APPS_H
#ifdef E_TYPEDEFS
typedef enum _E_App_Change
{
@ -14,6 +13,10 @@ typedef enum _E_App_Change
typedef struct _E_App E_App;
#else
#ifndef E_APPS_H
#define E_APPS_H
struct _E_App
{
E_Object e_obj_inherit;
@ -59,3 +62,4 @@ EAPI void e_app_change_callback_del(void (*func) (void *data, E_App *a, E_App_
EAPI E_App *e_app_window_name_class_find(char *name, char *class);
#endif
#endif

@ -1,9 +1,10 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_ATOMS_H
#define E_ATOMS_H
/* atom globals */
EAPI int e_atoms_init(void);
EAPI int e_atoms_shutdown(void);
#endif
#endif

@ -2606,7 +2606,7 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y)
m = e_menu_new();
e_object_data_set(E_OBJECT(m), bd);
bd->border_menu = E_OBJECT(m);
bd->border_menu = m;
e_menu_post_deactivate_callback_set(m, _e_border_cb_border_menu_end, NULL);
mi = e_menu_item_new(m);

@ -1,25 +1,33 @@
#ifndef E_BORDER_H
#define E_BORDER_H
#ifdef E_TYPEDEFS
typedef struct _E_Border E_Border;
enum _E_Direction
typedef enum _E_Direction
{
E_DIRECTION_UP,
E_DIRECTION_DOWN,
E_DIRECTION_LEFT,
E_DIRECTION_RIGHT
};
typedef enum _E_Direction E_Direction;
} E_Direction;
enum _E_Transition
typedef enum _E_Transition
{
E_TRANSITION_LINEAR,
E_TRANSITION_SINUSOIDAL,
E_TRANSITION_ACCELERATE,
E_TRANSITION_DECELERATE
};
typedef enum _E_Transition E_Transition;
} E_Transition;
typedef struct _E_Border E_Border;
typedef struct _E_Event_Border_Resize E_Event_Border_Resize;
typedef struct _E_Event_Border_Move E_Event_Border_Move;
typedef struct _E_Event_Border_Add E_Event_Border_Add;
typedef struct _E_Event_Border_Remove E_Event_Border_Remove;
typedef struct _E_Event_Border_Show E_Event_Border_Show;
typedef struct _E_Event_Border_Hide E_Event_Border_Hide;
typedef struct _E_Event_Border_Desk_Set E_Event_Border_Desk_Set;
#else
#ifndef E_BORDER_H
#define E_BORDER_H
struct _E_Border
{
@ -169,7 +177,7 @@ struct _E_Border
} shade;
Evas_List *stick_desks;
E_Object *border_menu;
E_Menu *border_menu;
struct {
unsigned int visible : 1;
@ -184,14 +192,6 @@ struct _E_Border
} changes;
};
typedef struct _E_Event_Border_Resize E_Event_Border_Resize;
typedef struct _E_Event_Border_Move E_Event_Border_Move;
typedef struct _E_Event_Border_Add E_Event_Border_Add;
typedef struct _E_Event_Border_Remove E_Event_Border_Remove;
typedef struct _E_Event_Border_Show E_Event_Border_Show;
typedef struct _E_Event_Border_Hide E_Event_Border_Hide;
typedef struct _E_Event_Border_Desk_Set E_Event_Border_Desk_Set;
struct _E_Event_Border_Resize
{
E_Border *border;
@ -271,3 +271,4 @@ extern EAPI int E_EVENT_BORDER_REMOVE;
extern EAPI int E_EVENT_BORDER_DESK_SET;
#endif
#endif

@ -1,8 +1,9 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_BOX_H
#define E_BOX_H
EAPI Evas_Object *e_box_add (Evas *evas);
EAPI int e_box_freeze (Evas_Object *obj);
EAPI int e_box_thaw (Evas_Object *obj);
EAPI void e_box_orientation_set (Evas_Object *obj, int horizontal);
@ -23,3 +24,4 @@ EAPI void e_box_align_get (Evas_Object *obj, double *ax, double
EAPI void e_box_align_set (Evas_Object *obj, double ax, double ay);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_CANVAS_H
#define E_CANVAS_H
@ -8,3 +10,4 @@ EAPI void e_canvas_cache_flush(void);
EAPI void e_canvas_cache_reload(void);
#endif
#endif

@ -1,10 +1,40 @@
#ifndef E_CONFIG_H
#define E_CONFIG_H
#ifdef E_TYPEDEFS
#define E_CONFIG_DD_NEW(str, typ) \
eet_data_descriptor_new(str, sizeof(typ), \
(void *(*) (void *))evas_list_next, \
(void *(*) (void *, void *))evas_list_append, \
(void *(*) (void *))evas_list_data, \
(void *(*) (void *))evas_list_free, \
(void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, \
(void *(*) (void *, const char *, void *))evas_hash_add, \
(void (*) (void *))evas_hash_free)
#define E_CONFIG_DD_FREE(eed) if (eed) { eet_data_descriptor_free((eed)); (eed) = NULL; }
#define E_CONFIG_VAL(edd, type, member, dtype) EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype)
#define E_CONFIG_SUB(edd, type, member, eddtype) EET_DATA_DESCRIPTOR_ADD_SUB(edd, type, #member, member, eddtype)
#define E_CONFIG_LIST(edd, type, member, eddtype) EET_DATA_DESCRIPTOR_ADD_LIST(edd, type, #member, member, eddtype)
#define CHAR EET_T_CHAR
#define SHORT EET_T_SHORT
#define INT EET_T_INT
#define LL EET_T_LONG_LONG
#define FLOAT EET_T_FLOAT
#define DOUBLE EET_T_DOUBLE
#define UCHAR EET_T_UCHAR
#define USHORT EET_T_USHORT
#define UINT EET_T_UINT
#define ULL EET_T_ULONG_LONG
#define STR EET_T_STRING
#define E_CONFIG_LIMIT(v, min, max) {if (v > max) v = max; else if (v < min) v = min;}
typedef struct _E_Config E_Config;
typedef struct _E_Config_Module E_Config_Module;
typedef Eet_Data_Descriptor E_Config_DD;
typedef Eet_Data_Descriptor E_Config_DD;
#else
#ifndef E_CONFIG_H
#define E_CONFIG_H
struct _E_Config
{
@ -29,40 +59,6 @@ struct _E_Config_Module
unsigned char enabled;
};
#define E_CONFIG_DD_NEW(str, typ) \
eet_data_descriptor_new(str, sizeof(typ), \
(void *(*) (void *))evas_list_next, \
(void *(*) (void *, void *))evas_list_append, \
(void *(*) (void *))evas_list_data, \
(void *(*) (void *))evas_list_free, \
(void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, \
(void *(*) (void *, const char *, void *))evas_hash_add, \
(void (*) (void *))evas_hash_free)
#define E_CONFIG_DD_FREE(eed) \
if (eed) { eet_data_descriptor_free((eed)); (eed) = NULL; }
#define E_CONFIG_VAL(edd, type, member, dtype) \
EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype)
#define E_CONFIG_SUB(edd, type, member, eddtype) \
EET_DATA_DESCRIPTOR_ADD_SUB(edd, type, #member, member, eddtype)
#define E_CONFIG_LIST(edd, type, member, eddtype) \
EET_DATA_DESCRIPTOR_ADD_LIST(edd, type, #member, member, eddtype)
#define CHAR EET_T_CHAR
#define SHORT EET_T_SHORT
#define INT EET_T_INT
#define LL EET_T_LONG_LONG
#define FLOAT EET_T_FLOAT
#define DOUBLE EET_T_DOUBLE
#define UCHAR EET_T_UCHAR
#define USHORT EET_T_USHORT
#define UINT EET_T_UINT
#define ULL EET_T_ULONG_LONG
#define STR EET_T_STRING
#define E_CONFIG_LIMIT(v, min, max) \
{if (v > max) v = max; else if (v < min) v = min;}
EAPI int e_config_init(void);
EAPI int e_config_shutdown(void);
@ -75,3 +71,4 @@ EAPI void e_config_save_queue(void);
extern EAPI E_Config *e_config;
#endif
#endif

@ -1,5 +1,4 @@
#ifndef E_CONTAINER_H
#define E_CONTAINER_H
#ifdef E_TYPEDEFS
typedef enum _E_Container_Shape_Change
{
@ -17,6 +16,10 @@ typedef struct _E_Container_Shape E_Container_Shape;
typedef struct _E_Container_Shape_Callback E_Container_Shape_Callback;
typedef struct _E_Event_Container_Resize E_Event_Container_Resize;
#else
#ifndef E_CONTAINER_H
#define E_CONTAINER_H
struct _E_Container
{
E_Object e_obj_inherit;
@ -91,3 +94,4 @@ EAPI Evas_List *e_container_shape_rects_get(E_Container_Shape *es);
extern EAPI int E_EVENT_CONTAINER_RESIZE;
#endif
#endif

@ -1,8 +1,11 @@
#ifndef E_DESK_H
#define E_DESK_H
#ifdef E_TYPEDEFS
typedef struct _E_Desk E_Desk;
#else
#ifndef E_DESK_H
#define E_DESK_H
struct _E_Desk
{
E_Object e_obj_inherit;
@ -32,4 +35,4 @@ EAPI void e_desk_col_add(E_Zone *zone);
EAPI void e_desk_col_remove(E_Zone *zone);
#endif
#endif

@ -1,5 +1,4 @@
#ifndef E_ERROR_H
#define E_ERROR_H
#ifdef E_TYPEDEFS
#define print0(x, args...) x ,print1(## args)
#define e_error_message_show(args...) \
@ -18,6 +17,10 @@
e_error_dialog_show_internal(title, __tmpbuf); \
}
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
EAPI void e_error_dialog_show_internal(char *title, char *txt);
@ -25,3 +28,4 @@ EAPI void e_error_gui_set(int on);
EAPI void e_error_message_manager_show(E_Manager *man, char *title, char *txt);
#endif
#endif

@ -1,10 +1,8 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_FILE_H
#define E_FILE_H
#include <sys/time.h>
#include <sys/stat.h>
#include <Evas.h>
EAPI time_t e_file_mod_time(char *file);
EAPI int e_file_exists(char *file);
EAPI int e_file_is_dir(char *file);
@ -20,3 +18,4 @@ EAPI char *e_file_readlink(char *link);
EAPI Evas_List *e_file_ls(char *dir);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_FOCUS_H
#define E_FOCUS_H
@ -6,3 +8,4 @@ EAPI int e_focus_shutdown(void);
EAPI void e_focus_idler_before(void);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_HINTS_H
#define E_HINTS_H
@ -12,3 +14,4 @@ EAPI void e_hints_window_name_get(Ecore_X_Window win);
EAPI void e_hints_window_icon_name_get(Ecore_X_Window win);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_ICON_H
#define E_ICON_H
@ -11,3 +13,4 @@ EAPI int e_icon_fill_inside_get (Evas_Object *obj);
EAPI void e_icon_fill_inside_set (Evas_Object *obj, int fill_inside);
#endif
#endif

@ -1,12 +1,14 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_ICONIFY_H
#define E_ICONIFY_H
EAPI int e_iconify_init(void);
EAPI int e_iconify_shutdown(void);
EAPI Evas_List *e_iconify_clients_list_get(void);
EAPI int e_iconify_border_iconfied(E_Border *bd);
EAPI void e_iconify_border_add(E_Border *bd);
EAPI void e_iconify_border_remove(E_Border *bd);
#endif
#endif

@ -0,0 +1,29 @@
#include "e_object.h"
#include "e_file.h"
#include "e_user.h"
#include "e_manager.h"
#include "e_path.h"
#include "e_ipc.h"
#include "e_error.h"
#include "e_container.h"
#include "e_zone.h"
#include "e_desk.h"
#include "e_border.h"
#include "e_pointer.h"
#include "e_config.h"
#include "e_menu.h"
#include "e_icon.h"
#include "e_box.h"
#include "e_init.h"
#include "e_int_menus.h"
#include "e_module.h"
#include "e_apps.h"
#include "e_atoms.h"
#include "e_utils.h"
#include "e_canvas.h"
#include "e_focus.h"
#include "e_place.h"
#include "e_resist.h"
#include "e_startup.h"
#include "e_iconify.h"
#include "e_hints.h"

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_INIT_H
#define E_INIT_H
@ -11,3 +13,4 @@ EAPI void e_init_status_set(const char *str);
EAPI Ecore_X_Window e_init_window_get(void);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_MENUS_H
#define E_INT_MENUS_H
@ -8,3 +10,4 @@ EAPI E_Menu *e_int_menus_apps_new(char *dir);
EAPI E_Menu *e_int_menus_favorite_apps_new(void);
#endif
#endif

@ -1,5 +1,4 @@
#ifndef E_IPC_H
#define E_IPC_H
#ifdef E_TYPEDEFS
typedef enum _E_Ipc_Domain {
E_IPC_DOMAIN_NONE,
@ -24,7 +23,12 @@ typedef enum _E_Ipc_Op {
E_IPC_OP_LAST
} E_Ipc_Op;
#else
#ifndef E_IPC_H
#define E_IPC_H
EAPI int e_ipc_init(void);
EAPI void e_ipc_shutdown(void);
#endif
#endif

@ -3,14 +3,6 @@
*/
#include "e.h"
struct _E_Before_Idler
{
int (*func) (void *data);
void *data;
unsigned char once : 1;
unsigned char delete_me : 1;
};
/* local subsystem functions */
static void _e_main_shutdown_push(int (*func)(void));
static void _e_main_shutdown(int errorcode);

@ -1,8 +1,11 @@
#ifndef E_MANAGER_H
#define E_MANAGER_H
#ifdef E_TYPEDEFS
typedef struct _E_Manager E_Manager;
#else
#ifndef E_MANAGER_H
#define E_MANAGER_H
struct _E_Manager
{
E_Object e_obj_inherit;
@ -29,3 +32,4 @@ EAPI void e_manager_raise(E_Manager *man);
EAPI void e_manager_lower(E_Manager *man);
#endif
#endif

@ -1,9 +1,20 @@
#ifndef E_MENU_H
#define E_MENU_H
#ifdef E_TYPEDEFS
#define E_MENU_POP_DIRECTION_NONE 0
#define E_MENU_POP_DIRECTION_LEFT 1
#define E_MENU_POP_DIRECTION_RIGHT 2
#define E_MENU_POP_DIRECTION_UP 3
#define E_MENU_POP_DIRECTION_DOWN 4
#define E_MENU_POP_DIRECTION_AUTO 5
#define E_MENU_POP_DIRECTION_LAST 6
typedef struct _E_Menu E_Menu;
typedef struct _E_Menu_Item E_Menu_Item;
#else
#ifndef E_MENU_H
#define E_MENU_H
struct _E_Menu
{
E_Object e_obj_inherit;
@ -96,14 +107,6 @@ struct _E_Menu_Item
unsigned char active : 1;
};
#define E_MENU_POP_DIRECTION_NONE 0
#define E_MENU_POP_DIRECTION_LEFT 1
#define E_MENU_POP_DIRECTION_RIGHT 2
#define E_MENU_POP_DIRECTION_UP 3
#define E_MENU_POP_DIRECTION_DOWN 4
#define E_MENU_POP_DIRECTION_AUTO 5
#define E_MENU_POP_DIRECTION_LAST 6
EAPI int e_menu_init(void);
EAPI int e_menu_shutdown(void);
@ -140,4 +143,6 @@ EAPI void e_menu_item_active_set(E_Menu_Item *mi, int active);
EAPI void e_menu_idler_before(void);
EAPI Ecore_X_Window e_menu_grab_window_get(void);
#endif
#endif

@ -1,11 +1,14 @@
#ifndef E_MODULE_H
#define E_MODULE_H
#ifdef E_TYPEDEFS
#define E_MODULE_API_VERSION 1
typedef struct _E_Module E_Module;
typedef struct _E_Module_Api E_Module_Api;
#else
#ifndef E_MODULE_H
#define E_MODULE_H
struct _E_Module
{
E_Object e_obj_inherit;
@ -59,3 +62,4 @@ EAPI Evas_List *e_module_list(void);
EAPI E_Menu *e_module_menu_new(void);
#endif
#endif

@ -64,6 +64,13 @@ e_object_del_func_set(E_Object *obj, E_Object_Cleanup_Func del_func)
obj->del_func = del_func;
}
void
e_object_type_set(E_Object *obj, int type)
{
E_OBJECT_CHECK(obj);
obj->type = type;
}
void
e_object_free(E_Object *obj)
{

@ -1,6 +1,4 @@
#ifndef E_OBJECT_H
#define E_OBJECT_H
#ifdef E_TYPEDEFS
/* Object safety/debugging checks */
/* */
/* OBJECT_PARANOIA_CHECK is paranoid and checkes pointers and traps segv's */
@ -28,15 +26,18 @@
#define E_OBJECT_DEL_SET(x, del_func) e_object_del_func_set(E_OBJECT(x), E_OBJECT_CLEANUP_FUNC(del_func))
#ifdef OBJECT_PARANOIA_CHECK
# define E_OBJECT_CHECK(x) {if (e_object_error(E_OBJECT(x))) return;}
# define E_OBJECT_CHECK_RETURN(x, ret) {if (e_object_error(E_OBJECT(x))) return ret;}
# define E_OBJECT_CHECK(x) {if (e_object_error(E_OBJECT(x))) return;}
# define E_OBJECT_CHECK_RETURN(x, ret) {if (e_object_error(E_OBJECT(x))) return ret;}
# define E_OBJECT_IF_NOT_TYPE(x, type) if (E_OBJECT(x)->type != (type))
#else
# ifdef OBJECT_CHECK
# define E_OBJECT_CHECK(x) {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return;}
# define E_OBJECT_CHECK_RETURN(x, ret) {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return ret;}
# define E_OBJECT_CHECK(x) {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return;}
# define E_OBJECT_CHECK_RETURN(x, ret) {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return ret;}
# define E_OBJECT_IF_NOT_TYPE(x, type) if (E_OBJECT(x)->type != (type))
# else
# define E_OBJECT_CHECK(x)
# define E_OBJECT_CHECK_RETURN(x, ret)
# define E_OBJECT_IF_NOT_TYPE(x, type)
# endif
#endif
@ -44,9 +45,14 @@ typedef void (*E_Object_Cleanup_Func) (void *obj);
typedef struct _E_Object E_Object;
#else
#ifndef E_OBJECT_H
#define E_OBJECT_H
struct _E_Object
{
int magic;
int type;
int references;
E_Object_Cleanup_Func del_func;
E_Object_Cleanup_Func cleanup_func;
@ -60,6 +66,7 @@ EAPI void *e_object_alloc (int size, E_Object_Cleanup_Func cleanup
EAPI void e_object_del (E_Object *obj);
EAPI int e_object_del_get (E_Object *obj);
EAPI void e_object_del_func_set (E_Object *obj, E_Object_Cleanup_Func del_func);
EAPI void e_object_type_set (E_Object *obj, int type);
EAPI void e_object_free (E_Object *obj);
EAPI int e_object_ref (E_Object *obj);
EAPI int e_object_unref (E_Object *obj);
@ -71,3 +78,4 @@ EAPI void e_object_free_attach_func_set(E_Object *obj, void (*func) (void *obj)
EAPI void e_object_del_attach_func_set (E_Object *obj, void (*func) (void *obj));
#endif
#endif

@ -1,8 +1,11 @@
#ifndef E_PATH_H
#define E_PATH_H
#ifdef E_TYPEDEFS
typedef struct _E_Path E_Path;
#else
#ifndef E_PATH_H
#define E_PATH_H
struct _E_Path
{
E_Object e_obj_inherit;
@ -17,6 +20,7 @@ EAPI void e_path_path_append(E_Path *ep, const char *path);
EAPI void e_path_path_prepend(E_Path *ep, const char *path);
EAPI void e_path_path_remove(E_Path *ep, const char *path);
EAPI char *e_path_find(E_Path *ep, const char *file); /* for conveience this doesnt return a malloc'd string. it's a static buffer, so a new call will replace this buffer, but thsi means there is no need to free the return */
EAPI void e_path_evas_append(E_Path *ep, Evas *evas);
#endif
#endif

@ -1,6 +1,9 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_PLACE_H
#define E_PLACE_H
EAPI int e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w, int h, int *rx, int *ry);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_POINTER_H
#define E_POINTER_H
@ -5,3 +7,4 @@ EAPI void e_pointer_container_set(E_Container *con);
EAPI void e_pointer_ecore_evas_set(Ecore_Evas *ee);
#endif
#endif

@ -1,6 +1,9 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_RESIST_H
#define E_RESIST_H
EAPI int e_resist_container_position(E_Container *con, Evas_List *skiplist, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry);
#endif
#endif

@ -1,5 +1,4 @@
#ifndef E_STARTUP_H
#define E_STARTUP_H
#ifdef E_TYPEDEFS
typedef enum _E_Startup_Mode
{
@ -7,6 +6,11 @@ typedef enum _E_Startup_Mode
E_STARTUP_RESTART
} E_Startup_Mode;
#else
#ifndef E_STARTUP_H
#define E_STARTUP_H
EAPI void e_startup(E_Startup_Mode mode);
#endif
#endif

@ -1,6 +1,9 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_USER_H
#define E_USER_H
EAPI char *e_user_homedir_get(void);
#endif
#endif

@ -1,3 +1,5 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_UTILS_H
#define E_UTILS_H
@ -6,3 +8,4 @@ EAPI void e_util_container_fake_mouse_up_all_later(E_Container *con);
EAPI void e_util_wakeup(void);
#endif
#endif

@ -280,7 +280,7 @@ _e_zone_cb_bg_mouse_move(void *data, Evas *evas, Evas_Object *obj, void *event_i
void
e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count)
{
E_Object **new_desks; /* match the bug in e_zone.h */
E_Desk **new_desks;
E_Desk *desk, *new_desk;
int x, y, xx, yy, moved;
Evas_List *client;
@ -302,7 +302,7 @@ e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count)
desk = (E_Desk *) zone->desks[x + (y * zone->desk_x_count)];
else
desk = e_desk_new(zone, x, y);
new_desks[x + (y * xx)] = (E_Object *) desk;
new_desks[x + (y * xx)] = desk;
}
/* catch windoes that have fallen off the end if we got smaller */
@ -351,8 +351,7 @@ e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count)
}
}
if (zone->desks)
free(zone->desks);
if (zone->desks) free(zone->desks);
zone->desks = new_desks;
zone->desk_x_count = xx;

@ -1,8 +1,11 @@
#ifndef E_ZONE_H
#define E_ZONE_H
#ifdef E_TYPEDEFS
typedef struct _E_Zone E_Zone;
#else
#ifndef E_ZONE_H
#define E_ZONE_H
struct _E_Zone
{
E_Object e_obj_inherit;
@ -17,7 +20,7 @@ struct _E_Zone
int desk_x_count, desk_y_count;
int desk_x_current, desk_y_current;
E_Object **desks; /* FIXME: why can this not be E_Desk? */
E_Desk **desks;
Evas_List *clients;
};
@ -35,4 +38,4 @@ EAPI void e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count);
EAPI void e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count);
#endif
#endif

@ -1,7 +1,6 @@
#ifndef _E_H
#define _E_H
#ifdef EAPI
#undef EAPI
#endif
@ -19,9 +18,6 @@
# endif
#endif
extern EAPI int E_RESPONSE_MODULE_LIST;
extern EAPI int E_RESPONSE_BACKGROUND_GET;
typedef struct _E_Response_Module_List E_Response_Module_List;
typedef struct _E_Response_Background_Get E_Response_Background_Get;
@ -36,23 +32,20 @@ struct _E_Response_Background_Get
char *data;
};
extern EAPI int E_RESPONSE_MODULE_LIST;
extern EAPI int E_RESPONSE_BACKGROUND_GET;
#ifdef __cplusplus
extern "C" {
#endif
/* edje_main.c */
EAPI int e_init (const char *display);
EAPI int e_shutdown (void);
EAPI void e_module_enabled_set (const char *module,
int enable);
EAPI void e_module_loaded_set (const char *module,
int load);
EAPI void e_module_enabled_set (const char *module, int enable);
EAPI void e_module_loaded_set (const char *module, int load);
EAPI void e_module_list (void);
EAPI void e_background_set (const char *bgfile);
EAPI void e_background_get (void);
#ifdef __cplusplus
}

@ -19,7 +19,6 @@
#include "E.h"
#include "e_private.h"
#include <Ecore.h>
#include <Ecore_Ipc.h>

@ -1,11 +1,13 @@
#ifndef _EDJE_PRIVATE_H
#define _EDJE_PRIVATE_H
#ifndef _E_PRIVATE_H
#define _E_PRIVATE_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#define E_TYPEDEFS 1
#include "e_ipc.h"
#undef E_TYPEDEFS
#include "e_ipc.h"
#endif

Loading…
Cancel
Save