Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        Ewl.h Makefile.am ewl_entry.c ewl_events.c ewl_image.c 
        ewl_misc.c ewl_notebook.c ewl_row.c ewl_row.h ewl_seeker.c 
        ewl_selectionbar.c ewl_separator.c ewl_spinner.c ewl_tree.c 
        ewl_tree.h ewl_window.c ewl_window.h 
Removed Files:
        ewl_fx.c ewl_fx.h ewl_list.c ewl_list.h 


Log Message:
Port to Ecore2 (which is found in SPLIT for now), thanks to rephorm for doing
99% of the work. Also cleaned out a few FIXME's and incremented the version
number.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Ewl.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- Ewl.h       3 Jun 2003 04:00:37 -0000       1.30
+++ Ewl.h       28 Jun 2003 06:50:32 -0000      1.31
@@ -7,6 +7,7 @@
 
 #include <Ebits.h>
 #include <Ecore.h>
+#include <Ecore_X.h>
 #include <Edb.h>
 #include <Evas.h>
 #include <Evas_Engine_Software_X11.h>
@@ -61,7 +62,6 @@
 #include <ewl_scrollbar.h>
 #include <ewl_spacer.h>
 #include <ewl_spinner.h>
-#include <ewl_list.h>
 #include <ewl_image.h>
 #include <ewl_spectrum.h>
 #include <ewl_menu_base.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Makefile.am,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- Makefile.am 23 May 2003 22:10:15 -0000      1.33
+++ Makefile.am 28 Jun 2003 06:50:32 -0000      1.34
@@ -28,7 +28,6 @@
        ewl_image.h \
        ewl_imenu.h \
        ewl_menu.h \
-       ewl_list.h \
        ewl_macros.h \
        ewl_menu_base.h \
        ewl_misc.h \
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- ewl_entry.c 25 Jun 2003 00:21:17 -0000      1.61
+++ ewl_entry.c 28 Jun 2003 06:50:32 -0000      1.62
@@ -270,27 +270,27 @@
  */
 void __ewl_entry_key_down(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ecore_Event_Key_Down *ev;
+       Ecore_X_Event_Key_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        ev = ev_data;
 
-       if (!strcmp(ev->key, "Left"))
+       if (!strcmp(ev->keyname, "Left"))
                __ewl_entry_move_cursor_to_left(w);
-       else if (!strcmp(ev->key, "Right"))
+       else if (!strcmp(ev->keyname, "Right"))
                __ewl_entry_move_cursor_to_right(w);
-       else if (!strcmp(ev->key, "Home"))
+       else if (!strcmp(ev->keyname, "Home"))
                __ewl_entry_move_cursor_to_home(w);
-       else if (!strcmp(ev->key, "End"))
+       else if (!strcmp(ev->keyname, "End"))
                __ewl_entry_move_cursor_to_end(w);
-       else if (!strcmp(ev->key, "BackSpace"))
+       else if (!strcmp(ev->keyname, "BackSpace"))
                __ewl_entry_delete_to_left(w);
-       else if (!strcmp(ev->key, "Delete"))
+       else if (!strcmp(ev->keyname, "Delete"))
                __ewl_entry_delete_to_right(w);
-       else if (ev->compose)
-               __ewl_entry_insert_text(w, ev->compose);
+       else if (ev->key_compose)
+               __ewl_entry_insert_text(w, ev->key_compose);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -300,7 +300,7 @@
  */
 void __ewl_entry_mouse_down(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ecore_Event_Mouse_Down *ev;
+       Ecore_X_Event_Mouse_Button_Down *ev;
        Ewl_Entry      *e;
        int             index = 0, len = 0;
 
@@ -337,7 +337,7 @@
 void __ewl_entry_mouse_move(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        int             index = 0;
-       Ecore_Event_Mouse_Move *ev;
+       Ecore_X_Event_Mouse_Move *ev;
        Ewl_Entry      *e;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -352,10 +352,6 @@
        if (!(w->state & EWL_STATE_PRESSED))
                DRETURN(DLEVEL_STABLE);
 
-       /*
-        * FIXME: the correct behavior here is to scroll to the left
-        * or right when selecting text.
-        */
        if (ev->x < CURRENT_X(e->text))
                index = 0;
        else if (ev->x > CURRENT_X(e->text) + CURRENT_W(e->text))
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_events.c        18 Apr 2003 20:35:40 -0000      1.31
+++ ewl_events.c        28 Jun 2003 06:50:32 -0000      1.32
@@ -7,16 +7,16 @@
 Ewl_Widget     *last_focused = NULL;
 Ewl_Widget     *dnd_widget = NULL;
 
-static void     ewl_ev_window_expose(Ecore_Event * _ev);
-static void     ewl_ev_window_configure(Ecore_Event * _ev);
-static void     ewl_ev_window_delete(Ecore_Event * _ev);
-
-static void     ewl_ev_key_down(Ecore_Event * _ev);
-static void     ewl_ev_key_up(Ecore_Event * _ev);
-static void     ewl_ev_mouse_down(Ecore_Event * _ev);
-static void     ewl_ev_mouse_up(Ecore_Event * _ev);
-static void     ewl_ev_mouse_move(Ecore_Event * _ev);
-static void     ewl_ev_mouse_out(Ecore_Event * _ev);
+static void     ewl_ev_window_expose(void *data, int type, void *_ev);
+static void     ewl_ev_window_configure(void *data, int type, void *_ev);
+static void     ewl_ev_window_delete(void *data, int type, void *_ev);
+
+static void     ewl_ev_key_down(void *data, int type, void *_ev);
+static void     ewl_ev_key_up(void *data, int type, void *_ev);
+static void     ewl_ev_mouse_down(void *data, int type, void *_ev);
+static void     ewl_ev_mouse_up(void *data, int type, void *_ev);
+static void     ewl_ev_mouse_move(void *data, int type, void *_ev);
+static void     ewl_ev_mouse_out(void *data, int type, void *_ev);
 
 
 /**
@@ -31,28 +31,30 @@
        /*
         * Register dispatching functions for window events.
         */
-       ecore_event_filter_handler_add(ECORE_EVENT_WINDOW_EXPOSE,
-                                      ewl_ev_window_expose);
-       ecore_event_filter_handler_add(ECORE_EVENT_WINDOW_CONFIGURE,
-                                      ewl_ev_window_configure);
-       ecore_event_filter_handler_add(ECORE_EVENT_WINDOW_DELETE,
-                                      ewl_ev_window_delete);
+       ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE,
+                               ewl_ev_window_expose, NULL);
+       ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE,
+                               ewl_ev_window_configure, NULL);
+       ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY,
+                               ewl_ev_window_delete, NULL);
 
        /*
         * Register dispatching functions for keyboard events.
         */
-       ecore_event_filter_handler_add(ECORE_EVENT_KEY_DOWN, ewl_ev_key_down);
-       ecore_event_filter_handler_add(ECORE_EVENT_KEY_UP, ewl_ev_key_up);
+       ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, ewl_ev_key_down, NULL);
+       ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, ewl_ev_key_up, NULL);
 
        /*
         * Finally, register dispatching functions for mouse events.
         */
-       ecore_event_filter_handler_add(ECORE_EVENT_MOUSE_DOWN,
-                                      ewl_ev_mouse_down);
-       ecore_event_filter_handler_add(ECORE_EVENT_MOUSE_UP, ewl_ev_mouse_up);
-       ecore_event_filter_handler_add(ECORE_EVENT_MOUSE_MOVE,
-                                      ewl_ev_mouse_move);
-       ecore_event_filter_handler_add(ECORE_EVENT_MOUSE_OUT, ewl_ev_mouse_out);
+       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN,
+                               ewl_ev_mouse_down, NULL);
+       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, ewl_ev_mouse_up,
+                               NULL);
+       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE,
+                               ewl_ev_mouse_move, NULL);
+       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, ewl_ev_mouse_out,
+                               NULL);
 
        DRETURN_INT(1, DLEVEL_STABLE);
 }
@@ -64,18 +66,18 @@
  * Returns no value. Dispatches the expose event to the appropriate window for
  * handling.
  */
-static void ewl_ev_window_expose(Ecore_Event * _ev)
+static void ewl_ev_window_expose(void *data, int type, void * _ev)
 {
        /*
         * Widgets don't need to know about this usually, but we still need to
         * let them know in case a widget is using a non-evas based draw method
         */
-       Ecore_Event_Window_Expose *ev;
+       Ecore_X_Event_Window_Damage *ev;
        Ewl_Window     *window;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window_by_evas_window(ev->win);
        if (!window)
@@ -94,22 +96,25 @@
  * Returns no value. Dispatches a configure even to the appropriate ewl
  * window.
  */
-static void ewl_ev_window_configure(Ecore_Event * _ev)
+static void ewl_ev_window_configure(void *data, int type, void *_ev)
 {
        /*
         * When a configure event occurs, we must update the windows geometry
         * based on the coordinates and dimensions given in the Ecore_Event.
         */
-       Ecore_Event_Window_Configure *ev;
+       Ecore_X_Event_Window_Configure *ev;
        Ewl_Window     *window;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window(ev->win);
        if (!window)
                DRETURN(DLEVEL_STABLE);
 
+       window->x = ev->x;
+       window->y = ev->y;
+
        /*
         * Configure events really only need to occur on resize.
         */
@@ -128,18 +133,18 @@
  * Returns no value. Dispatches the delete event to the appropriate ewl
  * window.
  */
-static void ewl_ev_window_delete(Ecore_Event * _ev)
+static void ewl_ev_window_delete(void *data, int type, void *_ev)
 {
        /*
         * Retrieve the appropriate ewl_window using the x window id that is
         * held in the eevent, and call it's handlers for a window delete event.
         */
-       Ecore_Event_Window_Delete *ev;
+       Ecore_X_Event_Window_Destroy *ev;
        Ewl_Window     *window;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window(ev->win);
 
@@ -158,18 +163,18 @@
  * Returns no value. Dispatches the key down event to the appropriate ewl
  * window.
  */
-static void ewl_ev_key_down(Ecore_Event * _ev)
+static void ewl_ev_key_down(void *data, int type, void *_ev)
 {
        /*
         * Dispatcher of key down events, these get sent to the last widget
         * selected.
         */
        Ewl_Window     *window;
-       Ecore_Event_Key_Down *ev;
+       Ecore_X_Event_Key_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window_by_evas_window(ev->win);
 
@@ -200,17 +205,17 @@
  * Returns no value. Dispatches the key up event to the appropriate ewl
  * window.
  */
-static void ewl_ev_key_up(Ecore_Event * _ev)
+static void ewl_ev_key_up(void *data, int type, void *_ev)
 {
        /*
         * Dispatch key up events to the appropriate widget
         */
        Ewl_Window     *window;
-       Ecore_Event_Key_Up *ev;
+       Ecore_X_Event_Key_Up *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window_by_evas_window(ev->win);
        if (!window)
@@ -235,15 +240,15 @@
  * Returns no value. Dispatches the mouse down event to the appropriate ewl
  * window. Also determines the widgets clicked state.
  */
-static void ewl_ev_mouse_down(Ecore_Event * _ev)
+static void ewl_ev_mouse_down(void *data, int type, void *_ev)
 {
        Ewl_Widget     *widget = NULL;
        Ewl_Window     *window;
-       Ecore_Event_Mouse_Down *ev;
+       Ecore_X_Event_Mouse_Button_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window_by_evas_window(ev->win);
        if (!window)
@@ -294,14 +299,14 @@
  * Returns no value. Dispatches the mouse up event to the appropriate ewl
  * window. Also determines the widgets clicked state.
  */
-static void ewl_ev_mouse_up(Ecore_Event * _ev)
+static void ewl_ev_mouse_up(void *data, int type, void *_ev)
 {
        Ewl_Window     *window;
-       Ecore_Event_Mouse_Up *ev;
+       Ecore_X_Event_Mouse_Button_Up *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window_by_evas_window(ev->win);
        if (!window)
@@ -324,15 +329,15 @@
  * Returns no value. Dispatches the mouse move event to the appropriate ewl
  * window.
  */
-static void ewl_ev_mouse_move(Ecore_Event * _ev)
+static void ewl_ev_mouse_move(void *data, int type, void *_ev)
 {
        Ewl_Widget     *widget;
        Ewl_Window     *window;
-       Ecore_Event_Mouse_Move *ev;
+       Ecore_X_Event_Mouse_Move *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ev = _ev->event;
+       ev = _ev;
 
        window = ewl_window_find_window_by_evas_window(ev->win);
        if (!window)
@@ -374,7 +379,7 @@
  * Returns no value. Dispatches the mouse out event to the appropriate ewl
  * window.
  */
-static void ewl_ev_mouse_out(Ecore_Event * _ev)
+static void ewl_ev_mouse_out(void *data, int type, void *_ev)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_image.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_image.c 3 Jun 2003 04:00:43 -0000       1.24
+++ ewl_image.c 28 Jun 2003 06:50:32 -0000      1.25
@@ -370,7 +370,7 @@
 {
        Ewl_Image      *i;
        Ewl_Window     *win;
-       Ecore_Event_Mouse_Down *ev;
+       Ecore_X_Event_Mouse_Button_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -389,7 +389,7 @@
 {
        Ewl_Image      *i;
        Ewl_Window     *win;
-       Ecore_Event_Mouse_Up *ev;
+       Ecore_X_Event_Mouse_Button_Up *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -408,7 +408,7 @@
 {
        Ewl_Image      *i;
        Ewl_Window     *win;
-       Ecore_Event_Mouse_Move *ev;
+       Ecore_X_Event_Mouse_Move *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ewl_misc.c  4 Jun 2003 01:46:44 -0000       1.30
+++ ewl_misc.c  28 Jun 2003 06:50:32 -0000      1.31
@@ -1,7 +1,7 @@
 
 #include <Ewl.h>
 
-void            ewl_idle_render(void *data);
+int             ewl_idle_render(void *data);
 
 char           *xdisplay = NULL;
 extern Ewd_List *ewl_window_list;
@@ -9,7 +9,7 @@
 
 void            __ewl_init_parse_options(int argc, char **argv);
 void            __ewl_parse_option_array(int argc, char **argv);
-static void     ewl_reread_config(int val, void *data);
+static int      ewl_reread_config(void *data);
 
 /**
  * ewl_print_warning - this is used by debugging macros for breakpoints
@@ -41,15 +41,12 @@
        configure_list = ewd_list_new();
        __ewl_init_parse_options(argc, argv);
 
-       if (!ecore_display_init(xdisplay)) {
+       ecore_init();
+       if (!ecore_x_init(xdisplay)) {
                fprintf(stderr, "ERRR: Cannot connect to X display!\n");
                exit(-1);
        }
 
-       ecore_event_filter_init();
-       ecore_event_signal_init();
-       ecore_event_x_init();
-
        if (!ewl_config_init()) {
                DERROR("Couldn not init config data. Exiting....");
                exit(-1);
@@ -75,7 +72,7 @@
        }
 
        ewl_window_list = ewd_list_new();
-       ecore_event_filter_idle_handler_add(ewl_idle_render, NULL);
+       ecore_idle_enterer_add(ewl_idle_render, NULL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -90,10 +87,14 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ewl_reread_config(0, NULL);
+       /*
+        * Call it once right away, then get it looping every half second
+        */
+       ewl_reread_config(NULL);
+       ecore_timer_add(0.5, ewl_reread_config, NULL);
 
        ewl_idle_render(NULL);
-       ecore_event_loop();
+       ecore_main_loop_begin();
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -102,9 +103,10 @@
  * ewl_idle_render - renders updates during idle times of the main loop
  * @data: this is only necessary for registering this function with ecore
  *
- * Returns no value. Renders updates to the evas's during idle event times.
+ * Returns TRUE to continue the timer. Renders updates to the evas's during idle
+ * event times.
  */
-void ewl_idle_render(void *data)
+int ewl_idle_render(void *data)
 {
        Ewl_Widget     *w;
        Ewl_Window     *win;
@@ -117,7 +119,7 @@
        }
 
        if (ewd_list_is_empty(ewl_window_list))
-               DRETURN(DLEVEL_STABLE);
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        /*
         * Configure any widgets that need it.
@@ -151,7 +153,7 @@
                        evas_render(win->evas);
        }
 
-       DRETURN(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
        data = NULL;
 }
 
@@ -165,7 +167,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       ecore_event_loop_quit();
+       ecore_main_loop_quit();
        ewl_callbacks_deinit();
        ewd_list_destroy(configure_list);
 
@@ -232,17 +234,18 @@
 
 /**
  * ewl_reread_config - a timer function used to reread the config options
- * @val: dummy variable used for compatibility with ecore's timers
  * @data: dummy variable used for compatibility with ecore's timers
  *
- * Returns no value. Sets up a timer loop for rereading the config data.
+ * Returns TRUE to keep the timer going. Sets up a timer loop for rereading the
+ * config data.
  */
-static void ewl_reread_config(int val, void *data)
+static int ewl_reread_config(void *data)
 {
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
        ewl_config_reread_and_apply();
 
-       ecore_add_event_timer("reread_config_timer", 0.5,
-                             ewl_reread_config, 0, NULL);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 /**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_notebook.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_notebook.c      3 Jun 2003 04:00:46 -0000       1.27
+++ ewl_notebook.c      28 Jun 2003 06:50:32 -0000      1.28
@@ -413,9 +413,6 @@
 
        w = EWL_WIDGET(n);
 
-       /*
-        * FIXME: Need to clear the position mask first
-        */
        n->flags = (n->flags & ~EWL_POSITION_MASK) | p;
 
        switch (n->flags) {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_row.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_row.c   3 Jun 2003 04:00:47 -0000       1.10
+++ ewl_row.c   28 Jun 2003 06:50:32 -0000      1.11
@@ -89,6 +89,24 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
+/**
+ * ewl_row_get_column - retrieve the widget at a specified column
+ * @row: the row to retrieve a columns widget from
+ * @n: the column containing the desired widget
+ *
+ * Returns the widget located in column @n in @row on success, NULL on
+ * failure.
+ */
+Ewl_Widget *
+ewl_row_get_column(Ewl_Row *row, short n)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       DCHECK_PARAM_PTR_RET("row", row, NULL);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
 static void
 __ewl_row_configure(Ewl_Widget * w, void *ev_data, void *user_data)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_row.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_row.h   2 Apr 2003 20:36:19 -0000       1.7
+++ ewl_row.h   28 Jun 2003 06:50:32 -0000      1.8
@@ -18,7 +18,9 @@
 
 Ewl_Widget *ewl_row_new();
 int ewl_row_init(Ewl_Row *row);
+
 void ewl_row_set_column_bounds(Ewl_Row *row, int n, unsigned int **base,
                unsigned int **bounds);
+Ewl_Widget *ewl_row_get_column(Ewl_Row *row, short n);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_seeker.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_seeker.c        24 Jun 2003 20:19:31 -0000      1.39
+++ ewl_seeker.c        28 Jun 2003 06:50:32 -0000      1.40
@@ -377,7 +377,7 @@
 void
 __ewl_seeker_dragbar_mouse_down(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ecore_Event_Mouse_Down *ev;
+       Ecore_X_Event_Mouse_Button_Down *ev;
        Ewl_Seeker     *s;
        int             xx, yy, ww, hh;
 
@@ -418,7 +418,7 @@
 void
 __ewl_seeker_dragbar_mouse_move(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ecore_Event_Mouse_Move *ev;
+       Ecore_X_Event_Mouse_Move *ev;
        Ewl_Seeker *s;
        int mx, my;
        int dx, dy;
@@ -494,7 +494,7 @@
 void __ewl_seeker_mouse_down(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Seeker     *s;
-       Ecore_Event_Mouse_Down *ev;
+       Ecore_X_Event_Mouse_Button_Down *ev;
        double          value;
        int             xx, yy, ww, hh;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_selectionbar.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_selectionbar.c  3 Jun 2003 04:00:49 -0000       1.8
+++ ewl_selectionbar.c  28 Jun 2003 06:50:32 -0000      1.9
@@ -21,12 +21,11 @@
 
 void            __child_add(Ewl_Container * parent, Ewl_Widget * child);
 
-void            __open_bar_cb(int val, void *ev_data);
-void            __close_bar_cb(int val, void *ev_data);
+int             __open_bar_cb(void *ev_data);
+int             __close_bar_cb(void *ev_data);
 
-
-char            open_string[100];
-char            close_string[100];
+Ecore_Timer    *open_timer;
+Ecore_Timer    *close_timer;
 
 /**
  * ewl_selectionbar_new - create a new selectionbar
@@ -122,13 +121,6 @@
 
        ewl_container_add_notify(EWL_CONTAINER(w), __child_add);
 
-
-       sprintf(open_string, "open_%p", w);
-       sprintf(close_string, "close_%p", w);
-
-       printf("open string = %s\n", open_string);
-       printf("close string = %s\n", close_string);
-
        s->OPEN = 1;
        s->mouse_x = 0;
 
@@ -180,7 +172,7 @@
 
        s = EWL_SELECTIONBAR(w);
 
-       ecore_add_event_timer(close_string, 0.01, __close_bar_cb, 1, s->bar);
+       ecore_timer_add(0.01, __close_bar_cb, s->bar);
 }
 
 
@@ -275,7 +267,7 @@
                return;
 
 
-       ecore_add_event_timer(open_string, 0.01, __open_bar_cb, 1, w);
+       ecore_timer_add(0.01, __open_bar_cb, w);
 
        ewl_widget_show(s->scroller.top);
        ewl_widget_show(s->scroller.bottom);
@@ -333,7 +325,13 @@
         * focus didn't just go to one of it's children
         */
        window = ewl_window_find_window_by_widget(w);
-       ecore_pointer_xy(window->evas_window, &mx, &my);
+
+       /*
+        * FIXME: This is not in ecore yet.
+        */
+       /* ecore_pointer_xy(window->evas_window, &mx, &my); */
+       mx = 0;
+       my = 0;
 
        wx = CURRENT_X(o);
        wy = CURRENT_Y(o);
@@ -360,21 +358,22 @@
 
        s->OPEN = 0;
 
-       ecore_add_event_timer(close_string, 0.01, __close_bar_cb, 1, w);
+       ecore_timer_add(0.01, __close_bar_cb, w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
 
 
-void __open_bar_cb(int val, void *ev_data)
+int __open_bar_cb(void *ev_data)
 {
        Ewl_Widget     *w;
        Ewl_Object     *o;
        Ewl_Object     *so;
        Ewl_Selectionbar *s;
+       int retval = 0;
 
-       ecore_del_event_timer(close_string);
+       ecore_timer_del(close_timer);
 
        w = EWL_WIDGET(ev_data);
        o = EWL_OBJECT(w);
@@ -385,8 +384,7 @@
                ewl_object_request_size(o, s->w, CURRENT_H(o) + s->h / 10);
                ewl_object_request_size(so, CURRENT_W(o), CURRENT_H(o));
 
-               ecore_add_event_timer(open_string, 0.01, __open_bar_cb, ++val,
-                                     w);
+               retval = TRUE;
 
                ewl_widget_configure(EWL_WIDGET(s));
        } else {
@@ -398,18 +396,19 @@
                                    __mouse_move_over_children, s);
        }
 
-
+       DRETURN_INT(retval, DLEVEL_STABLE);
 }
 
 
-void __close_bar_cb(int val, void *ev_data)
+int __close_bar_cb(void *ev_data)
 {
        Ewl_Widget     *w;
        Ewl_Object     *o;
        Ewl_Object     *so;
        Ewl_Selectionbar *s;
+       int retval = 0;
 
-       ecore_del_event_timer(open_string);
+       ecore_timer_del(open_timer);
 
        w = EWL_WIDGET(ev_data);
        o = EWL_OBJECT(w);
@@ -422,13 +421,13 @@
                ewl_object_request_size(so, s->w,
                                        CURRENT_H(o) - (s->h / 10) + 5);
 
-               ecore_add_event_timer(close_string, 0.01, __close_bar_cb, ++val,
-                                     w);
+               retval = TRUE;
        } else {
                ewl_object_request_size(o, s->w, 5);
                ewl_object_request_size(so, s->w, 5);
        }
 
+       DRETURN_INT(retval, DLEVEL_STABLE);
 }
 
 
@@ -447,7 +446,7 @@
        Ewl_Widget     *child;
        Ewl_Object     *o;
        Ewd_List       *children;
-       Ecore_Event_Mouse_Move *ev;
+       Ecore_X_Event_Mouse_Move *ev;
        Ewl_Selectionbar *s;
        int             x, old_x;
 
@@ -456,9 +455,6 @@
        o = EWL_OBJECT(w);
        children = EWL_CONTAINER(w)->children;
 
-
-
-
        ev = ev_data;
        x = ev->x - CURRENT_X(o);
 
@@ -468,12 +464,9 @@
                old_x = s->mouse_x;
        s->mouse_x = x;
 
-
-
        ewl_object_request_position(EWL_OBJECT(s->scroller.top), x - 15,
                                    CURRENT_Y(o) + 5);
 
-
        ewl_object_request_position(EWL_OBJECT(s->scroller.bottom),
                                    x - 15, CURRENT_Y(o) + CURRENT_H(o) - 15);
 
@@ -492,8 +485,6 @@
                                                        (EWL_OBJECT(child)));
                        }
 
-/*                     ewl_object_request_size(EWL_OBJECT(child), 60, 40);
-*/
                        ewl_object_request_position(EWL_OBJECT(child),
                                                    CURRENT_X(child) +
                                                    (old_x - x),
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_separator.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_separator.c     1 Mar 2003 18:34:46 -0000       1.19
+++ ewl_separator.c     28 Jun 2003 06:50:32 -0000      1.20
@@ -49,26 +49,3 @@
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
-
-/*
- * Setup the ewl object's maximum size based on the max size of the ebits
- * object.
- */
-/* FIXME: This should be redundant, as this is done in the widget realize
- * callback.
-void __ewl_separator_realize(Ewl_Widget * w, void *ev_data, void *user_data)
-{
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("w", w);
-
-       if (w->ebits_object) {
-               int             ww, hh;
-
-               ebits_get_max_size(w->ebits_object, &ww, &hh);
-
-               ewl_object_set_maximum_size(EWL_OBJECT(w), ww, hh);
-       }
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spinner.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ewl_spinner.c       3 Jun 2003 04:00:50 -0000       1.37
+++ ewl_spinner.c       28 Jun 2003 06:50:32 -0000      1.38
@@ -364,44 +364,44 @@
 __ewl_spinner_key_down(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Spinner    *s;
-       Ecore_Event_Key_Down *ev;
+       Ecore_X_Event_Key_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        s = EWL_SPINNER(w->parent);
 
-       ev = (Ecore_Event_Key_Down *) ev_data;
+       ev = ev_data;
 
-       if (!strcmp(ev->key, "Up"))
+       if (!strcmp(ev->keyname, "Up"))
                __ewl_spinner_increase_value(w, NULL, NULL);
-       else if (!strcmp(ev->key, "Down"))
+       else if (!strcmp(ev->keyname, "Down"))
                __ewl_spinner_decrease_value(w, NULL, NULL);
-       else if (!strcmp(ev->key, "Left"))
+       else if (!strcmp(ev->keyname, "Left"))
                __ewl_entry_move_cursor_to_left(w);
-       else if (!strcmp(ev->key, "Right"))
+       else if (!strcmp(ev->keyname, "Right"))
                __ewl_entry_move_cursor_to_right(w);
-       else if (!strcmp(ev->key, "Home"))
+       else if (!strcmp(ev->keyname, "Home"))
                __ewl_entry_move_cursor_to_home(w);
-       else if (!strcmp(ev->key, "End"))
+       else if (!strcmp(ev->keyname, "End"))
                __ewl_entry_move_cursor_to_end(w);
-       else if (!strcmp(ev->key, "BackSpace"))
+       else if (!strcmp(ev->keyname, "BackSpace"))
                __ewl_entry_delete_to_left(w);
-       else if (!strcmp(ev->key, "Delete"))
+       else if (!strcmp(ev->keyname, "Delete"))
                __ewl_entry_delete_to_right(w);
-       else if (ev->compose && (ev->compose[0] == '0' ||
-                                ev->compose[0] == '1' ||
-                                ev->compose[0] == '2' ||
-                                ev->compose[0] == '3' ||
-                                ev->compose[0] == '4' ||
-                                ev->compose[0] == '5' ||
-                                ev->compose[0] == '6' ||
-                                ev->compose[0] == '7' ||
-                                ev->compose[0] == '8' ||
-                                ev->compose[0] == '9' ||
-                                ev->compose[0] == '.' ||
-                                ev->compose[0] == '-'))
-               __ewl_entry_insert_text(s->entry, ev->compose);
+       else if (ev->key_compose && (ev->key_compose[0] == '0' ||
+                                ev->key_compose[0] == '1' ||
+                                ev->key_compose[0] == '2' ||
+                                ev->key_compose[0] == '3' ||
+                                ev->key_compose[0] == '4' ||
+                                ev->key_compose[0] == '5' ||
+                                ev->key_compose[0] == '6' ||
+                                ev->key_compose[0] == '7' ||
+                                ev->key_compose[0] == '8' ||
+                                ev->key_compose[0] == '9' ||
+                                ev->key_compose[0] == '.' ||
+                                ev->key_compose[0] == '-'))
+               __ewl_entry_insert_text(s->entry, ev->key_compose);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_tree.c  3 Jun 2003 04:00:51 -0000       1.13
+++ ewl_tree.c  28 Jun 2003 06:50:32 -0000      1.14
@@ -494,8 +494,11 @@
                if (ewl_object_get_minimum_w(EWL_OBJECT(w)) > PREFERRED_W(c))
                        ewl_object_set_preferred_w(EWL_OBJECT(c),
                                        PREFERRED_W(c) + size);
+               /* FIXME: Should we only grow this in order to reduce list
+                * traversal?
                else
                        ewl_container_prefer_largest(c, o);
+                       */
        }
        else {
                ewl_object_set_preferred_h(EWL_OBJECT(c),
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_tree.h  3 Jun 2003 04:00:51 -0000       1.10
+++ ewl_tree.h  28 Jun 2003 06:50:32 -0000      1.11
@@ -38,18 +38,31 @@
        int expanded;
 };
 
+/*
+ * Node creation/initialization functions.
+ */
 Ewl_Widget *ewl_tree_node_new();
 int ewl_tree_node_init(Ewl_Tree_Node *tree_node);
+
+/*
+ * Node state modifying functions
+ */
 void ewl_tree_node_collapse(Ewl_Tree_Node *tree);
 void ewl_tree_node_expand(Ewl_Tree_Node *tree);
 
+/*
+ * Tree creation/initialization functions.
+ */
 Ewl_Widget *ewl_tree_new(unsigned short columns);
 int ewl_tree_init(Ewl_Tree *tree, unsigned short columns);
+
 void ewl_tree_set_headers(Ewl_Tree *tree, char **headers);
 void ewl_tree_set_columns(Ewl_Tree *tree, unsigned short columns);
+
 Ewl_Widget *ewl_tree_add_row(Ewl_Tree *tree, Ewl_Row *prow,
-               Ewl_Widget **children);
+                            Ewl_Widget **children);
 Ewl_Widget *ewl_tree_add_text_row(Ewl_Tree *tree, Ewl_Row *prow, char **text);
+
 void ewl_tree_destroy_row(Ewl_Tree *tree, Ewl_Row *row);
 void ewl_tree_set_row_expand(Ewl_Row *row, Ewl_Tree_Node_Flags expanded);
 Ewl_Row *ewl_tree_find_row(Ewl_Tree *tree, int row);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ewl_window.c        4 Jun 2003 01:46:44 -0000       1.48
+++ ewl_window.c        28 Jun 2003 06:50:32 -0000      1.49
@@ -150,7 +150,7 @@
        if (!REALIZED(win))
                return;
 
-       ecore_window_set_title(win->window, title);
+       ecore_x_window_prop_title_set(win->window, title);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -186,7 +186,7 @@
        win->flags |= EWL_WINDOW_BORDERLESS;
 
        if (REALIZED(win))
-               ecore_window_hint_set_borderless(win->window);
+               ecore_x_window_prop_borderless_set(win->window, TRUE);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -206,7 +206,7 @@
        DCHECK_PARAM_PTR("win", win);
 
        if (REALIZED(win))
-               ecore_window_move(win->window, x, y);
+               ecore_x_window_move(win->window, x, y);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -223,8 +223,10 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("win", win);
 
-       if (REALIZED(win))
-               ecore_window_get_geometry(win->window, x, y, NULL, NULL);
+       if (REALIZED(win)) {
+               *x = win->x;
+               *y = win->y;
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -312,19 +314,20 @@
        window = EWL_WINDOW(w);
        o = EWL_OBJECT(w);
 
+       /*
+        * FIXME: This needs to be explored a bit, the size should come down
+        * from a configure event, but neeed to double check.
+        */
        ewl_object_request_size(EWL_OBJECT(w), ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
 
-       window->window = ecore_window_new(0, ewl_object_get_current_x(o),
-                       ewl_object_get_current_y(o),
+       window->window = ecore_x_window_new(0, window->x, window->y,
                        ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
-       ecore_window_set_events(window->window, XEV_CONFIGURE);
-       ecore_window_set_name_class(window->window, "EWL", "EWL!");
-
-       ecore_window_set_title(window->window, window->title);
 
-       ecore_window_set_delete_inform(window->window);
+       ecore_x_window_prop_name_class_set(window->window, "EWL", "EWL!");
+       ecore_x_window_prop_title_set(window->window, window->title);
+       ecore_x_window_prop_delete_request_set(window->window, 1);
 
        window->evas = evas_new();
        evas_output_method_set(window->evas,
@@ -342,7 +345,7 @@
                info = (Evas_Engine_Info_Software_X11 *)
                        evas_engine_info_get(window->evas);
 
-               info->info.display = ecore_display_get();
+               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,
@@ -361,12 +364,9 @@
                evas_font_path_append(window->evas, font_path);
 
        window->evas_window = window->window;
-       ecore_window_set_events(window->evas_window, XEV_KEY | XEV_BUTTON |
-                               XEV_IN_OUT | XEV_EXPOSE | XEV_VISIBILITY |
-                               XEV_MOUSE_MOVE | XEV_FOCUS);
 
        if (window->flags & EWL_WINDOW_BORDERLESS)
-               ecore_window_hint_set_borderless(window->window);
+               ecore_x_window_prop_borderless_set(window->window, 1);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -385,7 +385,7 @@
        evas_free(window->evas);
        window->evas = NULL;
 
-       ecore_window_destroy(window->window);
+       ecore_x_window_del(window->window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -399,10 +399,10 @@
                DRETURN(DLEVEL_STABLE);
 
        if (EWL_WINDOW(w)->flags & EWL_WINDOW_BORDERLESS)
-               ecore_window_hint_set_borderless(EWL_WINDOW(w)->window);
+               ecore_x_window_prop_borderless_set(EWL_WINDOW(w)->window, 1);
 
-       ecore_window_show(EWL_WINDOW(w)->window);
-       ecore_window_show(EWL_WINDOW(w)->evas_window);
+       ecore_x_window_show(EWL_WINDOW(w)->window);
+       ecore_x_window_show(EWL_WINDOW(w)->evas_window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -412,8 +412,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("widget", widget);
 
-       ecore_window_hide(EWL_WINDOW(widget)->evas_window);
-       ecore_window_hide(EWL_WINDOW(widget)->window);
+       ecore_x_window_hide(EWL_WINDOW(widget)->evas_window);
+       ecore_x_window_hide(EWL_WINDOW(widget)->window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -429,11 +429,11 @@
 
        IF_FREE(win->title);
 
-       ecore_window_hide(win->evas_window);
-       ecore_window_hide(win->window);
+       ecore_x_window_hide(win->evas_window);
+       ecore_x_window_hide(win->window);
 
-       ecore_window_destroy(win->evas_window);
-       ecore_window_destroy(win->window);
+       ecore_x_window_del(win->evas_window);
+       ecore_x_window_del(win->window);
 
        IF_FREE(win->title);
 
@@ -447,7 +447,7 @@
 {
        Ewl_Window     *win;
        Ewl_Object     *child;
-       int             width, height;
+       unsigned int    width, height;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -460,25 +460,14 @@
        /*
         * Adjust the maximum window bounds to match the widget
         */
-       ecore_window_set_min_size(win->window,
+       ecore_x_window_prop_min_size_set(win->window,
                        ewl_object_get_minimum_w(EWL_OBJECT(w)),
                        ewl_object_get_minimum_h(EWL_OBJECT(w)));
-       ecore_window_set_max_size(win->window,
+       ecore_x_window_prop_max_size_set(win->window,
                        ewl_object_get_maximum_w(EWL_OBJECT(w)),
                        ewl_object_get_maximum_h(EWL_OBJECT(w)));
 
        /*
-        * Check the windows current geometry against the widgets values.
-        */
-       ecore_window_get_geometry(win->window, NULL, NULL, &width, &height);
-
-       if (width != ewl_object_get_current_w(EWL_OBJECT(win)))
-               ewl_object_request_w(EWL_OBJECT(win), width);
-
-       if (height != ewl_object_get_current_h(EWL_OBJECT(win)))
-               ewl_object_request_h(EWL_OBJECT(win), height);
-
-       /*
         * Find out how much space the widget accepted.
         */
        width = ewl_object_get_current_w(EWL_OBJECT(w));
@@ -488,8 +477,8 @@
         * Now give the windows the appropriate size and adjust the evas as
         * well.
         */
-       ecore_window_resize(win->window, width, height);
-       ecore_window_resize(win->evas_window, width, height);
+       ecore_x_window_resize(win->window, width, height);
+       ecore_x_window_resize(win->evas_window, width, height);
        evas_output_size_set(win->evas, width, height);
        evas_output_viewport_set(win->evas,
                        ewl_object_get_current_x(EWL_OBJECT(w)),
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_window.h        4 Jun 2003 01:46:44 -0000       1.18
+++ ewl_window.h        28 Jun 2003 06:50:32 -0000      1.19
@@ -28,6 +28,8 @@
         * Flag to indicate if the window has a border.
         */
        Ewl_Window_Flags flags;
+
+       int x, y;
 };
 
 #define EWL_WINDOW(widget) ((Ewl_Window *) widget)




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to