-typedef enum {
- OB_ACTION_DONE,
- OB_ACTION_CANCELLED,
- OB_ACTION_INTERACTING,
- OB_NUM_ACTIONS_INTERACTIVE_STATES
-} ObActionsInteractiveState;
-
-typedef gpointer (*ObActionsDataSetupFunc)();
-typedef void (*ObActionsDataParseFunc)(gpointer action_data,
- ObParseInst *i,
- xmlDocPtr doc, xmlNodePtr node);
-typedef void (*ObActionsDataFreeFunc)(gpointer action_data);
-typedef void (*ObActionsRunFunc)(ObActionsAnyData *data);
-
-struct _ObActionsDefinition {
- gchar *name;
- gboolean interactive;
-
- ObActionsDataSetupFunc setup;
- ObActionsDataParseFunc parse;
- ObActionsDataFreeFunc free;
- ObActionsRunFunc run;
-};
-
-struct _ObActionsAnyData {
+#include "misc.h"
+#include "frame.h"
+#include "obt/xml.h"
+#include "obt/keyboard.h"
+
+#include <glib.h>
+#include <X11/Xlib.h>
+
+typedef struct _ObActionsDefinition ObActionsDefinition;
+typedef struct _ObActionsAct ObActionsAct;
+typedef struct _ObActionsData ObActionsData;
+typedef struct _ObActionsAnyData ObActionsAnyData;
+typedef struct _ObActionsGlobalData ObActionsGlobalData;
+typedef struct _ObActionsClientData ObActionsClientData;
+typedef struct _ObActionsSelectorData ObActionsSelectorData;
+
+typedef void (*ObActionsDataFreeFunc)(gpointer options);
+typedef gboolean (*ObActionsRunFunc)(ObActionsData *data,
+ gpointer options);
+typedef gpointer (*ObActionsDataSetupFunc)(xmlNodePtr node);
+typedef void (*ObActionsShutdownFunc)(void);
+
+/* functions for interactive actions */
+/* return TRUE if the action is going to be interactive, or false to change
+ your mind and make it not */
+typedef gboolean (*ObActionsIPreFunc)(guint initial_state, gpointer options);
+typedef void (*ObActionsIPostFunc)(gpointer options);
+typedef gboolean (*ObActionsIInputFunc)(guint initial_state,
+ XEvent *e,
+ ObtIC *ic,
+ gpointer options,
+ gboolean *used);
+typedef void (*ObActionsICancelFunc)(gpointer options);
+typedef gpointer (*ObActionsIDataSetupFunc)(xmlNodePtr node,
+ ObActionsIPreFunc *pre,
+ ObActionsIInputFunc *input,
+ ObActionsICancelFunc *cancel,
+ ObActionsIPostFunc *post);
+
+struct _ObActionsData {