소스 검색

Added window WarpMouse() method.

Brucey 3 년 전
부모
커밋
45117acbcc
2개의 변경된 파일12개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      sdlvideo.mod/common.bmx
  2. 11 1
      sdlvideo.mod/sdlvideo.bmx

+ 1 - 0
sdlvideo.mod/common.bmx

@@ -126,6 +126,7 @@ Extern
 	Function SDL_DestroyWindow(handle:Byte Ptr)
 	Function SDL_RestoreWindow(handle:Byte Ptr)
 	Function SDL_SetWindowIcon(handle:Byte Ptr, surface:Byte Ptr)
+	Function SDL_WarpMouseInWindow(handle:Byte Ptr, x:Int, y:Int)
 
 	Function SDL_GetGrabbedWindow:Byte Ptr()
 	Function SDL_IsScreenSaverEnabled:Int()

+ 11 - 1
sdlvideo.mod/sdlvideo.bmx

@@ -434,12 +434,22 @@ Type TSDLWindow
 	End Method
 	
 	Rem
-	bbdoc: 
+	bbdoc: Returns the native window handle for this window.
 	End Rem
 	Method GetWindowHandle:Byte Ptr()
 		Return bmx_sdl_video_GetWindowHandle(windowPtr)
 	End Method
 	
+	Rem
+	bbdoc: Moves the mouse cursor to the given position within the window.
+	about: This method generates a mouse motion event.
+
+	Note that this method will appear to succeed, but not actually move the mouse when used over Microsoft Remote Desktop.
+	End Rem
+	Method WarpMouse(x:Int, y:Int)
+		SDL_WarpMouseInWindow(windowPtr, x, y)
+	End Method
+
 End Type
 
 Rem