mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-13 03:59:23 +02:00
Add pointer shape enum to kittens
This commit is contained in:
@@ -34,6 +34,109 @@ func (e MouseEventType) String() string {
|
||||
return strconv.Itoa(int(e))
|
||||
}
|
||||
|
||||
type PointerShape uint8
|
||||
|
||||
const (
|
||||
// start pointer shape enum (auto generated by gen-key-constants.py do not edit)
|
||||
DEFAULT_POINTER PointerShape = 0
|
||||
TEXT_POINTER PointerShape = 1
|
||||
POINTER_POINTER PointerShape = 2
|
||||
HELP_POINTER PointerShape = 3
|
||||
WAIT_POINTER PointerShape = 4
|
||||
PROGRESS_POINTER PointerShape = 5
|
||||
CROSSHAIR_POINTER PointerShape = 6
|
||||
VERTICAL_TEXT_POINTER PointerShape = 7
|
||||
MOVE_POINTER PointerShape = 8
|
||||
E_RESIZE_POINTER PointerShape = 9
|
||||
NE_RESIZE_POINTER PointerShape = 10
|
||||
NW_RESIZE_POINTER PointerShape = 11
|
||||
N_RESIZE_POINTER PointerShape = 12
|
||||
SE_RESIZE_POINTER PointerShape = 13
|
||||
SW_RESIZE_POINTER PointerShape = 14
|
||||
S_RESIZE_POINTER PointerShape = 15
|
||||
W_RESIZE_POINTER PointerShape = 16
|
||||
EW_RESIZE_POINTER PointerShape = 17
|
||||
NS_RESIZE_POINTER PointerShape = 18
|
||||
NESW_RESIZE_POINTER PointerShape = 19
|
||||
NWSE_RESIZE_POINTER PointerShape = 20
|
||||
ZOOM_IN_POINTER PointerShape = 21
|
||||
ZOOM_OUT_POINTER PointerShape = 22
|
||||
ALIAS_POINTER PointerShape = 23
|
||||
COPY_POINTER PointerShape = 24
|
||||
NOT_ALLOWED_POINTER PointerShape = 25
|
||||
NO_DROP_POINTER PointerShape = 26
|
||||
GRAB_POINTER PointerShape = 27
|
||||
GRABBING_POINTER PointerShape = 28
|
||||
|
||||
// end pointer shape enum
|
||||
)
|
||||
|
||||
func (e PointerShape) String() string {
|
||||
switch e {
|
||||
// start pointer shape tostring (auto generated by gen-key-constants.py do not edit)
|
||||
case DEFAULT_POINTER:
|
||||
return "default"
|
||||
case TEXT_POINTER:
|
||||
return "text"
|
||||
case POINTER_POINTER:
|
||||
return "pointer"
|
||||
case HELP_POINTER:
|
||||
return "help"
|
||||
case WAIT_POINTER:
|
||||
return "wait"
|
||||
case PROGRESS_POINTER:
|
||||
return "progress"
|
||||
case CROSSHAIR_POINTER:
|
||||
return "crosshair"
|
||||
case VERTICAL_TEXT_POINTER:
|
||||
return "vertical-text"
|
||||
case MOVE_POINTER:
|
||||
return "move"
|
||||
case E_RESIZE_POINTER:
|
||||
return "e-resize"
|
||||
case NE_RESIZE_POINTER:
|
||||
return "ne-resize"
|
||||
case NW_RESIZE_POINTER:
|
||||
return "nw-resize"
|
||||
case N_RESIZE_POINTER:
|
||||
return "n-resize"
|
||||
case SE_RESIZE_POINTER:
|
||||
return "se-resize"
|
||||
case SW_RESIZE_POINTER:
|
||||
return "sw-resize"
|
||||
case S_RESIZE_POINTER:
|
||||
return "s-resize"
|
||||
case W_RESIZE_POINTER:
|
||||
return "w-resize"
|
||||
case EW_RESIZE_POINTER:
|
||||
return "ew-resize"
|
||||
case NS_RESIZE_POINTER:
|
||||
return "ns-resize"
|
||||
case NESW_RESIZE_POINTER:
|
||||
return "nesw-resize"
|
||||
case NWSE_RESIZE_POINTER:
|
||||
return "nwse-resize"
|
||||
case ZOOM_IN_POINTER:
|
||||
return "zoom-in"
|
||||
case ZOOM_OUT_POINTER:
|
||||
return "zoom-out"
|
||||
case ALIAS_POINTER:
|
||||
return "alias"
|
||||
case COPY_POINTER:
|
||||
return "copy"
|
||||
case NOT_ALLOWED_POINTER:
|
||||
return "not-allowed"
|
||||
case NO_DROP_POINTER:
|
||||
return "no-drop"
|
||||
case GRAB_POINTER:
|
||||
return "grab"
|
||||
case GRABBING_POINTER:
|
||||
return "grabbing"
|
||||
// end pointer shape tostring
|
||||
}
|
||||
return strconv.Itoa(int(e))
|
||||
}
|
||||
|
||||
const (
|
||||
SHIFT_INDICATOR int = 1 << 2
|
||||
ALT_INDICATOR = 1 << 3
|
||||
|
||||
Reference in New Issue
Block a user