Skip to content

Commit

Permalink
Add missing cursor icons (#289)
Browse files Browse the repository at this point in the history
* add missing cursor icons

* rename CursorSize to CursorSizeAll
  • Loading branch information
Deltaspace0 authored Mar 21, 2024
1 parent 465f33c commit 94d7f24
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Monomer/Core/Combinators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,14 @@ class CmbCursorIcon t where
cursorDiagTL = cursorIcon CursorDiagTL
cursorDiagTR :: t
cursorDiagTR = cursorIcon CursorDiagTR
cursorSizeAll :: t
cursorSizeAll = cursorIcon CursorSizeAll
cursorWait :: t
cursorWait = cursorIcon CursorWait
cursorWaitArrow :: t
cursorWaitArrow = cursorIcon CursorWaitArrow
cursorCrosshair :: t
cursorCrosshair = cursorIcon CursorCrosshair
cursorIcon :: CursorIcon -> t

-- | Basic style for each item of a list.
Expand Down
4 changes: 4 additions & 0 deletions src/Monomer/Core/StyleTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ data CursorIcon
| CursorSizeV
| CursorDiagTL
| CursorDiagTR
| CursorSizeAll
| CursorWait
| CursorWaitArrow
| CursorCrosshair
deriving (Eq, Ord, Enum, Show, Generic)

instance Default CursorIcon where
Expand Down
4 changes: 4 additions & 0 deletions src/Monomer/Main/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -941,3 +941,7 @@ cursorToSDL CursorSizeH = SDLEnum.SDL_SYSTEM_CURSOR_SIZEWE
cursorToSDL CursorSizeV = SDLEnum.SDL_SYSTEM_CURSOR_SIZENS
cursorToSDL CursorDiagTL = SDLEnum.SDL_SYSTEM_CURSOR_SIZENWSE
cursorToSDL CursorDiagTR = SDLEnum.SDL_SYSTEM_CURSOR_SIZENESW
cursorToSDL CursorSizeAll = SDLEnum.SDL_SYSTEM_CURSOR_SIZEALL
cursorToSDL CursorWait = SDLEnum.SDL_SYSTEM_CURSOR_WAIT
cursorToSDL CursorWaitArrow = SDLEnum.SDL_SYSTEM_CURSOR_WAITARROW
cursorToSDL CursorCrosshair = SDLEnum.SDL_SYSTEM_CURSOR_CROSSHAIR

0 comments on commit 94d7f24

Please sign in to comment.