Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_checkbutton.c ewl_checkbutton.h 


Log Message:
Use functions to provide NULL and type checks.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_checkbutton.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_checkbutton.c   23 Oct 2005 16:52:36 -0000      1.5
+++ ewl_checkbutton.c   14 Dec 2005 02:32:09 -0000      1.6
@@ -71,6 +71,34 @@
 }
 
 /**
+ * @return Returns no value.
+ * @brief Update the checked state of the check button.
+ */
+void ewl_checkbutton_checked_set(Ewl_CheckButton *cb, int c)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("cb", cb);
+       DCHECK_TYPE("cb", cb, "checkbutton");
+
+       ewl_check_checked_set(EWL_CHECK(EWL_CHECKBUTTON(cb)->check), c);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @brief Retrieve the checked state of a check button.
+ */
+int ewl_checkbutton_is_checked(Ewl_CheckButton *cb)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("cb", cb, FALSE);
+       DCHECK_TYPE("cb", cb, "checkbutton");
+
+       DRETURN_INT(ewl_check_is_checked(EWL_CHECK(EWL_CHECKBUTTON(cb)->check)),
+                       DLEVEL_STABLE);
+}
+
+/**
  * @param cb: the widget to change the label positioning
  * @param p: the new position of the label
  * @return Returns no value.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_checkbutton.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_checkbutton.h   23 Oct 2005 16:52:36 -0000      1.5
+++ ewl_checkbutton.h   14 Dec 2005 02:32:09 -0000      1.6
@@ -44,21 +44,8 @@
 Ewl_Widget     *ewl_checkbutton_new(void);
 int             ewl_checkbutton_init(Ewl_CheckButton *cb);
 
-/**
- * @def ewl_checkbutton_checked_set(cb, c);
- * Shortcut for dereferencing the checkbutton to update the checked state of
- * the Ewl_Check.
- */
-#define ewl_checkbutton_checked_set(cb, c) \
-       ewl_check_checked_set(EWL_CHECK(EWL_CHECKBUTTON(cb)->check), c)
-
-/**
- * @def ewl_checkbutton_is_checked(cb);
- * Shortcut for dereferencing the checkbutton to test the checked state of
- * the Ewl_Check.
- */
-#define ewl_checkbutton_is_checked(cb) \
-       ewl_check_is_checked(EWL_CHECK(EWL_CHECKBUTTON(cb)->check))
+void            ewl_checkbutton_checked_set(Ewl_CheckButton *cb, int checked);
+int             ewl_checkbutton_is_checked(Ewl_CheckButton *cb);
 
 void            ewl_checkbutton_label_position_set(Ewl_CheckButton *cb,
                                                   Ewl_Position p);




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