Details
enum GnomeTriggerType
enum GnomeTriggerType {
GTRIG_NONE,
GTRIG_FUNCTION,
GTRIG_COMMAND,
GTRIG_MEDIAPLAY
}; |
GnomeTriggerActionFunction ()
void (*GnomeTriggerActionFunction) (char *msg,
char *level,
char *supinfo[]); |
struct GnomeTrigger
struct GnomeTrigger {
GnomeTriggerType type;
union {
/*
* These will be passed the same info as
* gnome_triggers_do got
*/
GnomeTriggerActionFunction function;
gchar *command;
struct {
gchar *file;
int cache_id;
} media;
} u;
gchar *level;
}; |
gnome_triggers_init ()
void gnome_triggers_init (void); |
gnome_triggers_readfile ()
gint gnome_triggers_readfile (const char *infilename); |
The file should be of the format:
level section type params
Where 'level' indicates the message severity at which this trigger
should be activated, 'section' is a colon-separated list indicating
which part of the "message classification tree" this trigger will
be activated for, 'type' is either "command" (run the command
specified in 'params') or 'play' (play the esd sound sample named
'params').
gnome_triggers_add_trigger ()
Similar to gnome_triggers_readfile(), but gets the trigger information
from the file 'nt' structure and the varargs, instead of from a file.
gnome_triggers_vadd_trigger ()
void gnome_triggers_vadd_trigger (GnomeTrigger *nt,
char *supinfo[]); |
Similar to gnome_triggers_readfile(), but gets the trigger information
from the file 'nt' structure and 'supinfo', instead of from a file.
gnome_triggers_do ()
void gnome_triggers_do (const char *msg,
const char *level,
...); |
Notifies GNOME about an event happening, so GNOME can do cool things.
gnome_triggers_vdo ()
void gnome_triggers_vdo (const char *msg,
const char *level,
const char *supinfo[]); |
Notifies GNOME about an event happening, so GNOME can do cool things.