Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        Ewl.h.in Makefile.am ewl_container.c ewl_container.h 
        ewl_enums.h 
Added Files:
        ewl_icon.c ewl_icon.h 


Log Message:
- add the start of an ewl_icon class. this will eventually take over for the
  icon code in ewl_iconbox. will also be used for the preview pane in the
  filedialog
- add a ewl_container_child_insert_internal that will take internal widgets
  into account when it inserts

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/Ewl.h.in,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- Ewl.h.in    27 Nov 2005 09:44:14 -0000      1.25
+++ Ewl.h.in    30 Dec 2005 05:39:28 -0000      1.26
@@ -319,6 +319,7 @@
 #include <ewl_separator.h>
 #include <ewl_calendar.h>
 #include <ewl_datepicker.h>
+#include <ewl_icon.h>
 #include <ewl_iconbox.h>
 @ewl_media_include@
 #include <ewl_notebook.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- Makefile.am 2 Dec 2005 21:00:50 -0000       1.17
+++ Makefile.am 30 Dec 2005 05:39:28 -0000      1.18
@@ -38,6 +38,7 @@
        ewl_floater.h \
        ewl_filedialog.h \
        ewl_grid.h \
+       ewl_icon.h \
        ewl_iconbox.h \
        ewl_image.h \
        ewl_imenu.h \
@@ -102,6 +103,7 @@
        ewl_floater.c \
        ewl_filedialog.c \
        ewl_grid.c \
+       ewl_icon.c \
        ewl_iconbox.c \
        ewl_image.c \
        ewl_imenu.c \
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ewl_container.c     29 Dec 2005 19:37:43 -0000      1.23
+++ ewl_container.c     30 Dec 2005 05:39:28 -0000      1.24
@@ -3,6 +3,11 @@
 #include "ewl_macros.h"
 #include "ewl_private.h"
 
+static void ewl_container_child_insert_helper(Ewl_Container *pc, 
+                                               Ewl_Widget *child, 
+                                               int index, 
+                                               int skip_internal);
+
 /**
  * @param c: the container to initialize
  * @return Returns TRUE on success, otherwise FALSE.
@@ -227,18 +232,9 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
-/**
- * @param pc: the parent container that will hold the child
- * @param child: the child to add to the container
- * @param index: the position in the child list to add the cihld
- * @return Returns no value.
- * @brief Add a child at an index of the container
- *
- * Attaches the child to the @a index position of the parent containers child
- * list.
- */
-void
-ewl_container_child_insert(Ewl_Container *pc, Ewl_Widget *child, int index)
+static void
+ewl_container_child_insert_helper(Ewl_Container *pc, Ewl_Widget *child, 
+                                               int index, int skip_internal)
 {
        Ewl_Widget *cur;
        int idx = 0;
@@ -263,7 +259,7 @@
        ecore_list_goto_first(pc->children);
        while ((cur = ecore_list_next(pc->children)))
        {
-               if (ewl_widget_internal_is(cur)) continue;
+               if (skip_internal && ewl_widget_internal_is(cur)) continue;
 
                idx++;
                if (idx == index) break;
@@ -276,6 +272,56 @@
 }
 
 /**
+ * @param pc: the parent container that will hold the child
+ * @param child: the child to add to the container
+ * @param index: the position in the child list to add the child (not
+ * including internal widgets
+ * @return Returns no value.
+ * @brief Add a child at an index of the container
+ *
+ * Attaches the child to the @a index position of the parent containers child
+ * list.
+ */
+void
+ewl_container_child_insert(Ewl_Container *pc, Ewl_Widget *child, int index)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("pc", pc);
+       DCHECK_PARAM_PTR("child", child);
+       DCHECK_TYPE("pc", pc, "container");
+       DCHECK_TYPE("child", child, "widget");
+
+       ewl_container_child_insert_helper(pc, child, index, TRUE);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param pc: the parent container that will hold the child
+ * @param child: the child to add to the container
+ * @param index: the position in the child list to add the cihld
+ * @return Returns no value.
+ * @brief Add a child at an index of the container
+ *
+ * Attaches the child to the @a index position of the parent containers child
+ * list.
+ */
+void
+ewl_container_child_insert_internal(Ewl_Container *pc,
+                                  Ewl_Widget *child, int index)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("pc", pc);
+       DCHECK_PARAM_PTR("child", child);
+       DCHECK_TYPE("pc", pc, "container");
+       DCHECK_TYPE("child", child, "widget");
+
+       ewl_container_child_insert_helper(pc, child, index, FALSE);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
  * @param pc: the container to search for the child to remove
  * @param child: the child to remove from the container
  * @return Returns no value.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_container.h     29 Dec 2005 17:21:15 -0000      1.10
+++ ewl_container.h     30 Dec 2005 05:39:28 -0000      1.11
@@ -109,6 +109,8 @@
                                            Ewl_Widget *child);
 void            ewl_container_child_insert(Ewl_Container *parent,
                                           Ewl_Widget *child, int index);
+void           ewl_container_child_insert_internal(Ewl_Container *parent,
+                                          Ewl_Widget *child, int index);
 void            ewl_container_child_remove(Ewl_Container *parent,
                                           Ewl_Widget *child);
 void            ewl_container_child_resize(Ewl_Widget *w, int size,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_enums.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ewl_enums.h 22 Dec 2005 04:29:44 -0000      1.30
+++ ewl_enums.h 30 Dec 2005 05:39:28 -0000      1.31
@@ -402,6 +402,13 @@
 };
 typedef enum Ewl_Text_Context_Mask Ewl_Text_Context_Mask;
 
+enum Ewl_Icon_Type
+{
+       EWL_ICON_TYPE_SHORT,
+       EWL_ICON_TYPE_LONG
+};
+typedef enum Ewl_Icon_Type Ewl_Icon_Type;
+
 /**
  * @}
  */ 




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