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()
74 const char *cursor_name =
NULL;
78 cursor_name =
"default";
87 cursor_name =
"crosshair";
90 cursor_name =
"progress";
93 cursor_name =
"nwse-resize";
96 cursor_name =
"nesw-resize";
99 cursor_name =
"ew-resize";
102 cursor_name =
"ns-resize";
107 cursor_name =
"not-allowed";
110 cursor_name =
"pointer";
142 if (curdata !=
NULL) {
160 if (Module[
'canvas']) {
161 Module[
'canvas'].style[
'cursor'] = Module[
'Pointer_stringify']($0);
169 if (Module[
'canvas']) {
170 Module[
'canvas'].style[
'cursor'] =
'none';
189 if(emscripten_request_pointerlock(
NULL, 1) >= EMSCRIPTEN_RESULT_SUCCESS) {
193 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()
static SDL_Window * window
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()