Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_view.c ewl_view.h
Log Message:
Expand the view to allow transient data to be passed for assignment.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_view.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_view.c 4 Jan 2007 05:09:48 -0000 1.5
+++ ewl_view.c 6 Feb 2007 10:17:48 -0000 1.6
@@ -104,6 +104,42 @@
}
/**
+ * @param v: The Ewl_View to set the data free function into
+ * @param assign: The Ewl_View_Data_Free function to set
+ * @return Returns no value.
+ * @brief Set the data free pointer on this view
+ *
+ * This function is necessary to decrement intermediate reference counts or
free
+ * temporary data buffers passed between the allocated data and the assigned
+ * widget.
+ */
+void
+ewl_view_data_free_set(Ewl_View *v, Ewl_View_Data_Free data_free)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("v", v);
+
+ v->data_free = data_free;
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param v: The Ewl_View to get the data free function from
+ * @return Returns the Ewl_View_Data_Free set into the Ewl_View or NULL if none
+ * set.
+ * @brief Get the data free pointer set on this view
+ */
+Ewl_View_Data_Free
+ewl_view_data_free_get(Ewl_View *v)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("v", v, NULL);
+
+ DRETURN_INT(v->data_free, DLEVEL_STABLE);
+}
+
+/**
* @param v: The Ewl_View to set the header_fetch callback on
* @param f: The Ewl_View_Header_Fetch callback
* @return Returns no value.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_view.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_view.h 4 Jan 2007 05:09:48 -0000 1.8
+++ ewl_view.h 6 Feb 2007 10:17:48 -0000 1.9
@@ -34,6 +34,17 @@
typedef void (*Ewl_View_Assign)(Ewl_Widget *w, void *data);
/**
+ * @def EWL_VIEW_DATA_FREE(f)
+ * View callback to free data after passing it to be assigned.
+ */
+#define EWL_VIEW_DATA_FREE(f) ((Ewl_View_Data_Free)f)
+
+/**
+ * A typedef to shorten the definition of the view_data_free callbacks.
+ */
+typedef void (*Ewl_View_Data_Free)(void *data);
+
+/**
* @def EWL_VIEW_HEADER_GET(f)
* View callback to get the header for a given column
*/
@@ -62,6 +73,7 @@
{
Ewl_View_Constructor construct; /**< Create a widget for
display */
Ewl_View_Assign assign; /**< Assign data to a widget */
+ Ewl_View_Data_Free data_free; /**< Free data passed to assign
*/
Ewl_View_Header_Fetch header_fetch; /**< Get the header for the
given column */
};
@@ -73,6 +85,9 @@
void ewl_view_assign_set(Ewl_View *view, Ewl_View_Assign
assign);
Ewl_View_Assign ewl_view_assign_get(Ewl_View *view);
+
+void ewl_view_data_free_set(Ewl_View *view,
Ewl_View_Data_Free assign);
+Ewl_View_Data_Free ewl_view_data_free_get(Ewl_View *view);
void ewl_view_header_fetch_set(Ewl_View *v,
Ewl_View_Header_Fetch f);
Ewl_View_Header_Fetch ewl_view_header_fetch_get(Ewl_View *v);
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs