1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978moduleTypes=Raylib_generated_typesmoduleConstants=Raylib_generated_constantsmoduleDescription(F:Ctypes.FOREIGN)=structopenCtypesopenF(* Window and Graphics Device Functions (Module: core) *)(* Window-related functions *)(* Initialize window and OpenGL context *)letinit_window=foreign"InitWindow"(int@->int@->string@->returningvoid)(* Check if KEY_ESCAPE pressed or Close icon pressed *)letwindow_should_close=foreign"WindowShouldClose"(void@->returningbool)(* Close window and unload OpenGL context *)letclose_window=foreign"CloseWindow"(void@->returningvoid)(* Check if window has been initialized successfully *)letis_window_ready=foreign"IsWindowReady"(void@->returningbool)(* Check if window has been minimized (or lost focus) *)letis_window_minimized=foreign"IsWindowMinimized"(void@->returningbool)(* Check if window has been resized *)letis_window_resized=foreign"IsWindowResized"(void@->returningbool)(* Check if window is currently hidden *)letis_window_hidden=foreign"IsWindowHidden"(void@->returningbool)(* Check if window is currently fullscreen *)letis_window_fullscreen=foreign"IsWindowFullscreen"(void@->returningbool)(* Toggle fullscreen mode (only PLATFORM_DESKTOP) *)lettoggle_fullscreen=foreign"ToggleFullscreen"(void@->returningvoid)(* Show the window *)letunhide_window=foreign"UnhideWindow"(void@->returningvoid)(* Hide the window *)lethide_window=foreign"HideWindow"(void@->returningvoid)(* Set icon for window (only PLATFORM_DESKTOP) *)letset_window_icon=foreign"SetWindowIcon"(Types.Image.t@->returningvoid)(* Set title for window (only PLATFORM_DESKTOP) *)letset_window_title=foreign"SetWindowTitle"(string@->returningvoid)(* Set window position on screen (only PLATFORM_DESKTOP) *)letset_window_position=foreign"SetWindowPosition"(int@->int@->returningvoid)(* Set monitor for the current window (fullscreen mode) *)letset_window_monitor=foreign"SetWindowMonitor"(int@->returningvoid)(* Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) *)letset_window_min_size=foreign"SetWindowMinSize"(int@->int@->returningvoid)(* Set window dimensions *)letset_window_size=foreign"SetWindowSize"(int@->int@->returningvoid)(* Get native window handle *)letget_window_handle=foreign"GetWindowHandle"(void@->returning(ptr_optvoid))(* Get current screen width *)letget_screen_width=foreign"GetScreenWidth"(void@->returningint)(* Get current screen height *)letget_screen_height=foreign"GetScreenHeight"(void@->returningint)(* Get number of connected monitors *)letget_monitor_count=foreign"GetMonitorCount"(void@->returningint)(* Get primary monitor width *)letget_monitor_width=foreign"GetMonitorWidth"(int@->returningint)(* Get primary monitor height *)letget_monitor_height=foreign"GetMonitorHeight"(int@->returningint)(* Get primary monitor physical width in millimetres *)letget_monitor_physical_width=foreign"GetMonitorPhysicalWidth"(int@->returningint)(* Get primary monitor physical height in millimetres *)letget_monitor_physical_height=foreign"GetMonitorPhysicalHeight"(int@->returningint)(* Get window position XY on monitor *)letget_window_position=foreign"GetWindowPosition"(void@->returningTypes.Vector2.t)(* Get the human-readable, UTF-8 encoded name of the primary monitor *)letget_monitor_name=foreign"GetMonitorName"(int@->returningstring)(* Get clipboard text content *)letget_clipboard_text=foreign"GetClipboardText"(void@->returningstring_opt)(* Set clipboard text content *)letset_clipboard_text=foreign"SetClipboardText"(string@->returningvoid)(* Cursor-related functions *)(* Shows cursor *)letshow_cursor=foreign"ShowCursor"(void@->returningvoid)(* Hides cursor *)lethide_cursor=foreign"HideCursor"(void@->returningvoid)(* Check if cursor is not visible *)letis_cursor_hidden=foreign"IsCursorHidden"(void@->returningbool)(* Enables cursor (unlock cursor) *)letenable_cursor=foreign"EnableCursor"(void@->returningvoid)(* Disables cursor (lock cursor) *)letdisable_cursor=foreign"DisableCursor"(void@->returningvoid)(* Drawing-related functions *)(* Set background color (framebuffer clear color) *)letclear_background=foreign"ClearBackground"(Types.Color.t@->returningvoid)(* Setup canvas (framebuffer) to start drawing *)letbegin_drawing=foreign"BeginDrawing"(void@->returningvoid)(* End canvas drawing and swap buffers (double buffering) *)letend_drawing=foreign"EndDrawing"(void@->returningvoid)(* Initialize 2D mode with custom camera (2D) *)letbegin_mode_2d=foreign"BeginMode2D"(Types.Camera2D.t@->returningvoid)(* Ends 2D mode with custom camera *)letend_mode_2d=foreign"EndMode2D"(void@->returningvoid)(* Initializes 3D mode with custom camera (3D) *)letbegin_mode_3d=foreign"BeginMode3D"(Types.Camera3D.t@->returningvoid)(* Ends 3D mode and returns to default 2D orthographic mode *)letend_mode_3d=foreign"EndMode3D"(void@->returningvoid)(* Initializes render texture for drawing *)letbegin_texture_mode=foreign"BeginTextureMode"(Types.RenderTexture2D.t@->returningvoid)(* Ends drawing to render texture *)letend_texture_mode=foreign"EndTextureMode"(void@->returningvoid)(* Begin scissor mode (define screen area for following drawing) *)letbegin_scissor_mode=foreign"BeginScissorMode"(int@->int@->int@->int@->returningvoid)(* End scissor mode *)letend_scissor_mode=foreign"EndScissorMode"(void@->returningvoid)(* Screen-space-related functions *)(* Returns a ray trace from mouse position *)letget_mouse_ray=foreign"GetMouseRay"(Types.Vector2.t@->Types.Camera3D.t@->returningTypes.Ray.t)(* Returns camera transform matrix (view matrix) *)letget_camera_matrix=foreign"GetCameraMatrix"(Types.Camera3D.t@->returningTypes.Matrix.t)(* Returns camera 2d transform matrix *)letget_camera_matrix_2d=foreign"GetCameraMatrix2D"(Types.Camera2D.t@->returningTypes.Matrix.t)(* Returns the screen space position for a 3d world space position *)letget_world_to_screen=foreign"GetWorldToScreen"(Types.Vector3.t@->Types.Camera3D.t@->returningTypes.Vector2.t)(* Returns size position for a 3d world space position *)letget_world_to_screen_ex=foreign"GetWorldToScreenEx"(Types.Vector3.t@->Types.Camera3D.t@->int@->int@->returningTypes.Vector2.t)(* Returns the screen space position for a 2d camera world space position *)letget_world_to_screen_2d=foreign"GetWorldToScreen2D"(Types.Vector2.t@->Types.Camera2D.t@->returningTypes.Vector2.t)(* Returns the world space position for a 2d camera screen space position *)letget_screen_to_world_2d=foreign"GetScreenToWorld2D"(Types.Vector2.t@->Types.Camera2D.t@->returningTypes.Vector2.t)(* Timing-related functions *)(* Set target FPS (maximum) *)letset_target_fps=foreign"SetTargetFPS"(int@->returningvoid)(* Returns current FPS *)letget_f_p_s=foreign"GetFPS"(void@->returningint)(* Returns time in seconds for last frame drawn *)letget_frame_time=foreign"GetFrameTime"(void@->returningfloat)(* Returns elapsed time in seconds since InitWindow() *)letget_time=foreign"GetTime"(void@->returningdouble)(* Color-related functions *)(* Returns hexadecimal value for a Color *)letcolor_to_int=foreign"ColorToInt"(Types.Color.t@->returningint)(* Returns color normalized as float [0..1] *)letcolor_normalize=foreign"ColorNormalize"(Types.Color.t@->returningTypes.Vector4.t)(* Returns color from normalized values [0..1] *)letcolor_from_normalized=foreign"ColorFromNormalized"(Types.Vector4.t@->returningTypes.Color.t)(* Returns HSV values for a Color *)letcolor_to_hsv=foreign"ColorToHSV"(Types.Color.t@->returningTypes.Vector3.t)(* Returns a Color from HSV values *)letcolor_from_hsv=foreign"ColorFromHSV"(Types.Vector3.t@->returningTypes.Color.t)(* Returns a Color struct from hexadecimal value *)letget_color=foreign"GetColor"(int@->returningTypes.Color.t)(* Color fade-in or fade-out, alpha goes from 0.0f to 1.0f *)letfade=foreign"Fade"(Types.Color.t@->float@->returningTypes.Color.t)(* Misc. functions *)(* Setup window configuration flags (view FLAGS) *)letset_config_flags=foreign"SetConfigFlags"(Constants.ConfigFlag.t_bitmask@->returningvoid)(* Set the current threshold (minimum) log level *)letset_trace_log_level=foreign"SetTraceLogLevel"(Constants.TraceLogType.t@->returningvoid)(* Set the exit threshold (minimum) log level *)letset_trace_log_exit=foreign"SetTraceLogExit"(Constants.TraceLogType.t@->returningvoid)(* Set a trace log callback to enable custom logging *)(* let set_trace_log_callback = foreign "SetTraceLogCallback" ( TraceLogCallback @-> returning void) *)(* Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR) *)lettrace_log=foreign"TraceLog"(Constants.TraceLogType.t@->string@->returningvoid)(* Takes a screenshot of current screen (saved a .png) *)lettake_screenshot=foreign"TakeScreenshot"(string@->returningvoid)(* Returns a random value between min and max (both included) *)letget_random_value=foreign"GetRandomValue"(int@->int@->returningint)(* Files management functions *)(* Load file data as byte array (read) *)let_load_file_data=foreign"LoadFileData"(string@->ptruint@->returning(ptruchar))(* Save data to file from byte array (write) *)let_save_file_data=foreign"SaveFileData"(string@->ptrvoid@->int@->returningvoid)(* Load text data from file (read), returns a '' terminated string *)letload_file_text=foreign"LoadFileText"(string@->returningstring)(* Save text data to file (write), string must be '' terminated *)letsave_file_text=foreign"SaveFileText"(string@->string@->returningvoid)(* Check if file exists *)letfile_exists=foreign"FileExists"(string@->returningbool)(* Check file extension *)letis_file_extension=foreign"IsFileExtension"(string@->string@->returningbool)(* Check if a directory path exists *)letdirectory_exists=foreign"DirectoryExists"(string@->returningbool)(* Get pointer to extension for a filename string *)letget_extension=foreign"GetExtension"(string@->returningstring)(* Get pointer to filename for a path string *)letget_file_name=foreign"GetFileName"(string@->returningstring)(* Get filename string without extension (uses static string) *)letget_file_name_without_ext=foreign"GetFileNameWithoutExt"(string@->returningstring)(* Get full path for a given fileName with path (uses static string) *)letget_directory_path=foreign"GetDirectoryPath"(string@->returningstring)(* Get previous directory path for a given path (uses static string) *)letget_prev_directory_path=foreign"GetPrevDirectoryPath"(string@->returningstring)(* Get current working directory (uses static string) *)letget_working_directory=foreign"GetWorkingDirectory"(void@->returningstring)(* Get filenames in a directory path (memory should be freed) *)let_get_directory_files=foreign"GetDirectoryFiles"(string@->ptrint@->returning(ptrstring))(* Clear directory files paths buffers (free memory) *)letclear_directory_files=foreign"ClearDirectoryFiles"(void@->returningvoid)(* Change working directory, returns true if success *)letchange_directory=foreign"ChangeDirectory"(string@->returningbool)(* Check if a file has been dropped into window *)letis_file_dropped=foreign"IsFileDropped"(void@->returningbool)(* Get dropped files names (memory should be freed) *)let_get_dropped_files=foreign"GetDroppedFiles"(ptrint@->returning(ptrstring))(* Clear dropped files paths buffer (free memory) *)letclear_dropped_files=foreign"ClearDroppedFiles"(void@->returningvoid)(* Get file modification time (last write time) *)letget_file_mod_time=foreign"GetFileModTime"(string@->returninglong)(* Compress data (DEFLATE algorythm) *)let_compress_data=foreign"CompressData"(ptruchar@->int@->ptrint@->returning(ptruchar))(* Decompress data (DEFLATE algorythm) *)let_decompress_data=foreign"DecompressData"(ptruchar@->int@->ptrint@->returning(ptruchar))(* Persistent storage management *)(* Save integer value to storage file (to defined position) *)letsave_storage_value=foreign"SaveStorageValue"(int@->int@->returningvoid)(* Load integer value from storage file (from defined position) *)letload_storage_value=foreign"LoadStorageValue"(int@->returningint)(* Open URL with default system browser (if available) *)letopen_u_r_l=foreign"OpenURL"(string@->returningvoid)(*------------------------------------------------------------------------------------ *)(* Input Handling Functions (Module: core) *)(*------------------------------------------------------------------------------------ *)(* Input-related functions: keyboard *)(* Detect if a key has been pressed once *)letis_key_pressed=foreign"IsKeyPressed"(Constants.Key.t@->returningbool)(* Detect if a key is being pressed *)letis_key_down=foreign"IsKeyDown"(Constants.Key.t@->returningbool)(* Detect if a key has been released once *)letis_key_released=foreign"IsKeyReleased"(Constants.Key.t@->returningbool)(* Detect if a key is NOT being pressed *)letis_key_up=foreign"IsKeyUp"(Constants.Key.t@->returningbool)(* Set a custom key to exit program (default is ESC) *)letset_exit_key=foreign"SetExitKey"(Constants.Key.t@->returningvoid)(* Get key pressed, call it multiple times for chars queued *)letget_key_pressed=foreign"GetKeyPressed"(void@->returningConstants.Key.t)(* Input-related functions: gamepads *)(* Detect if a gamepad is available *)letis_gamepad_available=foreign"IsGamepadAvailable"(Constants.GamepadNumber.t@->returningbool)(* Check gamepad name (if available) *)letis_gamepad_name=foreign"IsGamepadName"(Constants.GamepadNumber.t@->string@->returningbool)(* Return gamepad internal name id *)letget_gamepad_name=foreign"GetGamepadName"(Constants.GamepadNumber.t@->returningstring)(* Detect if a gamepad button has been pressed once *)letis_gamepad_button_pressed=foreign"IsGamepadButtonPressed"(Constants.GamepadNumber.t@->Constants.GamepadButton.t@->returningbool)(* Detect if a gamepad button is being pressed *)letis_gamepad_button_down=foreign"IsGamepadButtonDown"(Constants.GamepadNumber.t@->Constants.GamepadButton.t@->returningbool)(* Detect if a gamepad button has been released once *)letis_gamepad_button_released=foreign"IsGamepadButtonReleased"(Constants.GamepadNumber.t@->Constants.GamepadButton.t@->returningbool)(* Detect if a gamepad button is NOT being pressed *)letis_gamepad_button_up=foreign"IsGamepadButtonUp"(Constants.GamepadNumber.t@->Constants.GamepadButton.t@->returningbool)(* Get the last gamepad button pressed *)letget_gamepad_button_pressed=foreign"GetGamepadButtonPressed"(void@->returningConstants.GamepadButton.t)(* Return gamepad axis count for a gamepad *)letget_gamepad_axis_count=foreign"GetGamepadAxisCount"(Constants.GamepadNumber.t@->returningint)(* Return axis movement value for a gamepad axis *)letget_gamepad_axis_movement=foreign"GetGamepadAxisMovement"(Constants.GamepadNumber.t@->Constants.GamepadAxis.t@->returningfloat)(* Input-related functions: mouse *)(* Detect if a mouse button has been pressed once *)letis_mouse_button_pressed=foreign"IsMouseButtonPressed"(Constants.MouseButton.t@->returningbool)(* Detect if a mouse button is being pressed *)letis_mouse_button_down=foreign"IsMouseButtonDown"(Constants.MouseButton.t@->returningbool)(* Detect if a mouse button has been released once *)letis_mouse_button_released=foreign"IsMouseButtonReleased"(Constants.MouseButton.t@->returningbool)(* Detect if a mouse button is NOT being pressed *)letis_mouse_button_up=foreign"IsMouseButtonUp"(Constants.MouseButton.t@->returningbool)(* Returns mouse position X *)letget_mouse_x=foreign"GetMouseX"(void@->returningint)(* Returns mouse position Y *)letget_mouse_y=foreign"GetMouseY"(void@->returningint)(* Returns mouse position XY *)letget_mouse_position=foreign"GetMousePosition"(void@->returningTypes.Vector2.t)(* Set mouse position XY *)letset_mouse_position=foreign"SetMousePosition"(int@->int@->returningvoid)(* Set mouse offset *)letset_mouse_offset=foreign"SetMouseOffset"(int@->int@->returningvoid)(* Set mouse scaling *)letset_mouse_scale=foreign"SetMouseScale"(float@->float@->returningvoid)(* Returns mouse wheel movement Y *)letget_mouse_wheel_move=foreign"GetMouseWheelMove"(void@->returningint)(* Input-related functions: touch *)(* Returns touch position X for touch point 0 (relative to screen size) *)letget_touch_x=foreign"GetTouchX"(void@->returningint)(* Returns touch position Y for touch point 0 (relative to screen size) *)letget_touch_y=foreign"GetTouchY"(void@->returningint)(* Returns touch position XY for a touch point index (relative to screen size) *)letget_touch_position=foreign"GetTouchPosition"(int@->returningTypes.Vector2.t)(* Gestures and Touch Handling Functions (Module: gestures) *)(* Enable a set of gestures using flags *)(* let set_gestures_enabled = foreign "SetGesturesEnabled" ( unsigned @-> returning void) *)(* Check if a gesture have been detected *)letis_gesture_detected=foreign"IsGestureDetected"(int@->returningbool)(* Get latest detected gesture *)letget_gesture_detected=foreign"GetGestureDetected"(void@->returningint)(* Get touch points count *)letget_touch_points_count=foreign"GetTouchPointsCount"(void@->returningint)(* Get gesture hold time in milliseconds *)letget_gesture_hold_duration=foreign"GetGestureHoldDuration"(void@->returningfloat)(* Get gesture drag vector *)letget_gesture_drag_vector=foreign"GetGestureDragVector"(void@->returningTypes.Vector2.t)(* Get gesture drag angle *)letget_gesture_drag_angle=foreign"GetGestureDragAngle"(void@->returningfloat)(* Get gesture pinch delta *)letget_gesture_pinch_vector=foreign"GetGesturePinchVector"(void@->returningTypes.Vector2.t)(* Get gesture pinch angle *)letget_gesture_pinch_angle=foreign"GetGesturePinchAngle"(void@->returningfloat)(* Camera System Functions (Module: camera) *)(* Set camera mode (multiple camera modes available) *)letset_camera_mode=foreign"SetCameraMode"(Types.Camera3D.t@->Constants.CameraMode.t@->returningvoid)(* Update camera position for selected mode *)letupdate_camera=foreign"UpdateCamera"(ptrTypes.Camera3D.t@->returningvoid)(* Set camera pan key to combine with mouse movement (free camera) *)letset_camera_pan_control=foreign"SetCameraPanControl"(int@->returningvoid)(* Set camera alt key to combine with mouse movement (free camera) *)letset_camera_alt_control=foreign"SetCameraAltControl"(int@->returningvoid)(* Set camera smooth zoom key to combine with mouse (free camera) *)letset_camera_smooth_zoom_control=foreign"SetCameraSmoothZoomControl"(int@->returningvoid)(* Set camera move controls (1st person and 3rd person cameras) *)letset_camera_move_controls=foreign"SetCameraMoveControls"(int@->int@->int@->int@->int@->int@->returningvoid)(* Basic Shapes Drawing Functions (Module: shapes) *)(* Basic shapes drawing functions *)(* Draw a pixel *)letdraw_pixel=foreign"DrawPixel"(int@->int@->Types.Color.t@->returningvoid)(* Draw a pixel (Vector version) *)letdraw_pixel_v=foreign"DrawPixelV"(Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw a line *)letdraw_line=foreign"DrawLine"(int@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw a line (Vector version) *)letdraw_line_v=foreign"DrawLineV"(Types.Vector2.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw a line defining thickness *)letdraw_line_ex=foreign"DrawLineEx"(Types.Vector2.t@->Types.Vector2.t@->float@->Types.Color.t@->returningvoid)(* Draw a line using cubic-bezier curves in-out *)letdraw_line_bezier=foreign"DrawLineBezier"(Types.Vector2.t@->Types.Vector2.t@->float@->Types.Color.t@->returningvoid)(* Draw lines sequence *)letdraw_line_strip=foreign"DrawLineStrip"(ptrTypes.Vector2.t@->int@->Types.Color.t@->returningvoid)(* Draw a color-filled circle *)letdraw_circle=foreign"DrawCircle"(int@->int@->float@->Types.Color.t@->returningvoid)(* Draw a piece of a circle *)letdraw_circle_sector=foreign"DrawCircleSector"(Types.Vector2.t@->float@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw circle sector outline *)letdraw_circle_sector_lines=foreign"DrawCircleSectorLines"(Types.Vector2.t@->float@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw a gradient-filled circle *)letdraw_circle_gradient=foreign"DrawCircleGradient"(int@->int@->float@->Types.Color.t@->Types.Color.t@->returningvoid)(* Draw a color-filled circle (Vector version) *)letdraw_circle_v=foreign"DrawCircleV"(Types.Vector2.t@->float@->Types.Color.t@->returningvoid)(* Draw circle outline *)letdraw_circle_lines=foreign"DrawCircleLines"(int@->int@->float@->Types.Color.t@->returningvoid)(* Draw ellipse *)letdraw_ellipse=foreign"DrawEllipse"(int@->int@->float@->float@->Types.Color.t@->returningvoid)(* Draw ellipse outline *)letdraw_ellipse_lines=foreign"DrawEllipseLines"(int@->int@->float@->float@->Types.Color.t@->returningvoid)(* Draw ring *)letdraw_ring=foreign"DrawRing"(Types.Vector2.t@->float@->float@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw ring outline *)letdraw_ring_lines=foreign"DrawRingLines"(Types.Vector2.t@->float@->float@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw a color-filled rectangle *)letdraw_rectangle=foreign"DrawRectangle"(int@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw a color-filled rectangle (Vector version) *)letdraw_rectangle_v=foreign"DrawRectangleV"(Types.Vector2.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw a color-filled rectangle *)letdraw_rectangle_rec=foreign"DrawRectangleRec"(Types.Rectangle.t@->Types.Color.t@->returningvoid)(* Draw a color-filled rectangle with pro parameters *)letdraw_rectangle_pro=foreign"DrawRectanglePro"(Types.Rectangle.t@->Types.Vector2.t@->float@->Types.Color.t@->returningvoid)(* Draw a vertical-gradient-filled rectangle *)letdraw_rectangle_gradient_v=foreign"DrawRectangleGradientV"(int@->int@->int@->int@->Types.Color.t@->Types.Color.t@->returningvoid)(* Draw a horizontal-gradient-filled rectangle *)letdraw_rectangle_gradient_h=foreign"DrawRectangleGradientH"(int@->int@->int@->int@->Types.Color.t@->Types.Color.t@->returningvoid)(* Draw a gradient-filled rectangle with custom vertex colors *)letdraw_rectangle_gradient_ex=foreign"DrawRectangleGradientEx"(Types.Rectangle.t@->Types.Color.t@->Types.Color.t@->Types.Color.t@->Types.Color.t@->returningvoid)(* Draw rectangle outline *)letdraw_rectangle_lines=foreign"DrawRectangleLines"(int@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw rectangle outline with extended parameters *)letdraw_rectangle_lines_ex=foreign"DrawRectangleLinesEx"(Types.Rectangle.t@->int@->Types.Color.t@->returningvoid)(* Draw rectangle with rounded edges *)letdraw_rectangle_rounded=foreign"DrawRectangleRounded"(Types.Rectangle.t@->float@->int@->Types.Color.t@->returningvoid)(* Draw rectangle with rounded edges outline *)letdraw_rectangle_rounded_lines=foreign"DrawRectangleRoundedLines"(Types.Rectangle.t@->float@->int@->int@->Types.Color.t@->returningvoid)(* Draw a color-filled triangle (vertex in counter-clockwise order!) *)letdraw_triangle=foreign"DrawTriangle"(Types.Vector2.t@->Types.Vector2.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw triangle outline (vertex in counter-clockwise order!) *)letdraw_triangle_lines=foreign"DrawTriangleLines"(Types.Vector2.t@->Types.Vector2.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw a triangle fan defined by points (first vertex is the center) *)letdraw_triangle_fan=foreign"DrawTriangleFan"(ptrTypes.Vector2.t@->int@->Types.Color.t@->returningvoid)(* Draw a triangle strip defined by points *)letdraw_triangle_strip=foreign"DrawTriangleStrip"(ptrTypes.Vector2.t@->int@->Types.Color.t@->returningvoid)(* Draw a regular polygon (Vector version) *)letdraw_poly=foreign"DrawPoly"(Types.Vector2.t@->int@->float@->float@->Types.Color.t@->returningvoid)(* Draw a polygon outline of n sides *)letdraw_poly_lines=foreign"DrawPolyLines"(Types.Vector2.t@->int@->float@->float@->Types.Color.t@->returningvoid)(* Basic shapes collision detection functions *)(* Check collision between two rectangles *)letcheck_collision_recs=foreign"CheckCollisionRecs"(Types.Rectangle.t@->Types.Rectangle.t@->returningbool)(* Check collision between two circles *)letcheck_collision_circles=foreign"CheckCollisionCircles"(Types.Vector2.t@->float@->Types.Vector2.t@->float@->returningbool)(* Check collision between circle and rectangle *)letcheck_collision_circle_rec=foreign"CheckCollisionCircleRec"(Types.Vector2.t@->float@->Types.Rectangle.t@->returningbool)(* Get collision rectangle for two rectangles collision *)letget_collision_rec=foreign"GetCollisionRec"(Types.Rectangle.t@->Types.Rectangle.t@->returningTypes.Rectangle.t)(* Check if point is inside rectangle *)letcheck_collision_point_rec=foreign"CheckCollisionPointRec"(Types.Vector2.t@->Types.Rectangle.t@->returningbool)(* Check if point is inside circle *)letcheck_collision_point_circle=foreign"CheckCollisionPointCircle"(Types.Vector2.t@->Types.Vector2.t@->float@->returningbool)(* Check if point is inside a triangle *)letcheck_collision_point_triangle=foreign"CheckCollisionPointTriangle"(Types.Vector2.t@->Types.Vector2.t@->Types.Vector2.t@->Types.Vector2.t@->returningbool)(* Texture Loading and Drawing Functions (Module: textures) *)(* Image loading functions *)(* NOTE: This functions do not require GPU access *)(* Load image from file into CPU memory (RAM) *)letload_image=foreign"LoadImage"(string@->returningTypes.Image.t)(* Load image from Color array data (RGBA - 32bit) *)letload_image_ex=foreign"LoadImageEx"(ptrTypes.Color.t@->int@->int@->returningTypes.Image.t)(* Load image from raw data with parameters *)letload_image_pro=foreign"LoadImagePro"(ptrvoid@->int@->int@->int@->returningTypes.Image.t)(* Load image from RAW file data *)letload_image_raw=foreign"LoadImageRaw"(string@->int@->int@->int@->int@->returningTypes.Image.t)(* Unload image from CPU memory (RAM) *)letunload_image=foreign"UnloadImage"(Types.Image.t@->returningvoid)(* Export image data to file *)letexport_image=foreign"ExportImage"(Types.Image.t@->string@->returningvoid)(* Export image as code file defining an array of bytes *)letexport_image_as_code=foreign"ExportImageAsCode"(Types.Image.t@->string@->returningvoid)(* Get pixel data from image as a Color struct array *)(* let *_get_image_data = foreign "*GetImageData" ( Types.Image.t @-> returning Types.Color.t) *)(* Get pixel data from image as Vector4 array (float normalized) *)(* let *_get_image_data_normalized = foreign "*GetImageDataNormalized" ( Types.Image.t @-> returning Vector4) *)(* Image generation functions *)(* Generate image: plain color *)letgen_image_color=foreign"GenImageColor"(int@->int@->Types.Color.t@->returningTypes.Image.t)(* Generate image: vertical gradient *)letgen_image_gradient_v=foreign"GenImageGradientV"(int@->int@->Types.Color.t@->Types.Color.t@->returningTypes.Image.t)(* Generate image: horizontal gradient *)letgen_image_gradient_h=foreign"GenImageGradientH"(int@->int@->Types.Color.t@->Types.Color.t@->returningTypes.Image.t)(* Generate image: radial gradient *)letgen_image_gradient_radial=foreign"GenImageGradientRadial"(int@->int@->float@->Types.Color.t@->Types.Color.t@->returningTypes.Image.t)(* Generate image: checked *)letgen_image_checked=foreign"GenImageChecked"(int@->int@->int@->int@->Types.Color.t@->Types.Color.t@->returningTypes.Image.t)(* Generate image: white noise *)letgen_image_white_noise=foreign"GenImageWhiteNoise"(int@->int@->float@->returningTypes.Image.t)(* Generate image: perlin noise *)letgen_image_perlin_noise=foreign"GenImagePerlinNoise"(int@->int@->int@->int@->float@->returningTypes.Image.t)(* Generate image: cellular algorithm. Bigger tileSize means bigger cells *)letgen_image_cellular=foreign"GenImageCellular"(int@->int@->int@->returningTypes.Image.t)(* Image manipulation functions *)(* Create an image duplicate (useful for transformations) *)letimage_copy=foreign"ImageCopy"(Types.Image.t@->returningTypes.Image.t)(* Create an image from another image piece *)letimage_from_image=foreign"ImageFromImage"(Types.Image.t@->Types.Rectangle.t@->returningTypes.Image.t)(* Create an image from text (default font) *)letimage_text=foreign"ImageText"(string@->int@->Types.Color.t@->returningTypes.Image.t)(* Create an image from text (custom sprite font) *)letimage_text_ex=foreign"ImageTextEx"(Types.Font.t@->string@->float@->float@->Types.Color.t@->returningTypes.Image.t)(* Convert image to POT (power-of-two) *)letimage_to_p_o_t=foreign"ImageToPOT"(ptrTypes.Image.t@->Types.Color.t@->returningvoid)(* Convert image data to desired format *)letimage_format=foreign"ImageFormat"(ptrTypes.Image.t@->int@->returningvoid)(* Apply alpha mask to image *)letimage_alpha_mask=foreign"ImageAlphaMask"(ptrTypes.Image.t@->Types.Image.t@->returningvoid)(* Clear alpha channel to desired color *)letimage_alpha_clear=foreign"ImageAlphaClear"(ptrTypes.Image.t@->Types.Color.t@->float@->returningvoid)(* Crop image depending on alpha value *)letimage_alpha_crop=foreign"ImageAlphaCrop"(ptrTypes.Image.t@->float@->returningvoid)(* Premultiply alpha channel *)letimage_alpha_premultiply=foreign"ImageAlphaPremultiply"(ptrTypes.Image.t@->returningvoid)(* Crop an image to a defined rectangle *)letimage_crop=foreign"ImageCrop"(ptrTypes.Image.t@->Types.Rectangle.t@->returningvoid)(* Resize image (Bicubic scaling algorithm) *)letimage_resize=foreign"ImageResize"(ptrTypes.Image.t@->int@->int@->returningvoid)(* Resize image (Nearest-Neighbor scaling algorithm) *)letimage_resize_n_n=foreign"ImageResizeNN"(ptrTypes.Image.t@->int@->int@->returningvoid)(* Resize canvas and fill with color *)letimage_resize_canvas=foreign"ImageResizeCanvas"(ptrTypes.Image.t@->int@->int@->int@->int@->Types.Color.t@->returningvoid)(* Generate all mipmap levels for a provided image *)letimage_mipmaps=foreign"ImageMipmaps"(ptrTypes.Image.t@->returningvoid)(* Dither image data to 16bpp or lower (Floyd-Steinberg dithering) *)letimage_dither=foreign"ImageDither"(ptrTypes.Image.t@->int@->int@->int@->int@->returningvoid)(* Flip image vertically *)letimage_flip_vertical=foreign"ImageFlipVertical"(ptrTypes.Image.t@->returningvoid)(* Flip image horizontally *)letimage_flip_horizontal=foreign"ImageFlipHorizontal"(ptrTypes.Image.t@->returningvoid)(* Rotate image clockwise 90deg *)letimage_rotate_c_w=foreign"ImageRotateCW"(ptrTypes.Image.t@->returningvoid)(* Rotate image counter-clockwise 90deg *)letimage_rotate_c_c_w=foreign"ImageRotateCCW"(ptrTypes.Image.t@->returningvoid)(* Modify image color: tint *)letimage_color_tint=foreign"ImageColorTint"(ptrTypes.Image.t@->Types.Color.t@->returningvoid)(* Modify image color: invert *)letimage_color_invert=foreign"ImageColorInvert"(ptrTypes.Image.t@->returningvoid)(* Modify image color: grayscale *)letimage_color_grayscale=foreign"ImageColorGrayscale"(ptrTypes.Image.t@->returningvoid)(* Modify image color: contrast (-100 to 100) *)letimage_color_contrast=foreign"ImageColorContrast"(ptrTypes.Image.t@->float@->returningvoid)(* Modify image color: brightness (-255 to 255) *)letimage_color_brightness=foreign"ImageColorBrightness"(ptrTypes.Image.t@->int@->returningvoid)(* Modify image color: replace color *)letimage_color_replace=foreign"ImageColorReplace"(ptrTypes.Image.t@->Types.Color.t@->Types.Color.t@->returningvoid)(* Extract color palette from image to maximum size (memory should be freed) *)(* let *_image_extract_palette = foreign "*ImageExtractPalette" ( Types.Image.t @-> int @-> int @-> returning Types.Color.t) *)(* Get image alpha border rectangle *)letget_image_alpha_border=foreign"GetImageAlphaBorder"(Types.Image.t@->float@->returningTypes.Rectangle.t)(* Image drawing functions *)(* NOTE: Image software-rendering functions (CPU) *)(* Clear image background with given color *)letimage_clear_background=foreign"ImageClearBackground"(ptrTypes.Image.t@->Types.Color.t@->returningvoid)(* Draw pixel within an image *)letimage_draw_pixel=foreign"ImageDrawPixel"(ptrTypes.Image.t@->int@->int@->Types.Color.t@->returningvoid)(* Draw pixel within an image (Vector version) *)letimage_draw_pixel_v=foreign"ImageDrawPixelV"(ptrTypes.Image.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw line within an image *)letimage_draw_line=foreign"ImageDrawLine"(ptrTypes.Image.t@->int@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw line within an image (Vector version) *)letimage_draw_line_v=foreign"ImageDrawLineV"(ptrTypes.Image.t@->Types.Vector2.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw circle within an image *)letimage_draw_circle=foreign"ImageDrawCircle"(ptrTypes.Image.t@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw circle within an image (Vector version) *)letimage_draw_circle_v=foreign"ImageDrawCircleV"(ptrTypes.Image.t@->Types.Vector2.t@->int@->Types.Color.t@->returningvoid)(* Draw rectangle within an image *)letimage_draw_rectangle=foreign"ImageDrawRectangle"(ptrTypes.Image.t@->int@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw rectangle within an image (Vector version) *)letimage_draw_rectangle_v=foreign"ImageDrawRectangleV"(ptrTypes.Image.t@->Types.Vector2.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw rectangle within an image *)letimage_draw_rectangle_rec=foreign"ImageDrawRectangleRec"(ptrTypes.Image.t@->Types.Rectangle.t@->Types.Color.t@->returningvoid)(* Draw rectangle lines within an image *)letimage_draw_rectangle_lines=foreign"ImageDrawRectangleLines"(ptrTypes.Image.t@->Types.Rectangle.t@->int@->Types.Color.t@->returningvoid)(* Draw a source image within a destination image (tint applied to source) *)letimage_draw=foreign"ImageDraw"(ptrTypes.Image.t@->Types.Image.t@->Types.Rectangle.t@->Types.Rectangle.t@->Types.Color.t@->returningvoid)(* Draw text (default font) within an image (destination) *)letimage_draw_text=foreign"ImageDrawText"(ptrTypes.Image.t@->Types.Vector2.t@->string@->int@->Types.Color.t@->returningvoid)(* Draw text (custom sprite font) within an image (destination) *)letimage_draw_text_ex=foreign"ImageDrawTextEx"(ptrTypes.Image.t@->Types.Vector2.t@->Types.Font.t@->string@->float@->float@->Types.Color.t@->returningvoid)(* Texture loading functions *)(* NOTE: These functions require GPU access *)(* Load texture from file into GPU memory (VRAM) *)letload_texture=foreign"LoadTexture"(string@->returningTypes.Texture2D.t)(* Load texture from image data *)letload_texture_from_image=foreign"LoadTextureFromImage"(Types.Image.t@->returningTypes.Texture2D.t)(* Load cubemap from image, multiple image cubemap layouts supported *)letload_texture_cubemap=foreign"LoadTextureCubemap"(Types.Image.t@->int@->returningTypes.Texture2D.t)(* Load texture for rendering (framebuffer) *)letload_render_texture=foreign"LoadRenderTexture"(int@->int@->returningTypes.RenderTexture2D.t)(* Unload texture from GPU memory (VRAM) *)letunload_texture=foreign"UnloadTexture"(Types.Texture2D.t@->returningvoid)(* Unload render texture from GPU memory (VRAM) *)letunload_render_texture=foreign"UnloadRenderTexture"(Types.RenderTexture2D.t@->returningvoid)(* Update GPU texture with new data *)letupdate_texture=foreign"UpdateTexture"(Types.Texture2D.t@->ptrvoid@->returningvoid)(* Get pixel data from GPU texture and return an Image *)letget_texture_data=foreign"GetTextureData"(Types.Texture2D.t@->returningTypes.Image.t)(* Get pixel data from screen buffer and return an Image (screenshot) *)letget_screen_data=foreign"GetScreenData"(void@->returningTypes.Image.t)(* Texture configuration functions *)(* Generate GPU mipmaps for a texture *)letgen_texture_mipmaps=foreign"GenTextureMipmaps"(ptrTypes.Texture2D.t@->returningvoid)(* Set texture scaling filter mode *)letset_texture_filter=foreign"SetTextureFilter"(Types.Texture2D.t@->Constants.TextureFilterMode.t@->returningvoid)(* Set texture wrapping mode *)letset_texture_wrap=foreign"SetTextureWrap"(Types.Texture2D.t@->Constants.TextureWrapMode.t@->returningvoid)(* Texture drawing functions *)(* Draw a Texture2D *)letdraw_texture=foreign"DrawTexture"(Types.Texture2D.t@->int@->int@->Types.Color.t@->returningvoid)(* Draw a Texture2D with position defined as Vector2 *)letdraw_texture_v=foreign"DrawTextureV"(Types.Texture2D.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw a Texture2D with extended parameters *)letdraw_texture_ex=foreign"DrawTextureEx"(Types.Texture2D.t@->Types.Vector2.t@->float@->float@->Types.Color.t@->returningvoid)(* Draw a part of a texture defined by a rectangle *)letdraw_texture_rec=foreign"DrawTextureRec"(Types.Texture2D.t@->Types.Rectangle.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw texture quad with tiling and offset parameters *)letdraw_texture_quad=foreign"DrawTextureQuad"(Types.Texture2D.t@->Types.Vector2.t@->Types.Vector2.t@->Types.Rectangle.t@->Types.Color.t@->returningvoid)(* Draw a part of a texture defined by a rectangle with 'pro' parameters *)letdraw_texture_pro=foreign"DrawTexturePro"(Types.Texture2D.t@->Types.Rectangle.t@->Types.Rectangle.t@->Types.Vector2.t@->float@->Types.Color.t@->returningvoid)(* Draws a texture (or part of it) that stretches or shrinks nicely *)(* let draw_texture_n_patch = foreign "DrawTextureNPatch" ( Types.Texture2D.t @-> NPatch @-> Types.Rectangle.t @-> Types.Vector2.t @-> float @-> Types.Color.t @-> returning void) *)(* Image/Texture misc functions *)(* Get pixel data size in bytes (image or texture) *)letget_pixel_data_size=foreign"GetPixelDataSize"(int@->int@->int@->returningint)(* Font Loading and Text Drawing Functions (Module: text) *)(* Font loading/unloading functions *)(* Get the default Font *)letget_font_default=foreign"GetFontDefault"(void@->returningTypes.Font.t)(* Load font from file into GPU memory (VRAM) *)letload_font=foreign"LoadFont"(string@->returningTypes.Font.t)(* Load font from file with extended parameters *)letload_font_ex=foreign"LoadFontEx"(string@->int@->ptrint@->int@->returningTypes.Font.t)(* Load font from Image (XNA style) *)letload_font_from_image=foreign"LoadFontFromImage"(Types.Image.t@->Types.Color.t@->int@->returningTypes.Font.t)(* Load font data for further use *)letload_font_data=foreign"LoadFontData"(string@->int@->ptrint@->int@->int@->returning(ptrTypes.CharInfo.t))(* Generate image font atlas using chars info *)(* let gen_image_font_atlas = foreign "GenImageFontAtlas" ( (ptr Types.CharInfo.t) @-> Types.Rectangle.t @-> int @-> int @-> int @-> int @-> returning Types.Image.t) *)(* Unload Font from GPU memory (VRAM) *)letunload_font=foreign"UnloadFont"(Types.Font.t@->returningvoid)(* Text drawing functions *)(* Shows current FPS *)letdraw_fps=foreign"DrawFPS"(int@->int@->returningvoid)(* Draw text (using default font) *)letdraw_text=foreign"DrawText"(string@->int@->int@->int@->Types.Color.t@->returningvoid)(* Draw text using font and additional parameters *)letdraw_text_ex=foreign"DrawTextEx"(Types.Font.t@->string@->Types.Vector2.t@->float@->float@->Types.Color.t@->returningvoid)(* Draw text using font inside rectangle limits *)letdraw_text_rec=foreign"DrawTextRec"(Types.Font.t@->string@->Types.Rectangle.t@->float@->float@->bool@->Types.Color.t@->returningvoid)(* Draw text using font inside rectangle limits with support for text selection *)letdraw_text_rec_ex=foreign"DrawTextRecEx"(Types.Font.t@->string@->Types.Rectangle.t@->float@->float@->bool@->Types.Color.t@->int@->int@->Types.Color.t@->Types.Color.t@->returningvoid)(* Draw one character (codepoint) *)letdraw_text_codepoint=foreign"DrawTextCodepoint"(Types.Font.t@->int@->Types.Vector2.t@->float@->Types.Color.t@->returningvoid)(* Text misc. functions *)(* Measure string width for default font *)letmeasure_text=foreign"MeasureText"(string@->int@->returningint)(* Measure string size for Font *)letmeasure_text_ex=foreign"MeasureTextEx"(Types.Font.t@->string@->float@->float@->returningTypes.Vector2.t)(* Get index position for a unicode character on font *)letget_glyph_index=foreign"GetGlyphIndex"(Types.Font.t@->int@->returningint)(* Text strings management functions (no utf8 strings, only byte chars) *)(* NOTE: Some strings allocate memory internally for returned strings, just be careful! *)(* Copy one string to another, returns bytes copied *)lettext_copy=foreign"TextCopy"(string@->string@->returningint)(* Check if two text string are equal *)lettext_is_equal=foreign"TextIsEqual"(string@->string@->returningbool)(* Get text length, checks for '' ending *)lettext_length=foreign"TextLength"(string@->returningint)(* Text formatting with variables (sprintf style) *)(* let text_format = foreign "TextFormat" ( string @-> ... @-> returning string) *)(* Get a piece of a text string *)lettext_subtext=foreign"TextSubtext"(string@->int@->int@->returningstring)(* Replace text string (memory must be freed!) *)lettext_replace=foreign"TextReplace"(string@->string@->string@->returningstring)(* Insert text in a position (memory must be freed!) *)lettext_insert=foreign"TextInsert"(string@->string@->int@->returningstring)(* Join text strings with delimiter *)(* let text_join =
* foreign "TextJoin" (ptr string @-> int @-> string @-> returning string) *)(* Split text into multiple strings *)(* let text_split = foreign "*TextSplit" ( string @-> char @-> int @-> returning string) *)(* Append text at specific position and move cursor! *)lettext_append=foreign"TextAppend"(string@->string@->ptrint@->returningvoid)(* Find first text occurrence within a string *)lettext_find_index=foreign"TextFindIndex"(string@->string@->returningint)(* Get upper case version of provided string *)lettext_to_upper=foreign"TextToUpper"(string@->returningstring)(* Get lower case version of provided string *)lettext_to_lower=foreign"TextToLower"(string@->returningstring)(* Get Pascal case notation version of provided string *)lettext_to_pascal=foreign"TextToPascal"(string@->returningstring)(* Get integer value from text (negative values not supported) *)lettext_to_integer=foreign"TextToInteger"(string@->returningint)(* Encode text codepoint into utf8 text (memory must be freed!) *)lettext_to_utf8=foreign"TextToUtf8"(ptrint@->int@->returningstring)(* UTF8 text strings management functions *)(* Get all codepoints in a string, codepoints count returned by parameters *)letget_codepoints=foreign"GetCodepoints"(string@->ptrint@->returning(ptrint))(* Get total number of characters (codepoints) in a UTF8 encoded string *)letget_codepoints_count=foreign"GetCodepointsCount"(string@->returningint)(* Returns next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure *)letget_next_codepoint=foreign"GetNextCodepoint"(string@->ptrint@->returningint)(* Encode codepoint into utf8 text (char array length returned as parameter) *)letcodepoint_to_utf8=foreign"CodepointToUtf8"(int@->ptrint@->returningstring)(* Basic 3d Shapes Drawing Functions (Module: models) *)(* Basic geometric 3D shapes drawing functions *)(* Draw a line in 3D world space *)letdraw_line_3d=foreign"DrawLine3D"(Types.Vector3.t@->Types.Vector3.t@->Types.Color.t@->returningvoid)(* Draw a point in 3D space, actually a small line *)letdraw_point_3d=foreign"DrawPoint3D"(Types.Vector3.t@->Types.Color.t@->returningvoid)(* Draw a circle in 3D world space *)letdraw_circle_3d=foreign"DrawCircle3D"(Types.Vector3.t@->float@->Types.Vector3.t@->float@->Types.Color.t@->returningvoid)(* Draw cube *)letdraw_cube=foreign"DrawCube"(Types.Vector3.t@->float@->float@->float@->Types.Color.t@->returningvoid)(* Draw cube (Vector version) *)letdraw_cube_v=foreign"DrawCubeV"(Types.Vector3.t@->Types.Vector3.t@->Types.Color.t@->returningvoid)(* Draw cube wires *)letdraw_cube_wires=foreign"DrawCubeWires"(Types.Vector3.t@->float@->float@->float@->Types.Color.t@->returningvoid)(* Draw cube wires (Vector version) *)letdraw_cube_wires_v=foreign"DrawCubeWiresV"(Types.Vector3.t@->Types.Vector3.t@->Types.Color.t@->returningvoid)(* Draw cube textured *)letdraw_cube_texture=foreign"DrawCubeTexture"(Types.Texture2D.t@->Types.Vector3.t@->float@->float@->float@->Types.Color.t@->returningvoid)(* Draw sphere *)letdraw_sphere=foreign"DrawSphere"(Types.Vector3.t@->float@->Types.Color.t@->returningvoid)(* Draw sphere with extended parameters *)letdraw_sphere_ex=foreign"DrawSphereEx"(Types.Vector3.t@->float@->int@->int@->Types.Color.t@->returningvoid)(* Draw sphere wires *)letdraw_sphere_wires=foreign"DrawSphereWires"(Types.Vector3.t@->float@->int@->int@->Types.Color.t@->returningvoid)(* Draw a cylinder/cone *)letdraw_cylinder=foreign"DrawCylinder"(Types.Vector3.t@->float@->float@->float@->int@->Types.Color.t@->returningvoid)(* Draw a cylinder/cone wires *)letdraw_cylinder_wires=foreign"DrawCylinderWires"(Types.Vector3.t@->float@->float@->float@->int@->Types.Color.t@->returningvoid)(* Draw a plane XZ *)letdraw_plane=foreign"DrawPlane"(Types.Vector3.t@->Types.Vector2.t@->Types.Color.t@->returningvoid)(* Draw a ray line *)(* let draw_ray = foreign "DrawRay" ( Ray @-> Types.Color.t @-> returning void) *)(* Draw a grid (centered at (0, 0, 0)) *)letdraw_grid=foreign"DrawGrid"(int@->float@->returningvoid)(* Draw simple gizmo *)letdraw_gizmo=foreign"DrawGizmo"(Types.Vector3.t@->returningvoid)(*DrawTorus(), DrawTeapot() could be useful? *)(*------------------------------------------------------------------------------------ *)(* Model 3d Loading and Drawing Functions (Module: models) *)(*------------------------------------------------------------------------------------ *)(* Model loading/unloading functions *)(* Load model from files (meshes and materials) *)letload_model=foreign"LoadModel"(string@->returningTypes.Model.t)(* Load model from generated mesh (default material) *)letload_model_from_mesh=foreign"LoadModelFromMesh"(Types.Mesh.t@->returningTypes.Model.t)(* Unload model from memory (RAM and/or VRAM) *)letunload_model=foreign"UnloadModel"(Types.Model.t@->returningvoid)(* Mesh loading/unloading functions *)(* Load meshes from model file *)letload_meshes=foreign"LoadMeshes"(string@->ptrint@->returning(ptr_optTypes.Mesh.t))(* Export mesh data to file *)letexport_mesh=foreign"ExportMesh"(Types.Mesh.t@->string@->returningvoid)(* Unload mesh from memory (RAM and/or VRAM) *)letunload_mesh=foreign"UnloadMesh"(Types.Mesh.t@->returningvoid)(* Material loading/unloading functions *)(* Load materials from model file *)letload_materials=foreign"LoadMaterials"(string@->ptrint@->returning(ptrTypes.Material.t))(* Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) *)letload_material_default=foreign"LoadMaterialDefault"(void@->returningTypes.Material.t)(* Unload material from GPU memory (VRAM) *)letunload_material=foreign"UnloadMaterial"(Types.Material.t@->returningvoid)(* Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) *)letset_material_texture=foreign"SetMaterialTexture"(ptrTypes.Material.t@->Constants.MaterialMapType.t@->Types.Texture2D.t@->returningvoid)(* Set material for a mesh *)letset_model_mesh_material=foreign"SetModelMeshMaterial"(ptrTypes.Model.t@->int@->int@->returningvoid)(* Model animations loading/unloading functions *)(* Load model animations from file *)let_load_model_animations=foreign"LoadModelAnimations"(string@->ptrint@->returning(ptrTypes.ModelAnimation.t))(* Update model animation pose *)letupdate_model_animation=foreign"UpdateModelAnimation"(Types.Model.t@->Types.ModelAnimation.t@->int@->returningvoid)(* Unload animation data *)letunload_model_animation=foreign"UnloadModelAnimation"(Types.ModelAnimation.t@->returningvoid)(* Check model animation skeleton match *)letis_model_animation_valid=foreign"IsModelAnimationValid"(Types.Model.t@->Types.ModelAnimation.t@->returningbool)(* Mesh generation functions *)(* Generate polygonal mesh *)letgen_mesh_poly=foreign"GenMeshPoly"(int@->float@->returningTypes.Mesh.t)(* Generate plane mesh (with subdivisions) *)letgen_mesh_plane=foreign"GenMeshPlane"(float@->float@->int@->int@->returningTypes.Mesh.t)(* Generate cuboid mesh *)letgen_mesh_cube=foreign"GenMeshCube"(float@->float@->float@->returningTypes.Mesh.t)(* Generate sphere mesh (standard sphere) *)letgen_mesh_sphere=foreign"GenMeshSphere"(float@->int@->int@->returningTypes.Mesh.t)(* Generate half-sphere mesh (no bottom cap) *)letgen_mesh_hemi_sphere=foreign"GenMeshHemiSphere"(float@->int@->int@->returningTypes.Mesh.t)(* Generate cylinder mesh *)letgen_mesh_cylinder=foreign"GenMeshCylinder"(float@->float@->int@->returningTypes.Mesh.t)(* Generate torus mesh *)letgen_mesh_torus=foreign"GenMeshTorus"(float@->float@->int@->int@->returningTypes.Mesh.t)(* Generate trefoil knot mesh *)letgen_mesh_knot=foreign"GenMeshKnot"(float@->float@->int@->int@->returningTypes.Mesh.t)(* Generate heightmap mesh from image data *)letgen_mesh_heightmap=foreign"GenMeshHeightmap"(Types.Image.t@->Types.Vector3.t@->returningTypes.Mesh.t)(* Generate cubes-based map mesh from image data *)letgen_mesh_cubicmap=foreign"GenMeshCubicmap"(Types.Image.t@->Types.Vector3.t@->returningTypes.Mesh.t)(* Mesh manipulation functions *)(* Compute mesh bounding box limits *)letmesh_bounding_box=foreign"MeshBoundingBox"(Types.Mesh.t@->returningTypes.BoundingBox.t)(* Compute mesh tangents *)letmesh_tangents=foreign"MeshTangents"(ptrTypes.Mesh.t@->returningvoid)(* Compute mesh binormals *)letmesh_binormals=foreign"MeshBinormals"(ptrTypes.Mesh.t@->returningvoid)(* Model drawing functions *)(* Draw a model (with texture if set) *)letdraw_model=foreign"DrawModel"(Types.Model.t@->Types.Vector3.t@->float@->Types.Color.t@->returningvoid)(* Draw a model with extended parameters *)letdraw_model_ex=foreign"DrawModelEx"(Types.Model.t@->Types.Vector3.t@->Types.Vector3.t@->float@->Types.Vector3.t@->Types.Color.t@->returningvoid)(* Draw a model wires (with texture if set) *)letdraw_model_wires=foreign"DrawModelWires"(Types.Model.t@->Types.Vector3.t@->float@->Types.Color.t@->returningvoid)(* Draw a model wires (with texture if set) with extended parameters *)letdraw_model_wires_ex=foreign"DrawModelWiresEx"(Types.Model.t@->Types.Vector3.t@->Types.Vector3.t@->float@->Types.Vector3.t@->Types.Color.t@->returningvoid)(* Draw bounding box (wires) *)letdraw_bounding_box=foreign"DrawBoundingBox"(Types.BoundingBox.t@->Types.Color.t@->returningvoid)(* Draw a billboard texture *)letdraw_billboard=foreign"DrawBillboard"(Types.Camera3D.t@->Types.Texture2D.t@->Types.Vector3.t@->float@->Types.Color.t@->returningvoid)(* Draw a billboard texture defined by sourceRec *)letdraw_billboard_rec=foreign"DrawBillboardRec"(Types.Camera3D.t@->Types.Texture2D.t@->Types.Rectangle.t@->Types.Vector3.t@->float@->Types.Color.t@->returningvoid)(* Collision detection functions *)(* Detect collision between two spheres *)letcheck_collision_spheres=foreign"CheckCollisionSpheres"(Types.Vector3.t@->float@->Types.Vector3.t@->float@->returningbool)(* Detect collision between two bounding boxes *)letcheck_collision_boxes=foreign"CheckCollisionBoxes"(Types.BoundingBox.t@->Types.BoundingBox.t@->returningbool)(* Detect collision between box and sphere *)letcheck_collision_box_sphere=foreign"CheckCollisionBoxSphere"(Types.BoundingBox.t@->Types.Vector3.t@->float@->returningbool)(* Detect collision between ray and sphere *)letcheck_collision_ray_sphere=foreign"CheckCollisionRaySphere"(Types.Ray.t@->Types.Vector3.t@->float@->returningbool)(* Detect collision between ray and sphere, returns collision point *)letcheck_collision_ray_sphere_ex=foreign"CheckCollisionRaySphereEx"(Types.Ray.t@->Types.Vector3.t@->float@->ptrTypes.Vector3.t@->returningbool)(* Detect collision between ray and box *)letcheck_collision_ray_box=foreign"CheckCollisionRayBox"(Types.Ray.t@->Types.BoundingBox.t@->returningbool)(* Get collision info between ray and model *)letget_collision_ray_model=foreign"GetCollisionRayModel"(Types.Ray.t@->Types.Model.t@->returningTypes.RayHitInfo.t)(* Get collision info between ray and triangle *)letget_collision_ray_triangle=foreign"GetCollisionRayTriangle"(Types.Ray.t@->Types.Vector3.t@->Types.Vector3.t@->Types.Vector3.t@->returningTypes.RayHitInfo.t)(* Get collision info between ray and ground plane (Y-normal plane) *)letget_collision_ray_ground=foreign"GetCollisionRayGround"(Types.Ray.t@->float@->returningTypes.RayHitInfo.t)(*------------------------------------------------------------------------------------ *)(* Shaders System Functions (Module: rlgl) *)(* NOTE: This functions are useless when using OpenGL 1.1 *)(*------------------------------------------------------------------------------------ *)(* Shader loading/unloading functions *)(* Load shader from files and bind default locations *)letload_shader=foreign"LoadShader"(string@->string@->returningTypes.Shader.t)(* Load shader from code strings and bind default locations *)letload_shader_code=foreign"LoadShaderCode"(string@->string@->returningTypes.Shader.t)(* Unload shader from GPU memory (VRAM) *)letunload_shader=foreign"UnloadShader"(Types.Shader.t@->returningvoid)(* Get default shader *)letget_shader_default=foreign"GetShaderDefault"(void@->returningTypes.Shader.t)(* Get default texture *)letget_texture_default=foreign"GetTextureDefault"(void@->returningTypes.Texture2D.t)(* Get texture to draw shapes *)letget_shapes_texture=foreign"GetShapesTexture"(void@->returningTypes.Texture2D.t)(* Get texture rectangle to draw shapes *)letget_shapes_texture_rec=foreign"GetShapesTextureRec"(void@->returningTypes.Rectangle.t)(* Define default texture used to draw shapes *)letset_shapes_texture=foreign"SetShapesTexture"(Types.Texture2D.t@->Types.Rectangle.t@->returningvoid)(* Shader configuration functions *)(* Get shader uniform location *)letget_shader_location=foreign"GetShaderLocation"(Types.Shader.t@->string@->returningConstants.ShaderLocationIndex.t)(* Set shader uniform value *)letset_shader_value=foreign"SetShaderValue"(Types.Shader.t@->Constants.ShaderLocationIndex.t@->ptrvoid@->Constants.ShaderUniformDataType.t@->returningvoid)(* Set shader uniform value vector *)letset_shader_value_v=foreign"SetShaderValueV"(Types.Shader.t@->Constants.ShaderLocationIndex.t@->ptrvoid@->Constants.ShaderUniformDataType.t@->int@->returningvoid)(* Set shader uniform value (matrix 4x4) *)letset_shader_value_matrix=foreign"SetShaderValueMatrix"(Types.Shader.t@->Constants.ShaderLocationIndex.t@->Types.Matrix.t@->returningvoid)(* Set shader uniform value for texture *)letset_shader_value_texture=foreign"SetShaderValueTexture"(Types.Shader.t@->Constants.ShaderLocationIndex.t@->Types.Texture2D.t@->returningvoid)(* Set a custom projection matrix (replaces internal projection matrix) *)letset_matrix_projection=foreign"SetMatrixProjection"(Types.Matrix.t@->returningvoid)(* Set a custom modelview matrix (replaces internal modelview matrix) *)letset_matrix_modelview=foreign"SetMatrixModelview"(Types.Matrix.t@->returningvoid)(* Get internal modelview matrix *)letget_matrix_modelview=foreign"GetMatrixModelview"(void@->returningTypes.Matrix.t)(* Get internal projection matrix *)letget_matrix_projection=foreign"GetMatrixProjection"(void@->returningTypes.Matrix.t)(* Texture maps generation (PBR) *)(* NOTE: Required shaders should be provided *)(* Generate cubemap texture from 2D texture *)letgen_texture_cubemap=foreign"GenTextureCubemap"(Types.Shader.t@->Types.Texture2D.t@->int@->returningTypes.Texture2D.t)(* Generate irradiance texture using cubemap data *)letgen_texture_irradiance=foreign"GenTextureIrradiance"(Types.Shader.t@->Types.Texture2D.t@->int@->returningTypes.Texture2D.t)(* Generate prefilter texture using cubemap data *)letgen_texture_prefilter=foreign"GenTexturePrefilter"(Types.Shader.t@->Types.Texture2D.t@->int@->returningTypes.Texture2D.t)(* Generate BRDF texture *)letgen_texture_b_r_d_f=foreign"GenTextureBRDF"(Types.Shader.t@->int@->returningTypes.Texture2D.t)(* Shading begin/end functions *)(* Begin custom shader drawing *)letbegin_shader_mode=foreign"BeginShaderMode"(Types.Shader.t@->returningvoid)(* End custom shader drawing (use default shader) *)letend_shader_mode=foreign"EndShaderMode"(void@->returningvoid)(* Begin blending mode (alpha, additive, multiplied) *)letbegin_blend_mode=foreign"BeginBlendMode"(Constants.BlendMode.t@->returningvoid)(* End blending mode (reset to default: alpha blending) *)letend_blend_mode=foreign"EndBlendMode"(void@->returningvoid)(* VR control functions *)(* Init VR simulator for selected device parameters *)letinit_vr_simulator=foreign"InitVrSimulator"(void@->returningvoid)(* Close VR simulator for current device *)letclose_vr_simulator=foreign"CloseVrSimulator"(void@->returningvoid)(* Update VR tracking (position and orientation) and camera *)letupdate_vr_tracking=foreign"UpdateVrTracking"(ptrTypes.Camera3D.t@->returningvoid)(* Set stereo rendering configuration parameters *)(* TODO *)(* let set_vr_configuration =
* foreign "SetVrConfiguration"
* (VrDeviceInfo @-> Types.Shader.t @-> returning void) *)(* Detect if VR simulator is ready *)letis_vr_simulator_ready=foreign"IsVrSimulatorReady"(void@->returningbool)(* Enable/Disable VR experience *)lettoggle_vr_mode=foreign"ToggleVrMode"(void@->returningvoid)(* Begin VR simulator stereo rendering *)letbegin_vr_drawing=foreign"BeginVrDrawing"(void@->returningvoid)(* End VR simulator stereo rendering *)letend_vr_drawing=foreign"EndVrDrawing"(void@->returningvoid)(*------------------------------------------------------------------------------------ *)(* Audio Loading and Playing Functions (Module: audio) *)(*------------------------------------------------------------------------------------ *)(* Audio device management functions *)(* Initialize audio device and context *)letinit_audio_device=foreign"InitAudioDevice"(void@->returningvoid)(* Close the audio device and context *)letclose_audio_device=foreign"CloseAudioDevice"(void@->returningvoid)(* Check if audio device has been initialized successfully *)letis_audio_device_ready=foreign"IsAudioDeviceReady"(void@->returningbool)(* Set master volume (listener) *)letset_master_volume=foreign"SetMasterVolume"(float@->returningvoid)(* Wave/Sound loading/unloading functions *)(* Load wave data from file *)letload_wave=foreign"LoadWave"(string@->returningTypes.Wave.t)(* Load sound from file *)letload_sound=foreign"LoadSound"(string@->returningTypes.Sound.t)(* Load sound from wave data *)letload_sound_from_wave=foreign"LoadSoundFromWave"(Types.Wave.t@->returningTypes.Sound.t)(* Update sound buffer with new data *)letupdate_sound=foreign"UpdateSound"(Types.Sound.t@->ptrvoid@->int@->returningvoid)(* Unload wave data *)letunload_wave=foreign"UnloadWave"(Types.Wave.t@->returningvoid)(* Unload sound *)letunload_sound=foreign"UnloadSound"(Types.Sound.t@->returningvoid)(* Export wave data to file *)letexport_wave=foreign"ExportWave"(Types.Wave.t@->string@->returningvoid)(* Export wave sample data to code (.h) *)letexport_wave_as_code=foreign"ExportWaveAsCode"(Types.Wave.t@->string@->returningvoid)(* Wave/Sound management functions *)(* Play a sound *)letplay_sound=foreign"PlaySound"(Types.Sound.t@->returningvoid)(* Stop playing a sound *)letstop_sound=foreign"StopSound"(Types.Sound.t@->returningvoid)(* Pause a sound *)letpause_sound=foreign"PauseSound"(Types.Sound.t@->returningvoid)(* Resume a paused sound *)letresume_sound=foreign"ResumeSound"(Types.Sound.t@->returningvoid)(* Play a sound (using multichannel buffer pool) *)letplay_sound_multi=foreign"PlaySoundMulti"(Types.Sound.t@->returningvoid)(* Stop any sound playing (using multichannel buffer pool) *)letstop_sound_multi=foreign"StopSoundMulti"(void@->returningvoid)(* Get number of sounds playing in the multichannel *)letget_sounds_playing=foreign"GetSoundsPlaying"(void@->returningint)(* Check if a sound is currently playing *)letis_sound_playing=foreign"IsSoundPlaying"(Types.Sound.t@->returningbool)(* Set volume for a sound (1.0 is max level) *)letset_sound_volume=foreign"SetSoundVolume"(Types.Sound.t@->float@->returningvoid)(* Set pitch for a sound (1.0 is base level) *)letset_sound_pitch=foreign"SetSoundPitch"(Types.Sound.t@->float@->returningvoid)(* Convert wave data to desired format *)letwave_format=foreign"WaveFormat"(ptrTypes.Wave.t@->int@->int@->int@->returningvoid)(* Copy a wave to a new wave *)letwave_copy=foreign"WaveCopy"(Types.Wave.t@->returningTypes.Wave.t)(* Crop a wave to defined samples range *)letwave_crop=foreign"WaveCrop"(ptrTypes.Wave.t@->int@->int@->returningvoid)(* Get samples data from wave as a floats array *)letget_wave_data=foreign"GetWaveData"(Types.Wave.t@->returning(ptrfloat))(* Music management functions *)(* Load music stream from file *)letload_music_stream=foreign"LoadMusicStream"(string@->returningTypes.Music.t)(* Unload music stream *)letunload_music_stream=foreign"UnloadMusicStream"(Types.Music.t@->returningvoid)(* Start music playing *)letplay_music_stream=foreign"PlayMusicStream"(Types.Music.t@->returningvoid)(* Updates buffers for music streaming *)letupdate_music_stream=foreign"UpdateMusicStream"(Types.Music.t@->returningvoid)(* Stop music playing *)letstop_music_stream=foreign"StopMusicStream"(Types.Music.t@->returningvoid)(* Pause music playing *)letpause_music_stream=foreign"PauseMusicStream"(Types.Music.t@->returningvoid)(* Resume playing paused music *)letresume_music_stream=foreign"ResumeMusicStream"(Types.Music.t@->returningvoid)(* Check if music is playing *)letis_music_playing=foreign"IsMusicPlaying"(Types.Music.t@->returningbool)(* Set volume for music (1.0 is max level) *)letset_music_volume=foreign"SetMusicVolume"(Types.Music.t@->float@->returningvoid)(* Set pitch for a music (1.0 is base level) *)letset_music_pitch=foreign"SetMusicPitch"(Types.Music.t@->float@->returningvoid)(* Set music loop count (loop repeats) *)letset_music_loop_count=foreign"SetMusicLoopCount"(Types.Music.t@->int@->returningvoid)(* Get music time length (in seconds) *)letget_music_time_length=foreign"GetMusicTimeLength"(Types.Music.t@->returningfloat)(* Get current music time played (in seconds) *)letget_music_time_played=foreign"GetMusicTimePlayed"(Types.Music.t@->returningfloat)(* AudioStream management functions *)(* Init audio stream (to stream raw audio pcm data) *)letinit_audio_stream=foreign"InitAudioStream"(int@->int@->int@->returningTypes.AudioStream.t)(* Update audio stream buffers with data *)letupdate_audio_stream=foreign"UpdateAudioStream"(Types.AudioStream.t@->ptrvoid@->int@->returningvoid)(* Close audio stream and free memory *)letclose_audio_stream=foreign"CloseAudioStream"(Types.AudioStream.t@->returningvoid)(* Check if any audio stream buffers requires refill *)letis_audio_stream_processed=foreign"IsAudioStreamProcessed"(Types.AudioStream.t@->returningbool)(* Play audio stream *)letplay_audio_stream=foreign"PlayAudioStream"(Types.AudioStream.t@->returningvoid)(* Pause audio stream *)letpause_audio_stream=foreign"PauseAudioStream"(Types.AudioStream.t@->returningvoid)(* Resume audio stream *)letresume_audio_stream=foreign"ResumeAudioStream"(Types.AudioStream.t@->returningvoid)(* Check if audio stream is playing *)letis_audio_stream_playing=foreign"IsAudioStreamPlaying"(Types.AudioStream.t@->returningbool)(* Stop audio stream *)letstop_audio_stream=foreign"StopAudioStream"(Types.AudioStream.t@->returningvoid)(* Set volume for audio stream (1.0 is max level) *)letset_audio_stream_volume=foreign"SetAudioStreamVolume"(Types.AudioStream.t@->float@->returningvoid)(* Set pitch for audio stream (1.0 is base level) *)letset_audio_stream_pitch=foreign"SetAudioStreamPitch"(Types.AudioStream.t@->float@->returningvoid)(* Default size for new audio streams *)letset_audio_stream_buffer_size_default=foreign"SetAudioStreamBufferSizeDefault"(int@->returningvoid)end