summaryrefslogtreecommitdiff
path: root/src
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
parent3812467f4341abae87185c327e2e771c2fa903c6 (diff)
downloadratpoison-ec8132fffa4e61d7a390e96bcd229c74841595ea.zip
Move more stuff from actions.h to actions.c
Diffstat (limited to 'src')
-rw-r--r--src/actions.c46
-rw-r--r--src/actions.h49
2 files changed, 48 insertions, 47 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;
diff --git a/src/actions.h b/src/actions.h
index 9f6cda6..29cf984 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -24,58 +24,13 @@
#include "ratpoison.h"
-/* 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;
-};
-
-struct argspec
-{
- int type;
- char *prompt;
-};
-
/* The structure returned by a command. */
-typedef struct cmdret cmdret;
-struct cmdret
+typedef struct cmdret
{
char *output;
int success;
-};
-
void del_frame_undo (rp_frame_undo *u);
+} cmdret;
rp_keymap *find_keymap (char *name);
void init_user_commands(void);