Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/engines/evas


Modified Files:
        ewl_engine_evas.c 


Log Message:
- Split the engine function array into three smaller arrays. 
  - One for window functions. 
  - One for canvas functions.
  - One for theme functions.

- This should make it easier to implement engines as you can leave the
  entire array NULL if you don't want to implement the given type of
  functions.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/engines/evas/ewl_engine_evas.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_engine_evas.c   30 Sep 2006 20:53:30 -0000      1.5
+++ ewl_engine_evas.c   12 Oct 2006 21:41:17 -0000      1.6
@@ -20,20 +20,17 @@
 static Evas_Object *ewl_widget_layer_neighbor_find_above(Ewl_Widget *w);
 static Evas_Object *ewl_widget_layer_neighbor_find_below(Ewl_Widget *w);
 
-static Ewl_Engine_Info engine_funcs = {
+static void *canvas_funcs[EWL_ENGINE_CANVAS_MAX] = 
        {
-               ee_init,
-               NULL, NULL,
-               NULL, NULL, NULL, NULL,
-               NULL, NULL, NULL, NULL,
-               NULL, NULL, NULL, NULL,
-               NULL, NULL, NULL, NULL,
-               NULL, NULL, NULL, NULL,
-               NULL, NULL, NULL,
+               NULL,
                ee_canvas_output_set,
                ee_canvas_render,
                ee_canvas_freeze,
-               ee_canvas_thaw,
+               ee_canvas_thaw
+       };
+
+static void *theme_funcs[EWL_ENGINE_THEME_MAX] =
+       {
                NULL, NULL, NULL,
                ee_canvas_smart_new,
                NULL,
@@ -53,8 +50,7 @@
                evas_object_color_set,
                ee_canvas_stack_add,
                ee_canvas_layer_update,
-       }
-};
+       };
 
 Ecore_DList *
 ewl_engine_dependancies(void)
@@ -87,11 +83,18 @@
 static int
 ee_init(Ewl_Engine *engine)
 {
+       Ewl_Engine_Info *info;
+
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("engine", engine, FALSE);
 
+       info = NEW(Ewl_Engine_Info, 1);
+       info->init = ee_init;
+       info->hooks.canvas = canvas_funcs;
+       info->hooks.theme = theme_funcs;
+
        engine->name = strdup("evas");
-       engine->functions = &engine_funcs;
+       engine->functions = info;
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
@@ -109,9 +112,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("embed", embed);
 
-       if (embed->evas) {
+       if (embed->evas)
                evas_render(embed->evas);
-       }
 
        DRETURN(DLEVEL_STABLE);
 }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to