summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan <okan>2014-01-29 22:30:00 +0000
committerokan <okan>2014-01-29 22:30:00 +0000
commit1fd3fc49974bdc0c7703b53d9eaea29529e80643 (patch)
tree8f675eaa3c96da03db2404ea9b28390af60a459e /calmwm.h
parent2b233f0548bb026eebb336bcdac57e48f0839e5c (diff)
parent2be890489b8542b12f77133fbba404210c1b5f54 (diff)
downloadcwm-1fd3fc49974bdc0c7703b53d9eaea29529e80643.tar.gz
cwm-1fd3fc49974bdc0c7703b53d9eaea29529e80643.tar.xz
cwm-1fd3fc49974bdc0c7703b53d9eaea29529e80643.zip
cvsimport
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/calmwm.h b/calmwm.h
index b81b32c..03979e6 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -106,6 +106,11 @@ union arg {
 	int	 i;
 };
 
+union press {
+	KeySym		 keysym;
+	unsigned int	 button;
+};
+
 enum cursor_font {
 	CF_DEFAULT,
 	CF_MOVE,
@@ -259,26 +264,17 @@ struct screen_ctx {
 };
 TAILQ_HEAD(screen_ctx_q, screen_ctx);
 
-struct keybinding {
-	TAILQ_ENTRY(keybinding)	 entry;
+struct binding {
+	TAILQ_ENTRY(binding)	 entry;
 	void			(*callback)(struct client_ctx *, union arg *);
 	union arg		 argument;
 	unsigned int		 modmask;
-	KeySym			 keysym;
+	union press		 press;
 	int			 flags;
 	int			 argtype;
 };
-TAILQ_HEAD(keybinding_q, keybinding);
-
-struct mousebinding {
-	TAILQ_ENTRY(mousebinding)	entry;
-	void			 	(*callback)(struct client_ctx *, union arg *);
-	union arg			argument;
-	unsigned int			modmask;
-	unsigned int		 	button;
-	int				flags;
-};
-TAILQ_HEAD(mousebinding_q, mousebinding);
+TAILQ_HEAD(keybinding_q, binding);
+TAILQ_HEAD(mousebinding_q, binding);
 
 struct cmd {
 	TAILQ_ENTRY(cmd)	entry;
@@ -302,10 +298,10 @@ TAILQ_HEAD(menu_q, menu);
 
 struct conf {
 	struct keybinding_q	 keybindingq;
+	struct mousebinding_q	 mousebindingq;
 	struct autogroupwin_q	 autogroupq;
 	struct winmatch_q	 ignoreq;
 	struct cmd_q		 cmdq;
-	struct mousebinding_q	 mousebindingq;
 #define	CONF_STICKY_GROUPS		0x0001
 	int			 flags;
 #define CONF_BWIDTH			1
@@ -493,7 +489,7 @@ void			 kbfunc_cmdexec(struct client_ctx *, union arg *);
 void			 kbfunc_cwm_status(struct client_ctx *, union arg *);
 void			 kbfunc_exec(struct client_ctx *, union arg *);
 void			 kbfunc_lock(struct client_ctx *, union arg *);
-void			 kbfunc_menu_search(struct client_ctx *, union arg *);
+void			 kbfunc_menu_cmd(struct client_ctx *, union arg *);
 void			 kbfunc_ssh(struct client_ctx *, union arg *);
 void			 kbfunc_term(struct client_ctx *, union arg *);
 void 			 kbfunc_tile(struct client_ctx *, union arg *);
@@ -534,7 +530,7 @@ int			 conf_bind_mouse(struct conf *, const char *,
     			     const char *);
 void			 conf_clear(struct conf *);
 void			 conf_client(struct client_ctx *);
-void			 conf_cmd_add(struct conf *, const char *,
+int			 conf_cmd_add(struct conf *, const char *,
 			     const char *);
 void			 conf_cursor(struct conf *);
 void			 conf_grab_kbd(Window);