2
0

sdl2.monkey2 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147
  1. Namespace sdl2
  2. #Import "<jni>"
  3. #Import "<libc>"
  4. #Import "<gles20>"
  5. #Import "SDL/include/*.h"
  6. #If __TARGET__="android"
  7. #Import "SDL/src/core/android/SDL_android.h"
  8. #Endif
  9. #Import "<SDL.h>"
  10. #Import "makefile.monkey2"
  11. Using libc
  12. Extern
  13. #If __TARGET__="android"
  14. Function Android_JNI_GetEnv:jni.JNIEnv()
  15. Function Android_JNI_GetActivityClass:jni.jclass()
  16. Function Android_JNI_SetActivityTitle( title:CString )
  17. #Endif
  18. Struct SDL_Surface
  19. End
  20. Enum SDL_bool
  21. End
  22. Const SDL_FALSE:SDL_bool
  23. Const SDL_TRUE:SDL_bool
  24. '${EXTERN}
  25. 'FILE="sdl2/SDL_rwops.h"
  26. Struct SDL_RWops
  27. End
  28. Const RW_SEEK_SET:Int
  29. Const RW_SEEK_CUR:Int
  30. Const RW_SEEK_END:Int
  31. Function SDL_RWFromMem:SDL_RWops Ptr( mem:Void Ptr,size:Int )
  32. Function SDL_RWFromFile:SDL_RWops Ptr( file:CString,mode:CString )
  33. Function SDL_RWsize:Long( ops:SDL_RWops Ptr )
  34. Function SDL_RWtell:Long( ops:SDL_RWops Ptr )
  35. Function SDL_RWseek:Long( ops:SDL_RWops Ptr,offset:Long,whence:Int )
  36. Function SDL_RWread:Long( ops:SDL_RWops Ptr,buf:Void Ptr,size:Long,count:Long )
  37. Function SDL_RWwrite:Long( ops:SDL_RWops Ptr,buf:Void Ptr,size:Long,count:Long )
  38. Function SDL_RWclose:Int( ops:SDL_RWops Ptr )
  39. 'FILE=sdl2/SDL_hints.h
  40. Function SDL_SetHint( name:CString,value:CString )
  41. 'FILE="sdl2/SDL.h"
  42. Const SDL_INIT_TIMER:Int
  43. Const SDL_INIT_AUDIO:Int
  44. Const SDL_INIT_VIDEO:Int
  45. Const SDL_INIT_JOYSTICK:Int
  46. Const SDL_INIT_HAPTIC:Int
  47. Const SDL_INIT_GAMECONTROLLER:Int
  48. Const SDL_INIT_EVENTS:Int
  49. Const SDL_INIT_NOPARACHUTE:Int
  50. Const SDL_INIT_EVERYTHING:Int
  51. Function SDL_Init:Int(flags_:Int)
  52. Function SDL_InitSubSystem:Int(flags_:Int)
  53. Function SDL_QuitSubSystem:Void(flags_:Int)
  54. Function SDL_WasInit:Int(flags_:Int)
  55. Function SDL_Quit:Void()
  56. 'FILE="sdl2/SDL_error.h"
  57. Function SDL_GetError:char_t Ptr()
  58. Function SDL_ClearError:Void()
  59. Const SDL_OutOfMemory:Int
  60. Const SDL_Unsupported:Int
  61. Const SDL_InvalidParamError:Int
  62. Enum SDL_errorcode
  63. End
  64. Const SDL_ENOMEM:SDL_errorcode
  65. Const SDL_EFREAD:SDL_errorcode
  66. Const SDL_EFWRITE:SDL_errorcode
  67. Const SDL_EFSEEK:SDL_errorcode
  68. Const SDL_UNSUPPORTED:SDL_errorcode
  69. Const SDL_LASTERROR:SDL_errorcode
  70. Function SDL_Error:Int(code_:SDL_errorcode)
  71. 'FILE="sdl2/SDL_timer.h"
  72. Function SDL_GetTicks:Int()
  73. Const SDL_TICKS_PASSED:Int
  74. Function SDL_GetPerformanceCounter:Long()
  75. Function SDL_GetPerformanceFrequency:Long()
  76. Function SDL_Delay:Void(ms_:Int)
  77. Alias SDL_TimerCallback:Int(Int,Void Ptr)
  78. Alias SDL_TimerID:Int
  79. Function SDL_AddTimer:SDL_TimerID(interval_:Int,callback_:SDL_TimerCallback,param_:Void Ptr)
  80. Function SDL_RemoveTimer:SDL_bool(id_:SDL_TimerID)
  81. 'FILE="sdl2/SDL_rect.h"
  82. Struct SDL_Point
  83. Field x:Int
  84. Field y:Int
  85. End
  86. Struct SDL_Rect
  87. Field x:Int
  88. Field y:Int
  89. Field w:Int
  90. Field h:Int
  91. End
  92. Function SDL_PointInRect:SDL_bool(p_:SDL_Point Ptr,r_:SDL_Rect Ptr)
  93. Function SDL_RectEmpty:SDL_bool(r_:SDL_Rect Ptr)
  94. Function SDL_RectEquals:SDL_bool(a_:SDL_Rect Ptr,b_:SDL_Rect Ptr)
  95. Function SDL_HasIntersection:SDL_bool(A_:SDL_Rect Ptr,B_:SDL_Rect Ptr)
  96. Function SDL_IntersectRect:SDL_bool(A_:SDL_Rect Ptr,B_:SDL_Rect Ptr,result_:SDL_Rect Ptr)
  97. Function SDL_UnionRect:Void(A_:SDL_Rect Ptr,B_:SDL_Rect Ptr,result_:SDL_Rect Ptr)
  98. Function SDL_EnclosePoints:SDL_bool(points_:SDL_Point Ptr,count_:Int,clip_:SDL_Rect Ptr,result_:SDL_Rect Ptr)
  99. Function SDL_IntersectRectAndLine:SDL_bool(rect_:SDL_Rect Ptr,X1_:Int Ptr,Y1_:Int Ptr,X2_:Int Ptr,Y2_:Int Ptr)
  100. 'FILE="sdl2/sdl_video.h"
  101. Struct SDL_DisplayMode
  102. Field format:Int
  103. Field w:Int
  104. Field h:Int
  105. Field refresh_rate:Int
  106. Field driverdata:Void Ptr
  107. End
  108. Struct SDL_Window
  109. Field w:Int
  110. Field h:int
  111. End
  112. Enum SDL_WindowFlags
  113. End
  114. Const SDL_WINDOW_FULLSCREEN:SDL_WindowFlags
  115. Const SDL_WINDOW_OPENGL:SDL_WindowFlags
  116. Const SDL_WINDOW_SHOWN:SDL_WindowFlags
  117. Const SDL_WINDOW_HIDDEN:SDL_WindowFlags
  118. Const SDL_WINDOW_BORDERLESS:SDL_WindowFlags
  119. Const SDL_WINDOW_RESIZABLE:SDL_WindowFlags
  120. Const SDL_WINDOW_MINIMIZED:SDL_WindowFlags
  121. Const SDL_WINDOW_MAXIMIZED:SDL_WindowFlags
  122. Const SDL_WINDOW_INPUT_GRABBED:SDL_WindowFlags
  123. Const SDL_WINDOW_INPUT_FOCUS:SDL_WindowFlags
  124. Const SDL_WINDOW_MOUSE_FOCUS:SDL_WindowFlags
  125. Const SDL_WINDOW_FULLSCREEN_DESKTOP:SDL_WindowFlags
  126. Const SDL_WINDOW_FOREIGN:SDL_WindowFlags
  127. Const SDL_WINDOW_ALLOW_HIGHDPI:SDL_WindowFlags
  128. Const SDL_WINDOW_MOUSE_CAPTURE:SDL_WindowFlags
  129. Const SDL_WINDOW_FLOATING:SDL_WindowFlags
  130. Const SDL_WINDOWPOS_UNDEFINED_MASK:Int
  131. Const SDL_WINDOWPOS_UNDEFINED_DISPLAY:Int
  132. Const SDL_WINDOWPOS_UNDEFINED:Int
  133. Const SDL_WINDOWPOS_ISUNDEFINED:Int
  134. Const SDL_WINDOWPOS_CENTERED_MASK:Int
  135. Const SDL_WINDOWPOS_CENTERED_DISPLAY:Int
  136. Const SDL_WINDOWPOS_CENTERED:Int
  137. Const SDL_WINDOWPOS_ISCENTERED:Int
  138. Enum SDL_WindowEventID
  139. End
  140. Const SDL_WINDOWEVENT_NONE:SDL_WindowEventID
  141. Const SDL_WINDOWEVENT_SHOWN:SDL_WindowEventID
  142. Const SDL_WINDOWEVENT_HIDDEN:SDL_WindowEventID
  143. Const SDL_WINDOWEVENT_EXPOSED:SDL_WindowEventID
  144. Const SDL_WINDOWEVENT_MOVED:SDL_WindowEventID
  145. Const SDL_WINDOWEVENT_RESIZED:SDL_WindowEventID
  146. Const SDL_WINDOWEVENT_SIZE_CHANGED:SDL_WindowEventID
  147. Const SDL_WINDOWEVENT_MINIMIZED:SDL_WindowEventID
  148. Const SDL_WINDOWEVENT_MAXIMIZED:SDL_WindowEventID
  149. Const SDL_WINDOWEVENT_RESTORED:SDL_WindowEventID
  150. Const SDL_WINDOWEVENT_ENTER:SDL_WindowEventID
  151. Const SDL_WINDOWEVENT_LEAVE:SDL_WindowEventID
  152. Const SDL_WINDOWEVENT_FOCUS_GAINED:SDL_WindowEventID
  153. Const SDL_WINDOWEVENT_FOCUS_LOST:SDL_WindowEventID
  154. Const SDL_WINDOWEVENT_CLOSE:SDL_WindowEventID
  155. Alias SDL_GLContext:Void Ptr
  156. Enum SDL_GLattr
  157. End
  158. Const SDL_GL_RED_SIZE:SDL_GLattr
  159. Const SDL_GL_GREEN_SIZE:SDL_GLattr
  160. Const SDL_GL_BLUE_SIZE:SDL_GLattr
  161. Const SDL_GL_ALPHA_SIZE:SDL_GLattr
  162. Const SDL_GL_BUFFER_SIZE:SDL_GLattr
  163. Const SDL_GL_DOUBLEBUFFER:SDL_GLattr
  164. Const SDL_GL_DEPTH_SIZE:SDL_GLattr
  165. Const SDL_GL_STENCIL_SIZE:SDL_GLattr
  166. Const SDL_GL_ACCUM_RED_SIZE:SDL_GLattr
  167. Const SDL_GL_ACCUM_GREEN_SIZE:SDL_GLattr
  168. Const SDL_GL_ACCUM_BLUE_SIZE:SDL_GLattr
  169. Const SDL_GL_ACCUM_ALPHA_SIZE:SDL_GLattr
  170. Const SDL_GL_STEREO:SDL_GLattr
  171. Const SDL_GL_MULTISAMPLEBUFFERS:SDL_GLattr
  172. Const SDL_GL_MULTISAMPLESAMPLES:SDL_GLattr
  173. Const SDL_GL_ACCELERATED_VISUAL:SDL_GLattr
  174. Const SDL_GL_RETAINED_BACKING:SDL_GLattr
  175. Const SDL_GL_CONTEXT_MAJOR_VERSION:SDL_GLattr
  176. Const SDL_GL_CONTEXT_MINOR_VERSION:SDL_GLattr
  177. Const SDL_GL_CONTEXT_EGL:SDL_GLattr
  178. Const SDL_GL_CONTEXT_FLAGS:SDL_GLattr
  179. Const SDL_GL_CONTEXT_PROFILE_MASK:SDL_GLattr
  180. Const SDL_GL_SHARE_WITH_CURRENT_CONTEXT:SDL_GLattr
  181. Const SDL_GL_FRAMEBUFFER_SRGB_CAPABLE:SDL_GLattr
  182. Const SDL_GL_CONTEXT_RELEASE_BEHAVIOR:SDL_GLattr
  183. Enum SDL_GLprofile
  184. End
  185. Const SDL_GL_CONTEXT_PROFILE_CORE:SDL_GLprofile
  186. Const SDL_GL_CONTEXT_PROFILE_COMPATIBILITY:SDL_GLprofile
  187. Const SDL_GL_CONTEXT_PROFILE_ES:SDL_GLprofile
  188. Enum SDL_GLcontextFlag
  189. End
  190. Const SDL_GL_CONTEXT_DEBUG_FLAG:SDL_GLcontextFlag
  191. Const SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG:SDL_GLcontextFlag
  192. Const SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG:SDL_GLcontextFlag
  193. Const SDL_GL_CONTEXT_RESET_ISOLATION_FLAG:SDL_GLcontextFlag
  194. Enum SDL_GLcontextReleaseFlag
  195. End
  196. Const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE:SDL_GLcontextReleaseFlag
  197. Const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH:SDL_GLcontextReleaseFlag
  198. Function SDL_GetNumVideoDrivers:Int()
  199. Function SDL_GetVideoDriver:char_t Ptr(index_:Int)
  200. Function SDL_VideoInit:Int(driver_name_:CString)
  201. Function SDL_VideoQuit:Void()
  202. Function SDL_GetCurrentVideoDriver:char_t Ptr()
  203. Function SDL_GetNumVideoDisplays:Int()
  204. Function SDL_GetDisplayName:char_t Ptr(displayIndex_:Int)
  205. Function SDL_GetDisplayBounds:Int(displayIndex_:Int,rect_:SDL_Rect Ptr)
  206. Function SDL_GetDisplayDPI:Int( displayIndex:Int,ddpi:Float Ptr,hdpi:Float Ptr,vdpi:Float Ptr )
  207. Function SDL_GetNumDisplayModes:Int(displayIndex_:Int)
  208. Function SDL_GetDisplayMode:Int(displayIndex_:Int,modeIndex_:Int,mode_:SDL_DisplayMode Ptr)
  209. Function SDL_GetDesktopDisplayMode:Int(displayIndex_:Int,mode_:SDL_DisplayMode Ptr)
  210. Function SDL_GetCurrentDisplayMode:Int(displayIndex_:Int,mode_:SDL_DisplayMode Ptr)
  211. Function SDL_GetClosestDisplayMode:SDL_DisplayMode Ptr(displayIndex_:Int,mode_:SDL_DisplayMode Ptr,closest_:SDL_DisplayMode Ptr)
  212. Function SDL_GetWindowDisplayIndex:Int(window_:SDL_Window Ptr)
  213. Function SDL_SetWindowDisplayMode:Int(window_:SDL_Window Ptr,mode_:SDL_DisplayMode Ptr)
  214. Function SDL_GetWindowDisplayMode:Int(window_:SDL_Window Ptr,mode_:SDL_DisplayMode Ptr)
  215. Function SDL_GetWindowPixelFormat:Int(window_:SDL_Window Ptr)
  216. Function SDL_CreateWindow:SDL_Window Ptr(title_:CString,x_:Int,y_:Int,w_:Int,h_:Int,flags_:Int)
  217. Function SDL_CreateWindowFrom:SDL_Window Ptr(data_:Void Ptr)
  218. Function SDL_GetWindowID:Int(window_:SDL_Window Ptr)
  219. Function SDL_GetWindowFromID:SDL_Window Ptr(id_:Int)
  220. Function SDL_GetWindowFlags:Int(window_:SDL_Window Ptr)
  221. Function SDL_SetWindowTitle:Void(window_:SDL_Window Ptr,title_:CString)
  222. Function SDL_GetWindowTitle:char_t Ptr(window_:SDL_Window Ptr)
  223. Function SDL_SetWindowIcon:Void(window_:SDL_Window Ptr,icon_:SDL_Surface Ptr)
  224. Function SDL_SetWindowData:Void Ptr(window_:SDL_Window Ptr,name_:CString,userdata_:Void Ptr)
  225. Function SDL_GetWindowData:Void Ptr(window_:SDL_Window Ptr,name_:CString)
  226. Function SDL_SetWindowPosition:Void(window_:SDL_Window Ptr,x_:Int,y_:Int)
  227. Function SDL_GetWindowPosition:Void(window_:SDL_Window Ptr,x_:Int Ptr,y_:Int Ptr)
  228. Function SDL_SetWindowSize:Void(window_:SDL_Window Ptr,w_:Int,h_:Int)
  229. Function SDL_GetWindowSize:Void(window_:SDL_Window Ptr,w_:Int Ptr,h_:Int Ptr)
  230. Function SDL_SetWindowMinimumSize:Void(window_:SDL_Window Ptr,min_w_:Int,min_h_:Int)
  231. Function SDL_GetWindowMinimumSize:Void(window_:SDL_Window Ptr,w_:Int Ptr,h_:Int Ptr)
  232. Function SDL_SetWindowMaximumSize:Void(window_:SDL_Window Ptr,max_w_:Int,max_h_:Int)
  233. Function SDL_GetWindowMaximumSize:Void(window_:SDL_Window Ptr,w_:Int Ptr,h_:Int Ptr)
  234. Function SDL_SetWindowBordered:Void(window_:SDL_Window Ptr,bordered_:SDL_bool)
  235. Function SDL_ShowWindow:Void(window_:SDL_Window Ptr)
  236. Function SDL_HideWindow:Void(window_:SDL_Window Ptr)
  237. Function SDL_RaiseWindow:Void(window_:SDL_Window Ptr)
  238. Function SDL_MaximizeWindow:Void(window_:SDL_Window Ptr)
  239. Function SDL_MinimizeWindow:Void(window_:SDL_Window Ptr)
  240. Function SDL_RestoreWindow:Void(window_:SDL_Window Ptr)
  241. Function SDL_SetWindowFullscreen:Int(window_:SDL_Window Ptr,flags_:Int)
  242. Function SDL_GetWindowSurface:SDL_Surface Ptr(window_:SDL_Window Ptr)
  243. Function SDL_UpdateWindowSurface:Int(window_:SDL_Window Ptr)
  244. Function SDL_UpdateWindowSurfaceRects:Int(window_:SDL_Window Ptr,rects_:SDL_Rect Ptr,numrects_:Int)
  245. Function SDL_SetWindowGrab:Void(window_:SDL_Window Ptr,grabbed_:SDL_bool)
  246. Function SDL_GetWindowGrab:SDL_bool(window_:SDL_Window Ptr)
  247. Function SDL_SetWindowBrightness:Int(window_:SDL_Window Ptr,brightness_:Float)
  248. Function SDL_GetWindowBrightness:Float(window_:SDL_Window Ptr)
  249. Function SDL_SetWindowGammaRamp:Int(window_:SDL_Window Ptr,red_:Short Ptr,green_:Short Ptr,blue_:Short Ptr)
  250. Function SDL_GetWindowGammaRamp:Int(window_:SDL_Window Ptr,red_:Short Ptr,green_:Short Ptr,blue_:Short Ptr)
  251. Enum SDL_HitTestResult
  252. End
  253. Const SDL_HITTEST_NORMAL:SDL_HitTestResult
  254. Const SDL_HITTEST_DRAGGABLE:SDL_HitTestResult
  255. Const SDL_HITTEST_RESIZE_TOPLEFT:SDL_HitTestResult
  256. Const SDL_HITTEST_RESIZE_TOP:SDL_HitTestResult
  257. Const SDL_HITTEST_RESIZE_TOPRIGHT:SDL_HitTestResult
  258. Const SDL_HITTEST_RESIZE_RIGHT:SDL_HitTestResult
  259. Const SDL_HITTEST_RESIZE_BOTTOMRIGHT:SDL_HitTestResult
  260. Const SDL_HITTEST_RESIZE_BOTTOM:SDL_HitTestResult
  261. Const SDL_HITTEST_RESIZE_BOTTOMLEFT:SDL_HitTestResult
  262. Const SDL_HITTEST_RESIZE_LEFT:SDL_HitTestResult
  263. Alias SDL_HitTest:SDL_HitTestResult(SDL_Window Ptr,SDL_Point Ptr,Void Ptr)
  264. Function SDL_SetWindowHitTest:Int(window_:SDL_Window Ptr,callback_:SDL_HitTest,callback_data_:Void Ptr)
  265. Function SDL_DestroyWindow:Void(window_:SDL_Window Ptr)
  266. Function SDL_IsScreenSaverEnabled:SDL_bool()
  267. Function SDL_EnableScreenSaver:Void()
  268. Function SDL_DisableScreenSaver:Void()
  269. Function SDL_GL_LoadLibrary:Int(path_:CString)
  270. Function SDL_GL_GetProcAddress:Void Ptr(proc_:CString)
  271. Function SDL_GL_UnloadLibrary:Void()
  272. Function SDL_GL_ExtensionSupported:SDL_bool(extension_:CString)
  273. Function SDL_GL_ResetAttributes:Void()
  274. Function SDL_GL_SetAttribute:Int(attr_:SDL_GLattr,value_:Int)
  275. Function SDL_GL_GetAttribute:Int(attr_:SDL_GLattr,value_:Int Ptr)
  276. Function SDL_GL_CreateContext:SDL_GLContext(window_:SDL_Window Ptr)
  277. Function SDL_GL_MakeCurrent:Int(window_:SDL_Window Ptr,context_:SDL_GLContext)
  278. Function SDL_GL_GetCurrentWindow:SDL_Window Ptr()
  279. Function SDL_GL_GetCurrentContext:SDL_GLContext()
  280. Function SDL_GL_GetDrawableSize:Void(window_:SDL_Window Ptr,w_:Int Ptr,h_:Int Ptr)
  281. Function SDL_GL_SetSwapInterval:Int(interval_:Int)
  282. Function SDL_GL_GetSwapInterval:Int()
  283. Function SDL_GL_SwapWindow:Void(window_:SDL_Window Ptr)
  284. Function SDL_GL_DeleteContext:Void(context_:SDL_GLContext)
  285. 'FILE="sdl2/sdl_touch.h"
  286. Alias SDL_TouchID:Long
  287. Alias SDL_FingerID:Long
  288. Struct SDL_Finger
  289. Field id:SDL_FingerID
  290. Field x:Float
  291. Field y:Float
  292. Field pressure:Float
  293. End
  294. Const SDL_TOUCH_MOUSEID:Int
  295. Function SDL_GetNumTouchDevices:Int()
  296. Function SDL_GetTouchDevice:SDL_TouchID(index_:Int)
  297. Function SDL_GetNumTouchFingers:Int(touchID_:SDL_TouchID)
  298. Function SDL_GetTouchFinger:SDL_Finger Ptr(touchID_:SDL_TouchID,index_:Int)
  299. 'FILE="sdl2/sdl_mouse.h"
  300. Struct SDL_Cursor
  301. End
  302. Enum SDL_SystemCursor
  303. End
  304. Const SDL_SYSTEM_CURSOR_ARROW:SDL_SystemCursor
  305. Const SDL_SYSTEM_CURSOR_IBEAM:SDL_SystemCursor
  306. Const SDL_SYSTEM_CURSOR_WAIT:SDL_SystemCursor
  307. Const SDL_SYSTEM_CURSOR_CROSSHAIR:SDL_SystemCursor
  308. Const SDL_SYSTEM_CURSOR_WAITARROW:SDL_SystemCursor
  309. Const SDL_SYSTEM_CURSOR_SIZENWSE:SDL_SystemCursor
  310. Const SDL_SYSTEM_CURSOR_SIZENESW:SDL_SystemCursor
  311. Const SDL_SYSTEM_CURSOR_SIZEWE:SDL_SystemCursor
  312. Const SDL_SYSTEM_CURSOR_SIZENS:SDL_SystemCursor
  313. Const SDL_SYSTEM_CURSOR_SIZEALL:SDL_SystemCursor
  314. Const SDL_SYSTEM_CURSOR_NO:SDL_SystemCursor
  315. Const SDL_SYSTEM_CURSOR_HAND:SDL_SystemCursor
  316. Const SDL_NUM_SYSTEM_CURSORS:SDL_SystemCursor
  317. Enum SDL_MouseWheelDirection
  318. End
  319. Const SDL_MOUSEWHEEL_NORMAL:SDL_MouseWheelDirection
  320. Const SDL_MOUSEWHEEL_FLIPPED:SDL_MouseWheelDirection
  321. Function SDL_GetMouseFocus:SDL_Window Ptr()
  322. Function SDL_GetMouseState:Int(x_:Int Ptr,y_:Int Ptr)
  323. Function SDL_GetGlobalMouseState:Int(x_:Int Ptr,y_:Int Ptr)
  324. Function SDL_GetRelativeMouseState:Int(x_:Int Ptr,y_:Int Ptr)
  325. Function SDL_WarpMouseInWindow:Void(window_:SDL_Window Ptr,x_:Int,y_:Int)
  326. Function SDL_WarpMouseGlobal:Void(x_:Int,y_:Int)
  327. Function SDL_SetRelativeMouseMode:Int(enabled_:SDL_bool)
  328. Function SDL_CaptureMouse:Int(enabled_:SDL_bool)
  329. Function SDL_GetRelativeMouseMode:SDL_bool()
  330. Function SDL_CreateCursor:SDL_Cursor Ptr(data_:CString,mask_:CString,w_:Int,h_:Int,hot_x_:Int,hot_y_:Int)
  331. Function SDL_CreateColorCursor:SDL_Cursor Ptr(surface_:SDL_Surface Ptr,hot_x_:Int,hot_y_:Int)
  332. Function SDL_CreateSystemCursor:SDL_Cursor Ptr(id_:SDL_SystemCursor)
  333. Function SDL_SetCursor:Void(cursor_:SDL_Cursor Ptr)
  334. Function SDL_GetCursor:SDL_Cursor Ptr()
  335. Function SDL_GetDefaultCursor:SDL_Cursor Ptr()
  336. Function SDL_FreeCursor:Void(cursor_:SDL_Cursor Ptr)
  337. Function SDL_ShowCursor:Int(toggle_:Int)
  338. Const SDL_BUTTON:Int
  339. Const SDL_BUTTON_LEFT:Int
  340. Const SDL_BUTTON_MIDDLE:Int
  341. Const SDL_BUTTON_RIGHT:Int
  342. Const SDL_BUTTON_X1:Int
  343. Const SDL_BUTTON_X2:Int
  344. Const SDL_BUTTON_LMASK:Int
  345. Const SDL_BUTTON_MMASK:Int
  346. Const SDL_BUTTON_RMASK:Int
  347. Const SDL_BUTTON_X1MASK:Int
  348. Const SDL_BUTTON_X2MASK:Int
  349. 'FILE="sdl2/sdl_joystick.h"
  350. Struct SDL_Joystick
  351. End
  352. Struct SDL_JoystickGUID
  353. End
  354. Alias SDL_JoystickID:Int
  355. Function SDL_NumJoysticks:Int()
  356. Function SDL_JoystickNameForIndex:char_t Ptr(device_index_:Int)
  357. Function SDL_JoystickOpen:SDL_Joystick Ptr(device_index_:Int)
  358. Function SDL_JoystickName:char_t Ptr(joystick_:SDL_Joystick Ptr)
  359. Function SDL_JoystickGetDeviceGUID:SDL_JoystickGUID(device_index_:Int)
  360. Function SDL_JoystickGetGUID:SDL_JoystickGUID(joystick_:SDL_Joystick Ptr)
  361. Function SDL_JoystickGetGUIDString:Void(guid_:SDL_JoystickGUID,pszGUID_:char_t Ptr ,cbGUID_:Int)
  362. Function SDL_JoystickGetGUIDFromString:SDL_JoystickGUID(pchGUID_:CString)
  363. Function SDL_JoystickGetAttached:SDL_bool(joystick_:SDL_Joystick Ptr)
  364. Function SDL_JoystickInstanceID:SDL_JoystickID(joystick_:SDL_Joystick Ptr)
  365. Function SDL_JoystickNumAxes:Int(joystick_:SDL_Joystick Ptr)
  366. Function SDL_JoystickNumBalls:Int(joystick_:SDL_Joystick Ptr)
  367. Function SDL_JoystickNumHats:Int(joystick_:SDL_Joystick Ptr)
  368. Function SDL_JoystickNumButtons:Int(joystick_:SDL_Joystick Ptr)
  369. Function SDL_JoystickUpdate:Void()
  370. Function SDL_JoystickEventState:Int(state_:Int)
  371. Function SDL_JoystickGetAxis:Short(joystick_:SDL_Joystick Ptr,axis_:Int)
  372. Const SDL_HAT_CENTERED:Int
  373. Const SDL_HAT_UP:Int
  374. Const SDL_HAT_RIGHT:Int
  375. Const SDL_HAT_DOWN:Int
  376. Const SDL_HAT_LEFT:Int
  377. Const SDL_HAT_RIGHTUP:Int
  378. Const SDL_HAT_RIGHTDOWN:Int
  379. Const SDL_HAT_LEFTUP:Int
  380. Const SDL_HAT_LEFTDOWN:Int
  381. Function SDL_JoystickGetHat:Byte(joystick_:SDL_Joystick Ptr,hat_:Int)
  382. Function SDL_JoystickGetBall:Int(joystick_:SDL_Joystick Ptr,ball_:Int,dx_:Int Ptr,dy_:Int Ptr)
  383. Function SDL_JoystickGetButton:Byte(joystick_:SDL_Joystick Ptr,button_:Int)
  384. Function SDL_JoystickClose:Void(joystick_:SDL_Joystick Ptr)
  385. 'FILE="sdl2/sdl_keycode.h"
  386. Alias SDL_Keycode:Int
  387. Const SDL_SCANCODE_TO_KEYCODE:Int
  388. Enum SDL_Keymod
  389. End
  390. Const KMOD_NONE:SDL_Keymod
  391. Const KMOD_LSHIFT:SDL_Keymod
  392. Const KMOD_RSHIFT:SDL_Keymod
  393. Const KMOD_LCTRL:SDL_Keymod
  394. Const KMOD_RCTRL:SDL_Keymod
  395. Const KMOD_LALT:SDL_Keymod
  396. Const KMOD_RALT:SDL_Keymod
  397. Const KMOD_LGUI:SDL_Keymod
  398. Const KMOD_RGUI:SDL_Keymod
  399. Const KMOD_NUM:SDL_Keymod
  400. Const KMOD_CAPS:SDL_Keymod
  401. Const KMOD_MODE:SDL_Keymod
  402. Const KMOD_RESERVED:SDL_Keymod
  403. 'FILE="sdl2/sdl_scancode.h"
  404. Enum SDL_Scancode
  405. End
  406. Const SDL_SCANCODE_UNKNOWN:SDL_Scancode
  407. Const SDL_SCANCODE_A:SDL_Scancode
  408. Const SDL_SCANCODE_B:SDL_Scancode
  409. Const SDL_SCANCODE_C:SDL_Scancode
  410. Const SDL_SCANCODE_D:SDL_Scancode
  411. Const SDL_SCANCODE_E:SDL_Scancode
  412. Const SDL_SCANCODE_F:SDL_Scancode
  413. Const SDL_SCANCODE_G:SDL_Scancode
  414. Const SDL_SCANCODE_H:SDL_Scancode
  415. Const SDL_SCANCODE_I:SDL_Scancode
  416. Const SDL_SCANCODE_J:SDL_Scancode
  417. Const SDL_SCANCODE_K:SDL_Scancode
  418. Const SDL_SCANCODE_L:SDL_Scancode
  419. Const SDL_SCANCODE_M:SDL_Scancode
  420. Const SDL_SCANCODE_N:SDL_Scancode
  421. Const SDL_SCANCODE_O:SDL_Scancode
  422. Const SDL_SCANCODE_P:SDL_Scancode
  423. Const SDL_SCANCODE_Q:SDL_Scancode
  424. Const SDL_SCANCODE_R:SDL_Scancode
  425. Const SDL_SCANCODE_S:SDL_Scancode
  426. Const SDL_SCANCODE_T:SDL_Scancode
  427. Const SDL_SCANCODE_U:SDL_Scancode
  428. Const SDL_SCANCODE_V:SDL_Scancode
  429. Const SDL_SCANCODE_W:SDL_Scancode
  430. Const SDL_SCANCODE_X:SDL_Scancode
  431. Const SDL_SCANCODE_Y:SDL_Scancode
  432. Const SDL_SCANCODE_Z:SDL_Scancode
  433. Const SDL_SCANCODE_1:SDL_Scancode
  434. Const SDL_SCANCODE_2:SDL_Scancode
  435. Const SDL_SCANCODE_3:SDL_Scancode
  436. Const SDL_SCANCODE_4:SDL_Scancode
  437. Const SDL_SCANCODE_5:SDL_Scancode
  438. Const SDL_SCANCODE_6:SDL_Scancode
  439. Const SDL_SCANCODE_7:SDL_Scancode
  440. Const SDL_SCANCODE_8:SDL_Scancode
  441. Const SDL_SCANCODE_9:SDL_Scancode
  442. Const SDL_SCANCODE_0:SDL_Scancode
  443. Const SDL_SCANCODE_RETURN:SDL_Scancode
  444. Const SDL_SCANCODE_ESCAPE:SDL_Scancode
  445. Const SDL_SCANCODE_BACKSPACE:SDL_Scancode
  446. Const SDL_SCANCODE_TAB:SDL_Scancode
  447. Const SDL_SCANCODE_SPACE:SDL_Scancode
  448. Const SDL_SCANCODE_MINUS:SDL_Scancode
  449. Const SDL_SCANCODE_EQUALS:SDL_Scancode
  450. Const SDL_SCANCODE_LEFTBRACKET:SDL_Scancode
  451. Const SDL_SCANCODE_RIGHTBRACKET:SDL_Scancode
  452. Const SDL_SCANCODE_BACKSLASH:SDL_Scancode
  453. Const SDL_SCANCODE_NONUSHASH:SDL_Scancode
  454. Const SDL_SCANCODE_SEMICOLON:SDL_Scancode
  455. Const SDL_SCANCODE_APOSTROPHE:SDL_Scancode
  456. Const SDL_SCANCODE_GRAVE:SDL_Scancode
  457. Const SDL_SCANCODE_COMMA:SDL_Scancode
  458. Const SDL_SCANCODE_PERIOD:SDL_Scancode
  459. Const SDL_SCANCODE_SLASH:SDL_Scancode
  460. Const SDL_SCANCODE_CAPSLOCK:SDL_Scancode
  461. Const SDL_SCANCODE_F1:SDL_Scancode
  462. Const SDL_SCANCODE_F2:SDL_Scancode
  463. Const SDL_SCANCODE_F3:SDL_Scancode
  464. Const SDL_SCANCODE_F4:SDL_Scancode
  465. Const SDL_SCANCODE_F5:SDL_Scancode
  466. Const SDL_SCANCODE_F6:SDL_Scancode
  467. Const SDL_SCANCODE_F7:SDL_Scancode
  468. Const SDL_SCANCODE_F8:SDL_Scancode
  469. Const SDL_SCANCODE_F9:SDL_Scancode
  470. Const SDL_SCANCODE_F10:SDL_Scancode
  471. Const SDL_SCANCODE_F11:SDL_Scancode
  472. Const SDL_SCANCODE_F12:SDL_Scancode
  473. Const SDL_SCANCODE_PRINTSCREEN:SDL_Scancode
  474. Const SDL_SCANCODE_SCROLLLOCK:SDL_Scancode
  475. Const SDL_SCANCODE_PAUSE:SDL_Scancode
  476. Const SDL_SCANCODE_INSERT:SDL_Scancode
  477. Const SDL_SCANCODE_HOME:SDL_Scancode
  478. Const SDL_SCANCODE_PAGEUP:SDL_Scancode
  479. Const SDL_SCANCODE_DELETE:SDL_Scancode
  480. Const SDL_SCANCODE_END:SDL_Scancode
  481. Const SDL_SCANCODE_PAGEDOWN:SDL_Scancode
  482. Const SDL_SCANCODE_RIGHT:SDL_Scancode
  483. Const SDL_SCANCODE_LEFT:SDL_Scancode
  484. Const SDL_SCANCODE_DOWN:SDL_Scancode
  485. Const SDL_SCANCODE_UP:SDL_Scancode
  486. Const SDL_SCANCODE_NUMLOCKCLEAR:SDL_Scancode
  487. Const SDL_SCANCODE_KP_DIVIDE:SDL_Scancode
  488. Const SDL_SCANCODE_KP_MULTIPLY:SDL_Scancode
  489. Const SDL_SCANCODE_KP_MINUS:SDL_Scancode
  490. Const SDL_SCANCODE_KP_PLUS:SDL_Scancode
  491. Const SDL_SCANCODE_KP_ENTER:SDL_Scancode
  492. Const SDL_SCANCODE_KP_1:SDL_Scancode
  493. Const SDL_SCANCODE_KP_2:SDL_Scancode
  494. Const SDL_SCANCODE_KP_3:SDL_Scancode
  495. Const SDL_SCANCODE_KP_4:SDL_Scancode
  496. Const SDL_SCANCODE_KP_5:SDL_Scancode
  497. Const SDL_SCANCODE_KP_6:SDL_Scancode
  498. Const SDL_SCANCODE_KP_7:SDL_Scancode
  499. Const SDL_SCANCODE_KP_8:SDL_Scancode
  500. Const SDL_SCANCODE_KP_9:SDL_Scancode
  501. Const SDL_SCANCODE_KP_0:SDL_Scancode
  502. Const SDL_SCANCODE_KP_PERIOD:SDL_Scancode
  503. Const SDL_SCANCODE_NONUSBACKSLASH:SDL_Scancode
  504. Const SDL_SCANCODE_APPLICATION:SDL_Scancode
  505. Const SDL_SCANCODE_POWER:SDL_Scancode
  506. Const SDL_SCANCODE_KP_EQUALS:SDL_Scancode
  507. Const SDL_SCANCODE_F13:SDL_Scancode
  508. Const SDL_SCANCODE_F14:SDL_Scancode
  509. Const SDL_SCANCODE_F15:SDL_Scancode
  510. Const SDL_SCANCODE_F16:SDL_Scancode
  511. Const SDL_SCANCODE_F17:SDL_Scancode
  512. Const SDL_SCANCODE_F18:SDL_Scancode
  513. Const SDL_SCANCODE_F19:SDL_Scancode
  514. Const SDL_SCANCODE_F20:SDL_Scancode
  515. Const SDL_SCANCODE_F21:SDL_Scancode
  516. Const SDL_SCANCODE_F22:SDL_Scancode
  517. Const SDL_SCANCODE_F23:SDL_Scancode
  518. Const SDL_SCANCODE_F24:SDL_Scancode
  519. Const SDL_SCANCODE_EXECUTE:SDL_Scancode
  520. Const SDL_SCANCODE_HELP:SDL_Scancode
  521. Const SDL_SCANCODE_MENU:SDL_Scancode
  522. Const SDL_SCANCODE_SELECT:SDL_Scancode
  523. Const SDL_SCANCODE_STOP:SDL_Scancode
  524. Const SDL_SCANCODE_AGAIN:SDL_Scancode
  525. Const SDL_SCANCODE_UNDO:SDL_Scancode
  526. Const SDL_SCANCODE_CUT:SDL_Scancode
  527. Const SDL_SCANCODE_COPY:SDL_Scancode
  528. Const SDL_SCANCODE_PASTE:SDL_Scancode
  529. Const SDL_SCANCODE_FIND:SDL_Scancode
  530. Const SDL_SCANCODE_MUTE:SDL_Scancode
  531. Const SDL_SCANCODE_VOLUMEUP:SDL_Scancode
  532. Const SDL_SCANCODE_VOLUMEDOWN:SDL_Scancode
  533. Const SDL_SCANCODE_KP_COMMA:SDL_Scancode
  534. Const SDL_SCANCODE_KP_EQUALSAS400:SDL_Scancode
  535. Const SDL_SCANCODE_INTERNATIONAL1:SDL_Scancode
  536. Const SDL_SCANCODE_INTERNATIONAL2:SDL_Scancode
  537. Const SDL_SCANCODE_INTERNATIONAL3:SDL_Scancode
  538. Const SDL_SCANCODE_INTERNATIONAL4:SDL_Scancode
  539. Const SDL_SCANCODE_INTERNATIONAL5:SDL_Scancode
  540. Const SDL_SCANCODE_INTERNATIONAL6:SDL_Scancode
  541. Const SDL_SCANCODE_INTERNATIONAL7:SDL_Scancode
  542. Const SDL_SCANCODE_INTERNATIONAL8:SDL_Scancode
  543. Const SDL_SCANCODE_INTERNATIONAL9:SDL_Scancode
  544. Const SDL_SCANCODE_LANG1:SDL_Scancode
  545. Const SDL_SCANCODE_LANG2:SDL_Scancode
  546. Const SDL_SCANCODE_LANG3:SDL_Scancode
  547. Const SDL_SCANCODE_LANG4:SDL_Scancode
  548. Const SDL_SCANCODE_LANG5:SDL_Scancode
  549. Const SDL_SCANCODE_LANG6:SDL_Scancode
  550. Const SDL_SCANCODE_LANG7:SDL_Scancode
  551. Const SDL_SCANCODE_LANG8:SDL_Scancode
  552. Const SDL_SCANCODE_LANG9:SDL_Scancode
  553. Const SDL_SCANCODE_ALTERASE:SDL_Scancode
  554. Const SDL_SCANCODE_SYSREQ:SDL_Scancode
  555. Const SDL_SCANCODE_CANCEL:SDL_Scancode
  556. Const SDL_SCANCODE_CLEAR:SDL_Scancode
  557. Const SDL_SCANCODE_PRIOR:SDL_Scancode
  558. Const SDL_SCANCODE_RETURN2:SDL_Scancode
  559. Const SDL_SCANCODE_SEPARATOR:SDL_Scancode
  560. Const SDL_SCANCODE_OUT:SDL_Scancode
  561. Const SDL_SCANCODE_OPER:SDL_Scancode
  562. Const SDL_SCANCODE_CLEARAGAIN:SDL_Scancode
  563. Const SDL_SCANCODE_CRSEL:SDL_Scancode
  564. Const SDL_SCANCODE_EXSEL:SDL_Scancode
  565. Const SDL_SCANCODE_KP_00:SDL_Scancode
  566. Const SDL_SCANCODE_KP_000:SDL_Scancode
  567. Const SDL_SCANCODE_THOUSANDSSEPARATOR:SDL_Scancode
  568. Const SDL_SCANCODE_DECIMALSEPARATOR:SDL_Scancode
  569. Const SDL_SCANCODE_CURRENCYUNIT:SDL_Scancode
  570. Const SDL_SCANCODE_CURRENCYSUBUNIT:SDL_Scancode
  571. Const SDL_SCANCODE_KP_LEFTPAREN:SDL_Scancode
  572. Const SDL_SCANCODE_KP_RIGHTPAREN:SDL_Scancode
  573. Const SDL_SCANCODE_KP_LEFTBRACE:SDL_Scancode
  574. Const SDL_SCANCODE_KP_RIGHTBRACE:SDL_Scancode
  575. Const SDL_SCANCODE_KP_TAB:SDL_Scancode
  576. Const SDL_SCANCODE_KP_BACKSPACE:SDL_Scancode
  577. Const SDL_SCANCODE_KP_A:SDL_Scancode
  578. Const SDL_SCANCODE_KP_B:SDL_Scancode
  579. Const SDL_SCANCODE_KP_C:SDL_Scancode
  580. Const SDL_SCANCODE_KP_D:SDL_Scancode
  581. Const SDL_SCANCODE_KP_E:SDL_Scancode
  582. Const SDL_SCANCODE_KP_F:SDL_Scancode
  583. Const SDL_SCANCODE_KP_XOR:SDL_Scancode
  584. Const SDL_SCANCODE_KP_POWER:SDL_Scancode
  585. Const SDL_SCANCODE_KP_PERCENT:SDL_Scancode
  586. Const SDL_SCANCODE_KP_LESS:SDL_Scancode
  587. Const SDL_SCANCODE_KP_GREATER:SDL_Scancode
  588. Const SDL_SCANCODE_KP_AMPERSAND:SDL_Scancode
  589. Const SDL_SCANCODE_KP_DBLAMPERSAND:SDL_Scancode
  590. Const SDL_SCANCODE_KP_VERTICALBAR:SDL_Scancode
  591. Const SDL_SCANCODE_KP_DBLVERTICALBAR:SDL_Scancode
  592. Const SDL_SCANCODE_KP_COLON:SDL_Scancode
  593. Const SDL_SCANCODE_KP_HASH:SDL_Scancode
  594. Const SDL_SCANCODE_KP_SPACE:SDL_Scancode
  595. Const SDL_SCANCODE_KP_AT:SDL_Scancode
  596. Const SDL_SCANCODE_KP_EXCLAM:SDL_Scancode
  597. Const SDL_SCANCODE_KP_MEMSTORE:SDL_Scancode
  598. Const SDL_SCANCODE_KP_MEMRECALL:SDL_Scancode
  599. Const SDL_SCANCODE_KP_MEMCLEAR:SDL_Scancode
  600. Const SDL_SCANCODE_KP_MEMADD:SDL_Scancode
  601. Const SDL_SCANCODE_KP_MEMSUBTRACT:SDL_Scancode
  602. Const SDL_SCANCODE_KP_MEMMULTIPLY:SDL_Scancode
  603. Const SDL_SCANCODE_KP_MEMDIVIDE:SDL_Scancode
  604. Const SDL_SCANCODE_KP_PLUSMINUS:SDL_Scancode
  605. Const SDL_SCANCODE_KP_CLEAR:SDL_Scancode
  606. Const SDL_SCANCODE_KP_CLEARENTRY:SDL_Scancode
  607. Const SDL_SCANCODE_KP_BINARY:SDL_Scancode
  608. Const SDL_SCANCODE_KP_OCTAL:SDL_Scancode
  609. Const SDL_SCANCODE_KP_DECIMAL:SDL_Scancode
  610. Const SDL_SCANCODE_KP_HEXADECIMAL:SDL_Scancode
  611. Const SDL_SCANCODE_LCTRL:SDL_Scancode
  612. Const SDL_SCANCODE_LSHIFT:SDL_Scancode
  613. Const SDL_SCANCODE_LALT:SDL_Scancode
  614. Const SDL_SCANCODE_LGUI:SDL_Scancode
  615. Const SDL_SCANCODE_RCTRL:SDL_Scancode
  616. Const SDL_SCANCODE_RSHIFT:SDL_Scancode
  617. Const SDL_SCANCODE_RALT:SDL_Scancode
  618. Const SDL_SCANCODE_RGUI:SDL_Scancode
  619. Const SDL_SCANCODE_MODE:SDL_Scancode
  620. Const SDL_SCANCODE_AUDIONEXT:SDL_Scancode
  621. Const SDL_SCANCODE_AUDIOPREV:SDL_Scancode
  622. Const SDL_SCANCODE_AUDIOSTOP:SDL_Scancode
  623. Const SDL_SCANCODE_AUDIOPLAY:SDL_Scancode
  624. Const SDL_SCANCODE_AUDIOMUTE:SDL_Scancode
  625. Const SDL_SCANCODE_MEDIASELECT:SDL_Scancode
  626. Const SDL_SCANCODE_WWW:SDL_Scancode
  627. Const SDL_SCANCODE_MAIL:SDL_Scancode
  628. Const SDL_SCANCODE_CALCULATOR:SDL_Scancode
  629. Const SDL_SCANCODE_COMPUTER:SDL_Scancode
  630. Const SDL_SCANCODE_AC_SEARCH:SDL_Scancode
  631. Const SDL_SCANCODE_AC_HOME:SDL_Scancode
  632. Const SDL_SCANCODE_AC_BACK:SDL_Scancode
  633. Const SDL_SCANCODE_AC_FORWARD:SDL_Scancode
  634. Const SDL_SCANCODE_AC_STOP:SDL_Scancode
  635. Const SDL_SCANCODE_AC_REFRESH:SDL_Scancode
  636. Const SDL_SCANCODE_AC_BOOKMARKS:SDL_Scancode
  637. Const SDL_SCANCODE_BRIGHTNESSDOWN:SDL_Scancode
  638. Const SDL_SCANCODE_BRIGHTNESSUP:SDL_Scancode
  639. Const SDL_SCANCODE_DISPLAYSWITCH:SDL_Scancode
  640. Const SDL_SCANCODE_KBDILLUMTOGGLE:SDL_Scancode
  641. Const SDL_SCANCODE_KBDILLUMDOWN:SDL_Scancode
  642. Const SDL_SCANCODE_KBDILLUMUP:SDL_Scancode
  643. Const SDL_SCANCODE_EJECT:SDL_Scancode
  644. Const SDL_SCANCODE_SLEEP:SDL_Scancode
  645. Const SDL_SCANCODE_APP1:SDL_Scancode
  646. Const SDL_SCANCODE_APP2:SDL_Scancode
  647. Const SDL_NUM_SCANCODES:SDL_Scancode
  648. 'FILE="sdl2/sdl_keyboard.h"
  649. Struct SDL_Keysym
  650. Field scancode:SDL_Scancode
  651. Field sym:SDL_Keycode
  652. Field mod_:Short="mod"
  653. Field unused:Int
  654. End
  655. Function SDL_GetKeyboardFocus:SDL_Window Ptr()
  656. Function SDL_GetKeyboardState:UByte Ptr(numkeys_:Int Ptr)="(bbUByte*)SDL_GetKeyboardState"
  657. Function SDL_GetModState:SDL_Keymod()
  658. Function SDL_SetModState:Void(modstate_:SDL_Keymod)
  659. Function SDL_GetKeyFromScancode:SDL_Keycode(scancode_:SDL_Scancode)
  660. Function SDL_GetScancodeFromKey:SDL_Scancode(key_:SDL_Keycode)
  661. Function SDL_GetScancodeName:char_t Ptr(scancode_:SDL_Scancode)
  662. Function SDL_GetScancodeFromName:SDL_Scancode(name_:CString)
  663. Function SDL_GetKeyName:char_t Ptr(key_:SDL_Keycode)
  664. Function SDL_GetKeyFromName:SDL_Keycode(name_:CString)
  665. Function SDL_StartTextInput:Void()
  666. Function SDL_IsTextInputActive:SDL_bool()
  667. Function SDL_StopTextInput:Void()
  668. Function SDL_SetTextInputRect:Void(rect_:SDL_Rect Ptr)
  669. Function SDL_HasScreenKeyboardSupport:SDL_bool()
  670. Function SDL_IsScreenKeyboardShown:SDL_bool(window_:SDL_Window Ptr)
  671. 'FILE="sdl2/sdl_events.h"
  672. Const SDL_RELEASED:Int
  673. Const SDL_PRESSED:Int
  674. Enum SDL_EventType
  675. End
  676. Const SDL_FIRSTEVENT:SDL_EventType
  677. Const SDL_QUIT:SDL_EventType
  678. Const SDL_APP_TERMINATING:SDL_EventType
  679. Const SDL_APP_LOWMEMORY:SDL_EventType
  680. Const SDL_APP_WILLENTERBACKGROUND:SDL_EventType
  681. Const SDL_APP_DIDENTERBACKGROUND:SDL_EventType
  682. Const SDL_APP_WILLENTERFOREGROUND:SDL_EventType
  683. Const SDL_APP_DIDENTERFOREGROUND:SDL_EventType
  684. Const SDL_WINDOWEVENT:SDL_EventType
  685. Const SDL_SYSWMEVENT:SDL_EventType
  686. Const SDL_KEYDOWN:SDL_EventType
  687. Const SDL_KEYUP:SDL_EventType
  688. Const SDL_TEXTEDITING:SDL_EventType
  689. Const SDL_TEXTINPUT:SDL_EventType
  690. Const SDL_MOUSEMOTION:SDL_EventType
  691. Const SDL_MOUSEBUTTONDOWN:SDL_EventType
  692. Const SDL_MOUSEBUTTONUP:SDL_EventType
  693. Const SDL_MOUSEWHEEL:SDL_EventType
  694. Const SDL_JOYAXISMOTION:SDL_EventType
  695. Const SDL_JOYBALLMOTION:SDL_EventType
  696. Const SDL_JOYHATMOTION:SDL_EventType
  697. Const SDL_JOYBUTTONDOWN:SDL_EventType
  698. Const SDL_JOYBUTTONUP:SDL_EventType
  699. Const SDL_JOYDEVICEADDED:SDL_EventType
  700. Const SDL_JOYDEVICEREMOVED:SDL_EventType
  701. Const SDL_CONTROLLERAXISMOTION:SDL_EventType
  702. Const SDL_CONTROLLERBUTTONDOWN:SDL_EventType
  703. Const SDL_CONTROLLERBUTTONUP:SDL_EventType
  704. Const SDL_CONTROLLERDEVICEADDED:SDL_EventType
  705. Const SDL_CONTROLLERDEVICEREMOVED:SDL_EventType
  706. Const SDL_CONTROLLERDEVICEREMAPPED:SDL_EventType
  707. Const SDL_FINGERDOWN:SDL_EventType
  708. Const SDL_FINGERUP:SDL_EventType
  709. Const SDL_FINGERMOTION:SDL_EventType
  710. Const SDL_DOLLARGESTURE:SDL_EventType
  711. Const SDL_DOLLARRECORD:SDL_EventType
  712. Const SDL_MULTIGESTURE:SDL_EventType
  713. Const SDL_CLIPBOARDUPDATE:SDL_EventType
  714. Const SDL_DROPFILE:SDL_EventType
  715. Const SDL_AUDIODEVICEADDED:SDL_EventType
  716. Const SDL_AUDIODEVICEREMOVED:SDL_EventType
  717. Const SDL_RENDER_TARGETS_RESET:SDL_EventType
  718. Const SDL_RENDER_DEVICE_RESET:SDL_EventType
  719. Const SDL_USEREVENT:SDL_EventType
  720. Const SDL_LASTEVENT:SDL_EventType
  721. Struct SDL_CommonEvent
  722. Field type:Int
  723. Field timestamp:Int
  724. End
  725. Struct SDL_WindowEvent
  726. Field type:Int
  727. Field timestamp:Int
  728. Field windowID:Int
  729. Field event:Byte
  730. Field padding1:Byte
  731. Field padding2:Byte
  732. Field padding3:Byte
  733. Field data1:Int
  734. Field data2:Int
  735. End
  736. Struct SDL_KeyboardEvent
  737. Field type:Int
  738. Field timestamp:Int
  739. Field windowID:Int
  740. Field state:Byte
  741. Field repeat_:Byte="repeat"
  742. Field padding2:Byte
  743. Field padding3:Byte
  744. Field keysym:SDL_Keysym
  745. End
  746. Const SDL_TEXTEDITINGEVENT_TEXT_SIZE:Int
  747. Struct SDL_TextEditingEvent
  748. Field type:Int
  749. Field timestamp:Int
  750. Field windowID:Int
  751. Field text:UByte Ptr
  752. Field start:Int
  753. Field length:Int
  754. End
  755. Const SDL_TEXTINPUTEVENT_TEXT_SIZE:Int
  756. Struct SDL_TextInputEvent
  757. Field type:Int
  758. Field timestamp:Int
  759. Field windowID:Int
  760. Field text:UByte Ptr
  761. End
  762. Struct SDL_MouseMotionEvent
  763. Field type:Int
  764. Field timestamp:Int
  765. Field windowID:Int
  766. Field which:Int
  767. Field state:Int
  768. Field x:Int
  769. Field y:Int
  770. Field xrel:Int
  771. Field yrel:Int
  772. End
  773. Struct SDL_MouseButtonEvent
  774. Field type:Int
  775. Field timestamp:Int
  776. Field windowID:Int
  777. Field which:Int
  778. Field button:Byte
  779. Field state:Byte
  780. Field clicks:Byte
  781. Field padding1:Byte
  782. Field x:Int
  783. Field y:Int
  784. End
  785. Struct SDL_MouseWheelEvent
  786. Field type:Int
  787. Field timestamp:Int
  788. Field windowID:Int
  789. Field which:Int
  790. Field x:Int
  791. Field y:Int
  792. Field direction:Int
  793. End
  794. Struct SDL_JoyAxisEvent
  795. Field type:Int
  796. Field timestamp:Int
  797. Field which:SDL_JoystickID
  798. Field axis:Byte
  799. Field padding1:Byte
  800. Field padding2:Byte
  801. Field padding3:Byte
  802. Field value:Short
  803. Field padding4:Short
  804. End
  805. Struct SDL_JoyBallEvent
  806. Field type:Int
  807. Field timestamp:Int
  808. Field which:SDL_JoystickID
  809. Field ball:Byte
  810. Field padding1:Byte
  811. Field padding2:Byte
  812. Field padding3:Byte
  813. Field xrel:Short
  814. Field yrel:Short
  815. End
  816. Struct SDL_JoyHatEvent
  817. Field type:Int
  818. Field timestamp:Int
  819. Field which:SDL_JoystickID
  820. Field hat:Byte
  821. Field value:Byte
  822. Field padding1:Byte
  823. Field padding2:Byte
  824. End
  825. Struct SDL_JoyButtonEvent
  826. Field type:Int
  827. Field timestamp:Int
  828. Field which:SDL_JoystickID
  829. Field button:Byte
  830. Field state:Byte
  831. Field padding1:Byte
  832. Field padding2:Byte
  833. End
  834. Struct SDL_JoyDeviceEvent
  835. Field type:Int
  836. Field timestamp:Int
  837. Field which:Int
  838. End
  839. Struct SDL_ControllerAxisEvent
  840. Field type:Int
  841. Field timestamp:Int
  842. Field which:SDL_JoystickID
  843. Field axis:Byte
  844. Field padding1:Byte
  845. Field padding2:Byte
  846. Field padding3:Byte
  847. Field value:Short
  848. Field padding4:Short
  849. End
  850. Struct SDL_ControllerButtonEvent
  851. Field type:Int
  852. Field timestamp:Int
  853. Field which:SDL_JoystickID
  854. Field button:Byte
  855. Field state:Byte
  856. Field padding1:Byte
  857. Field padding2:Byte
  858. End
  859. Struct SDL_ControllerDeviceEvent
  860. Field type:Int
  861. Field timestamp:Int
  862. Field which:Int
  863. End
  864. Struct SDL_AudioDeviceEvent
  865. Field type:Int
  866. Field timestamp:Int
  867. Field which:Int
  868. Field iscapture:Byte
  869. Field padding1:Byte
  870. Field padding2:Byte
  871. Field padding3:Byte
  872. End
  873. Struct SDL_TouchFingerEvent
  874. Field type:Int
  875. Field timestamp:Int
  876. Field touchId:SDL_TouchID
  877. Field fingerId:SDL_FingerID
  878. Field x:Float
  879. Field y:Float
  880. Field dx:Float
  881. Field dy:Float
  882. Field pressure:Float
  883. End
  884. Struct SDL_MultiGestureEvent
  885. Field type:Int
  886. Field timestamp:Int
  887. Field touchId:SDL_TouchID
  888. Field dTheta:Float
  889. Field dDist:Float
  890. Field x:Float
  891. Field y:Float
  892. Field numFingers:Short
  893. Field padding:Short
  894. End
  895. Struct SDL_DollarGestureEvent
  896. Field type:Int
  897. Field timestamp:Int
  898. Field touchId:SDL_TouchID
  899. ' Field gestureId:SDL_GestureID
  900. Field numFingers:Int
  901. Field error:Float
  902. Field x:Float
  903. Field y:Float
  904. End
  905. Struct SDL_DropEvent
  906. Field type:Int
  907. Field timestamp:Int
  908. Field file:Byte Ptr
  909. End
  910. Struct SDL_QuitEvent
  911. Field type:Int
  912. Field timestamp:Int
  913. End
  914. Struct SDL_OSEvent
  915. Field type:Int
  916. Field timestamp:Int
  917. End
  918. Struct SDL_UserEvent
  919. Field type:Int
  920. Field timestamp:Int
  921. Field windowID:Int
  922. Field code:Int
  923. Field data1:Void Ptr
  924. Field data2:Void Ptr
  925. End
  926. Struct SDL_SysWMmsg
  927. End
  928. Struct SDL_SysWMEvent
  929. Field type:Int
  930. Field timestamp:Int
  931. Field msg:SDL_SysWMmsg Ptr
  932. End
  933. Struct SDL_Event
  934. Field type:Int
  935. Field common:SDL_CommonEvent
  936. Field window:SDL_WindowEvent
  937. Field key:SDL_KeyboardEvent
  938. Field edit:SDL_TextEditingEvent
  939. Field text:SDL_TextInputEvent
  940. Field motion:SDL_MouseMotionEvent
  941. Field button:SDL_MouseButtonEvent
  942. Field wheel:SDL_MouseWheelEvent
  943. Field jaxis:SDL_JoyAxisEvent
  944. Field jball:SDL_JoyBallEvent
  945. Field jhat:SDL_JoyHatEvent
  946. Field jbutton:SDL_JoyButtonEvent
  947. Field jdevice:SDL_JoyDeviceEvent
  948. Field caxis:SDL_ControllerAxisEvent
  949. Field cbutton:SDL_ControllerButtonEvent
  950. Field cdevice:SDL_ControllerDeviceEvent
  951. Field adevice:SDL_AudioDeviceEvent
  952. Field quit:SDL_QuitEvent
  953. Field user:SDL_UserEvent
  954. Field syswm:SDL_SysWMEvent
  955. Field tfinger:SDL_TouchFingerEvent
  956. Field mgesture:SDL_MultiGestureEvent
  957. Field dgesture:SDL_DollarGestureEvent
  958. Field drop:SDL_DropEvent
  959. End
  960. Function SDL_PumpEvents:Void()
  961. Enum SDL_eventaction
  962. End
  963. Const SDL_ADDEVENT:SDL_eventaction
  964. Const SDL_PEEKEVENT:SDL_eventaction
  965. Const SDL_GETEVENT:SDL_eventaction
  966. Function SDL_PeepEvents:Int(events_:SDL_Event Ptr,numevents_:Int,action_:SDL_eventaction,minType_:Int,maxType_:Int)
  967. Function SDL_HasEvent:SDL_bool(type_:Int)
  968. Function SDL_HasEvents:SDL_bool(minType_:Int,maxType_:Int)
  969. Function SDL_FlushEvent:Void(type_:Int)
  970. Function SDL_FlushEvents:Void(minType_:Int,maxType_:Int)
  971. Function SDL_PollEvent:Int(event_:SDL_Event Ptr)
  972. Function SDL_WaitEvent:Int(event_:SDL_Event Ptr)
  973. Function SDL_WaitEventTimeout:Int(event_:SDL_Event Ptr,timeout_:Int)
  974. Function SDL_PushEvent:Int(event_:SDL_Event Ptr)
  975. Alias SDL_EventFilter:Int(Void Ptr,SDL_Event Ptr)
  976. Function SDL_SetEventFilter:Void(filter_:SDL_EventFilter,userdata_:Void Ptr)
  977. Function SDL_GetEventFilter:SDL_bool(filter_:SDL_EventFilter Ptr,userdata_:Void Ptr Ptr)
  978. Function SDL_AddEventWatch:Void(filter_:SDL_EventFilter,userdata_:Void Ptr)
  979. Function SDL_DelEventWatch:Void(filter_:SDL_EventFilter,userdata_:Void Ptr)
  980. Function SDL_FilterEvents:Void(filter_:SDL_EventFilter,userdata_:Void Ptr)
  981. Const SDL_QUERY:Int
  982. Const SDL_IGNORE:Int
  983. Const SDL_DISABLE:Int
  984. Const SDL_ENABLE:Int
  985. Function SDL_EventState:Byte(type_:Int,state_:Int)
  986. Const SDL_GetEventState:Int
  987. Function SDL_RegisterEvents:Int(numevents_:Int)
  988. 'FILE="sdl2/sdl_audio.h"
  989. Alias SDL_AudioFormat:Short
  990. Const SDL_AUDIO_MASK_BITSIZE:Int
  991. Const SDL_AUDIO_MASK_DATATYPE:Int
  992. Const SDL_AUDIO_MASK_ENDIAN:Int
  993. Const SDL_AUDIO_MASK_SIGNED:Int
  994. Const SDL_AUDIO_BITSIZE:Int
  995. Const SDL_AUDIO_ISFLOAT:Int
  996. Const SDL_AUDIO_ISBIGENDIAN:Int
  997. Const SDL_AUDIO_ISSIGNED:Int
  998. Const SDL_AUDIO_ISINT:Int
  999. Const SDL_AUDIO_ISLITTLEENDIAN:Int
  1000. Const SDL_AUDIO_ISUNSIGNED:Int
  1001. Const SDL_AUDIO_ALLOW_FREQUENCY_CHANGE:Int
  1002. Const SDL_AUDIO_ALLOW_FORMAT_CHANGE:Int
  1003. Const SDL_AUDIO_ALLOW_CHANNELS_CHANGE:Int
  1004. Const SDL_AUDIO_ALLOW_ANY_CHANGE:Int
  1005. Alias SDL_AudioCallback:Void(Void Ptr,UByte Ptr,Int)
  1006. Struct SDL_AudioSpec
  1007. Field freq:Int
  1008. Field format:SDL_AudioFormat
  1009. Field channels:Byte
  1010. Field silence:Byte
  1011. Field samples:Short
  1012. Field padding:Short
  1013. Field size:Int
  1014. Field callback:SDL_AudioCallback
  1015. Field userdata:Void Ptr
  1016. End
  1017. Struct SDL_AudioCVT
  1018. Field needed:Int
  1019. Field src_format:SDL_AudioFormat
  1020. Field dst_format:SDL_AudioFormat
  1021. Field rate_incr:Double
  1022. Field buf:Byte Ptr
  1023. Field len:Int
  1024. Field len_cvt:Int
  1025. Field len_mult:Int
  1026. Field len_ratio:Double
  1027. Field filter_index:Int
  1028. End
  1029. Alias SDL_AudioFilter:Void(SDL_AudioCVT Ptr,SDL_AudioFormat)
  1030. Function SDL_GetNumAudioDrivers:Int()
  1031. Function SDL_GetAudioDriver:char_t Ptr(index_:Int)
  1032. Function SDL_AudioInit:Int(driver_name_:CString)
  1033. Function SDL_AudioQuit:Void()
  1034. Function SDL_GetCurrentAudioDriver:char_t Ptr()
  1035. Function SDL_OpenAudio:Int(desired_:SDL_AudioSpec Ptr,obtained_:SDL_AudioSpec Ptr)
  1036. Alias SDL_AudioDeviceID:Int
  1037. Function SDL_GetNumAudioDevices:Int(iscapture_:Int)
  1038. Function SDL_GetAudioDeviceName:char_t Ptr(index_:Int,iscapture_:Int)
  1039. Function SDL_OpenAudioDevice:SDL_AudioDeviceID(device_:CString,iscapture_:Int,desired_:SDL_AudioSpec Ptr,obtained_:SDL_AudioSpec Ptr,allowed_changes_:Int)
  1040. Enum SDL_AudioStatus
  1041. End
  1042. Const SDL_AUDIO_STOPPED:SDL_AudioStatus
  1043. Const SDL_AUDIO_PLAYING:SDL_AudioStatus
  1044. Const SDL_AUDIO_PAUSED:SDL_AudioStatus
  1045. Function SDL_GetAudioStatus:SDL_AudioStatus()
  1046. Function SDL_GetAudioDeviceStatus:SDL_AudioStatus(dev_:SDL_AudioDeviceID)
  1047. Function SDL_PauseAudio:Void(pause_on_:Int)
  1048. Function SDL_PauseAudioDevice:Void(dev_:SDL_AudioDeviceID,pause_on_:Int)
  1049. Function SDL_LoadWAV_RW:SDL_AudioSpec Ptr(src_:SDL_RWops Ptr,freesrc_:Int,spec_:SDL_AudioSpec Ptr,audio_buf_:UByte Ptr Ptr,audio_len_:UInt Ptr)
  1050. Const SDL_LoadWAV:Int
  1051. Function SDL_FreeWAV:Void(audio_buf_:Byte Ptr)
  1052. Function SDL_BuildAudioCVT:Int(cvt_:SDL_AudioCVT Ptr,src_format_:SDL_AudioFormat,src_channels_:Byte,src_rate_:Int,dst_format_:SDL_AudioFormat,dst_channels_:Byte,dst_rate_:Int)
  1053. Function SDL_ConvertAudio:Int(cvt_:SDL_AudioCVT Ptr)
  1054. Const SDL_MIX_MAXVOLUME:Int
  1055. Function SDL_MixAudio:Void(dst_:Byte Ptr,src_:CString,len_:Int,volume_:Int)
  1056. Function SDL_MixAudioFormat:Void(dst_:Byte Ptr,src_:CString,format_:SDL_AudioFormat,len_:Int,volume_:Int)
  1057. Function SDL_QueueAudio:Int(dev_:SDL_AudioDeviceID,data_:Void Ptr,len_:Int)
  1058. Function SDL_GetQueuedAudioSize:Int(dev_:SDL_AudioDeviceID)
  1059. Function SDL_ClearQueuedAudio:Void(dev_:SDL_AudioDeviceID)
  1060. Function SDL_LockAudio:Void()
  1061. Function SDL_LockAudioDevice:Void(dev_:SDL_AudioDeviceID)
  1062. Function SDL_UnlockAudio:Void()
  1063. Function SDL_UnlockAudioDevice:Void(dev_:SDL_AudioDeviceID)
  1064. Function SDL_CloseAudio:Void()
  1065. Function SDL_CloseAudioDevice:Void(dev_:SDL_AudioDeviceID)
  1066. 'FILE="sdl2/SDL_clipboard.h"
  1067. Function SDL_SetClipboardText( text:CString )
  1068. Function SDL_GetClipboardText:char_t Ptr()
  1069. Function SDL_HasClipboardText:SDL_bool()
  1070. Function SDL_free( text:Void Ptr )
  1071. 'FILE="sdl2/SDL_audio.h"
  1072. Const AUDIO_U8:Int
  1073. Const AUDIO_S8:Int
  1074. Const AUDIO_U16LSB:Int
  1075. Const AUDIO_S16LSB:Int
  1076. Const AUDIO_U16MSB:Int
  1077. Const AUDIO_S16MSB:Int
  1078. Const AUDIO_U16:Int
  1079. Const AUDIO_S16:Int
  1080. 'FILE="sdl2/SDL_thread.h"
  1081. Alias SDL_threadID:UInt
  1082. Function SDL_ThreadID:SDL_threadID()
  1083. '${END}