From e5b94e6072287d39a777a3cedd0f10a66c58a2b5 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 21 Jun 2007 22:50:16 +0000 Subject: some first structural stuff for new actions --- openbox/actions.h | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'openbox/actions.h') diff --git a/openbox/actions.h b/openbox/actions.h index e2a8499f..cb1d377f 100644 --- a/openbox/actions.h +++ b/openbox/actions.h @@ -16,6 +16,17 @@ See the COPYING file for a copy of the GNU General Public License. */ +#include "misc.h" +#include "frame.h" +#include "parser/parse.h" +#include + +typedef struct _ObActionsDefinition ObActionsDefinition; +typedef struct _ObActionsAnyData ObActionsAnyData; +typedef struct _ObActionsGlobalData ObActionsGlobalData; +typedef struct _ObActionsClientData ObActionsClientData; +typedef struct _ObActionsSelectorData ObActionsSelectorData; + typedef enum { OB_ACTION_DONE, OB_ACTION_CANCELLED, @@ -28,17 +39,16 @@ typedef void (*ObActionsDataParseFunc)(gpointer action_data, ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); typedef void (*ObActionsDataFreeFunc)(gpointer action_data); -typedef void (*ObActionsRunFunc)(ObActionsAnyData *data); +typedef void (*ObActionsRunFunc)(ObActionsAnyData *data, + gpointer action_data); -struct _ObActionsDefinition { - gchar *name; - gboolean interactive; +/* + The theory goes: - ObActionsDataSetupFunc setup; - ObActionsDataParseFunc parse; - ObActionsDataFreeFunc free; - ObActionsRunFunc run; -}; + 06:10 (@dana) hm i think there are 3 types of actions + 06:10 (@dana) global actions, window actions, and selector actions + 06:11 (@dana) eg show menu/exit, raise/focus, and cycling/directional/expose +*/ struct _ObActionsAnyData { ObUserAction uact; @@ -48,23 +58,21 @@ struct _ObActionsAnyData { Time time; ObActionsInteractiveState interactive; - - gpointer action_data; }; struct _ObActionsGlobalData { - ObActionsData any; + ObActionsAnyData any; }; struct _ObActionsClientData { - ObActionsData any; + ObActionsAnyData any; struct _ObClient *c; ObFrameContext context; }; struct _ObActionsSelectorData { - ObActionsData any; + ObActionsAnyData any; GSList *actions; }; -- cgit v1.2.3