aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan2014-01-29 21:13:52 +0000
committerokan2014-01-29 21:13:52 +0000
commitf97feb3ccf6b2eed9c7dcc0960b4872dbdaa1521 (patch)
tree4295b7abba2af66f36dc74aaa5c8d8c91722d24e /calmwm.h
parentfa7fc8c0d3bdc53f02cfb0ce1a1de69188f0a18f (diff)
downloadcwm-f97feb3ccf6b2eed9c7dcc0960b4872dbdaa1521.tar.gz
Merge keybinding and mousebinding queues into using the same merged
struct, binding; they were essentially the same accept for what was 'pressed', keysym or button.
Diffstat (limited to '')
-rw-r--r--calmwm.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/calmwm.h b/calmwm.h
index 930fc12..11c4a02 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.
*
- * $OpenBSD: calmwm.h,v 1.249 2014/01/29 18:34:22 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.250 2014/01/29 21:13:52 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -94,6 +94,11 @@ union arg {
int i;
};
+union press {
+ KeySym keysym;
+ unsigned int button;
+};
+
enum cursor_font {
CF_DEFAULT,
CF_MOVE,
@@ -247,26 +252,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;
@@ -290,10 +286,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