Rationalize mouse cursor shape handling

Now can use the full range of standard mouse cursor shapes similar to
those supported by browsers via the CSS cursor property.

Still needs to be fully implemented for cocoa backend.
This commit is contained in:
Kovid Goyal
2023-10-15 09:05:05 +05:30
parent a8a1571ed1
commit 4f1971c480
17 changed files with 493 additions and 122 deletions

View File

@@ -68,7 +68,40 @@ typedef enum { DISABLE_LIGATURES_NEVER, DISABLE_LIGATURES_CURSOR, DISABLE_LIGATU
#define ERROR_PREFIX "[PARSE ERROR]"
typedef enum MouseTrackingModes { NO_TRACKING, BUTTON_MODE, MOTION_MODE, ANY_MODE } MouseTrackingMode;
typedef enum MouseTrackingProtocols { NORMAL_PROTOCOL, UTF8_PROTOCOL, SGR_PROTOCOL, URXVT_PROTOCOL, SGR_PIXEL_PROTOCOL} MouseTrackingProtocol;
typedef enum MouseShapes { BEAM, HAND, ARROW } MouseShape;
typedef enum MouseShapes {
INVALID_POINTER,
/* start mouse shapes (auto generated by gen-key-constants.py do not edit) */
DEFAULT_POINTER,
TEXT_POINTER,
POINTER_POINTER,
HELP_POINTER,
WAIT_POINTER,
PROGRESS_POINTER,
CROSSHAIR_POINTER,
VERTICAL_TEXT_POINTER,
MOVE_POINTER,
E_RESIZE_POINTER,
NE_RESIZE_POINTER,
NW_RESIZE_POINTER,
N_RESIZE_POINTER,
SE_RESIZE_POINTER,
SW_RESIZE_POINTER,
S_RESIZE_POINTER,
W_RESIZE_POINTER,
EW_RESIZE_POINTER,
NS_RESIZE_POINTER,
NESW_RESIZE_POINTER,
NWSE_RESIZE_POINTER,
ZOOM_IN_POINTER,
ZOOM_OUT_POINTER,
ALIAS_POINTER,
COPY_POINTER,
NOT_ALLOWED_POINTER,
NO_DROP_POINTER,
GRAB_POINTER,
GRABBING_POINTER,
/* end mouse shapes */
} MouseShape;
typedef enum { NONE, MENUBAR, WINDOW, ALL } WindowTitleIn;
typedef enum { TILING, SCALED, MIRRORED, CLAMPED, CENTER_CLAMPED, CENTER_SCALED } BackgroundImageLayout;
typedef struct ImageAnchorPosition {