summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan <okan>2016-10-06 14:41:19 +0000
committerokan <okan>2016-10-06 14:41:19 +0000
commit987ee736b92ec889391283624d84cc6cc87c8c1a (patch)
tree50edaea87e5eb23d2ccf90fa3a5c3bb558121244 /calmwm.h
parent66f5360fd48401a1d8ac204e36567597a3974164 (diff)
downloadcwm-987ee736b92ec889391283624d84cc6cc87c8c1a.tar.gz
cwm-987ee736b92ec889391283624d84cc6cc87c8c1a.tar.xz
cwm-987ee736b92ec889391283624d84cc6cc87c8c1a.zip
Add an argument to the callbacks to pass the xevent context, button or
key press. This allows to remove a few hacks to duplicate functions only
for behaviour changes; now differing behaviours are pushed down to the
callback. Also will allow for previously unavailable actions to be bind-able
down the road.
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/calmwm.h b/calmwm.h
index 15fb8b3..6c5dfa3 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -74,8 +74,8 @@
 #define CWM_GAP			0x0001
 #define CWM_NOGAP		0x0002
 
-#define CWM_KBD			0x0001
-#define CWM_MOUSE		0x0002
+#define CWM_KEY			0x0001
+#define CWM_BTN			0x0002
 
 #define CWM_CONTEXT_NONE	0x0000
 #define CWM_CONTEXT_CLIENT	0x0001
@@ -245,7 +245,7 @@ TAILQ_HEAD(screen_ctx_q, screen_ctx);
 
 struct binding {
 	TAILQ_ENTRY(binding)	 entry;
-	void			(*callback)(struct client_ctx *, union arg *);
+	void			(*callback)(struct client_ctx *, union arg *, int);
 	union arg		 argument;
 	unsigned int		 modmask;
 	union press		 press;
@@ -457,52 +457,52 @@ void			 screen_update_geometry(struct screen_ctx *);
 void			 screen_updatestackingorder(struct screen_ctx *);
 void			 screen_assert_clients_within(struct screen_ctx *);
 
-void			 kbfunc_client_cycle(struct client_ctx *, union arg *);
-void			 kbfunc_client_delete(struct client_ctx *, union arg *);
+void			 kbfunc_client_cycle(struct client_ctx *, union arg *, int);
+void			 kbfunc_client_delete(struct client_ctx *, union arg *, int);
 void			 kbfunc_client_grouptoggle(struct client_ctx *,
-			     union arg *);
-void			 kbfunc_client_hide(struct client_ctx *, union arg *);
-void			 kbfunc_client_label(struct client_ctx *, union arg *);
-void			 kbfunc_client_lower(struct client_ctx *, union arg *);
-void			 kbfunc_client_move(struct client_ctx *, union arg *);
+			     union arg *, int);
+void			 kbfunc_client_hide(struct client_ctx *, union arg *, int);
+void			 kbfunc_client_label(struct client_ctx *, union arg *, int);
+void			 kbfunc_client_lower(struct client_ctx *, union arg *, int);
+void			 kbfunc_client_move(struct client_ctx *, union arg *, int);
 void			 kbfunc_client_movetogroup(struct client_ctx *,
-			     union arg *);
-void			 kbfunc_client_raise(struct client_ctx *, union arg *);
-void			 kbfunc_client_rcycle(struct client_ctx *, union arg *);
-void			 kbfunc_client_resize(struct client_ctx *, union arg *);
-void 			 kbfunc_client_tile(struct client_ctx *, union arg *);
+			     union arg *, int);
+void			 kbfunc_client_raise(struct client_ctx *, union arg *, int);
+void			 kbfunc_client_rcycle(struct client_ctx *, union arg *, int);
+void			 kbfunc_client_resize(struct client_ctx *, union arg *, int);
+void 			 kbfunc_client_tile(struct client_ctx *, union arg *, int);
 void			 kbfunc_client_toggle_freeze(struct client_ctx *,
-    			     union arg *);
+    			     union arg *, int);
 void			 kbfunc_client_toggle_fullscreen(struct client_ctx *,
-			     union arg *);
+			     union arg *, int);
 void			 kbfunc_client_toggle_hmaximize(struct client_ctx *,
-			     union arg *);
+			     union arg *, int);
 void			 kbfunc_client_toggle_maximize(struct client_ctx *,
-			     union arg *);
+			     union arg *, int);
 void			 kbfunc_client_toggle_sticky(struct client_ctx *,
-    			     union arg *);
+    			     union arg *, int);
 void			 kbfunc_client_toggle_vmaximize(struct client_ctx *,
-			     union arg *);
-void			 kbfunc_cwm_status(struct client_ctx *, union arg *);
-void			 kbfunc_exec(struct client_ctx *, union arg *);
-void			 kbfunc_exec_lock(struct client_ctx *, union arg *);
-void			 kbfunc_exec_term(struct client_ctx *, union arg *);
+			     union arg *, int);
+void			 kbfunc_cwm_status(struct client_ctx *, union arg *, int);
+void			 kbfunc_exec(struct client_ctx *, union arg *, int);
+void			 kbfunc_exec_lock(struct client_ctx *, union arg *, int);
+void			 kbfunc_exec_term(struct client_ctx *, union arg *, int);
 void			 kbfunc_group_alltoggle(struct client_ctx *,
-			     union arg *);
-void			 kbfunc_group_cycle(struct client_ctx *, union arg *);
-void			 kbfunc_group_only(struct client_ctx *, union arg *);
-void			 kbfunc_group_toggle(struct client_ctx *, union arg *);
-void			 kbfunc_menu_exec(struct client_ctx *, union arg *);
-void			 kbfunc_menu_client(struct client_ctx *, union arg *);
-void			 kbfunc_menu_cmd(struct client_ctx *, union arg *);
-void			 kbfunc_menu_group(struct client_ctx *, union arg *);
-void			 kbfunc_menu_ssh(struct client_ctx *, union arg *);
-void			 kbfunc_ptrmove(struct client_ctx *, union arg *);
+			     union arg *, int);
+void			 kbfunc_group_cycle(struct client_ctx *, union arg *, int);
+void			 kbfunc_group_only(struct client_ctx *, union arg *, int);
+void			 kbfunc_group_toggle(struct client_ctx *, union arg *, int);
+void			 kbfunc_menu_exec(struct client_ctx *, union arg *, int);
+void			 kbfunc_menu_client(struct client_ctx *, union arg *, int);
+void			 kbfunc_menu_cmd(struct client_ctx *, union arg *, int);
+void			 kbfunc_menu_group(struct client_ctx *, union arg *, int);
+void			 kbfunc_menu_ssh(struct client_ctx *, union arg *, int);
+void			 kbfunc_ptrmove(struct client_ctx *, union arg *, int);
 
 void			 mousefunc_client_move(struct client_ctx *,
-    			    union arg *);
+    			    union arg *, int);
 void			 mousefunc_client_resize(struct client_ctx *,
-    			    union arg *);
+    			    union arg *, int);
 
 void			 menu_windraw(struct screen_ctx *, Window,
 			     const char *, ...);