23 #include "../../SDL_internal.h" 25 #if SDL_VIDEO_DRIVER_EMSCRIPTEN 27 #include <emscripten/emscripten.h> 28 #include <emscripten/html5.h> 32 #include "../../events/SDL_mouse_c.h" 37 Emscripten_CreateDefaultCursor()
62 Emscripten_CreateCursor(
SDL_Surface* sruface,
int hot_x,
int hot_y)
64 return Emscripten_CreateDefaultCursor();
72 const char *cursor_name =
NULL;
76 cursor_name =
"default";
85 cursor_name =
"crosshair";
88 cursor_name =
"progress";
91 cursor_name =
"nwse-resize";
94 cursor_name =
"nesw-resize";
97 cursor_name =
"ew-resize";
100 cursor_name =
"ns-resize";
105 cursor_name =
"not-allowed";
108 cursor_name =
"pointer";
140 if (curdata !=
NULL) {
158 if (Module[
'canvas']) {
159 Module[
'canvas'].style[
'cursor'] = Module[
'Pointer_stringify']($0);
167 if (Module[
'canvas']) {
168 Module[
'canvas'].style[
'cursor'] =
'none';
187 if(emscripten_request_pointerlock(
NULL, 1) >= EMSCRIPTEN_RESULT_SUCCESS) {
191 if(emscripten_exit_pointerlock() >= EMSCRIPTEN_RESULT_SUCCESS) {
SDL_Mouse * SDL_GetMouse(void)
int(* ShowCursor)(SDL_Cursor *cursor)
GLint GLint GLint GLint GLint x
int(* SetRelativeMouseMode)(SDL_bool enabled)
void Emscripten_FiniMouse()
A collection of pixels used in software blitting.
SDL_Cursor *(* CreateCursor)(SDL_Surface *surface, int hot_x, int hot_y)
void * SDL_calloc(size_t nmemb, size_t size)
GLint GLint GLint GLint GLint GLint y
SDL_SystemCursor
Cursor types for SDL_CreateSystemCursor.
void SDL_SetDefaultCursor(SDL_Cursor *cursor)
GLenum GLenum GLsizei const GLuint GLboolean enabled
void(* FreeCursor)(SDL_Cursor *cursor)
#define SDL_assert(condition)
#define SDL_OutOfMemory()
#define SDL_GetMouseFocus
The type used to identify a window.
void(* WarpMouse)(SDL_Window *window, int x, int y)
const char * system_cursor
SDL_Cursor *(* CreateSystemCursor)(SDL_SystemCursor id)
#define SDL_Unsupported()
void Emscripten_InitMouse()