Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        Ewl.h ewl_config.c ewl_config.h ewl_scrollpane.c ewl_tree.c 
        ewl_window.c 


Log Message:
Preliminary support for the GL engine, though I do need to ifdef the various
engines still. Also added support for launching specific tests as arguments to
ewl_test, ie. "ewl_test Tree" for the tree test.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Ewl.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- Ewl.h       20 Oct 2003 15:42:57 -0000      1.37
+++ Ewl.h       25 Oct 2003 05:55:46 -0000      1.38
@@ -231,6 +231,7 @@
 #include <Ecore_X.h>
 #include <Edb.h>
 #include <Evas.h>
+#include <Evas_Engine_GL_X11.h>
 #include <Evas_Engine_Software_X11.h>
 #include <Etox.h>
 #include <Ewd.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_config.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_config.c        6 Oct 2003 17:39:54 -0000       1.27
+++ ewl_config.c        25 Oct 2003 05:55:46 -0000      1.28
@@ -191,18 +191,14 @@
  * @return Returns the found render method, default software render.
  * @brief Retrieve the render method of the evas
  */
-int ewl_config_get_render_method()
+char *ewl_config_get_render_method()
 {
-       char           *str = NULL;
-       int             method = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       str = ewl_config_get_str("system", "/evas/render_method");
-       if (str)
-               method = evas_render_method_lookup(str);
-
-       DRETURN_INT(method, DLEVEL_STABLE);
+       DRETURN_INT((ewl_config.evas.render_method ?
+                               strdup(ewl_config.evas.render_method) : NULL),
+                       DLEVEL_STABLE);
 }
 
 /**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_config.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_config.h        16 Oct 2003 20:54:25 -0000      1.21
+++ ewl_config.h        25 Oct 2003 05:55:46 -0000      1.22
@@ -39,7 +39,7 @@
 char           *ewl_config_get_str(char *config, char *k);
 int             ewl_config_get_int(char *config, char *k);
 float           ewl_config_get_float(char *config, char *k);
-int             ewl_config_get_render_method();
+char *          ewl_config_get_render_method();
 void            ewl_config_reread_and_apply(void);
 
 /**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_scrollpane.c    29 Sep 2003 21:46:51 -0000      1.24
+++ ewl_scrollpane.c    25 Oct 2003 05:55:47 -0000      1.25
@@ -62,7 +62,8 @@
         * callback to position it's child.
         */
        s->box = ewl_vbox_new();
-       ewl_object_set_fill_policy(EWL_OBJECT(s->box), EWL_FLAG_FILL_SHRINK);
+       ewl_object_set_fill_policy(EWL_OBJECT(s->box), EWL_FLAG_FILL_SHRINK |
+                       EWL_FLAG_FILL_FILL);
 
        /*
         * Create the scrollbars for the scrollpane.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_tree.c  20 Oct 2003 18:09:43 -0000      1.21
+++ ewl_tree.c  25 Oct 2003 05:55:47 -0000      1.22
@@ -402,6 +402,9 @@
        ewl_container_init(EWL_CONTAINER(node), "node", __ewl_tree_node_add,
                        __ewl_tree_node_resize, __ewl_tree_node_remove);
 
+       ewl_object_set_fill_policy(EWL_OBJECT(node), EWL_FLAG_FILL_HFILL |
+                       EWL_FLAG_FILL_HSHRINK);
+
        ewl_callback_append(EWL_WIDGET(node), EWL_CALLBACK_CONFIGURE,
                        __ewl_tree_node_configure, NULL);
        ewl_callback_append(EWL_WIDGET(node), EWL_CALLBACK_CLICKED,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- ewl_window.c        18 Oct 2003 17:00:37 -0000      1.57
+++ ewl_window.c        25 Oct 2003 05:55:47 -0000      1.58
@@ -216,6 +216,7 @@
        Ewl_Window     *window;
        char           *font_path;
        Ewd_List       *paths;
+       char           *render;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -226,7 +227,7 @@
 
        /*
         * FIXME: This needs to be explored a bit, the size should come down
-        * from a configure event, but neeed to double check.
+        * from a configure event, but need to double check.
         */
        ewl_object_request_size(EWL_OBJECT(w), ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
@@ -240,9 +241,16 @@
        ecore_x_window_prop_protocol_set(window->window,
                        ECORE_X_WM_PROTOCOL_DELETE_REQUEST,1);
 
+       /*
+        * Determine the type of evas to create.
+        */
+       render = ewl_config_get_render_method();
+       if (!render)
+               render = strdup("software_x11");
+
        embed->evas = evas_new();
        evas_output_method_set(embed->evas,
-                       evas_render_method_lookup("software_x11"));
+                       evas_render_method_lookup(render));
        evas_output_size_set(embed->evas, ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
        evas_output_viewport_set(embed->evas, ewl_object_get_current_x(o),
@@ -250,7 +258,23 @@
                        ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
 
-       {
+       if (!strcmp(render, "gl_x11")) {
+               Evas_Engine_Info_GL_X11 *info;
+
+               info = (Evas_Engine_Info_GL_X11 *)
+                       evas_engine_info_get(embed->evas);
+
+               info->info.display = ecore_x_display_get();
+               info->info.visual = DefaultVisual(info->info.display,
+                               DefaultScreen(info->info.display));
+               info->info.colormap = DefaultColormap(info->info.display,
+                               DefaultScreen(info->info.display));
+               info->info.drawable = window->window;
+               info->info.depth = DefaultDepth(info->info.display,
+                               DefaultScreen(info->info.display));
+               evas_engine_info_set(embed->evas, (Evas_Engine_Info *)info);
+       }
+       else {
                Evas_Engine_Info_Software_X11 *info;
 
                info = (Evas_Engine_Info_Software_X11 *)




-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to