CursorBase provides the common infrastructure for the [Cursor] interface, to be extended on desktop platforms. It can also be used as an empty implementation of the [Cursor] interface on mobile platforms, as they do not have cursors.
| 43 | // implementation of the [Cursor] interface on mobile platforms, as they |
| 44 | // do not have cursors. |
| 45 | type CursorBase struct { |
| 46 | // Cur is the current cursor, which is maintained by the standard methods. |
| 47 | Cur enums.Enum |
| 48 | |
| 49 | // Vis is whether the cursor is visible; be sure to initialize to true! |
| 50 | Vis bool |
| 51 | |
| 52 | // Size is the size that cursors are rendered at |
| 53 | Size int |
| 54 | } |
| 55 | |
| 56 | // CursorBase should be a valid cursor so that it can be used directly in mobile |
| 57 | var _ Cursor = (*CursorBase)(nil) |
nothing calls this directly
no outgoing calls
no test coverage detected