Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_container.c 


Log Message:
add container_new()

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_container.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- ewl_container.c     5 Aug 2008 08:41:19 -0000       1.77
+++ ewl_container.c     5 Aug 2008 19:30:12 -0000       1.78
@@ -13,6 +13,33 @@
 static int ewl_container_child_count_get_helper(Ewl_Container *c, int skip);
 
 /**
+ * @return Returns a newly allocated container on success, NULL on failure.
+ * @brief Allocate a new container.
+ *
+ * Do not use this function unless you know what you are doing! It is only
+ * intended to easily create custom container. It doesn't manage the children.
+ */
+Ewl_Widget *
+ewl_container_new(void)
+{
+        Ewl_Container *c;
+
+        DENTER_FUNCTION(DLEVEL_STABLE);
+
+        c = NEW(Ewl_Container, 1);
+        if (!c)
+                DRETURN_PTR(NULL, DLEVEL_STABLE);
+
+        if (!ewl_container_init(c)) {
+                FREE(c);
+                c = NULL;
+        }
+
+        DRETURN_PTR(EWL_WIDGET(c), DLEVEL_STABLE);
+}
+
+
+/**
  * @param c: the container to initialize
  * @return Returns TRUE on success, otherwise FALSE.
  * @brief Initialize a containers default fields and callbacks



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to