summaryrefslogtreecommitdiffstats
path: root/include/keyb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/keyb.h')
-rw-r--r--include/keyb.h59
1 files changed, 40 insertions, 19 deletions
diff --git a/include/keyb.h b/include/keyb.h
index 37263a34..e33b00b0 100644
--- a/include/keyb.h
+++ b/include/keyb.h
@@ -28,19 +28,34 @@
#ifndef ROFI_KEYB_H
#define ROFI_KEYB_H
+#include "nkutils-bindings.h"
+
/**
* @defgroup KEYB KeyboardBindings
*
* @{
*/
+typedef enum
+{
+ SCOPE_GLOBAL,
+ SCOPE_MOUSE_LISTVIEW,
+ SCOPE_MOUSE_LISTVIEW_ELEMENT,
+
+#define SCOPE_MIN_FIXED SCOPE_MOUSE_EDITBOX
+ SCOPE_MOUSE_EDITBOX,
+ SCOPE_MOUSE_SCROLLBAR,
+ SCOPE_MOUSE_SIDEBAR_MODI,
+#define SCOPE_MAX_FIXED SCOPE_MOUSE_SIDEBAR_MODI
+} BindingsScope;
+
/**
* List of all possible actions that can be triggered by a keybinding.
*/
typedef enum
{
/** Paste from primary clipboard */
- PASTE_PRIMARY = 0,
+ PASTE_PRIMARY = 1,
/** Paste from secondary clipboard */
PASTE_SECONDARY,
/** Clear the entry box. */
@@ -119,14 +134,36 @@ typedef enum
SELECT_ELEMENT_8,
SELECT_ELEMENT_9,
SELECT_ELEMENT_10,
- NUM_ABE
} KeyBindingAction;
+typedef enum
+{
+ SCROLL_LEFT = 1,
+ SCROLL_RIGHT,
+ SCROLL_DOWN,
+ SCROLL_UP,
+} MouseBindingListviewAction;
+
+typedef enum
+{
+ SELECT_HOVERED_ENTRY = 1,
+ ACCEPT_HOVERED_ENTRY,
+ ACCEPT_HOVERED_CUSTOM,
+} MouseBindingListviewElementAction;
+
+typedef enum
+{
+ MOUSE_CLICK_DOWN = 1,
+ MOUSE_CLICK_UP,
+ MOUSE_DCLICK_DOWN,
+ MOUSE_DCLICK_UP,
+} MouseBindingMouseDefaultAction;
+
/**
* Parse the keybindings.
* This should be called after the setting system is initialized.
*/
-gboolean parse_keys_abe ( void );
+gboolean parse_keys_abe ( NkBindings *bindings );
/**
* Setup the keybindings
@@ -134,21 +171,5 @@ gboolean parse_keys_abe ( void );
*/
void setup_abe ( void );
-/**
- * Cleanup.
- */
-void cleanup_abe ( void );
-
-/**
- * Find if a binding has been triggered.
- * @returns NUM_ABE if no key combo matches, a valid action otherwise.
- */
-KeyBindingAction abe_find_action ( unsigned int mask, xkb_keysym_t key );
-
-/**
- * Trigger keybinding on key release.
- */
-void abe_trigger_release ( void );
-
/*@}*/
#endif // ROFI_KEYB_H