cursor_shape.h
Go to the documentation of this file.
1 #ifndef NVIM_CURSOR_SHAPE_H
2 #define NVIM_CURSOR_SHAPE_H
3 
5 #include "nvim/types.h"
6 
9 typedef enum {
26  SHAPE_IDX_SM = 16,
28 } ModeShape;
29 
30 typedef enum {
32  SHAPE_HOR = 1,
33  SHAPE_VER = 2,
34 } CursorShape;
35 
36 #define MSHAPE_NUMBERED 1000 // offset for shapes identified by number
37 #define MSHAPE_HIDE 1 // hide mouse pointer
38 
39 #define SHAPE_MOUSE 1 // used for mouse pointer shape
40 #define SHAPE_CURSOR 2 // used for text cursor shape
41 
42 typedef struct cursor_entry {
43  char *full_name;
45  int mshape;
46  int percentage;
47  long blinkwait;
48  long blinkon;
49  long blinkoff;
50  int id;
51  int id_lm;
52  char *name;
53  char used_for;
55 
57 
58 #ifdef INCLUDE_GENERATED_DECLARATIONS
59 # include "cursor_shape.h.generated.h"
60 #endif
61 #endif // NVIM_CURSOR_SHAPE_H
cursor_entry::blinkwait
long blinkwait
blinking, wait time before blinking starts
Definition: cursor_shape.h:47
cursor_entry
Definition: cursor_shape.h:42
cursor_entry::used_for
char used_for
SHAPE_MOUSE and/or SHAPE_CURSOR.
Definition: cursor_shape.h:53
SHAPE_IDX_CI
@ SHAPE_IDX_CI
Command line Insert mode.
Definition: cursor_shape.h:15
SHAPE_IDX_N
@ SHAPE_IDX_N
Normal mode.
Definition: cursor_shape.h:10
types.h
SHAPE_VER
@ SHAPE_VER
vertical bar cursor
Definition: cursor_shape.h:33
SHAPE_BLOCK
@ SHAPE_BLOCK
block cursor
Definition: cursor_shape.h:31
SHAPE_IDX_MOREL
@ SHAPE_IDX_MOREL
Hit-return or More in last line.
Definition: cursor_shape.h:25
SHAPE_IDX_STATUS
@ SHAPE_IDX_STATUS
On status line.
Definition: cursor_shape.h:20
cursor_entry::id_lm
int id_lm
highlight group ID for :lmap mode
Definition: cursor_shape.h:51
cursor_entry::name
char * name
mode short name
Definition: cursor_shape.h:52
SHAPE_IDX_VE
@ SHAPE_IDX_VE
Visual mode with 'selection' exclusive.
Definition: cursor_shape.h:18
cursor_entry::id
int id
highlight group ID
Definition: cursor_shape.h:50
cursor_entry::full_name
char * full_name
mode description
Definition: cursor_shape.h:43
SHAPE_IDX_R
@ SHAPE_IDX_R
Replace mode.
Definition: cursor_shape.h:13
SHAPE_IDX_SM
@ SHAPE_IDX_SM
showing matching paren
Definition: cursor_shape.h:26
defs.h
SHAPE_IDX_O
@ SHAPE_IDX_O
Operator-pending mode.
Definition: cursor_shape.h:17
cursor_entry::shape
CursorShape shape
cursor shape: one of the SHAPE_ defines
Definition: cursor_shape.h:44
cursor_entry::blinkon
long blinkon
blinking, on time
Definition: cursor_shape.h:48
SHAPE_IDX_CR
@ SHAPE_IDX_CR
Command line Replace mode.
Definition: cursor_shape.h:16
SHAPE_IDX_CLINE
@ SHAPE_IDX_CLINE
On command line.
Definition: cursor_shape.h:19
SHAPE_IDX_I
@ SHAPE_IDX_I
Insert mode.
Definition: cursor_shape.h:12
shape_table
cursorentry_T shape_table[SHAPE_IDX_COUNT]
Handling of cursor and mouse pointer shapes in various modes.
Definition: cursor_shape.c:22
ModeShape
ModeShape
Definition: cursor_shape.h:9
SHAPE_IDX_C
@ SHAPE_IDX_C
Command line Normal mode.
Definition: cursor_shape.h:14
SHAPE_HOR
@ SHAPE_HOR
horizontal bar cursor
Definition: cursor_shape.h:32
cursor_entry::mshape
int mshape
mouse shape: one of the MSHAPE defines
Definition: cursor_shape.h:45
SHAPE_IDX_VDRAG
@ SHAPE_IDX_VDRAG
dragging a vertical separator line
Definition: cursor_shape.h:23
SHAPE_IDX_VSEP
@ SHAPE_IDX_VSEP
On vertical separator line.
Definition: cursor_shape.h:22
cursor_entry::percentage
int percentage
percentage of cell for bar
Definition: cursor_shape.h:46
SHAPE_IDX_MORE
@ SHAPE_IDX_MORE
Hit-return or More.
Definition: cursor_shape.h:24
cursorentry_T
struct cursor_entry cursorentry_T
CursorShape
CursorShape
Definition: cursor_shape.h:30
SHAPE_IDX_COUNT
@ SHAPE_IDX_COUNT
Definition: cursor_shape.h:27
SHAPE_IDX_SDRAG
@ SHAPE_IDX_SDRAG
dragging a status line
Definition: cursor_shape.h:21
cursor_entry::blinkoff
long blinkoff
blinking, off time
Definition: cursor_shape.h:49
SHAPE_IDX_V
@ SHAPE_IDX_V
Visual mode.
Definition: cursor_shape.h:11