Created
January 8, 2023 09:13
-
-
Save MurphyMc/94e7d61143a9d41a90bb2f7ffde395b7 to your computer and use it in GitHub Desktop.
Creates a nice cursor for libvncserver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void init_cursor (rfbScreenInfoPtr rfbScreen) | |
| { | |
| char * cursor = | |
| "X " | |
| "XX " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X " | |
| "X X" | |
| "X XXXXX" | |
| "X X X " | |
| "X X X X " | |
| "X X X X " | |
| "XX X X " | |
| " X X " | |
| " XX "; | |
| char * mask = | |
| "X " | |
| "XX " | |
| "XXX " | |
| "XXXX " | |
| "XXXXX " | |
| "XXXXXX " | |
| "XXXXXXX " | |
| "XXXXXXXX " | |
| "XXXXXXXXX " | |
| "XXXXXXXXXX " | |
| "XXXXXXXXXXX " | |
| "XXXXXXXXXXXX" | |
| "XXXXXXXXXXXX" | |
| "XXXXXXXX " | |
| "XXXX XXXX " | |
| "XXX XXXX " | |
| "XX XXXX " | |
| " XXXX " | |
| " XX "; | |
| // To invert, change cursor to a char[] and then... | |
| //for (int i = 0; i < sizeof(cursor); ++i) | |
| // cursor[i] = (cursor[i] == ' ') ? 'x' : ' '; | |
| rfbScreen->cursor = rfbMakeXCursor(12, 19, cursor, mask); | |
| rfbScreen->cursor->xhot = 2; | |
| rfbScreen->cursor->yhot = 3; | |
| rfbScreen->cursor->richSource = NULL; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment