#include "frame.h"
#include "parser/parse.h"
#include <glib.h>
+#include <X11/Xlib.h>
typedef struct _ObActionsDefinition ObActionsDefinition;
typedef struct _ObActionsAct ObActionsAct;
OB_ACTION_TYPE_SELECTOR
} ObActionsType;
+/* These structures are all castable as eachother */
+
struct _ObActionsAnyData {
ObUserAction uact;
+ Time time;
+ guint state;
+ guint button;
gint x;
gint y;
- gint button;
- Time time;
-
- ObActionsInteractiveState interactive;
};
struct _ObActionsGlobalData {
+ ObActionsType type;
ObActionsAnyData any;
};
struct _ObActionsClientData {
+ ObActionsType type;
ObActionsAnyData any;
struct _ObClient *c;
};
struct _ObActionsSelectorData {
+ ObActionsType type;
ObActionsAnyData any;
+ ObActionsInteractiveState interactive;
GSList *actions;
};
void actions_shutdown(gboolean reconfigure);
gboolean actions_register(const gchar *name,
- gboolean allow_interactive,
+ ObActionsType type,
ObActionsDataSetupFunc setup,
ObActionsDataFreeFunc free,
ObActionsRunFunc run);
void actions_act_ref(ObActionsAct *act);
void actions_act_unref(ObActionsAct *act);
+
+/*! Pass in a GSList of ObActionsAct's to be run */
+void actions_run_acts(GSList *acts,
+ ObUserAction uact,
+ Time time,
+ guint state,
+ guint button,
+ gint x,
+ gint y,
+ ObFrameContext con,
+ struct _ObClient *client,
+ ObActionsInteractiveState interactive);