summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authoroga <oga>2009-01-23 18:58:40 +0000
committeroga <oga>2009-01-23 18:58:40 +0000
commit779177a53d2d0c9a02905a43f250f4ae08cb1dff (patch)
tree99fae4ece379034da322706e728ab238445e54c8 /calmwm.h
parent87964e5c7e4cfa96f34187a993d10cc5ec37e881 (diff)
downloadcwm-779177a53d2d0c9a02905a43f250f4ae08cb1dff.tar.gz
cwm-779177a53d2d0c9a02905a43f250f4ae08cb1dff.tar.xz
cwm-779177a53d2d0c9a02905a43f250f4ae08cb1dff.zip
Move the keybinding argument to a union to prevent warnings where
sizeof(int) != sizeof(void *). This has been annoying me for ages.

ok okan@, todd@
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h62
1 files changed, 36 insertions, 26 deletions
diff --git a/calmwm.h b/calmwm.h
index 95c4e8c..b1c8b4c 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -205,14 +205,19 @@ TAILQ_HEAD(winmatch_q, winmatch);
 
 #define KBTOGROUP(X) ((X) - 1)
 
+union arg {
+	char	*c;
+	int	 i;
+};
+
 struct keybinding {
+	TAILQ_ENTRY(keybinding)	 entry;
+	void			(*callback)(struct client_ctx *, union arg *);
+	union arg		 argument;
 	int			 modmask;
 	int			 keysym;
 	int			 keycode;
 	int			 flags;
-	void			 (*callback)(struct client_ctx *, void *);
-	void			*argument;
-	TAILQ_ENTRY(keybinding)	 entry;
 };
 
 struct cmd {
@@ -423,29 +428,34 @@ void			 conf_cmd_add(struct conf *, char *, char *, int);
 
 int			 parse_config(const char *, struct conf *);
 
-void			 kbfunc_client_lower(struct client_ctx *, void *);
-void			 kbfunc_client_raise(struct client_ctx *, void *);
-void			 kbfunc_client_search(struct client_ctx *, void *);
-void			 kbfunc_client_hide(struct client_ctx *, void *);
-void			 kbfunc_client_cycle(struct client_ctx *, void *);
-void			 kbfunc_client_rcycle(struct client_ctx *, void *);
-void			 kbfunc_cmdexec(struct client_ctx *, void *);
-void			 kbfunc_client_label(struct client_ctx *, void *);
-void			 kbfunc_client_delete(struct client_ctx *, void *);
-void			 kbfunc_client_group(struct client_ctx *, void *);
-void			 kbfunc_client_cyclegroup(struct client_ctx *, void *);
-void			 kbfunc_client_nogroup(struct client_ctx *, void *);
-void			 kbfunc_client_grouptoggle(struct client_ctx *, void *);
-void			 kbfunc_client_maximize(struct client_ctx *, void *);
-void			 kbfunc_client_vmaximize(struct client_ctx *, void *);
-void			 kbfunc_reload(struct client_ctx *, void *);
-void			 kbfunc_quit_wm(struct client_ctx *, void *);
-void			 kbfunc_moveresize(struct client_ctx *, void *);
-void			 kbfunc_menu_search(struct client_ctx *, void *);
-void			 kbfunc_exec(struct client_ctx *, void *);
-void			 kbfunc_ssh(struct client_ctx *, void *);
-void			 kbfunc_term(struct client_ctx *, void *);
-void			 kbfunc_lock(struct client_ctx *, void *);
+void			 kbfunc_client_lower(struct client_ctx *, union arg *);
+void			 kbfunc_client_raise(struct client_ctx *, union arg *);
+void			 kbfunc_client_search(struct client_ctx *, union arg *);
+void			 kbfunc_client_hide(struct client_ctx *, union arg *);
+void			 kbfunc_client_cycle(struct client_ctx *, union arg *);
+void			 kbfunc_client_rcycle(struct client_ctx *, union arg *);
+void			 kbfunc_cmdexec(struct client_ctx *, union arg *);
+void			 kbfunc_client_label(struct client_ctx *, union arg *);
+void			 kbfunc_client_delete(struct client_ctx *, union arg *);
+void			 kbfunc_client_group(struct client_ctx *, union arg *);
+void			 kbfunc_client_cyclegroup(struct client_ctx *,
+			     union arg *);
+void			 kbfunc_client_nogroup(struct client_ctx *,
+			     union arg *);
+void			 kbfunc_client_grouptoggle(struct client_ctx *,
+			     union arg *);
+void			 kbfunc_client_maximize(struct client_ctx *,
+			     union arg *);
+void			 kbfunc_client_vmaximize(struct client_ctx *,
+			     union arg *);
+void			 kbfunc_reload(struct client_ctx *, union arg *);
+void			 kbfunc_quit_wm(struct client_ctx *, union arg *);
+void			 kbfunc_moveresize(struct client_ctx *, union arg *);
+void			 kbfunc_menu_search(struct client_ctx *, union arg *);
+void			 kbfunc_exec(struct client_ctx *, union arg *);
+void			 kbfunc_ssh(struct client_ctx *, union arg *);
+void			 kbfunc_term(struct client_ctx *, union arg *);
+void			 kbfunc_lock(struct client_ctx *, union arg *);
 
 void			 mousefunc_window_resize(struct client_ctx *, void *);
 void			 mousefunc_window_move(struct client_ctx *, void *);