robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
38986188ba
master
1#pragma once 2 3#include "nvim/api/private/defs.h" // IWYU pragma: keep 4#include "nvim/memory_defs.h" // IWYU pragma: keep 5 6/// struct to store values from 'guicursor' and 'mouseshape' 7/// Indexes in shape_table[] 8typedef enum { 9SHAPE_IDX_N = 0 ,///< Normal mode 10SHAPE_IDX_V = 1 ,///< Visual mode 11SHAPE_IDX_I = 2 ,///< Insert mode 12SHAPE_IDX_R = 3 ,///< Replace mode 13SHAPE_IDX_C = 4 ,///< Command line Normal mode 14SHAPE_IDX_CI = 5 ,///< Command line Insert mode 15SHAPE_IDX_CR = 6 ,///< Command line Replace mode 16SHAPE_IDX_O = 7 ,///< Operator-pending mode 17SHAPE_IDX_VE = 8 ,///< Visual mode with 'selection' exclusive 18SHAPE_IDX_CLINE = 9 ,///< On command line 19SHAPE_IDX_STATUS = 10 ,///< On status line 20SHAPE_IDX_SDRAG = 11 ,///< dragging a status line 21SHAPE_IDX_VSEP = 12 ,///< On vertical separator line 22SHAPE_IDX_VDRAG = 13 ,///< dragging a vertical separator line 23SHAPE_IDX_MORE = 14 ,///< Hit-return or More 24SHAPE_IDX_MOREL = 15 ,///< Hit-return or More in last line 25SHAPE_IDX_SM = 16 ,///< showing matching paren 26SHAPE_IDX_TERM = 17 ,///< Terminal mode 27SHAPE_IDX_COUNT = 18 , 28}ModeShape ; 29 30typedef enum { 31SHAPE_BLOCK = 0 ,///< block cursor 32SHAPE_HOR = 1 ,///< horizontal bar cursor 33SHAPE_VER = 2 ,///< vertical bar cursor 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 42typedef struct { 43char * full_name ;///< mode description 44CursorShape shape ;///< cursor shape: one of the SHAPE_ defines 45int mshape ;///< mouse shape: one of the MSHAPE defines 46int percentage ;///< percentage of cell for bar 47int blinkwait ;///< blinking, wait time before blinking starts 48int blinkon ;///< blinking, on time 49int blinkoff ;///< blinking, off time 50int id ;///< highlight group ID 51int id_lm ;///< highlight group ID for :lmap mode 52char * name ;///< mode short name 53char used_for ;///< SHAPE_MOUSE and/or SHAPE_CURSOR 54}cursorentry_T ; 55 56extern cursorentry_T shape_table [SHAPE_IDX_COUNT ]; 57 58#include "cursor_shape.h.generated.h"