mouse.h (1757B)
1 #pragma once 2 3 #include "nvim/eval/typval_defs.h" // IWYU pragma: keep 4 #include "nvim/normal_defs.h" // IWYU pragma: keep 5 #include "nvim/types_defs.h" // IWYU pragma: keep 6 #include "nvim/vim_defs.h" // IWYU pragma: keep 7 8 /// jump_to_mouse() returns one of first five these values, possibly with 9 /// some of the other five added. 10 enum { 11 IN_UNKNOWN = 0, 12 IN_BUFFER = 1, 13 IN_STATUS_LINE = 2, ///< on status or command line 14 IN_SEP_LINE = 4, ///< on vertical separator line 15 IN_OTHER_WIN = 8, ///< in other window but can't go there 16 CURSOR_MOVED = 0x100, 17 MOUSE_FOLD_CLOSE = 0x200, ///< clicked on '-' in fold column 18 MOUSE_FOLD_OPEN = 0x400, ///< clicked on '+' in fold column 19 MOUSE_WINBAR = 0x800, ///< in window toolbar 20 MOUSE_STATUSCOL = 0x1000, ///< in 'statuscolumn' 21 }; 22 23 /// flags for jump_to_mouse() 24 enum { 25 MOUSE_FOCUS = 0x01, ///< need to stay in this window 26 MOUSE_MAY_VIS = 0x02, ///< may start Visual mode 27 MOUSE_DID_MOVE = 0x04, ///< only act when mouse has moved 28 MOUSE_SETPOS = 0x08, ///< only set current mouse position 29 MOUSE_MAY_STOP_VIS = 0x10, ///< may stop Visual mode 30 MOUSE_RELEASED = 0x20, ///< button was released 31 }; 32 33 enum { 34 // Codes for mouse button events in lower three bits: 35 MOUSE_LEFT = 0x00, 36 MOUSE_MIDDLE = 0x01, 37 MOUSE_RIGHT = 0x02, 38 MOUSE_RELEASE = 0x03, 39 40 // mouse buttons that are handled like a key press 41 MOUSE_X1 = 0x300, ///< Mouse-button X1 (6th) 42 MOUSE_X2 = 0x400, ///< Mouse-button X2 43 }; 44 45 /// Direction for nv_mousescroll() and ins_mousescroll() 46 enum { 47 MSCR_DOWN = 0, ///< DOWN must be false 48 MSCR_UP = 1, 49 MSCR_LEFT = -1, 50 MSCR_RIGHT = -2, 51 }; 52 53 #include "mouse.h.generated.h"