mouse.h
Go to the documentation of this file.
1 #ifndef NVIM_MOUSE_H
2 #define NVIM_MOUSE_H
3 
4 #include <stdbool.h>
5 
6 #include "nvim/vim.h"
7 #include "nvim/buffer_defs.h"
8 
9 // jump_to_mouse() returns one of first four these values, possibly with
10 // some of the other three added.
11 #define IN_UNKNOWN 0
12 #define IN_BUFFER 1
13 #define IN_STATUS_LINE 2 // on status or command line
14 #define IN_SEP_LINE 4 // on vertical separator line
15 #define IN_OTHER_WIN 8 // in other window but can't go there
16 #define CURSOR_MOVED 0x100
17 #define MOUSE_FOLD_CLOSE 0x200 // clicked on '-' in fold column
18 #define MOUSE_FOLD_OPEN 0x400 // clicked on '+' in fold column
19 #define MOUSE_WINBAR 0x800 // in window toolbar
20 
21 // flags for jump_to_mouse()
22 #define MOUSE_FOCUS 0x01 // need to stay in this window
23 #define MOUSE_MAY_VIS 0x02 // may start Visual mode
24 #define MOUSE_DID_MOVE 0x04 // only act when mouse has moved
25 #define MOUSE_SETPOS 0x08 // only set current mouse position
26 #define MOUSE_MAY_STOP_VIS 0x10 // may stop Visual mode
27 #define MOUSE_RELEASED 0x20 // button was released
28 
29 // Codes for mouse button events in lower three bits:
30 #define MOUSE_LEFT 0x00
31 #define MOUSE_MIDDLE 0x01
32 #define MOUSE_RIGHT 0x02
33 #define MOUSE_RELEASE 0x03
34 
35 #define MOUSE_X1 0x300 // Mouse-button X1 (6th)
36 #define MOUSE_X2 0x400 // Mouse-button X2
37 
38 // Direction for nv_mousescroll() and ins_mousescroll()
39 #define MSCR_DOWN 0 // DOWN must be FALSE
40 #define MSCR_UP 1
41 #define MSCR_LEFT -1
42 #define MSCR_RIGHT -2
43 
44 
45 #ifdef INCLUDE_GENERATED_DECLARATIONS
46 # include "mouse.h.generated.h"
47 #endif
48 
49 #endif // NVIM_MOUSE_H