-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnormalMode.h
36 lines (28 loc) · 901 Bytes
/
normalMode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* See LICENSE for license details. */
#ifndef NORMAL_MODE_H
#define NORMAL_MODE_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
/// Used in the configuration file to define custom shortcuts.
typedef struct NormalModeShortcuts {
char key;
char *value;
} NormalModeShortcuts;
/// Holds the exit status of the #kpressNormalMode function, which informs the
/// caller when to exit normal mode.
typedef enum ExitState {
failed = 0,
success = 1,
finished = 2,
} ExitState;
/// Called when curr position is altered.
void onMove(void);
/// Function which returns whether the value at position provided as arguments
/// is to be highlighted.
int highlighted(int, int);
/// Handles keys in normal mode.
ExitState kpressNormalMode(char const * decoded, int len, bool ctrlPressed,
void const * ksym);
//bool esc, bool enter, bool backspace, void* keysym);
#endif // NORMAL_MODE_H