Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_widget.c etk_widget.h 


Log Message:
ask and ye shall get!

- add function to get drag widget from drag object


===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- etk_widget.c        20 Feb 2006 10:31:30 -0000      1.38
+++ etk_widget.c        21 Feb 2006 00:56:09 -0000      1.39
@@ -1403,6 +1403,32 @@
    etk_container_add(ETK_CONTAINER(widget->drag), drag_widget);
 }
 
+/**
+ * @brief Gets the visual data for the drag (the widget to be displayed)
+ * @param widget a widget
+ * @Returns Return the widget that will appear in the drag window
+ */
+Etk_Widget *etk_widget_dnd_drag_widget_get(Etk_Widget *widget)
+{
+   Evas_List *children = NULL;
+   
+   if(!widget)
+     return;
+   
+   children = etk_container_children_get(ETK_CONTAINER(widget->drag));
+   
+   if(!children)
+     return NULL;
+   
+   if(evas_list_count(children) < 1)
+     return NULL;
+   
+   if(ETK_IS_WIDGET(children->data))
+     return (Etk_Widget*)children->data;
+   
+   return NULL;
+}
+
 void etk_widget_dnd_drag_data_set(Etk_Widget *widget, const char **types, int 
num_types, void *data, int data_size)
 {
    if(!widget)
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- etk_widget.h        20 Feb 2006 10:31:30 -0000      1.24
+++ etk_widget.h        21 Feb 2006 00:56:09 -0000      1.25
@@ -276,6 +276,7 @@
 void         etk_widget_dnd_source_set(Etk_Widget *widget, Etk_Bool on);
 Etk_Bool     etk_widget_dnd_source_get(Etk_Widget *widget);
 void         etk_widget_dnd_drag_widget_set(Etk_Widget *widget, Etk_Widget 
*drag_widget);
+Etk_Widget  *etk_widget_dnd_drag_widget_get(Etk_Widget *widget);  
 void         etk_widget_dnd_drag_data_set(Etk_Widget *widget, const char 
**types, int num_types, void *data, int data_size);
 const char **etk_widget_dnd_files_get(Etk_Widget *e, int *num_files);
 void         etk_widget_dnd_types_set(Etk_Widget *widget, char **types, int 
num);




-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to