Commits

Marcus von Appen  committed de611e2

Added sdl2.mouse.SDL_WarpMouseGlobal() function

  • Participants
  • Parent commits 4d0296d

Comments (0)

Files changed (1)

File sdl2/mouse.py

 from ctypes import Structure, POINTER, c_int
-from .dll import _bind
+from .dll import _bind, nullfunc
 from .stdinc import Uint8, Uint32, SDL_bool
 from .video import SDL_Window
 from .surface import SDL_Surface
            "SDL_ShowCursor", "SDL_BUTTON", "SDL_BUTTON_LEFT",
            "SDL_BUTTON_MIDDLE", "SDL_BUTTON_RIGHT", "SDL_BUTTON_X1",
            "SDL_BUTTON_X2", "SDL_BUTTON_LMASK", "SDL_BUTTON_MMASK",
-           "SDL_BUTTON_RMASK", "SDL_BUTTON_X1MASK", "SDL_BUTTON_X2MASK"
+           "SDL_BUTTON_RMASK", "SDL_BUTTON_X1MASK", "SDL_BUTTON_X2MASK",
+           "SDL_WarpMouseGlobal"
            ]
 
 
 SDL_GetDefaultCursor = _bind("SDL_GetDefaultCursor", None, POINTER(SDL_Cursor))
 SDL_FreeCursor = _bind("SDL_FreeCursor", [POINTER(SDL_Cursor)])
 SDL_ShowCursor = _bind("SDL_ShowCursor", [c_int], c_int)
+SDL_WarpMouseGlobal = _bind("SDL_WarpMouseGlobal", [c_int, c_int], optfunc=nullfunc)
 SDL_BUTTON = lambda X: (1 << ((X) - 1))
 SDL_BUTTON_LEFT = 1
 SDL_BUTTON_MIDDLE = 2