diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-21 23:57:35 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-21 23:57:35 +0000 |
| commit | 314c0566371d83305d723c883884555a24cc0ad8 (patch) | |
| tree | 8e68c95d5089922e480f2dda07523b0d9a0e7f52 /openbox/actions.h | |
| parent | 828d06f271392abbef75bb37e2635b2085bdef90 (diff) | |
make mouse use the new action stuff
Diffstat (limited to 'openbox/actions.h')
| -rw-r--r-- | openbox/actions.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/openbox/actions.h b/openbox/actions.h index 548b40b5..2cafa306 100644 --- a/openbox/actions.h +++ b/openbox/actions.h @@ -20,6 +20,7 @@ #include "frame.h" #include "parser/parse.h" #include <glib.h> +#include <X11/Xlib.h> typedef struct _ObActionsDefinition ObActionsDefinition; typedef struct _ObActionsAct ObActionsAct; @@ -56,21 +57,24 @@ typedef enum { 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; @@ -78,8 +82,10 @@ struct _ObActionsClientData { }; struct _ObActionsSelectorData { + ObActionsType type; ObActionsAnyData any; + ObActionsInteractiveState interactive; GSList *actions; }; @@ -98,7 +104,7 @@ void actions_startup(gboolean reconfigure); void actions_shutdown(gboolean reconfigure); gboolean actions_register(const gchar *name, - gboolean allow_interactive, + ObActionsType type, ObActionsDataSetupFunc setup, ObActionsDataFreeFunc free, ObActionsRunFunc run); @@ -110,3 +116,15 @@ ObActionsAct* actions_parse_string(const gchar *name); 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); |
