From c13dbbd835133e5160bdeefa8251adef63c56a9e Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 14 Jun 2008 21:48:54 +0000 Subject: confable menu and window mouse bindings from rivo nurges (thanks!) with some minor fixups, man page bits and knf. ok oga@ --- calmwm.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'calmwm.h') diff --git a/calmwm.h b/calmwm.h index 00f6149..88f44a7 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.51 2008/06/12 19:10:56 okan Exp $ + * $Id: calmwm.h,v 1.52 2008/06/14 21:48:54 okan Exp $ */ #ifndef _CALMWM_H_ @@ -249,8 +249,20 @@ struct cmd { /* (argv) */ }; +struct mousebinding { + int modmask; + int button; + int context; + void (*callback)(struct client_ctx *, void *); + TAILQ_ENTRY(mousebinding) entry; +}; + +#define MOUSEBIND_CTX_ROOT 1 +#define MOUSEBIND_CTX_WIN 2 + TAILQ_HEAD(keybinding_q, keybinding); TAILQ_HEAD(cmd_q, cmd); +TAILQ_HEAD(mousebinding_q, mousebinding); /* Global configuration */ struct conf { @@ -259,6 +271,7 @@ struct conf { struct winmatch_q ignoreq; char conf_path[MAXPATHLEN]; struct cmd_q cmdq; + struct mousebinding_q mousebindingq; #define CONF_STICKY_GROUPS 0x0001 int flags; @@ -424,6 +437,8 @@ void conf_setup(struct conf *, const char *); void conf_client(struct client_ctx *); void conf_bindname(struct conf *, char *, char *); void conf_unbind(struct conf *, struct keybinding *); +void conf_mousebind(struct conf *, char *, char *); +void conf_mouseunbind(struct conf *, struct mousebinding *); int conf_changed(char *); void conf_reload(struct conf *); @@ -450,6 +465,15 @@ void kbfunc_ssh(struct client_ctx *, void *); void kbfunc_term(struct client_ctx *, void *); void kbfunc_lock(struct client_ctx *, void *); +void mousefunc_window_resize(struct client_ctx *, void *); +void mousefunc_window_move(struct client_ctx *, void *); +void mousefunc_window_grouptoggle(struct client_ctx *, + void *); +void mousefunc_window_lower(struct client_ctx *, void *); +void mousefunc_menu_group(struct client_ctx *, void *); +void mousefunc_menu_unhide(struct client_ctx *, void *); +void mousefunc_menu_cmd(struct client_ctx *, void *); + void search_match_client(struct menu_q *, struct menu_q *, char *); void search_print_client(struct menu *, int); -- cgit v1.2.3-2-gb3c3