4
#include "baseobject.h"
12
* @defgroup SCallback SCallback
13
* @addtogroup SCallback
15
* Callbacks are used to signals one part of the a program to an other.
16
* It is manly used in SObject s and its children.
22
* An SCallbackEntry is used for convinience when installing callbacks into
23
* SObjects. It may also be used in
25
typedef struct SCallbackEntry SCallbackEntry;
28
* The types for callbacks.
34
S_CALLBACK_NOTIFY_CHANGE
38
* A list containing the names of the callback types.
40
static char * SCallbackTypeNames[] __attribute__((unused)) = {
50
struct SCallbackEntry {
51
char * name; /**< The name that is used to invoke the callback. */
52
SCallbackType type; /**< The type of the callback, is it a standard callback
54
Callback callback; /**< The callback that will be invoked.*/
66
* Installs an array of callcackentries into an SObject.
68
* @param obj The object to install the callback entries into.
69
* @param callbackentries an array containing the callback entries.
71
void s_object_install_callbacks (SObject * obj, SCallbackEntry ** callcackentries);
74
* Installs a singel callback into an SObject.
76
* @param obj The object to install the callback into.
77
* @param callbackentry The callback entry to install.
79
void s_object_install_callback (SObject * obj, SCallbackEntry * callbackentry);