Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_box.c ewl_box.h ewl_button.c ewl_button.h ewl_container.c
ewl_separator.c ewl_separator.h
Log Message:
Documentation for more widgets.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- ewl_box.c 25 Aug 2003 19:40:42 -0000 1.52
+++ ewl_box.c 27 Aug 2003 22:00:11 -0000 1.53
@@ -63,10 +63,9 @@
int *y, int *align, int *align_size);
/**
- * ewl_box_new - allocate and initialize a new box with given orientation
- * @o: the orientation for the box's layout
- *
- * Returns NULL on failure, or a newly allocated box on success.
+ * @param o: the orientation for the box's layout
+ * @return Returns NULL on failure, or a newly allocated box on success.
+ * @brief Allocate and initialize a new box with given orientation
*/
Ewl_Widget *ewl_box_new(Ewl_Orientation o)
{
@@ -88,11 +87,12 @@
}
/**
- * ewl_box_init - initialize the box to starting values
- * @b: the box to initialize
- * @o: the orientation for the box to layout child widgets
+ * @param b: the box to initialize
+ * @param o: the orientation for the box to layout child widgets
+ * @return Returns no value.
+ * @brief Initialize the box to starting values
*
- * Returns no value. Responsible for setting up default values and callbacks
+ * Responsible for setting up default values and callbacks
* within a box structure.
*/
int ewl_box_init(Ewl_Box * b, Ewl_Orientation o)
@@ -141,11 +141,12 @@
}
/**
- * ewl_box_set_orientation - change the specified box's orientation
- * @b: the box to change the orientation
- * @o: the orientation to set for the box
+ * @param b: the box to change the orientation
+ * @param o: the orientation to set for the box
+ * @return Returns no value.
+ * @brief Change the specified box's orientation
*
- * Returns no value. Changes the orientation of the specified box, and
+ * Changes the orientation of the specified box, and
* reconfigures it in order for the appearance to be updated.
*/
void ewl_box_set_orientation(Ewl_Box * b, Ewl_Orientation o)
@@ -178,11 +179,12 @@
}
/**
- * ewl_box_set_homogeneous - change the homogeneous layout of the box
- * @b: the box to change homogeneous layout
- * @h: the boolean value to change the layout mode to
+ * @param b: the box to change homogeneous layout
+ * @param h: the boolean value to change the layout mode to
+ * @return Returns no value.
+ * @brief Change the homogeneous layout of the box
*
- * Returns no value. Boxes use homogeneous layout by default, this can be used
+ * Boxes use homogeneous layout by default, this can be used
* to change that.
*/
void ewl_box_set_homogeneous(Ewl_Box *b, int h)
@@ -212,11 +214,12 @@
}
/**
- * ewl_box_set_spacing - changes the spacing between the objects in the box
- * @b: the box to change the spacing
- * @s: the spacing to put between the child widgets
+ * @param b: the box to change the spacing
+ * @param s: the spacing to put between the child widgets
+ * @return Returns no value.
+ * @brief Changes the spacing between the objects in the box
*
- * Returns no value. Adjust the spacing of the specified box and reconfigure
+ * Adjust the spacing of the specified box and reconfigure
* it to change the appearance.
*/
void ewl_box_set_spacing(Ewl_Box * b, int s)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_box.h 3 Jun 2003 04:00:39 -0000 1.21
+++ ewl_box.h 27 Aug 2003 22:00:11 -0000 1.22
@@ -1,29 +1,52 @@
-/*\
-|*|
-|*| The box widget is a layout manager and orders widget either horizontally
-|*| or vertically.
-|*|
-\*/
-
#ifndef __EWL_BOX_H__
#define __EWL_BOX_H__
-typedef struct _ewl_box Ewl_Box;
-
+/**
+ * @file ewl_box.h
+ * Defines the Ewl_Box class used for laying out Ewl_Widget's in a horizontal
+ * or vertical line.
+ */
+
+/**
+ * The box widget is an Ewl_Container and lays out Ewl_Widget's either
+ * horizontally or vertically.
+ */
+typedef struct Ewl_Box Ewl_Box;
+
+/**
+ * @def EWL_BOX(box)
+ * Typecast a pointer to an Ewl_Box pointer.
+ */
#define EWL_BOX(box) ((Ewl_Box *) box)
-struct _ewl_box
+/**
+ * @struct Ewl_Box
+ * Inherits from an Ewl_Container to provide layout facilities for child
+ * widgets placed inside. Layout is done horizontally (left-to-right), or
+ * vertically (top-to-bottom). There is also a flag for homogeneous layout,
+ * which gives each child Ewl_Widget equal space inside the Ewl_Box.
+ */
+struct Ewl_Box
{
- Ewl_Container container;
+ Ewl_Container container; /**< Inherit from Ewl_Container */
- Ewl_Orientation orientation;
- unsigned int spacing;
+ Ewl_Orientation orientation; /**< Indicate the orientation of layout */
+ unsigned int spacing; /**< Space between each widget in the box */
- unsigned int homogeneous;
+ unsigned int homogeneous; /**< Flag indicating space assignemnt */
};
+/**
+ * @def ewl_hbox_new()
+ * Shortcut to allocate a new horizontal Ewl_Box.
+ */
#define ewl_hbox_new() ewl_box_new(EWL_ORIENTATION_HORIZONTAL)
+
+/**
+ * @def ewl_vbox_new()
+ * Shortcut to allocate a new vertical Ewl_Box.
+ */
#define ewl_vbox_new() ewl_box_new(EWL_ORIENTATION_VERTICAL)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_button.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- ewl_button.c 16 Jul 2003 21:05:22 -0000 1.46
+++ ewl_button.c 27 Aug 2003 22:00:11 -0000 1.47
@@ -1,11 +1,9 @@
-
#include <Ewl.h>
/**
- * ewl_button_new - allocate and initialize a new button
- * @label: the string to use as a label for the button
- *
- * Returns NULL on failure, a pointer to a new button on success
+ * @param label: the string to use as a label for the button
+ * @return Returns NULL on failure, a pointer to a new button on success
+ * @brief Allocate and initialize a new button
*/
Ewl_Widget *ewl_button_new(char *label)
{
@@ -24,11 +22,12 @@
}
/**
- * ewl_button_init - initialize a button to starting values
- * @b: the button to initialize
- * @label: set the label of the button @b to @label
+ * @param b: the button to initialize
+ * @param label: set the label of the button @b to @a label
+ * @return Returns no value.
+ * @brief Initialize a button to starting values
*
- * Returns no value. Initializes a button to default values and callbacks.
+ * Initializes a button to default values and callbacks.
*/
void ewl_button_init(Ewl_Button * b, char *label)
{
@@ -56,11 +55,10 @@
}
/**
- * ewl_button_set_label - change the label of the specified button
- * @b: the buttons whose label will be changed
- * @l: the new label for the button
- *
- * Returns no value.
+ * @param b: the buttons whose label will be changed
+ * @param l: the new label for the button
+ * @return Returns no value.
+ * @brief Change the label of the specified button
*/
void ewl_button_set_label(Ewl_Button * b, char *l)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_button.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_button.h 14 Aug 2002 02:05:36 -0000 1.16
+++ ewl_button.h 27 Aug 2003 22:00:12 -0000 1.17
@@ -1,19 +1,34 @@
-
-/*
- * The button class is a basic button with a label. This class is inherited by
- * the check button and radio button classes.
- */
-
#ifndef __EWL_BUTTON_H__
#define __EWL_BUTTON_H__
-typedef struct _ewl_button Ewl_Button;
+/**
+ * @file ewl_button.h
+ * The button class is a basic button with a label. This class inherits from
+ * the Ewl_Box to allow for placing any other widget inside the button.
+ */
+
+/**
+ * The button provides a simple wrapper for creating a clickable Ewl_Widget
+ * with an Ewl_Text displayed inside.
+ */
+typedef struct Ewl_Button Ewl_Button;
+/**
+ * @def EWL_BUTTON(button)
+ * Typecast a pointer to an Ewl_Button pointer.
+ */
#define EWL_BUTTON(button) ((Ewl_Button *) button)
-struct _ewl_button {
- Ewl_Box box;
- Ewl_Widget *label_object;
+/**
+ * @struct Ewl_Button
+ * @brief A simple Ewl_Widget to provide for a clickable button in the UI.
+ * Provides easy facilities for adding a Ewl_Text label to the button, but
+ * allows for placing any number of Ewl_Widget's in the Ewl_Button.
+ */
+struct Ewl_Button
+{
+ Ewl_Box box; /**< Inherit from the box for adding widgets */
+ Ewl_Widget *label_object; /**< Labels are common, make it easy */
};
Ewl_Widget *ewl_button_new(char *l);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ewl_container.c 27 Aug 2003 07:21:14 -0000 1.40
+++ ewl_container.c 27 Aug 2003 22:00:12 -0000 1.41
@@ -112,7 +112,7 @@
* @return Returns no value.
* @brief Set function to be called when children resize
*
- * Changes the resize nofitier function of @a container to @a resize.
+ * Changes the resize notifier function of @a container to @a resize.
*/
void
ewl_container_resize_notify(Ewl_Container * container, Ewl_Child_Resize resize)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_separator.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- ewl_separator.c 28 Jun 2003 06:50:32 -0000 1.20
+++ ewl_separator.c 27 Aug 2003 22:00:14 -0000 1.21
@@ -1,11 +1,9 @@
#include <Ewl.h>
/**
- * ewl_separator_new - allocate a new separator widget
- * @o: the orientation of the newly allocated separator widget
- *
- * Returns a pointer to the newly alloacted separator widget on success, NULL
- * on failure.
+ * @param o: the orientation of the newly allocated separator widget
+ * @return Returns pointer to new separator widget on success, NULL on failure.
+ * @brief Allocate a new separator widget
*/
Ewl_Widget *ewl_separator_new(Ewl_Orientation o)
{
@@ -22,12 +20,13 @@
}
/**
- * ewl_separator_init - initialize the separator and inherited fields
- * @s: the separator to initialize
- * @o: the orientation of the separator to be initialized
+ * @param s: the separator to initialize
+ * @param o: the orientation of the separator to be initialized
+ * @return Returns no value.
+ * @brief Initialize the separator and inherited fields
*
- * Returns no value. Clears the contents of the separator and stores the
- * default values along with the orientation specified by @o.
+ * Clears the contents of the separator and stores the
+ * default values along with the orientation specified by @a o.
*/
void ewl_separator_init(Ewl_Separator * s, Ewl_Orientation o)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_separator.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_separator.h 25 May 2002 05:46:42 -0000 1.12
+++ ewl_separator.h 27 Aug 2003 22:00:14 -0000 1.13
@@ -2,16 +2,45 @@
#ifndef __EWL_SEPARATOR_H__
#define __EWL_SEPARATOR_H__
-typedef struct _ewl_separator Ewl_Separator;
+/**
+ * @file ewl_separator.h
+ * Defines the Ewl_Separator class used for drawing lines between widgets when
+ * visual separation is needed.
+ */
+/**
+ * Provides an Ewl_Widget to simply act as a separator between other
+ * Ewl_Widget's.
+ */
+typedef struct Ewl_Separator Ewl_Separator;
+
+/**
+ * @def EWL_SEPARATOR(separator)
+ * Typecast a pointer to an Ewl_Separator pointer.
+ */
#define EWL_SEPARATOR(separator) ((Ewl_Separator *) separator)
-struct _ewl_separator {
- Ewl_Widget widget;
- Ewl_Orientation orientation;
+/**
+ * @struct Ewl_Separator
+ * @brief Inherits from Ewl_Widget to allow drawing a horizontal or vertical
+ * line between widgets, depending on the orientation the Ewl_Separator.
+ */
+struct Ewl_Separator
+{
+ Ewl_Widget widget; /**< Inherit from Ewl_Widget */
+ Ewl_Orientation orientation; /**< Sets drawing horizontal or vertical */
};
+/**
+ * @def ewl_hseparator_new()
+ * @brief Convenience macro to easily define a horizontal separator.
+ */
#define ewl_hseparator_new() ewl_separator_new(EWL_ORIENTATION_HORIZONTAL)
+
+/**
+ * @def ewl_vseparator_new()
+ * @brief Convenience macro to easily define a vertical separator.
+ */
#define ewl_vseparator_new() ewl_separator_new(EWL_ORIENTATION_VERTICAL)
Ewl_Widget *ewl_separator_new(Ewl_Orientation o);
-------------------------------------------------------
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