From 6ec8c0c9f1d38db44b0c38a4a7f264abd325238f Mon Sep 17 00:00:00 2001 From: caro Date: Thu, 7 May 2009 08:35:00 +0000 Subject: [PATCH] API BREAK fix consistentness of ecore_x API. Rename some _del functions to _free ones. See ticket #302 git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@40532 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_evas/ecore_evas_x.c | 46 +++++++++++++++++----------------- src/lib/ecore_x/Ecore_X.h | 8 +++--- src/lib/ecore_x/xcb/ecore_xcb_damage.c | 2 +- src/lib/ecore_x/xcb/ecore_xcb_fixes.c | 2 +- src/lib/ecore_x/xcb/ecore_xcb_gc.c | 2 +- src/lib/ecore_x/xcb/ecore_xcb_pixmap.c | 2 +- src/lib/ecore_x/xlib/ecore_x_damage.c | 2 +- src/lib/ecore_x/xlib/ecore_x_fixes.c | 2 +- src/lib/ecore_x/xlib/ecore_x_gc.c | 2 +- src/lib/ecore_x/xlib/ecore_x_pixmap.c | 2 +- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas_x.c b/src/lib/ecore_evas/ecore_evas_x.c index 65e087b..cfc4d57 100644 --- a/src/lib/ecore_evas/ecore_evas_x.c +++ b/src/lib/ecore_evas/ecore_evas_x.c @@ -328,7 +328,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee) unsigned int foreground; Ecore_X_GC gc; - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1); foreground = 0; gc = ecore_x_gc_new(ee->engine.x.mask, @@ -336,7 +336,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee) &foreground); ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc, 0, 0, ee->w, ee->h); - ecore_x_gc_del(gc); + ecore_x_gc_free(gc); einfo->info.mask = ee->engine.x.mask; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); @@ -354,7 +354,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee) unsigned int foreground; Ecore_X_GC gc; - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1); foreground = 0; ecore_x_gc_new(ee->engine.x.mask, @@ -362,7 +362,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee) &foreground); ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc, 0, 0, ee->w, ee->h); - ecore_x_gc_del(gc); + ecore_x_gc_free(gc); einfo->info.mask = ee->engine.x.mask; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); @@ -382,7 +382,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee) GC gc; XGCValues gcv; - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1); einfo->info.mask = ee->engine.x.mask; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); @@ -1061,9 +1061,9 @@ static void _ecore_evas_x_free(Ecore_Evas *ee) { ecore_x_window_free(ee->prop.window); - if (ee->engine.x.pmap) ecore_x_pixmap_del(ee->engine.x.pmap); - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); - if (ee->engine.x.gc) ecore_x_gc_del(ee->engine.x.gc); + if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); + if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc); #ifdef HAVE_ECORE_X_XCB # warning [XCB] No Region code #else @@ -1389,7 +1389,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped) &foreground); ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc, 0, 0, ee->w, ee->h); - ecore_x_gc_del(gc); + ecore_x_gc_free(gc); einfo->info.mask = ee->engine.x.mask; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); @@ -1397,7 +1397,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped) } else { - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = 0; einfo->info.mask = 0; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); @@ -1429,7 +1429,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped) &foreground); ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc, 0, 0, ee->w, ee->h); - ecore_x_gc_del(gc); + ecore_x_gc_free(gc); einfo->info.mask = ee->engine.x.mask; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); @@ -1437,7 +1437,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped) } else { - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = 0; einfo->info.mask = 0; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); @@ -1469,7 +1469,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped) } else { - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = 0; einfo->info.mask = 0; evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); @@ -1527,7 +1527,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h); else ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h); - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = 0; ecore_x_window_shape_input_mask_set(ee->prop.window, 0); } @@ -1552,7 +1552,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) einfo->info.depth = att.depth; # endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */ -// if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); +// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); // ee->engine.x.mask = 0; einfo->info.mask = ee->engine.x.mask; einfo->info.drawable = ee->prop.window; @@ -1599,7 +1599,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h); else ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h); - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = 0; ecore_x_window_shape_input_mask_set(ee->prop.window, 0); } @@ -1617,7 +1617,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) einfo->info.visual = att.visual; # endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */ -// if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); +// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); // ee->engine.x.mask = 0; einfo->info.mask = ee->engine.x.mask; einfo->info.drawable = ee->prop.window; @@ -1663,7 +1663,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h); else ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h); - if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); + if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); ee->engine.x.mask = 0; ecore_x_window_shape_input_mask_set(ee->prop.window, 0); } @@ -1673,7 +1673,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) # endif /* XXX no alpha window support for software_16_x11 */ # if 0 /* XXX no shaped window support for software_16_x11 */ -// if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask); +// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask); // ee->engine.x.mask = 0; einfo->info.mask = ee->engine.x.mask; # endif /* XXX no shaped window support for software_16_x11 */ @@ -2104,8 +2104,8 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on) } else { - if (ee->engine.x.pmap) ecore_x_pixmap_del(ee->engine.x.pmap); - if (ee->engine.x.gc) ecore_x_gc_del(ee->engine.x.gc); + if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap); + if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc); if (ee->engine.x.using_bg_pixmap) { ecore_x_window_pixmap_set(ee->prop.window, 0); @@ -2149,8 +2149,8 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on) } else { - if (ee->engine.x.pmap) ecore_x_pixmap_del(ee->engine.x.pmap); - if (ee->engine.x.gc) ecore_x_gc_del(ee->engine.x.gc); + if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap); + if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc); if (ee->engine.x.using_bg_pixmap) { ecore_x_window_pixmap_set(ee->prop.window, 0); diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 8b2e857..87fd8c0 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1259,13 +1259,13 @@ EAPI void ecore_x_window_shape_events_select(Ecore_X_Window win, i EAPI void ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask); EAPI Ecore_X_Pixmap ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep); -EAPI void ecore_x_pixmap_del(Ecore_X_Pixmap pmap); +EAPI void ecore_x_pixmap_free(Ecore_X_Pixmap pmap); EAPI void ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc, int sx, int sy, int w, int h, int dx, int dy); EAPI void ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h); EAPI int ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap); EAPI Ecore_X_GC ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list); -EAPI void ecore_x_gc_del(Ecore_X_GC gc); +EAPI void ecore_x_gc_free(Ecore_X_GC gc); EAPI int ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Event_Mask mask, long d0, long d1, long d2, long d3, long d4); EAPI int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len); @@ -1665,7 +1665,7 @@ EAPI Ecore_X_Region ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap); EAPI Ecore_X_Region ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type); EAPI Ecore_X_Region ecore_x_region_new_from_gc(Ecore_X_GC gc); EAPI Ecore_X_Region ecore_x_region_new_from_picture(Ecore_X_Picture picture); -EAPI void ecore_x_region_del(Ecore_X_Region region); +EAPI void ecore_x_region_free(Ecore_X_Region region); EAPI void ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num); EAPI void ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source); EAPI void ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2); @@ -1714,7 +1714,7 @@ typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage; EAPI int ecore_x_damage_query(void); EAPI Ecore_X_Damage ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level); -EAPI void ecore_x_damage_del(Ecore_X_Damage damage); +EAPI void ecore_x_damage_free(Ecore_X_Damage damage); EAPI void ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts); EAPI int ecore_x_screen_is_composited(int screen); diff --git a/src/lib/ecore_x/xcb/ecore_xcb_damage.c b/src/lib/ecore_x/xcb/ecore_xcb_damage.c index d5b0c66..6e104b3 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_damage.c +++ b/src/lib/ecore_x/xcb/ecore_xcb_damage.c @@ -103,7 +103,7 @@ ecore_x_damage_new(Ecore_X_Drawable drawable, * @ingroup Ecore_X_Damage_Group */ EAPI void -ecore_x_damage_del(Ecore_X_Damage damage) +ecore_x_damage_free(Ecore_X_Damage damage) { #ifdef ECORE_XCB_DAMAGE xcb_damage_destroy(_ecore_xcb_conn, damage); diff --git a/src/lib/ecore_x/xcb/ecore_xcb_fixes.c b/src/lib/ecore_x/xcb/ecore_xcb_fixes.c index db3d462..d4014d4 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_fixes.c +++ b/src/lib/ecore_x/xcb/ecore_xcb_fixes.c @@ -197,7 +197,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture) * @ingroup Ecore_X_Fixes_Group */ EAPI void -ecore_x_region_del(Ecore_X_Region region) +ecore_x_region_free(Ecore_X_Region region) { #ifdef ECORE_XCB_FIXES xcb_xfixes_destroy_region(_ecore_xcb_conn, region); diff --git a/src/lib/ecore_x/xcb/ecore_xcb_gc.c b/src/lib/ecore_x/xcb/ecore_xcb_gc.c index 826f3b5..83d019b 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_gc.c +++ b/src/lib/ecore_x/xcb/ecore_xcb_gc.c @@ -42,7 +42,7 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons * storage. */ EAPI void -ecore_x_gc_del(Ecore_X_GC gc) +ecore_x_gc_free(Ecore_X_GC gc) { xcb_free_gc(_ecore_xcb_conn, gc); } diff --git a/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c b/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c index f976f93..11a7675 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c +++ b/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c @@ -52,7 +52,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, * @ingroup Ecore_X_Pixmap_Group */ EAPI void -ecore_x_pixmap_del(Ecore_X_Pixmap pmap) +ecore_x_pixmap_free(Ecore_X_Pixmap pmap) { xcb_free_pixmap(_ecore_xcb_conn, pmap); } diff --git a/src/lib/ecore_x/xlib/ecore_x_damage.c b/src/lib/ecore_x/xlib/ecore_x_damage.c index d8ce1e1..564b48f 100644 --- a/src/lib/ecore_x/xlib/ecore_x_damage.c +++ b/src/lib/ecore_x/xlib/ecore_x_damage.c @@ -51,7 +51,7 @@ ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level) } EAPI void -ecore_x_damage_del(Ecore_X_Damage damage) +ecore_x_damage_free(Ecore_X_Damage damage) { #ifdef ECORE_XDAMAGE XDamageDestroy(_ecore_x_disp, damage); diff --git a/src/lib/ecore_x/xlib/ecore_x_fixes.c b/src/lib/ecore_x/xlib/ecore_x_fixes.c index 4aeeb61..a6c6bc7 100644 --- a/src/lib/ecore_x/xlib/ecore_x_fixes.c +++ b/src/lib/ecore_x/xlib/ecore_x_fixes.c @@ -143,7 +143,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture) } EAPI void -ecore_x_region_del(Ecore_X_Region region) +ecore_x_region_free(Ecore_X_Region region) { #ifdef ECORE_XFIXES XFixesDestroyRegion(_ecore_x_disp, region); diff --git a/src/lib/ecore_x/xlib/ecore_x_gc.c b/src/lib/ecore_x/xlib/ecore_x_gc.c index 84c4201..ef0ff58 100644 --- a/src/lib/ecore_x/xlib/ecore_x_gc.c +++ b/src/lib/ecore_x/xlib/ecore_x_gc.c @@ -137,7 +137,7 @@ ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const un * @param gc The given graphics context. */ EAPI void -ecore_x_gc_del(Ecore_X_GC gc) +ecore_x_gc_free(Ecore_X_GC gc) { XFreeGC(_ecore_x_disp, gc); } diff --git a/src/lib/ecore_x/xlib/ecore_x_pixmap.c b/src/lib/ecore_x/xlib/ecore_x_pixmap.c index 4883a3a..a6802db 100644 --- a/src/lib/ecore_x/xlib/ecore_x_pixmap.c +++ b/src/lib/ecore_x/xlib/ecore_x_pixmap.c @@ -46,7 +46,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep) * @ingroup Ecore_X_Pixmap_Group */ EAPI void -ecore_x_pixmap_del(Ecore_X_Pixmap pmap) +ecore_x_pixmap_free(Ecore_X_Pixmap pmap) { XFreePixmap(_ecore_x_disp, pmap); } -- 2.7.4