Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_dnd.c ewl_engines.c ewl_io_manager.c ewl_theme.c 


Log Message:
Simplify the configure.in and fix for autoconf 2.60 by switching to
ac_define_dir.m4.
Update paths relative to the new package base directories.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_dnd.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewl_dnd.c   18 Oct 2006 16:28:08 -0000      1.29
+++ ewl_dnd.c   26 Oct 2006 16:11:56 -0000      1.30
@@ -16,9 +16,6 @@
 static int ewl_dragging_current = 0;
 static int ewl_dnd_move_count = 0;
 static Ecore_Evas *ewl_dnd_drag_canvas;
-static Evas *ewl_dnd_drag_evas;
-static Evas_Object *ewl_dnd_drag_image;
-static Ecore_X_Window ewl_dnd_evas_win;
 static Ecore_X_Window ewl_dnd_drag_win = 0;
 
 static Ewl_Widget *ewl_dnd_widget = NULL;
@@ -39,6 +36,8 @@
 static int ewl_dnd_event_mouse_up(void *data, int type, void *event);
 static int ewl_dnd_event_dnd_move(void *data, int type, void *event);
 
+static void ewl_dnd_cb_render(Ewl_Widget *w, void *event, void *data);
+
 /**
  * @internal
  * @return Returns TRUE if the DND system was successfully initialized,
@@ -289,7 +288,8 @@
 void
 ewl_dnd_drag_start(Ewl_Widget *w) 
 {
-       int width, height;
+       Ewl_Widget *win;
+       Ewl_Widget *image;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -302,59 +302,25 @@
        ewl_dnd_widget = w;
        ewl_dnd_move_count = 0;
 
-       ewl_dnd_mouse_up_handler = ecore_event_handler_add(
-                                               ECORE_X_EVENT_MOUSE_BUTTON_UP,
-                                               ewl_dnd_event_mouse_up, NULL);
-       ewl_dnd_mouse_move_handler = ecore_event_handler_add(
-                                               ECORE_X_EVENT_MOUSE_MOVE, 
-                                               ewl_dnd_event_dnd_move, NULL);
-
-       /* XXX This needs to be changed ot correctly go through the engine */
-       ewl_dnd_drag_canvas = ecore_evas_software_x11_new(NULL, 
-                                                       EWL_DND_WINDOW_ROOT, 
-                                                       64, 64, 64, 64); 
-       ewl_dnd_drag_evas = ecore_evas_get(ewl_dnd_drag_canvas);
-
-       ecore_evas_shaped_set(ewl_dnd_drag_canvas, 1);
-       ecore_evas_software_x11_direct_resize_set(ewl_dnd_drag_canvas, 1);
-
-       ewl_dnd_evas_win = ecore_evas_software_x11_window_get(
-                                                       ewl_dnd_drag_canvas);
-       ecore_x_window_resize(ewl_dnd_evas_win, 64, 64);
-       ecore_evas_override_set(ewl_dnd_drag_canvas, 1);
-
-       /* ecore_evas_software_x11_direct_resize_set(ewl_dnd_drag_evas, 1); */
-       ecore_evas_ignore_events_set(ewl_dnd_drag_canvas, 1);
-
-       /* XXX Setup a cursor (This needs to become generic) */
-       ewl_dnd_drag_image = evas_object_image_add(ewl_dnd_drag_evas);
-       evas_object_image_file_set(ewl_dnd_drag_image, PACKAGE_DATA_DIR 
-                                               "/images/World.png", 0);
-       evas_object_image_fill_set(ewl_dnd_drag_image, 0, 0, 50, 50);
-       evas_object_resize(ewl_dnd_drag_image, 50, 50);
-       evas_object_show(ewl_dnd_drag_image);
-
-       /* Setup the dnd event capture window */
-       ecore_x_window_geometry_get(EWL_DND_WINDOW_ROOT, NULL, NULL, 
-                                                       &width,  &height);
-       ewl_dnd_drag_win = ecore_x_window_input_new(EWL_DND_WINDOW_ROOT, 0, 0,
-                                                               width, height);
-
-       /* Finally show the drag window */
-       ecore_x_window_show(ewl_dnd_drag_win);
-
-       /* Confine the pointer to our event windows */  
-       ecore_x_pointer_confine_grab(ewl_dnd_drag_win);
-       ecore_x_keyboard_grab(ewl_dnd_drag_win);
-
-       ecore_x_dnd_aware_set(ewl_dnd_drag_win, 1);
-       ecore_x_dnd_aware_set(ewl_dnd_evas_win, 1);
-       ecore_x_mwm_borderless_set(ewl_dnd_evas_win, 1);
+       win = ewl_window_new();
+       ewl_embed_engine_name_set(EWL_EMBED(win), "buffer");
+       ewl_callback_append(win, EWL_CALLBACK_VALUE_CHANGED, ewl_dnd_cb_render,
+                       ewl_embed_widget_find(w));
+       ewl_widget_show(win);
+
+       image = ewl_image_new();
+       ewl_image_file_path_set(EWL_IMAGE(image), PACKAGE_DATA_DIR
+                       "/ewl/images/World.png");
+       ewl_object_custom_size_set(EWL_OBJECT(image), 64, 64);
+       ewl_container_child_append(EWL_CONTAINER(win), image);
+       ewl_widget_show(image);
 
        /* Start the drag operation */
+       /*
        ecore_x_dnd_types_set(ewl_dnd_drag_win, ewl_dnd_provided_types_get(w),
                        1);
        ecore_x_dnd_begin(ewl_dnd_drag_win, NULL, 0);
+       */
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -421,6 +387,24 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ewl_dnd_widget = NULL;
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+static void
+ewl_dnd_cb_render(Ewl_Widget *w, void *event, void *data)
+{
+       int handle;
+       Ewl_Embed *embed = EWL_EMBED(data);
+       Ewl_Embed *cursor_win = EWL_EMBED(w);
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+
+       handle = ewl_engine_pointer_data_new(embed, cursor_win->evas_window,
+                       ewl_object_current_w_get(EWL_OBJECT(cursor_win)),
+                       ewl_object_current_h_get(EWL_OBJECT(cursor_win)));
+       ewl_engine_pointer_set(embed, handle);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_engines.c       20 Oct 2006 18:21:53 -0000      1.18
+++ ewl_engines.c       26 Oct 2006 16:11:56 -0000      1.19
@@ -71,7 +71,8 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       snprintf(dir, sizeof(dir), "%s/%s", PACKAGE_LIB_DIR, EWL_ENGINE_DIR);
+       snprintf(dir, sizeof(dir), "%s/ewl/%s", PACKAGE_LIB_DIR,
+                                               EWL_ENGINE_DIR);
        if (!ecore_file_exists(dir))
                DRETURN_PTR(NULL, DLEVEL_STABLE);
 
@@ -124,7 +125,8 @@
        if (engine)
                DRETURN_PTR(engine, DLEVEL_STABLE);
 
-       snprintf(filename, sizeof(filename), "%s/%s/%s.so", PACKAGE_LIB_DIR, 
+       snprintf(filename, sizeof(filename), "%s/ewl/%s/%s.so",
+                                                       PACKAGE_LIB_DIR, 
                                                        EWL_ENGINE_DIR, name);
        if (!ecore_file_exists(filename))
        {
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_io_manager.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_io_manager.c    4 Oct 2006 15:42:55 -0000       1.4
+++ ewl_io_manager.c    26 Oct 2006 16:11:56 -0000      1.5
@@ -323,7 +323,8 @@
                *ptr = '_';
 
        snprintf(file, sizeof(file), 
-               "%s/plugins/ewl_io_manager_%s_plugin.so", PACKAGE_LIB_DIR, m);
+               "%s/ewl/plugins/ewl_io_manager_%s_plugin.so", PACKAGE_LIB_DIR,
+               m);
        FREE(m);
 
        if (!ecore_file_exists(file))
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- ewl_theme.c 26 Oct 2006 05:32:03 -0000      1.26
+++ ewl_theme.c 26 Oct 2006 16:11:56 -0000      1.27
@@ -475,7 +475,7 @@
         */
        if (!theme_found_path) {
                snprintf(theme_tmp_path, PATH_MAX, PACKAGE_DATA_DIR
-                               "/themes/%s.edj", name);
+                               "/ewl/themes/%s.edj", name);
                if (((stat(theme_tmp_path, &st)) == 0) && S_ISREG(st.st_mode))
                        theme_found_path = strdup(theme_tmp_path);
        }



-------------------------------------------------------------------------
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