docs: Explain enums for properties and signals

Add some more explanatory comments about the PROP_ and
signals enums.
This commit is contained in:
Elliot Smith 2011-01-28 11:39:26 +00:00
parent 18b90f100c
commit 5f676ce325

View File

@ -31,18 +31,24 @@ struct _CbButtonPrivate
gchar *text; gchar *text;
}; };
/* enumerates signal identifiers for this class */ /* enumerates property identifiers for this class;
enum { * note that property identifiers should be non-zero integers,
CLICKED, * so we add an unused PROP_0 to occupy the 0 position in the enum
LAST_SIGNAL */
};
/* enumerates property identifiers for this class */
enum { enum {
PROP_0, PROP_0,
PROP_TEXT PROP_TEXT
}; };
/* enumerates signal identifiers for this class;
* LAST_SIGNAL is not used as a signal identifier, but is instead
* used to delineate the size of the cache array for signals (see below)
*/
enum {
CLICKED,
LAST_SIGNAL
};
/* cache array for signals */ /* cache array for signals */
static guint cb_button_signals[LAST_SIGNAL] = { 0, }; static guint cb_button_signals[LAST_SIGNAL] = { 0, };