Abstract binding configuration to bindings.[ch]
Create files bindings.[ch] to contain functions for configuring, finding, and running bindings. Use the new function `configure_binding` for binding configuration. This function adds a binding from config parameters. Export the function `modifiers_from_str` from config_directives.h. This change is made in preparation for the new bindmouse functionality.
This commit is contained in:
committed by
Michael Stapelberg
parent
da0acb2080
commit
d24d8baeb5
25
include/bindings.h
Normal file
25
include/bindings.h
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* vim:ts=4:sw=4:expandtab
|
||||
*
|
||||
* i3 - an improved dynamic tiling window manager
|
||||
* © 2009-2014 Michael Stapelberg and contributors (see also: LICENSE)
|
||||
*
|
||||
* bindings.h: Functions for configuring, finding, and running bindings.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* The name of the default mode.
|
||||
*
|
||||
*/
|
||||
const char *DEFAULT_BINDING_MODE;
|
||||
|
||||
/**
|
||||
* Adds a binding from config parameters given as strings and returns a
|
||||
* pointer to the binding structure. Returns NULL if the input code could not
|
||||
* be parsed.
|
||||
*
|
||||
*/
|
||||
Binding *configure_binding(const char *bindtype, const char *modifiers, const char *input_code,
|
||||
const char *release, const char *command, const char *mode);
|
Reference in New Issue
Block a user