summaryrefslogtreecommitdiff
path: root/openbox/actions.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-21 22:50:16 +0000
committerDana Jansens <danakj@orodu.net>2007-06-21 22:50:16 +0000
commite5b94e6072287d39a777a3cedd0f10a66c58a2b5 (patch)
treeb808b657089917cd6370f8534382d6539d29bf33 /openbox/actions.h
parente5cc6c82520a0d4828394f5edddded77292f22ce (diff)
some first structural stuff for new actions
Diffstat (limited to 'openbox/actions.h')
-rw-r--r--openbox/actions.h36
1 files changed, 22 insertions, 14 deletions
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 <glib.h>
+
+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;
};