![]() |
![]() |
![]() |
GNOME Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libgnome/libgnome.h> enum GnomeTriggerType; void (*GnomeTriggerActionFunction) (char *msg
,char *level
,char *supinfo[]
); GnomeTrigger; void gnome_triggers_add_trigger (GnomeTrigger *nt
,...
); void gnome_triggers_vadd_trigger (GnomeTrigger *nt
,char *supinfo[]
); void gnome_triggers_do (const char *msg
,const char *level
,...
); void gnome_triggers_vdo (const char *msg
,const char *level
,const char *supinfo[]
);
typedef enum { GTRIG_NONE, GTRIG_FUNCTION, GTRIG_COMMAND, GTRIG_MEDIAPLAY } GnomeTriggerType;
void (*GnomeTriggerActionFunction) (char *msg
,char *level
,char *supinfo[]
);
typedef struct { GnomeTriggerType type; union { /* * These will be passed the same info as * gnome_triggers_do was given. */ GnomeTriggerActionFunction function; gchar *command; struct { gchar *file; int cache_id; } media; } u; gchar *level; } GnomeTrigger;
void gnome_triggers_add_trigger (GnomeTrigger *nt
,...
);
Adds a new GnomeTrigger instance to the event hierarchy.
|
Information on the new trigger to be added. |
|
The section to add the trigger under. |
void gnome_triggers_vadd_trigger (GnomeTrigger *nt
,char *supinfo[]
);
This does the same as gnome_triggers_add_trigger()
, except the section is
stored in the NULL
terminated array supinfo
instead of as a variable
length argument list.
|
Information on the new trigger to be added. |
|
The section to add the trigger under. |
void gnome_triggers_do (const char *msg
,const char *level
,...
);
Notifies GNOME about an event happening, so that any appropriate handlers can be run.
|
The human-readable message describing the event (can be NULL ). |
|
The level of severity of the event, or NULL . |
|
The classification of the event. |
void gnome_triggers_vdo (const char *msg
,const char *level
,const char *supinfo[]
);
Notifies GNOME about an event happening, so that any appropriate handlers
can be run. This does the same as gnome_trigger_do()
except that it takes a
NULL
terminated array instead of a varargs list.
|
The human-readable message describing the event (can be NULL ). |
|
The level of severity of the event, or NULL . |
|
The classification of the event (NULL terminated array). |