Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_evas Modified Files: Tag: SPLIT Ecore_Evas.h ecore_evas.c ecore_evas_fb.c ecore_evas_private.h ecore_evas_x.c Log Message: type check these modules HEAVILY =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/Attic/Ecore_Evas.h,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -3 -r1.1.2.11 -r1.1.2.12 --- Ecore_Evas.h 11 Feb 2003 11:48:42 -0000 1.1.2.11 +++ Ecore_Evas.h 12 Feb 2003 11:27:32 -0000 1.1.2.12 @@ -6,8 +6,6 @@ * - rotation api needs to work * - iconfication api needs to work * - maximization api nees to work - * - add magic checking to all api calls - * - add more fb engine code to maximize to current fb res and limit to it etc. * - attach keyed data to an ecore_evas canvas * - document all calls * =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/Attic/ecore_evas.c,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -3 -r1.1.2.12 -r1.1.2.13 --- ecore_evas.c 11 Feb 2003 11:26:05 -0000 1.1.2.12 +++ ecore_evas.c 12 Feb 2003 11:27:32 -0000 1.1.2.13 @@ -1,6 +1,6 @@ #include "config.h" -#include "ecore_private.h" #include "Ecore.h" +#include "ecore_private.h" #include "ecore_evas_private.h" #include "Ecore_Evas.h" @@ -42,6 +42,7 @@ ecore_evas_free(Ecore_Evas *ee) { if (!ee) return; + ECORE_MAGIC_SET(ee, ECORE_MAGIC_NONE); if (ee->driver) free(ee->driver); if (ee->name) free(ee->name); if (ee->prop.title) free(ee->prop.title); @@ -68,6 +69,12 @@ void ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_resize_set"); + return; + } IFC(ee, fn_callback_resize_set) (ee, func); IFE; ee->func.fn_resize = func; @@ -76,6 +83,12 @@ void ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_move_set"); + return; + } IFC(ee, fn_callback_move_set) (ee, func); IFE; ee->func.fn_move = func; @@ -84,6 +97,12 @@ void ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_show_set"); + return; + } IFC(ee, fn_callback_show_set) (ee, func); IFE; ee->func.fn_show = func; @@ -92,6 +111,12 @@ void ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_hide_set"); + return; + } IFC(ee, fn_callback_hide_set) (ee, func); IFE; ee->func.fn_hide = func; @@ -100,6 +125,12 @@ void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_delete_request_set"); + return; + } IFC(ee, fn_callback_delete_request_set) (ee, func); IFE; ee->func.fn_delete_request = func; @@ -108,6 +139,12 @@ void ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_destroy_set"); + return; + } IFC(ee, fn_callback_destroy_set) (ee, func); IFE; ee->func.fn_destroy = func; @@ -116,6 +153,12 @@ void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_focus_in_set"); + return; + } IFC(ee, fn_callback_focus_in_set) (ee, func); IFE; ee->func.fn_focus_in = func; @@ -124,6 +167,12 @@ void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_focus_out_set"); + return; + } IFC(ee, fn_callback_focus_out_set) (ee, func); IFE; ee->func.fn_focus_out = func; @@ -132,6 +181,12 @@ void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_mouse_in_set"); + return; + } IFC(ee, fn_callback_mouse_in_set) (ee, func); IFE; ee->func.fn_mouse_in = func; @@ -140,6 +195,12 @@ void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_mouse_out_set"); + return; + } IFC(ee, fn_callback_mouse_out_set) (ee, func); IFE; ee->func.fn_mouse_out = func; @@ -148,12 +209,24 @@ Evas * ecore_evas_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_get"); + return NULL; + } return ee->evas; } void ecore_evas_move(Ecore_Evas *ee, int x, int y) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_move"); + return; + } IFC(ee, fn_move) (ee, x, y); IFE; } @@ -161,6 +234,14 @@ void ecore_evas_resize(Ecore_Evas *ee, int w, int h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_resize"); + return; + } + if (w < 1) w = 1; + if (h < 1) h = 1; IFC(ee, fn_resize) (ee, w, h); IFE; } @@ -168,6 +249,14 @@ void ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_move_resize"); + return; + } + if (w < 1) w = 1; + if (h < 1) h = 1; IFC(ee, fn_move_resize) (ee, x, y, w, h); IFE; } @@ -175,6 +264,12 @@ void ecore_evas_geometry_get(Ecore_Evas *ee, int *x, int *y, int *w, int *h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_geometry_get"); + return; + } if (x) *x = ee->x; if (y) *y = ee->y; if (w) *w = ee->w; @@ -184,6 +279,12 @@ void ecore_evas_rotation_set(Ecore_Evas *ee, int rot) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_rotation_set"); + return; + } IFC(ee, fn_rotation_set) (ee, rot); IFE; } @@ -191,12 +292,24 @@ int ecore_evas_rotation_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_rotation_get"); + return 0; + } return ee->rotation; } void ecore_evas_shaped_set(Ecore_Evas *ee, int shaped) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_shaped_set"); + return; + } IFC(ee, fn_shaped_set) (ee, shaped); IFE; } @@ -204,12 +317,24 @@ int ecore_evas_shaped_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_shaped_get"); + return 0; + } return ee->shaped; } void ecore_evas_show(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_show"); + return; + } IFC(ee, fn_show) (ee); IFE; } @@ -217,6 +342,12 @@ void ecore_evas_hide(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_hide"); + return; + } IFC(ee, fn_hide) (ee); IFE; } @@ -224,12 +355,24 @@ int ecore_evas_visibility_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_visibility_get"); + return 0; + } return ee->visible; } void ecore_evas_raise(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_raise"); + return; + } IFC(ee, fn_raise) (ee); IFE; } @@ -237,6 +380,12 @@ void ecore_evas_lower(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_lower"); + return; + } IFC(ee, fn_lower) (ee); IFE; } @@ -244,6 +393,12 @@ void ecore_evas_title_set(Ecore_Evas *ee, const char *t) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_title_set"); + return; + } IFC(ee, fn_title_set) (ee, t); IFE; } @@ -251,12 +406,24 @@ const char * ecore_evas_title_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_title_get"); + return NULL; + } return ee->prop.title; } void ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_name_class_set"); + return; + } IFC(ee, fn_name_class_set) (ee, n, c); IFE; } @@ -264,6 +431,12 @@ void ecore_evas_name_class_get(Ecore_Evas *ee, const char **n, const char **c) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_name_class_get"); + return; + } if (n) *n = ee->prop.name; if (c) *c = ee->prop.clas; } @@ -271,6 +444,14 @@ void ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_min_set"); + return; + } + if (w < 0) w = 0; + if (h < 0) h = 0; IFC(ee, fn_size_min_set) (ee, w, h); IFE; } @@ -278,6 +459,12 @@ void ecore_evas_size_min_get(Ecore_Evas *ee, int *w, int *h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_min_get"); + return; + } if (w) *w = ee->prop.min.w; if (h) *h = ee->prop.min.h; } @@ -285,6 +472,14 @@ void ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_max_set"); + return; + } + if (w < 0) w = 0; + if (h < 0) h = 0; IFC(ee, fn_size_max_set) (ee, w, h); IFE; } @@ -292,6 +487,12 @@ void ecore_evas_size_max_get(Ecore_Evas *ee, int *w, int *h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_max_get"); + return; + } if (w) *w = ee->prop.max.w; if (h) *h = ee->prop.max.h; } @@ -299,6 +500,14 @@ void ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_base_set"); + return; + } + if (w < 0) w = 0; + if (h < 0) h = 0; IFC(ee, fn_size_base_set) (ee, w, h); IFE; } @@ -306,6 +515,12 @@ void ecore_evas_size_base_get(Ecore_Evas *ee, int *w, int *h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_base_get"); + return; + } if (w) *w = ee->prop.base.w; if (h) *h = ee->prop.base.h; } @@ -313,6 +528,14 @@ void ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_step_set"); + return; + } + if (w < 0) w = 0; + if (h < 0) h = 0; IFC(ee, fn_size_step_set) (ee, w, h); IFE; } @@ -320,6 +543,12 @@ void ecore_evas_size_step_get(Ecore_Evas *ee, int *w, int *h) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_size_step_get"); + return; + } if (w) *w = ee->prop.step.w; if (h) *h = ee->prop.step.h; } @@ -327,6 +556,12 @@ void ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_cursor_set"); + return; + } IFC(ee, fn_cursor_set) (ee, file, layer, hot_x, hot_y); IFE; } @@ -334,6 +569,12 @@ void ecore_evas_cursor_get(Ecore_Evas *ee, char **file, int *layer, int *hot_x, int *hot_y) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_cursor_get"); + return; + } if (file) *file = ee->prop.cursor.file; if (layer) *layer = ee->prop.cursor.layer; if (hot_x) *hot_x = ee->prop.cursor.hot.x; @@ -343,6 +584,12 @@ void ecore_evas_layer_set(Ecore_Evas *ee, int layer) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_layer_set"); + return; + } IFC(ee, fn_layer_set) (ee, layer); IFE; } @@ -350,12 +597,24 @@ int ecore_evas_layer_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_layer_get"); + return 0; + } return ee->prop.layer; } void ecore_evas_focus_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_focus_set"); + return; + } IFC(ee, fn_focus_set) (ee, on); IFE; } @@ -363,12 +622,24 @@ int ecore_evas_focus_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_focus_get"); + return 0; + } return ee->prop.focused; } void ecore_evas_iconified_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_iconified_set"); + return; + } IFC(ee, fn_iconified_set) (ee, on); IFE; } @@ -376,12 +647,24 @@ int ecore_evas_iconified_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_iconified_get"); + return 0; + } return ee->prop.iconified; } void ecore_evas_borderless_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_borderless_set"); + return; + } IFC(ee, fn_borderless_set) (ee, on); IFE; } @@ -389,12 +672,24 @@ int ecore_evas_borderless_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_borderless_get"); + return 0; + } return ee->prop.borderless; } void ecore_evas_override_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_override_set"); + return; + } IFC(ee, fn_override_set) (ee, on); IFE; } @@ -402,12 +697,24 @@ int ecore_evas_override_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_override_get"); + return 0; + } return ee->prop.override; } void ecore_evas_maximized_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_maximized_set"); + return; + } IFC(ee, fn_maximized_set) (ee, on); IFE; } @@ -415,12 +722,24 @@ int ecore_evas_maximized_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_maximized_get"); + return 0; + } return ee->prop.maximized;; } void ecore_evas_fullscreen_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_fullscreen_set"); + return; + } IFC(ee, fn_fullscreen_set) (ee, on); IFE; } @@ -428,12 +747,24 @@ int ecore_evas_fullscreen_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_fullscreen_get"); + return 0; + } return ee->prop.fullscreen; } void ecore_evas_avoid_damage_set(Ecore_Evas *ee, int on) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_avoid_damage_set"); + return; + } IFC(ee, fn_avoid_damage_set) (ee, on); IFE; } @@ -441,5 +772,11 @@ int ecore_evas_avoid_damage_get(Ecore_Evas *ee) { + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_avoid_damage_get"); + return 0; + } return ee->prop.avoid_damage; } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/Attic/ecore_evas_fb.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -3 -r1.1.2.3 -r1.1.2.4 --- ecore_evas_fb.c 12 Feb 2003 04:40:32 -0000 1.1.2.3 +++ ecore_evas_fb.c 12 Feb 2003 11:27:32 -0000 1.1.2.4 @@ -1,6 +1,6 @@ #include "config.h" -#include "ecore_private.h" #include "Ecore.h" +#include "ecore_private.h" #include "ecore_evas_private.h" #include "Ecore_Evas.h" #ifdef BUILD_ECORE_FB @@ -118,6 +118,38 @@ return 1; } +static int +_ecore_evas_fb_init(void) +{ + _ecore_evas_init_count++; + if (_ecore_evas_init_count > 1) return _ecore_evas_init_count; + ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL); + ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, +_ecore_evas_event_key_down, NULL); + ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_UP, +_ecore_evas_event_key_up, NULL); + ecore_evas_event_handlers[2] = +ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, +_ecore_evas_event_mouse_button_down, NULL); + ecore_evas_event_handlers[3] = +ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, +_ecore_evas_event_mouse_button_up, NULL); + ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, +_ecore_evas_event_mouse_move, NULL); + return _ecore_evas_init_count; +} + +static int +_ecore_evas_fb_shutdown(void) +{ + _ecore_evas_init_count--; + if (_ecore_evas_init_count == 0) + { + int i; + + while (ecore_evases) ecore_evas_free(ecore_evases); + for (i = 0; i < 5; i++) + ecore_event_handler_del(ecore_evas_event_handlers[i]); + ecore_idle_enterer_del(ecore_evas_idle_enterer); + ecore_evas_idle_enterer = NULL; + } + if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; + return _ecore_evas_init_count; +} + static void _ecore_evas_fb_free(Ecore_Evas *ee) { @@ -269,39 +301,6 @@ _ecore_evas_fullscreen_set, NULL }; - -int -_ecore_evas_fb_init(void) -{ - _ecore_evas_init_count++; - if (_ecore_evas_init_count > 1) return _ecore_evas_init_count; - ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL); - ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, _ecore_evas_event_key_down, NULL); - ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_UP, _ecore_evas_event_key_up, NULL); - ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL); - ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL); - ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL); - return _ecore_evas_init_count; -} - -int -_ecore_evas_fb_shutdown(void) -{ - _ecore_evas_init_count--; - if (_ecore_evas_init_count == 0) - { - int i; - - while (ecore_evases) ecore_evas_free(ecore_evases); - for (i = 0; i < 5; i++) - ecore_event_handler_del(ecore_evas_event_handlers[i]); - ecore_idle_enterer_del(ecore_evas_idle_enterer); - ecore_evas_idle_enterer = NULL; - } - if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; - return _ecore_evas_init_count; -} - #endif Ecore_Evas * @@ -318,6 +317,8 @@ ee = calloc(1, sizeof(Ecore_Evas)); if (!ee) return NULL; + ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); + _ecore_evas_fb_init(); ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_fb_engine_func; @@ -325,6 +326,8 @@ ee->driver = strdup("fb"); if (disp_name) ee->name = strdup(disp_name); + if (w < 1) w = 1; + if (h < 1) h = 1; ee->rotation = rotation; ee->visible = 1; ee->w = w; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/Attic/ecore_evas_private.h,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -3 -r1.1.2.10 -r1.1.2.11 --- ecore_evas_private.h 12 Feb 2003 04:40:32 -0000 1.1.2.10 +++ ecore_evas_private.h 12 Feb 2003 11:27:32 -0000 1.1.2.11 @@ -3,6 +3,8 @@ #include <Evas.h> +#define ECORE_MAGIC_EVAS 0x76543211 + #ifdef BUILD_ECORE_X #include <Evas_Engine_Software_X11.h> #include <X11/Xutil.h> @@ -131,14 +133,5 @@ Ecore_Evas_Engine engine; }; - -#ifdef BUILD_ECORE_X -int _ecore_evas_x_init(void); -int _ecore_evas_x_shutdown(void); -#endif -#ifdef BUILD_ECORE_FB -int _ecore_evas_fb_init(void); -int _ecore_evas_fb_shutdown(void); -#endif #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/Attic/ecore_evas_x.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -3 -r1.1.2.3 -r1.1.2.4 --- ecore_evas_x.c 12 Feb 2003 04:40:32 -0000 1.1.2.3 +++ ecore_evas_x.c 12 Feb 2003 11:27:32 -0000 1.1.2.4 @@ -1,6 +1,6 @@ #include "config.h" -#include "ecore_private.h" #include "Ecore.h" +#include "ecore_private.h" #include "ecore_evas_private.h" #include "Ecore_Evas.h" #ifdef BUILD_ECORE_X @@ -418,6 +418,48 @@ return 1; } +static int +_ecore_evas_x_init(void) +{ + _ecore_evas_init_count++; + if (_ecore_evas_init_count > 1) return _ecore_evas_init_count; + ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL); + ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, +_ecore_evas_event_key_down, NULL); + ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, +_ecore_evas_event_key_up, NULL); + ecore_evas_event_handlers[2] = +ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, +_ecore_evas_event_mouse_button_down, NULL); + ecore_evas_event_handlers[3] = +ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, +_ecore_evas_event_mouse_button_up, NULL); + ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, +_ecore_evas_event_mouse_move, NULL); + ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, +_ecore_evas_event_mouse_in, NULL); + ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, +_ecore_evas_event_mouse_out, NULL); + ecore_evas_event_handlers[7] = +ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, +_ecore_evas_event_window_focus_in, NULL); + ecore_evas_event_handlers[8] = +ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, +_ecore_evas_event_window_focus_out, NULL); + ecore_evas_event_handlers[9] = +ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, _ecore_evas_event_window_damage, +NULL); + ecore_evas_event_handlers[10] = +ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, +_ecore_evas_event_window_destroy, NULL); + ecore_evas_event_handlers[11] = +ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, +_ecore_evas_event_window_configure, NULL); + ecore_evas_event_handlers[12] = +ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, +_ecore_evas_event_window_delete_request, NULL); + ecore_evas_event_handlers[13] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, +_ecore_evas_event_window_show, NULL); + ecore_evas_event_handlers[14] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, +_ecore_evas_event_window_hide, NULL); + return _ecore_evas_init_count; +} + +static int +_ecore_evas_x_shutdown(void) +{ + _ecore_evas_init_count--; + if (_ecore_evas_init_count == 0) + { + int i; + + while (ecore_evases) ecore_evas_free(ecore_evases); + for (i = 0; i < 15; i++) + ecore_event_handler_del(ecore_evas_event_handlers[i]); + ecore_idle_enterer_del(ecore_evas_idle_enterer); + ecore_evas_idle_enterer = NULL; + } + if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; + return _ecore_evas_init_count; +} + static void _ecore_evas_x_free(Ecore_Evas *ee) { @@ -777,48 +819,6 @@ _ecore_evas_avoid_damage_set }; -int -_ecore_evas_x_init(void) -{ - _ecore_evas_init_count++; - if (_ecore_evas_init_count > 1) return _ecore_evas_init_count; - ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL); - ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, _ecore_evas_event_key_down, NULL); - ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, _ecore_evas_event_key_up, NULL); - ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL); - ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL); - ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL); - ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, _ecore_evas_event_mouse_in, NULL); - ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, _ecore_evas_event_mouse_out, NULL); - ecore_evas_event_handlers[7] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, _ecore_evas_event_window_focus_in, NULL); - ecore_evas_event_handlers[8] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, _ecore_evas_event_window_focus_out, NULL); - ecore_evas_event_handlers[9] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, _ecore_evas_event_window_damage, NULL); - ecore_evas_event_handlers[10] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, _ecore_evas_event_window_destroy, NULL); - ecore_evas_event_handlers[11] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, _ecore_evas_event_window_configure, NULL); - ecore_evas_event_handlers[12] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_event_window_delete_request, NULL); - ecore_evas_event_handlers[13] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, _ecore_evas_event_window_show, NULL); - ecore_evas_event_handlers[14] = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, _ecore_evas_event_window_hide, NULL); - return _ecore_evas_init_count; -} - -int -_ecore_evas_x_shutdown(void) -{ - _ecore_evas_init_count--; - if (_ecore_evas_init_count == 0) - { - int i; - - while (ecore_evases) ecore_evas_free(ecore_evases); - for (i = 0; i < 15; i++) - ecore_event_handler_del(ecore_evas_event_handlers[i]); - ecore_idle_enterer_del(ecore_evas_idle_enterer); - ecore_evas_idle_enterer = NULL; - } - if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; - return _ecore_evas_init_count; -} - #endif Ecore_Evas * @@ -836,6 +836,8 @@ ee = calloc(1, sizeof(Ecore_Evas)); if (!ee) return NULL; + ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); + _ecore_evas_x_init(); ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func; @@ -843,6 +845,8 @@ ee->driver = strdup("software_x11"); if (disp_name) ee->name = strdup(disp_name); + if (w < 1) w = 1; + if (h < 1) h = 1; ee->x = x; ee->y = y; ee->w = w; ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs