aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.h
diff options
context:
space:
mode:
authoroga2009-01-23 18:58:40 +0000
committeroga2009-01-23 18:58:40 +0000
commitf766a2baaec283eabcfa26f0c60e9a596b43459d (patch)
treeaf0bf5a5d5b494570033e062255fb8d34be055dc /calmwm.h
parent4b2cd3a9e6fb79dc8497bc499aea252775e9029c (diff)
downloadcwm-f766a2baaec283eabcfa26f0c60e9a596b43459d.tar.gz
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.h64
1 files changed, 37 insertions, 27 deletions
diff --git a/calmwm.h b/calmwm.h
index 4869890..5c98bd6 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: calmwm.h,v 1.78 2009/01/22 15:26:33 oga Exp $
+ * $Id: calmwm.h,v 1.79 2009/01/23 18:58:40 oga Exp $
*/
#ifndef _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 *);