Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_menu.c ewl_menu.h ewl_spinner.c ewl_spinner.h
Log Message:
Docs for the spinner and menu widgets.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_menu.c 13 Jul 2003 05:52:49 -0000 1.8
+++ ewl_menu.c 5 Sep 2003 15:17:37 -0000 1.9
@@ -17,12 +17,11 @@
void __ewl_menu_start(Ewl_Widget * w);
/**
- * ewl_menu_new - create a new internal menu
- * @image: the image icon to use for this menu
- * @title: the text to place in the menu
+ * @param image: the image icon to use for this menu
+ * @param title: the text to place in the menu
+ * @brief Create a new internal menu
*
- * Returns a pointer to a newly allocated menu on success, NULL on
- * failure.
+ * @return Returns a new menu on success, NULL on failure.
*/
Ewl_Widget *ewl_menu_new(char *image, char *title)
{
@@ -43,12 +42,11 @@
/**
- * ewl_menu_init - initialize an internal menu to starting values
- * @menu: the menu to initialize
- * @follows: the widget the menu will follow
- * @type: the menu type
- *
- * Returns nothing.
+ * @param menu: the menu to initialize
+ * @param image: the path to the icon image
+ * @param title: the text label to be displayed
+ * @return Returns no value.
+ * @brief Initialize an internal menu to starting values
*/
void ewl_menu_init(Ewl_Menu * menu, char *image, char *title)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_menu.h 25 May 2002 05:46:41 -0000 1.2
+++ ewl_menu.h 5 Sep 2003 15:17:37 -0000 1.3
@@ -1,12 +1,42 @@
#ifndef __EWL_MENU_H__
#define __EWL_MENU_H__
-#define Ewl_Menu Ewl_Menu_Base
+/**
+ * @defgroup Ewl_Menu A Popup Menu
+ * Provides a popup menu for displaying a list of options.
+ *
+ * @{
+ */
+
+/**
+ * A simple popup menu widget, with the capability of being nested inside
+ * another menu.
+ */
+typedef struct Ewl_Menu Ewl_Menu;
+
+/**
+ * @def EWL_MENU(menu)
+ * Typecasts a pointer to an Ewl_Menu pointer.
+ */
#define EWL_MENU(menu) ((Ewl_Menu *) menu)
+/**
+ * @struct Ewl_Menu
+ * Inherits from Ewl_Menu_Base and adds on functionality for displaying a
+ * pop-up menu that is in a window of it's own.
+ */
+struct Ewl_Menu
+{
+ Ewl_Menu_Base base; /**< Inherit from Ewl_Menu_Base */
+};
+
Ewl_Widget *ewl_menu_new(char *image, char *title);
void ewl_menu_init(Ewl_Menu * menu, char *image, char *title);
void ewl_menu_set_title_expandable(Ewl_Menu * m);
+
+/**
+ * @}
+ */
#endif /* __EWL_MENU_H__ */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spinner.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_spinner.c 25 Aug 2003 19:40:43 -0000 1.39
+++ ewl_spinner.c 5 Sep 2003 15:17:37 -0000 1.40
@@ -35,10 +35,8 @@
/**
- * ewl_spinner_new - allocate a new spinner widget
- *
- * Returns a pointer to a newly allocated spinner widget on success, NULL on
- * failure.
+ * @return Returns a new spinner widget on success, NULL on failure.
+ * @brief Allocate a new spinner widget
*/
Ewl_Widget *ewl_spinner_new()
{
@@ -57,11 +55,11 @@
}
/**
- * ewl_spinner_init - initialize a spinner to default values and callbacks
- * @s: the spinner to initialize
+ * @param s: the spinner to initialize
+ * @return Returns no value.
+ * @brief Initialize a spinner to default values and callbacks
*
- * Returns no value. Sets the fields and callbacks of the spinner @s their
- * default values.
+ * Sets the fields and callbacks of the spinner @a s their default values.
*/
void ewl_spinner_init(Ewl_Spinner * s)
{
@@ -122,11 +120,12 @@
}
/**
- * ewl_spinner_set_value - set the current value of a spinner widget
- * @s: the spinner widget to set the current value
- * @value: the value to set for the spinner @s
+ * @param s: the spinner widget to set the current value
+ * @param value: the value to set for the spinner @a s
+ * @return Returns no value.
+ * @brief Set the current value of a spinner widget
*
- * Returns no value. Sets the current value of the spinner @s to @value.
+ * Sets the current value of the spinner @a s to @a value.
*/
void ewl_spinner_set_value(Ewl_Spinner * s, double value)
{
@@ -139,10 +138,9 @@
}
/**
- * ewl_spinner_get_value - get the current value of a spinner widget
- * @s: the spinner widget to retrieve the value
- *
- * Returns the current value of the spinner @s on success, -1.0 on failure.
+ * @param s: the spinner widget to retrieve the value
+ * @return Returns the current value in @a s on success, -1.0 on failure.
+ * @brief Get the current value of a spinner widget
*/
double ewl_spinner_get_value(Ewl_Spinner * s)
{
@@ -152,11 +150,12 @@
}
/**
- * ewl_spinner_set_digits - set the number of digits displayed by a spinner
- * @s: the widget to change the number of digits displayed
- * @digits: the number of digits to display for the spinner @s
+ * @param s: the widget to change the number of digits displayed
+ * @param digits: the number of digits to display for the spinner @a s
+ * @return Returns no value.
+ * @brief Set the number of digits displayed by a spinner
*
- * Returns no value. Changes the digits displayed by @s to @digits.
+ * Changes the digits displayed by @a s to @a digits.
*/
void ewl_spinner_set_digits(Ewl_Spinner * s, int digits)
{
@@ -166,11 +165,12 @@
}
/**
- * ewl_spinner_set_min_val - set the minimum value possible for a spinner
- * @s: the spinner to change the minimum possible value
- * @val: the new minimum possible value for @s
+ * @param s: the spinner to change the minimum possible value
+ * @param val: the new minimum possible value for @a s
+ * @return Returns no value.
+ * @brief Set the minimum value possible for a spinner
*
- * Returns no value. Sets the smallest value that @s can obtain to @val.
+ * Sets the smallest value that @a s can obtain to @a val.
*/
void ewl_spinner_set_min_val(Ewl_Spinner * s, double val)
{
@@ -180,11 +180,12 @@
}
/**
- * ewl_spinner_set_max_val - set the maximum value possible for a spinner
- * @s: the spinner to change the maximum possible value
- * @val: the new maximum possible value for @s
+ * @param s: the spinner to change the maximum possible value
+ * @param val: the new maximum possible value for @a s
+ * @return Returns no value.
+ * @brief Set the maximum value possible for a spinner
*
- * Returns no value. Sets the largest value that @s can obtain to @val.
+ * Sets the largest value that @a s can obtain to @a val.
*/
void ewl_spinner_set_max_val(Ewl_Spinner * s, double val)
{
@@ -194,12 +195,13 @@
}
/**
- * ewl_spinner_set_step - set the increment between each click of the spinner
- * @s: the spinner to change increment step
- * @step: the new increment between clicks of the spinner @s
+ * @param s: the spinner to change increment step
+ * @param step: the new increment between clicks of the spinner @a s
+ * @brief Returns no value.
+ * @brief Set the increment between each click of the spinner
*
- * Returns no value. Changes the increment that @s changes by with each click
- * of it's spinner buttons to @step.
+ * Changes the increment that @a s changes by with each click of it's spinner
+ * buttons to @a step.
*/
void ewl_spinner_set_step(Ewl_Spinner * s, double step)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spinner.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_spinner.h 25 May 2002 05:46:42 -0000 1.15
+++ ewl_spinner.h 5 Sep 2003 15:17:37 -0000 1.16
@@ -1,23 +1,43 @@
-
#ifndef __EWL_SPINNER_H__
#define __EWL_SPINNER_H__
-struct _ewl_spinner {
- Ewl_Container container;
- double min_val;
- double max_val;
- double value;
- double step;
- int digits;
- Ewl_Widget *entry;
- Ewl_Widget *button_increase;
- Ewl_Widget *button_decrease;
-};
+/**
+ * @defgroup Ewl_Spinner A Numerical Value Entry
+ * Provides a field for entering numerical values, along with buttons to
+ * increment and decrement the value.
+ *
+ * @{
+ */
-typedef struct _ewl_spinner Ewl_Spinner;
+/**
+ * A combination of entry and increment/decrement buttons for adjusting
+ * numerical values.
+ */
+typedef struct Ewl_Spinner Ewl_Spinner;
+/**
+ * @def EWL_SPINNER(spinner)
+ * Typecasts a pointer to an Ewl_Spinner pointer.
+ */
#define EWL_SPINNER(spinner) ((Ewl_Spinner *) spinner)
+/**
+ * Inherits from Ewl_Container and adds an entry box that can only contain
+ * numerical values as well as buttons for manipulating that value.
+ */
+struct Ewl_Spinner
+{
+ Ewl_Container container; /**< Inherit from Ewl_Container */
+ double min_val; /**< Minimum numerical value displayed */
+ double max_val; /**< Maximum numerical value displayed */
+ double value; /**< Current value displayed */
+ double step; /**< Amount to add or subtract at a time */
+ int digits; /**< Number of digits displayed after decimal */
+ Ewl_Widget *entry; /**< The Ewl_Entry displaying value */
+ Ewl_Widget *button_increase; /**< Ewl_Button to add value */
+ Ewl_Widget *button_decrease; /**< Ewl_Button to subtract value */
+};
+
Ewl_Widget *ewl_spinner_new();
void ewl_spinner_init(Ewl_Spinner * s);
void ewl_spinner_set_value(Ewl_Spinner * s, double value);
@@ -26,5 +46,9 @@
void ewl_spinner_set_min_val(Ewl_Spinner * s, double val);
void ewl_spinner_set_max_val(Ewl_Spinner * s, double val);
void ewl_spinner_set_step(Ewl_Spinner * s, double step);
+
+/**
+ * @}
+ */
#endif /* __EWL_SPINNER_H__ */
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs