cursormgr.cpp 1.3 KB

1234567891011121314151617181920212223242526272829
  1. #include "precomp.h"
  2. #include <api.h>
  3. #include "cursormgr.h"
  4. #include <api/skin/skinelem.h>
  5. OSCURSOR CursorMgr::requestCursor(const wchar_t *id)
  6. {
  7. // Martin> Register os cursors, perhaps find a better way to do this in basewnd.cpp
  8. if (_wcsicmp(id, L"IDC_ARROW") == 0) return LoadCursor(NULL, IDC_ARROW);
  9. if (_wcsicmp(id, L"IDC_SIZENS") == 0) return LoadCursor(NULL, IDC_SIZENS);
  10. if (_wcsicmp(id, L"IDC_SIZEWE") == 0) return LoadCursor(NULL, IDC_SIZEWE);
  11. if (_wcsicmp(id, L"IDC_SIZENWSE") == 0) return LoadCursor(NULL, IDC_SIZENWSE);
  12. if (_wcsicmp(id, L"IDC_SIZENESW") == 0) return LoadCursor(NULL, IDC_SIZENESW);
  13. if (_wcsicmp(id, L"IDC_SIZEALL") == 0) return LoadCursor(NULL, IDC_SIZEALL);
  14. if (_wcsicmp(id, L"IDC_IBEAM") == 0) return LoadCursor(NULL, IDC_IBEAM);
  15. if (_wcsicmp(id, L"IDC_WAIT") == 0) return LoadCursor(NULL, IDC_WAIT);
  16. if (_wcsicmp(id, L"IDC_CROSS") == 0) return LoadCursor(NULL, IDC_CROSS);
  17. if (_wcsicmp(id, L"IDC_UPARROW") == 0) return LoadCursor(NULL, IDC_UPARROW);
  18. if (_wcsicmp(id, L"IDC_NO") == 0) return LoadCursor(NULL, IDC_NO);
  19. if (_wcsicmp(id, L"IDC_HAND") == 0) return LoadCursor(NULL, IDC_HAND);
  20. if (_wcsicmp(id, L"IDC_APPSTARTING") == 0) return LoadCursor(NULL, IDC_APPSTARTING);
  21. if (_wcsicmp(id, L"IDC_HELP") == 0) return LoadCursor(NULL, IDC_HELP);
  22. OSCURSOR cursor = WASABI_API_PALETTE->getCursor(id);
  23. return cursor;
  24. }