summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2016-11-23 03:22:23 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2016-11-23 03:22:23 +0100
commitec8132fffa4e61d7a390e96bcd229c74841595ea (patch)
tree604d178ffb6e3de2439b0fc46757f83c06c6fd6a /src/actions.c
parent3812467f4341abae87185c327e2e771c2fa903c6 (diff)
downloadratpoison-ec8132fffa4e61d7a390e96bcd229c74841595ea.zip
Move more stuff from actions.h to actions.c
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index 87a404e..fa09593 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -41,9 +41,55 @@
#endif
+
+
+/* arg_REST and arg_SHELLCMD eat the rest of the input. */
+enum argtype {
+ arg_REST,
+ arg_NUMBER,
+ arg_STRING,
+ arg_FRAME,
+ arg_WINDOW,
+ arg_COMMAND,
+ arg_SHELLCMD,
+ arg_KEYMAP,
+ arg_KEY,
+ arg_GRAVITY,
+ arg_GROUP,
+ arg_HOOK,
+ arg_VARIABLE,
+ arg_RAW,
+};
+
+union arg_union {
+ rp_frame *frame;
+ int number;
+ float fnumber;
+ rp_window *win;
+ rp_keymap *keymap;
+ rp_group *group;
+ struct list_head *hook;
+ struct set_var *variable;
+ struct rp_key *key;
+ int gravity;
+};
+
+struct cmdarg
+{
+ int type;
+ char *string;
+ union arg_union arg;
+ struct list_head node;
+};
#define ARG_STRING(elt) args[elt]->string
#define ARG(elt, type) args[elt]->arg.type
+struct argspec
+{
+ int type;
+ char *prompt;
+};
+
struct set_var
{
char *var;