30
32
typedef struct _ObActionsClientData ObActionsClientData;
31
33
typedef struct _ObActionsSelectorData ObActionsSelectorData;
33
typedef gpointer (*ObActionsDataSetupFunc)(ObParseInst *i,
34
xmlDocPtr doc, xmlNodePtr node);
35
35
typedef void (*ObActionsDataFreeFunc)(gpointer options);
36
36
typedef gboolean (*ObActionsRunFunc)(ObActionsData *data,
38
typedef gpointer (*ObActionsDataSetupFunc)(xmlNodePtr node);
38
39
typedef void (*ObActionsShutdownFunc)(void);
39
typedef gboolean (*ObActionsInteractiveInputFunc)(guint initial_state,
43
typedef void (*ObActionsInteractiveCancelFunc)(gpointer options);
41
/* functions for interactive actions */
42
/* return TRUE if the action is going to be interactive, or false to change
43
your mind and make it not */
44
typedef gboolean (*ObActionsIPreFunc)(guint initial_state, gpointer options);
45
typedef void (*ObActionsIPostFunc)(gpointer options);
46
typedef gboolean (*ObActionsIInputFunc)(guint initial_state,
51
typedef void (*ObActionsICancelFunc)(gpointer options);
52
typedef gpointer (*ObActionsIDataSetupFunc)(xmlNodePtr node,
53
ObActionsIPreFunc *pre,
54
ObActionsIInputFunc *input,
55
ObActionsICancelFunc *cancel,
56
ObActionsIPostFunc *post);
45
58
struct _ObActionsData {
56
69
void actions_startup(gboolean reconfigure);
57
70
void actions_shutdown(gboolean reconfigure);
59
/*! If the action is interactive, then i_input and i_cancel are not NULL.
60
Otherwise, they should both be NULL. */
72
/*! Use this if the actions created from this name may be interactive */
73
gboolean actions_register_i(const gchar *name,
74
ObActionsIDataSetupFunc setup,
75
ObActionsDataFreeFunc free,
76
ObActionsRunFunc run);
61
78
gboolean actions_register(const gchar *name,
62
79
ObActionsDataSetupFunc setup,
63
80
ObActionsDataFreeFunc free,
65
ObActionsInteractiveInputFunc i_input,
66
ObActionsInteractiveCancelFunc i_cancel);
81
ObActionsRunFunc run);
68
83
gboolean actions_set_shutdown(const gchar *name,
69
84
ObActionsShutdownFunc shutdown);
71
ObActionsAct* actions_parse(ObParseInst *i,
86
ObActionsAct* actions_parse(xmlNodePtr node);
75
87
ObActionsAct* actions_parse_string(const gchar *name);
77
89
gboolean actions_act_is_interactive(ObActionsAct *act);