]> icculus.org git repositories - dana/openbox.git/blob - plugins/keyboard/keyaction.h
mouse and key bindings plugins work. segfault somewhere still on shutdown
[dana/openbox.git] / plugins / keyboard / keyaction.h
1 #ifndef __plugin_keyboard_action_h
2 #define __plugin_keyboard_action_h
3
4 #include "../../kernel/action.h"
5
6 typedef enum {
7     DataType_Bool,
8     DataType_Int,
9     DataType_Uint,
10     DataType_String
11 } KeyActionDataType;
12
13 typedef union {
14     gboolean b;
15     int i;
16     guint u;
17     char *s;
18 } KeyActionData;
19
20 typedef struct {
21     Action action;
22     KeyActionDataType type[2];
23     KeyActionData data[2];
24 } KeyAction;
25
26 void keyaction_set_none(KeyAction *a, guint index);
27 void keyaction_set_bool(KeyAction *a, guint index, gboolean bool);
28 void keyaction_set_int(KeyAction *a, guint index, int i);
29 void keyaction_set_uint(KeyAction *a, guint index, guint uint);
30 void keyaction_set_string(KeyAction *a, guint index, char *string);
31
32 void keyaction_free(KeyAction *a);
33
34 void keyaction_do(KeyAction *a, Client *c);
35
36 #endif