mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Cleanup keyb.h file.
This commit is contained in:
parent
493801602a
commit
9492fe7611
2 changed files with 40 additions and 20 deletions
|
@ -27,26 +27,26 @@ typedef enum _KeyBindingAction
|
||||||
} KeyBindingAction;
|
} KeyBindingAction;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _KeyBinding
|
/**
|
||||||
{
|
* Parse the keybindings.
|
||||||
unsigned int modmask;
|
* This should be called after the setting system is initialized.
|
||||||
KeySym keysym;
|
*/
|
||||||
} KeyBinding;
|
|
||||||
|
|
||||||
typedef struct _ActionBindingEntry
|
|
||||||
{
|
|
||||||
const char *name;
|
|
||||||
char *keystr;
|
|
||||||
int num_bindings;
|
|
||||||
KeyBinding *kb;
|
|
||||||
} ActionBindingEntry;
|
|
||||||
|
|
||||||
|
|
||||||
void parse_keys_abe ( void );
|
void parse_keys_abe ( void );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup the keybindings
|
||||||
|
* This adds all the entries to the settings system.
|
||||||
|
*/
|
||||||
void setup_abe ( void );
|
void setup_abe ( void );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup.
|
||||||
|
*/
|
||||||
void cleanup_abe ( void );
|
void cleanup_abe ( void );
|
||||||
|
|
||||||
extern ActionBindingEntry abe[NUM_ABE];
|
/**
|
||||||
|
* Check if this key has been triggered.
|
||||||
|
* @returns TRUE if key combo matches, FALSE otherwise.
|
||||||
|
*/
|
||||||
int abe_test_action ( KeyBindingAction action, unsigned int mask, KeySym key );
|
int abe_test_action ( KeyBindingAction action, unsigned int mask, KeySym key );
|
||||||
#endif // __KEYB_H__
|
#endif // __KEYB_H__
|
||||||
|
|
|
@ -3,10 +3,22 @@
|
||||||
#include "x11-helper.h"
|
#include "x11-helper.h"
|
||||||
#include "xrmoptions.h"
|
#include "xrmoptions.h"
|
||||||
|
|
||||||
ActionBindingEntry abe[NUM_ABE];
|
|
||||||
// Use this so we can ignore numlock mask.
|
|
||||||
// TODO: maybe use something smarter here..
|
|
||||||
extern unsigned int NumlockMask;
|
typedef struct _KeyBinding
|
||||||
|
{
|
||||||
|
unsigned int modmask;
|
||||||
|
KeySym keysym;
|
||||||
|
} KeyBinding;
|
||||||
|
|
||||||
|
typedef struct _ActionBindingEntry
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
char *keystr;
|
||||||
|
int num_bindings;
|
||||||
|
KeyBinding *kb;
|
||||||
|
} ActionBindingEntry;
|
||||||
|
|
||||||
typedef struct _DefaultBinding
|
typedef struct _DefaultBinding
|
||||||
{
|
{
|
||||||
|
@ -15,6 +27,14 @@ typedef struct _DefaultBinding
|
||||||
char *keybinding;
|
char *keybinding;
|
||||||
} DefaultBinding;
|
} DefaultBinding;
|
||||||
|
|
||||||
|
ActionBindingEntry abe[NUM_ABE];
|
||||||
|
// Use this so we can ignore numlock mask.
|
||||||
|
// TODO: maybe use something smarter here..
|
||||||
|
extern unsigned int NumlockMask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LIST OF DEFAULT SETTINGS
|
||||||
|
*/
|
||||||
DefaultBinding bindings[NUM_ABE] =
|
DefaultBinding bindings[NUM_ABE] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue