# HG changeset patch # User Will Thompson # Date 1198950044 0 # Node ID 61b6e842a5bd1c52a177488fcb1d7457302a5cf3 # Parent 93e2caaa37acb0b138b28366d4c4b9f50b365705 Clarify documentation of confusingly-named and -valued signal priority constants. References to Matthew 20:16 are strictly optional. diff -r 93e2caaa37ac -r 61b6e842a5bd libpurple/signals.h --- a/libpurple/signals.h Sat Dec 29 04:46:49 2007 +0000 +++ b/libpurple/signals.h Sat Dec 29 17:40:44 2007 +0000 @@ -44,11 +44,24 @@ /**************************************************************************/ /*@{*/ -/** - * Signal Connect Priorities +/** The priority of a signal connected using purple_signal_connect(). + * + * @see purple_signal_connect_priority() */ #define PURPLE_SIGNAL_PRIORITY_DEFAULT 0 +/** The largest signal priority; signals with this priority will be called + * last. (This is highest as in numerical value, not as in order of + * importance.) + * + * @see purple_signal_connect_priority(). + */ #define PURPLE_SIGNAL_PRIORITY_HIGHEST 9999 +/** The smallest signal priority; signals with this priority will be called + * first. (This is lowest as in numerical value, not as in order of + * importance.) + * + * @see purple_signal_connect_priority(). + */ #define PURPLE_SIGNAL_PRIORITY_LOWEST -9999 /** @@ -109,19 +122,21 @@ * @param handle The handle of the receiver. * @param func The callback function. * @param data The data to pass to the callback function. - * @param priority The priority with which the handler should be called. Signal handlers are called - * in order from PURPLE_SIGNAL_PRIORITY_LOWEST to PURPLE_SIGNAL_PRIORITY_HIGHEST. + * @param priority The priority with which the handler should be called. Signal + * handlers are called in ascending numerical order of @a + * priority from #PURPLE_SIGNAL_PRIORITY_LOWEST to + * #PURPLE_SIGNAL_PRIORITY_HIGHEST. * * @return The signal handler ID. * * @see purple_signal_disconnect() */ gulong purple_signal_connect_priority(void *instance, const char *signal, - void *handle, PurpleCallback func, void *data, int priority); + void *handle, PurpleCallback func, void *data, int priority); /** * Connects a signal handler to a signal for a particular object. - * (priority defaults to 0) + * (Its priority defaults to 0, aka #PURPLE_SIGNAL_PRIORITY_DEFAULT.) * * Take care not to register a handler function twice. Purple will * not correct any mistakes for you in this area. @@ -137,7 +152,7 @@ * @see purple_signal_disconnect() */ gulong purple_signal_connect(void *instance, const char *signal, - void *handle, PurpleCallback func, void *data); + void *handle, PurpleCallback func, void *data); /** * Connects a signal handler to a signal for a particular object. @@ -153,18 +168,22 @@ * @param handle The handle of the receiver. * @param func The callback function. * @param data The data to pass to the callback function. - * @param priority The order in which the signal should be added to the list + * @param priority The priority with which the handler should be called. Signal + * handlers are called in ascending numerical order of @a + * priority from #PURPLE_SIGNAL_PRIORITY_LOWEST to + * #PURPLE_SIGNAL_PRIORITY_HIGHEST. * * @return The signal handler ID. * * @see purple_signal_disconnect() */ gulong purple_signal_connect_priority_vargs(void *instance, const char *signal, - void *handle, PurpleCallback func, void *data, int priority); + void *handle, PurpleCallback func, void *data, int priority); /** * Connects a signal handler to a signal for a particular object. - * (priority defaults to 0) + * (Its priority defaults to 0, aka #PURPLE_SIGNAL_PRIORITY_DEFAULT.) + * * The signal handler will take a va_args of arguments, instead of * individual arguments. * @@ -182,7 +201,7 @@ * @see purple_signal_disconnect() */ gulong purple_signal_connect_vargs(void *instance, const char *signal, - void *handle, PurpleCallback func, void *data); + void *handle, PurpleCallback func, void *data); /** * Disconnects a signal handler from a signal on an object.