Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/engines/evas Modified Files: Ewl_Engine_Evas.h ewl_engine_evas.c Log Message: - change tabs to spaces (Ewl uses an 8 space indent now instead of a tab) =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/engines/evas/Ewl_Engine_Evas.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- Ewl_Engine_Evas.h 6 Feb 2007 20:53:59 -0000 1.4 +++ Ewl_Engine_Evas.h 6 May 2008 20:20:36 -0000 1.5 @@ -1,4 +1,4 @@ -/* vim: set sw=8 ts=8 sts=8 noexpandtab: */ +/* vim: set sw=8 ts=8 sts=8 expandtab: */ #ifndef EWL_ENGINE_EVAS_H #define EWL_ENGINE_EVAS_H @@ -9,7 +9,7 @@ typedef struct Ewl_Engine_Evas Ewl_Engine_Evas; struct Ewl_Engine_Evas { - Ewl_Engine engine; + Ewl_Engine engine; }; #endif =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/engines/evas/ewl_engine_evas.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- ewl_engine_evas.c 28 Apr 2008 13:44:55 -0000 1.21 +++ ewl_engine_evas.c 6 May 2008 20:20:36 -0000 1.22 @@ -1,4 +1,4 @@ -/* vim: set sw=8 ts=8 sts=8 noexpandtab: */ +/* vim: set sw=8 ts=8 sts=8 expandtab: */ #include "Ewl_Engine_Evas.h" #include "ewl_private.h" #include "ewl_debug.h" @@ -14,7 +14,7 @@ static void ee_shutdown(Ewl_Engine *engine); static void ee_canvas_output_set(Ewl_Embed *embed, int x, int y, int width, - int height); + int height); static void ee_canvas_render(Ewl_Embed *embed); static void ee_canvas_freeze(Ewl_Embed *embed); static void ee_canvas_thaw(Ewl_Embed *embed); @@ -28,339 +28,339 @@ static Evas_Object *ewl_widget_layer_neighbor_find_below(Ewl_Widget *w); static void *canvas_funcs[EWL_ENGINE_CANVAS_MAX] = - { - NULL, - ee_canvas_output_set, - ee_canvas_render, - ee_canvas_freeze, - ee_canvas_thaw, - ee_canvas_damage_add - }; + { + NULL, + ee_canvas_output_set, + ee_canvas_render, + ee_canvas_freeze, + ee_canvas_thaw, + ee_canvas_damage_add + }; static void *theme_funcs[EWL_ENGINE_THEME_MAX] = - { - /* FIXME: disable these calls for now. They stop ejde reloading - * the theme object correctly after it was obscured, in some - * cases. If these problems are solved, please activate them - * again. For more information see bug #3, #116 and #456*/ - NULL, //edje_freeze, - NULL, //edje_thaw, - edje_file_data_get, - ee_canvas_smart_new, - NULL, - evas_object_del, - evas_object_move, - evas_object_resize, - evas_object_show, - evas_object_hide, - evas_object_clip_set, - evas_object_clip_unset, - NULL, NULL, - NULL, NULL, - NULL, NULL, NULL, - ee_canvas_clip_add, - evas_object_del, - evas_object_clipees_get, - evas_object_color_set, - ee_canvas_stack_add, - ee_canvas_layer_update, - }; + { + /* FIXME: disable these calls for now. They stop ejde reloading + * the theme object correctly after it was obscured, in some + * cases. If these problems are solved, please activate them + * again. For more information see bug #3, #116 and #456*/ + NULL, //edje_freeze, + NULL, //edje_thaw, + edje_file_data_get, + ee_canvas_smart_new, + NULL, + evas_object_del, + evas_object_move, + evas_object_resize, + evas_object_show, + evas_object_hide, + evas_object_clip_set, + evas_object_clip_unset, + NULL, NULL, + NULL, NULL, + NULL, NULL, NULL, + ee_canvas_clip_add, + evas_object_del, + evas_object_clipees_get, + evas_object_color_set, + ee_canvas_stack_add, + ee_canvas_layer_update, + }; Ecore_DList * ewl_engine_dependancies(void) { - DENTER_FUNCTION(DLEVEL_STABLE); + DENTER_FUNCTION(DLEVEL_STABLE); - DRETURN_PTR(NULL, DLEVEL_STABLE); + DRETURN_PTR(NULL, DLEVEL_STABLE); } Ewl_Engine * ewl_engine_create(int *argc __UNUSED__, char ** argv __UNUSED__) { - Ewl_Engine_Evas *engine; + Ewl_Engine_Evas *engine; - DENTER_FUNCTION(DLEVEL_STABLE); + DENTER_FUNCTION(DLEVEL_STABLE); - engine = NEW(Ewl_Engine_Evas, 1); - if (!engine) - DRETURN_PTR(NULL, DLEVEL_STABLE); + engine = NEW(Ewl_Engine_Evas, 1); + if (!engine) + DRETURN_PTR(NULL, DLEVEL_STABLE); - if (!ee_init(EWL_ENGINE(engine))) - { - FREE(engine); - DRETURN_PTR(NULL, DLEVEL_STABLE); - } + if (!ee_init(EWL_ENGINE(engine))) + { + FREE(engine); + DRETURN_PTR(NULL, DLEVEL_STABLE); + } - DRETURN_PTR(EWL_ENGINE(engine), DLEVEL_STABLE); + DRETURN_PTR(EWL_ENGINE(engine), DLEVEL_STABLE); } static int ee_init(Ewl_Engine *engine) { - Ewl_Engine_Info *info; + Ewl_Engine_Info *info; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(engine, FALSE); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(engine, FALSE); - info = NEW(Ewl_Engine_Info, 1); - info->shutdown = ee_shutdown; - info->hooks.canvas = canvas_funcs; - info->hooks.theme = theme_funcs; + info = NEW(Ewl_Engine_Info, 1); + info->shutdown = ee_shutdown; + info->hooks.canvas = canvas_funcs; + info->hooks.theme = theme_funcs; - engine->functions = info; + engine->functions = info; - DRETURN_INT(TRUE, DLEVEL_STABLE); + DRETURN_INT(TRUE, DLEVEL_STABLE); } static void ee_shutdown(Ewl_Engine *engine) { - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(engine); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(engine); - IF_FREE(engine->functions); + IF_FREE(engine->functions); - DLEAVE_FUNCTION(DLEVEL_STABLE); + DLEAVE_FUNCTION(DLEVEL_STABLE); } void ee_canvas_output_set(Ewl_Embed *embed, int x, int y, int width, int height) { - evas_output_size_set(embed->canvas, width, height); - evas_output_viewport_set(embed->canvas, x, y, width, height); + evas_output_size_set(embed->canvas, width, height); + evas_output_viewport_set(embed->canvas, x, y, width, height); } static void ee_canvas_render(Ewl_Embed *embed) { - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(embed); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(embed); - if (embed->canvas) - evas_render(embed->canvas); + if (embed->canvas) + evas_render(embed->canvas); - DRETURN(DLEVEL_STABLE); + DRETURN(DLEVEL_STABLE); } static void ee_canvas_freeze(Ewl_Embed *embed) { - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(embed); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(embed); - if (embed->canvas && evas_event_freeze_get(embed->canvas) < 1) { - evas_event_freeze(embed->canvas); - } + if (embed->canvas && evas_event_freeze_get(embed->canvas) < 1) { + evas_event_freeze(embed->canvas); + } - DRETURN(DLEVEL_STABLE); + DRETURN(DLEVEL_STABLE); } static void ee_canvas_thaw(Ewl_Embed *embed) { - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(embed); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(embed); - if (embed->canvas && evas_event_freeze_get(embed->canvas) > 0) - evas_event_thaw(embed->canvas); + if (embed->canvas && evas_event_freeze_get(embed->canvas) > 0) + evas_event_thaw(embed->canvas); - DRETURN(DLEVEL_STABLE); + DRETURN(DLEVEL_STABLE); } static void ee_canvas_damage_add(Ewl_Embed *embed, int x, int y, int w, int h) { - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(embed); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(embed); - if (embed->canvas) - evas_damage_rectangle_add(embed->canvas, x, y, w, h); + if (embed->canvas) + evas_damage_rectangle_add(embed->canvas, x, y, w, h); - DLEAVE_FUNCTION(DLEVEL_STABLE); + DLEAVE_FUNCTION(DLEVEL_STABLE); } static void * ee_canvas_smart_new(Ewl_Embed *embed) { - Evas_Object *smart_object; + Evas_Object *smart_object; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(embed, NULL); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(embed, NULL); - if (!widget_smart) { - widget_smart = evas_smart_new("Ewl Widget Smart Object", - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL); - } + if (!widget_smart) { + widget_smart = evas_smart_new("Ewl Widget Smart Object", + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL); + } - smart_object = evas_object_smart_add(embed->canvas, widget_smart); - DRETURN_PTR(smart_object, DLEVEL_STABLE); + smart_object = evas_object_smart_add(embed->canvas, widget_smart); + DRETURN_PTR(smart_object, DLEVEL_STABLE); } static void * ee_canvas_clip_add(Ewl_Embed *embed) { - Evas_Object *obj; + Evas_Object *obj; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(embed, NULL); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(embed, NULL); - obj = evas_object_rectangle_add(embed->canvas); - if (obj) - evas_object_pass_events_set(obj, TRUE); + obj = evas_object_rectangle_add(embed->canvas); + if (obj) + evas_object_pass_events_set(obj, TRUE); - DRETURN_PTR(obj, DLEVEL_STABLE); + DRETURN_PTR(obj, DLEVEL_STABLE); } static void ee_canvas_stack_add(Ewl_Widget *w) { - Evas_Object *smart_parent; + Evas_Object *smart_parent; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(w); - DCHECK_TYPE(w, EWL_WIDGET_TYPE); + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(w); + DCHECK_TYPE(w, EWL_WIDGET_TYPE); - if (w->parent && !REVEALED(w->parent)) - DRETURN(DLEVEL_STABLE); + if (w->parent && !REVEALED(w->parent)) + DRETURN(DLEVEL_STABLE); - if (w->parent && !w->toplayered) - smart_parent = w->parent->smart_object; - else { - Ewl_Embed *emb; + if (w->parent && !w->toplayered) + smart_parent = w->parent->smart_object; + else { + Ewl_Embed *emb; - emb = ewl_embed_widget_find(w); - smart_parent = emb->smart; - } + emb = ewl_embed_widget_find(w); + smart_parent = emb->smart; + } - evas_object_smart_member_add(w->smart_object, smart_parent); + evas_object_smart_member_add(w->smart_object, smart_parent); - if (w->theme_object) - evas_object_smart_member_add(w->theme_object, w->smart_object); + if (w->theme_object) + evas_object_smart_member_add(w->theme_object, w->smart_object); - if (w->fx_clip_box) - evas_object_smart_member_add(w->fx_clip_box, w->smart_object); + if (w->fx_clip_box) + evas_object_smart_member_add(w->fx_clip_box, w->smart_object); - if (w->theme_object && w->fx_clip_box) - evas_object_stack_below(w->theme_object, w->fx_clip_box); + if (w->theme_object && w->fx_clip_box) + evas_object_stack_below(w->theme_object, w->fx_clip_box); - DLEAVE_FUNCTION(DLEVEL_STABLE); + DLEAVE_FUNCTION(DLEVEL_STABLE); } static void ee_canvas_layer_update(Ewl_Widget *w) { - Ewl_Widget *p; - int layer; + Ewl_Widget *p; + int layer; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR(w); - DCHECK_TYPE(w, EWL_WIDGET_TYPE); - - if (!(p = w->parent)) - DRETURN(DLEVEL_STABLE); - - /* check first if the widget should be on the top */ - if (w->toplayered) - { - evas_object_raise(w->smart_object); - DRETURN(DLEVEL_STABLE); - } - - layer = ewl_widget_layer_priority_get(w); - if (layer == 0) - evas_object_stack_above(w->smart_object, p->fx_clip_box); - else if (layer > 0) { - Evas_Object *above; - - if (!(above = ewl_widget_layer_neighbor_find_above(w))) - DWARNING("No object above."); - - evas_object_stack_above(w->smart_object, above); - } - else { - Evas_Object *below; + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(w); + DCHECK_TYPE(w, EWL_WIDGET_TYPE); + + if (!(p = w->parent)) + DRETURN(DLEVEL_STABLE); + + /* check first if the widget should be on the top */ + if (w->toplayered) + { + evas_object_raise(w->smart_object); + DRETURN(DLEVEL_STABLE); + } + + layer = ewl_widget_layer_priority_get(w); + if (layer == 0) + evas_object_stack_above(w->smart_object, p->fx_clip_box); + else if (layer > 0) { + Evas_Object *above; + + if (!(above = ewl_widget_layer_neighbor_find_above(w))) + DWARNING("No object above."); + + evas_object_stack_above(w->smart_object, above); + } + else { + Evas_Object *below; - if (!(below = ewl_widget_layer_neighbor_find_below(w))) - DWARNING("No object below."); + if (!(below = ewl_widget_layer_neighbor_find_below(w))) + DWARNING("No object below."); - evas_object_stack_below(w->smart_object, below); - } + evas_object_stack_below(w->smart_object, below); + } - DLEAVE_FUNCTION(DLEVEL_STABLE); + DLEAVE_FUNCTION(DLEVEL_STABLE); } static Evas_Object * ewl_widget_layer_neighbor_find_above(Ewl_Widget *w) { - Evas_Object *o, *ol; + Evas_Object *o, *ol; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(w, NULL); - DCHECK_TYPE_RET(w, EWL_WIDGET_TYPE, NULL); - - if (!w->parent) - DRETURN_PTR(NULL, DLEVEL_STABLE); - - o = ol = w->parent->fx_clip_box; - - while ((o = evas_object_above_get(o))) - { - Ewl_Widget *found; - - found = evas_object_data_get(o, "EWL"); - /* - * Perhaps it is a cached object so no reason to stop iterating - */ - if (found) { - /* ignore the widget itself */ - if (w == found) - continue; - if (ewl_widget_layer_priority_get(w) <= - ewl_widget_layer_priority_get(found)) - break; - ol = o; - } - } + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(w, NULL); + DCHECK_TYPE_RET(w, EWL_WIDGET_TYPE, NULL); + + if (!w->parent) + DRETURN_PTR(NULL, DLEVEL_STABLE); + + o = ol = w->parent->fx_clip_box; + + while ((o = evas_object_above_get(o))) + { + Ewl_Widget *found; + + found = evas_object_data_get(o, "EWL"); + /* + * Perhaps it is a cached object so no reason to stop iterating + */ + if (found) { + /* ignore the widget itself */ + if (w == found) + continue; + if (ewl_widget_layer_priority_get(w) <= + ewl_widget_layer_priority_get(found)) + break; + ol = o; + } + } - DRETURN_PTR(ol, DLEVEL_STABLE); + DRETURN_PTR(ol, DLEVEL_STABLE); } static Evas_Object * ewl_widget_layer_neighbor_find_below(Ewl_Widget *w) { - Evas_Object *o, *ol; + Evas_Object *o, *ol; - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET(w, NULL); - DCHECK_TYPE_RET(w, EWL_WIDGET_TYPE, NULL); - - if (!w->parent) - DRETURN_PTR(NULL, DLEVEL_STABLE); - - o = ol = w->parent->fx_clip_box; - - while ((o = evas_object_below_get(o))) - { - Ewl_Widget *found; - - found = evas_object_data_get(o, "EWL"); - /* - * Perhaps it is a cached object so no reason to stop iterating - */ - if (found) { - /* ignore the widget itself */ - if (w == found) - continue; - if (ewl_widget_layer_priority_get(w) >= - ewl_widget_layer_priority_get(found)) - break; - ol = o; - } - } + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET(w, NULL); + DCHECK_TYPE_RET(w, EWL_WIDGET_TYPE, NULL); + + if (!w->parent) + DRETURN_PTR(NULL, DLEVEL_STABLE); + + o = ol = w->parent->fx_clip_box; + + while ((o = evas_object_below_get(o))) + { + Ewl_Widget *found; + + found = evas_object_data_get(o, "EWL"); + /* + * Perhaps it is a cached object so no reason to stop iterating + */ + if (found) { + /* ignore the widget itself */ + if (w == found) + continue; + if (ewl_widget_layer_priority_get(w) >= + ewl_widget_layer_priority_get(found)) + break; + ol = o; + } + } - DRETURN_PTR(ol, DLEVEL_STABLE); + DRETURN_PTR(ol, DLEVEL_STABLE); } ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs