Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
app_binding.h
Go to the documentation of this file.
1#ifndef APP_BINDING_H
2#define APP_BINDING_H
3
4#include <GLFW/glfw3.h> // IWYU pragma: export
5
17
28
33typedef struct {
34 int key;
35 int mods;
36 const char* action;
37 const char* desc;
41
42enum { MAX_APP_BINDINGS = 128 };
43
48typedef struct {
50 int count;
52
59
68 int key, int mods);
69
75
82 int index);
83
84#endif /* APP_BINDING_H */
BindingCategory
Categories for organization in the help UI.
Definition app_binding.h:10
@ BINDING_CAT_SYSTEM
Definition app_binding.h:14
@ BINDING_CAT_MOVEMENT
Definition app_binding.h:11
@ BINDING_CAT_POSTFX
Definition app_binding.h:13
@ BINDING_CAT_COUNT
Definition app_binding.h:15
@ BINDING_CAT_VISUALS
Definition app_binding.h:12
void app_binding_registry_init(AppBindingRegistry *registry)
Initializes the binding registry and populates it with all application shortcuts.
Definition app_binding.c:23
BindingType
Types of actions for color-coding in the UI.
Definition app_binding.h:22
@ BINDING_TYPE_COUNT
Definition app_binding.h:26
@ BINDING_TYPE_ACTION
Definition app_binding.h:23
@ BINDING_TYPE_CYCLE
Definition app_binding.h:25
@ BINDING_TYPE_TOGGLE
Definition app_binding.h:24
const AppBinding * app_binding_registry_get(const AppBindingRegistry *registry, int key, int mods)
Retrieves the binding for a specific key/mods combination.
Definition app_binding.c:270
@ MAX_APP_BINDINGS
Definition app_binding.h:42
const AppBinding * app_binding_registry_at(const AppBindingRegistry *registry, int index)
Returns a pointer to the binding at the given index.
Definition app_binding.c:287
int app_binding_registry_get_count(const AppBindingRegistry *registry)
Returns the total number of registered bindings.
Definition app_binding.c:282
Central registry that holds application key bindings.
Definition app_binding.h:48
int count
Definition app_binding.h:50
Definition of a single key binding with its help metadata.
Definition app_binding.h:33
int key
Definition app_binding.h:34
const char * action
Definition app_binding.h:36
int mods
Definition app_binding.h:35
BindingType type
Definition app_binding.h:39
const char * desc
Definition app_binding.h:37
BindingCategory category
Definition app_binding.h:38