default_cursor.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2025 Sam Lantinga <[email protected]>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  19. * Default cursor - it happens to be the Mac cursor, but could be anything */
  20. #define DEFAULT_CWIDTH 16
  21. #define DEFAULT_CHEIGHT 16
  22. #define DEFAULT_CHOTX 0
  23. #define DEFAULT_CHOTY 0
  24. // Added a real MacOS cursor, at the request of Luc-Olivier de Charrière
  25. #define USE_MACOS_CURSOR
  26. #ifdef USE_MACOS_CURSOR
  27. static const unsigned char default_cdata[] = {
  28. 0x00, 0x00,
  29. 0x40, 0x00,
  30. 0x60, 0x00,
  31. 0x70, 0x00,
  32. 0x78, 0x00,
  33. 0x7C, 0x00,
  34. 0x7E, 0x00,
  35. 0x7F, 0x00,
  36. 0x7F, 0x80,
  37. 0x7C, 0x00,
  38. 0x6C, 0x00,
  39. 0x46, 0x00,
  40. 0x06, 0x00,
  41. 0x03, 0x00,
  42. 0x03, 0x00,
  43. 0x00, 0x00
  44. };
  45. static const unsigned char default_cmask[] = {
  46. 0xC0, 0x00,
  47. 0xE0, 0x00,
  48. 0xF0, 0x00,
  49. 0xF8, 0x00,
  50. 0xFC, 0x00,
  51. 0xFE, 0x00,
  52. 0xFF, 0x00,
  53. 0xFF, 0x80,
  54. 0xFF, 0xC0,
  55. 0xFF, 0xE0,
  56. 0xFE, 0x00,
  57. 0xEF, 0x00,
  58. 0xCF, 0x00,
  59. 0x87, 0x80,
  60. 0x07, 0x80,
  61. 0x03, 0x00
  62. };
  63. #else
  64. static const unsigned char default_cdata[] = {
  65. 0x00, 0x00,
  66. 0x40, 0x00,
  67. 0x60, 0x00,
  68. 0x70, 0x00,
  69. 0x78, 0x00,
  70. 0x7C, 0x00,
  71. 0x7E, 0x00,
  72. 0x7F, 0x00,
  73. 0x7F, 0x80,
  74. 0x7C, 0x00,
  75. 0x6C, 0x00,
  76. 0x46, 0x00,
  77. 0x06, 0x00,
  78. 0x03, 0x00,
  79. 0x03, 0x00,
  80. 0x00, 0x00
  81. };
  82. static const unsigned char default_cmask[] = {
  83. 0x40, 0x00,
  84. 0xE0, 0x00,
  85. 0xF0, 0x00,
  86. 0xF8, 0x00,
  87. 0xFC, 0x00,
  88. 0xFE, 0x00,
  89. 0xFF, 0x00,
  90. 0xFF, 0x80,
  91. 0xFF, 0xC0,
  92. 0xFF, 0x80,
  93. 0xFE, 0x00,
  94. 0xEF, 0x00,
  95. 0x4F, 0x00,
  96. 0x07, 0x80,
  97. 0x07, 0x80,
  98. 0x03, 0x00
  99. };
  100. #endif // USE_MACOS_CURSOR