Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_dnd.c ewl_dnd.h ewl_embed.c ewl_entry.c ewl_events.c 
        ewl_window.c 


Log Message:
- formatting cleanups

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_dnd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_dnd.c   28 Nov 2005 08:26:48 -0000      1.2
+++ ewl_dnd.c   29 Nov 2005 02:11:50 -0000      1.3
@@ -3,32 +3,27 @@
 #include "ewl_macros.h"
 #include "ewl_private.h"
 
-Ewl_Dnd_Types* ewl_dnd_types_for_widget_get(Ewl_Widget* widget)
+Ewl_Dnd_Types *
+ewl_dnd_types_for_widget_get(Ewl_Widget *widget)
 {
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_TYPE("widget", widget, "widget");
+       Ewl_Widget *parent = NULL;
 
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("widget", widget, NULL);
+       DCHECK_TYPE_RET("widget", widget, "widget", NULL);
        
-       Ewl_Widget* parent = NULL;
-       
-       /*We need to get the top-level window widget.  Note
+       /* We need to get the top-level window widget.  Note
         * that we assume here that a widget is
         * a) Parented, and
-        * b) It's top-level parent is a window*/
-
+        * b) It's top-level parent is a window */
        parent = widget->parent;
-       do {
-               if (parent && parent->parent) 
-                       parent = parent->parent;
-               else 
-                       break;
-       } while (TRUE);
+       while (parent && parent->parent)
+               parent = parent->parent;
 
-       /*Now check if this obj we found is a window*/
-       if (parent && ewl_widget_type_is(parent, "window")) {
-               return &(EWL_WINDOW(parent)->dnd_types);
-       }
+       /* Now check if this obj we found is a window */
+       if (parent && ewl_widget_type_is(parent, "window")) 
+               DRETURN_PTR(&(EWL_WINDOW(parent)->dnd_types), DLEVEL_STABLE);
 
-       return NULL;
-       
+       DRETURN_PTR(NULL, DLEVEL_STABLE);
 }
+
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_dnd.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_dnd.h   28 Nov 2005 08:26:48 -0000      1.2
+++ ewl_dnd.h   29 Nov 2005 02:11:50 -0000      1.3
@@ -1,7 +1,7 @@
 #ifndef __EWL_DND_H__
 #define __EWL_DND_H__
 
-Ewl_Dnd_Types* ewl_dnd_types_for_widget_get(Ewl_Widget* widget);
+Ewl_Dnd_Types *ewl_dnd_types_for_widget_get(Ewl_Widget *widget);
 
 #endif
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_embed.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_embed.c 27 Nov 2005 09:44:14 -0000      1.24
+++ ewl_embed.c 29 Nov 2005 02:11:50 -0000      1.25
@@ -698,17 +698,17 @@
 
        widget = ewl_container_child_at_recursive_get(EWL_CONTAINER(embed), x, 
y);
        if (widget) {
-               Ewl_Widget* parent;             Ewl_Window* window;
+               Ewl_Widget *parent;
+               Ewl_Window *window;
 
-
-               /*First see if we need to send an 'enter' to this widget*/
+               /* First see if we need to send an 'enter' to this widget */
                window = ewl_window_window_find(embed->evas_window);
 
-               /*If the last position event was over a different widget,
-                * feed the leaving widget a 'null'*/
+               /* If the last position event was over a different widget,
+                * feed the leaving widget a 'null' */
                if (window->dnd_last_position != widget) {
-                       
                        if (window->dnd_last_position) {
+
                                parent = window->dnd_last_position;
                                while (parent) {
                                        
ewl_callback_call_with_event_data(parent,
@@ -716,9 +716,6 @@
                                        parent = parent->parent;
                                }
                        }
-               
-                       /*ewl_callback_call_with_event_data(widget,
-                                 EWL_CALLBACK_DND_ENTER, &ev);*/
 
                        parent = widget;
                        while (parent) {
@@ -726,7 +723,6 @@
                                        EWL_CALLBACK_DND_ENTER, &ev);
                                parent = parent->parent;
                        }
-       
                }
                
                /*
@@ -735,12 +731,9 @@
                parent = widget;
                while (parent) {
                        ewl_callback_call_with_event_data(parent,
-                               EWL_CALLBACK_DND_POSITION, &ev);
+                                       EWL_CALLBACK_DND_POSITION, &ev);
                        parent = parent->parent;
                }
-               
-               /*ewl_callback_call_with_event_data(widget,
-                         EWL_CALLBACK_DND_POSITION, &ev);*/
 
                window->dnd_last_position = widget;
        } else {
@@ -750,12 +743,6 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
-
-
-
-
-
-
 /**
  * @param embed: the embed where the mouse event is to occur
  * @param x: the x coordinate of the mouse out
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_entry.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ewl_entry.c 21 Nov 2005 22:10:36 -0000      1.37
+++ ewl_entry.c 29 Nov 2005 02:11:50 -0000      1.38
@@ -83,9 +83,6 @@
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
-
-
-
 /**
  * @param e: The Ewl_Entry to set the multiline status
  * @param multiline: The multiline status to set
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_events.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_events.c        28 Nov 2005 08:26:48 -0000      1.12
+++ ewl_events.c        29 Nov 2005 02:11:50 -0000      1.13
@@ -512,11 +512,14 @@
 int
 ewl_ev_x_paste(void *data __UNUSED__, int type __UNUSED__, void *e)
 {
-       Ecore_X_Event_Selection_Notify *ev = e;
+       Ecore_X_Event_Selection_Notify *ev;
        
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("e", e, FALSE);
 
-       /*Handle everything *except* XDND selection*/
+       ev = e;
+
+       /* Handle everything *except* XDND selection */
        if (ev->selection != ECORE_X_SELECTION_XDND) 
                printf("Paste event received\n");
 
@@ -558,10 +561,8 @@
                 */
                embed = ewl_embed_evas_window_find((void *)ev->win);
                if (embed) {
-                       
-                       /*First see if we need to send an 'enter' to the 
widget*/
+                       /* First see if we need to send an 'enter' to the 
widget */
                        ewl_embed_dnd_position_feed(embed, x, y);
-               } else {
                }
                
                rect.x = 0;
@@ -570,6 +571,7 @@
                rect.height = 0;        
                ecore_x_dnd_send_status(1, 0, rect, ECORE_X_DND_ACTION_PRIVATE);
        }
+
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
@@ -587,8 +589,7 @@
 {
        Ewl_Window *window;
        Ecore_X_Event_Xdnd_Enter *ev;
-       Ecore_X_Rectangle rect;
-       int i=0;
+       int i = 0;
        
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("e", e, FALSE);
@@ -601,7 +602,7 @@
                window->dnd_types.num_types = ev->num_types;
                window->dnd_types.types = malloc(sizeof(char*) * ev->num_types);
                
-               for (i=0;i<ev->num_types;i++) 
+               for (i = 0; i < ev->num_types; i++) 
                        window->dnd_types.types[i] = strdup(ev->types[i]);
        }
        DRETURN_INT(TRUE, DLEVEL_STABLE);
@@ -631,7 +632,7 @@
        window = ewl_window_window_find((void *)ev->win);
        if (window) {
                if (window->dnd_types.num_types > 0) {
-                       for (i=0;i<window->dnd_types.num_types;i++)             
+                       for (i = 0; i < window->dnd_types.num_types; i++)       
        
                                FREE(window->dnd_types.types[i]);
 
                        FREE(window->dnd_types.types);
@@ -656,7 +657,6 @@
 {
        Ewl_Window *window;
        Ecore_X_Event_Xdnd_Drop *ev;
-       int i;
        
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("e", e, FALSE);
@@ -667,12 +667,11 @@
        if (window) {
                /*printf("EWL got a DND drop event..\n");*/
 
-               /*Request a DND data request*/
-               /*TODO this only supports retrieval of the first type in the 
request*/
+               /* Request a DND data request */
+               /* TODO this only supports retrieval of the first type in the 
request */
                if (window->dnd_types.num_types > 0)
                        ecore_x_selection_xdnd_request(ev->win, 
                                window->dnd_types.types[0]);
-
        }
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
@@ -693,7 +692,7 @@
 {
        Ewl_Window *window;
        Ecore_X_Event_Selection_Notify *ev;
-       int i;
+//     int i;
        
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("e", e, FALSE);
@@ -716,7 +715,6 @@
                                printf("We've got some files! - '%s'\n", 
files->files[0]);
                        }*/
                }
-
        }
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_window.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ewl_window.c        21 Nov 2005 04:13:41 -0000      1.23
+++ ewl_window.c        29 Nov 2005 02:11:50 -0000      1.24
@@ -698,9 +698,8 @@
                }
                window->window = (void *)xwin;
 
-               if (window->flags & EWL_FLAG_PROPERTY_DND_AWARE) {
-                       ecore_x_dnd_aware_set((Ecore_X_Window)window->window,1);
-               }
+               if (window->flags & EWL_FLAG_PROPERTY_DND_AWARE) 
+                       ecore_x_dnd_aware_set((Ecore_X_Window)window->window, 
1);
        }
 #endif
 




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to