mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol: reorder and add missing funcs (#13652)
This commit is contained in:
parent
437fa02f27
commit
3ef437e679
@ -32,6 +32,12 @@ fn C.sapp_show_keyboard(visible bool)
|
|||||||
// return true if the mobile device onscreen keyboard is currently shown
|
// return true if the mobile device onscreen keyboard is currently shown
|
||||||
fn C.sapp_keyboard_shown() bool
|
fn C.sapp_keyboard_shown() bool
|
||||||
|
|
||||||
|
// Check if full screen rendering
|
||||||
|
fn C.sapp_is_fullscreen() bool
|
||||||
|
|
||||||
|
// Toggle full screen
|
||||||
|
fn C.sapp_toggle_fullscreen()
|
||||||
|
|
||||||
// show or hide the mouse cursor
|
// show or hide the mouse cursor
|
||||||
fn C.sapp_show_mouse(visible bool)
|
fn C.sapp_show_mouse(visible bool)
|
||||||
|
|
||||||
@ -74,6 +80,18 @@ fn C.sapp_set_clipboard_string(str &byte)
|
|||||||
// read string from clipboard (usually during SAPP_EVENTTYPE_CLIPBOARD_PASTED)
|
// read string from clipboard (usually during SAPP_EVENTTYPE_CLIPBOARD_PASTED)
|
||||||
fn C.sapp_get_clipboard_string() &byte
|
fn C.sapp_get_clipboard_string() &byte
|
||||||
|
|
||||||
|
// set the window title (only on desktop platforms)
|
||||||
|
fn C.sapp_set_window_title(&char)
|
||||||
|
|
||||||
|
// /* set the window icon (only on Windows and Linux) */
|
||||||
|
// SOKOL_APP_API_DECL void sapp_set_icon(const sapp_icon_desc* icon_desc);
|
||||||
|
|
||||||
|
// Get number of droped files
|
||||||
|
fn C.sapp_get_num_dropped_files() int
|
||||||
|
|
||||||
|
// Get the file path of the droped file
|
||||||
|
fn C.sapp_get_dropped_file_path(int) &byte
|
||||||
|
|
||||||
// special run-function for SOKOL_NO_ENTRY (in standard mode this is an empty stub)
|
// special run-function for SOKOL_NO_ENTRY (in standard mode this is an empty stub)
|
||||||
fn C.sapp_run(desc &Desc) int
|
fn C.sapp_run(desc &Desc) int
|
||||||
|
|
||||||
@ -83,6 +101,12 @@ fn C.sapp_gles2() bool
|
|||||||
// HTML5: enable or disable the hardwired "Leave Site?" dialog box
|
// HTML5: enable or disable the hardwired "Leave Site?" dialog box
|
||||||
fn C.sapp_html5_ask_leave_site(ask bool)
|
fn C.sapp_html5_ask_leave_site(ask bool)
|
||||||
|
|
||||||
|
// /* HTML5: get byte size of a dropped file */
|
||||||
|
// SOKOL_APP_API_DECL uint32_t sapp_html5_get_dropped_file_size(int index);
|
||||||
|
|
||||||
|
// /* HTML5: asynchronously load the content of a dropped file */
|
||||||
|
// SOKOL_APP_API_DECL void sapp_html5_fetch_dropped_file(const sapp_html5_fetch_request* request);
|
||||||
|
|
||||||
// Metal: get ARC-bridged pointer to Metal device object
|
// Metal: get ARC-bridged pointer to Metal device object
|
||||||
fn C.sapp_metal_get_device() voidptr
|
fn C.sapp_metal_get_device() voidptr
|
||||||
|
|
||||||
@ -104,6 +128,9 @@ fn C.sapp_d3d11_get_device() voidptr
|
|||||||
// D3D11: get pointer to ID3D11DeviceContext object
|
// D3D11: get pointer to ID3D11DeviceContext object
|
||||||
fn C.sapp_d3d11_get_device_context() voidptr
|
fn C.sapp_d3d11_get_device_context() voidptr
|
||||||
|
|
||||||
|
// D3D11: get pointer to IDXGISwapChain object
|
||||||
|
fn C.sapp_d3d11_get_swap_chain() voidptr
|
||||||
|
|
||||||
// D3D11: get pointer to ID3D11RenderTargetView object
|
// D3D11: get pointer to ID3D11RenderTargetView object
|
||||||
fn C.sapp_d3d11_get_render_target_view() voidptr
|
fn C.sapp_d3d11_get_render_target_view() voidptr
|
||||||
|
|
||||||
@ -113,17 +140,17 @@ fn C.sapp_d3d11_get_depth_stencil_view() voidptr
|
|||||||
// Win32: get the HWND window handle
|
// Win32: get the HWND window handle
|
||||||
fn C.sapp_win32_get_hwnd() voidptr
|
fn C.sapp_win32_get_hwnd() voidptr
|
||||||
|
|
||||||
|
// WebGPU: get WGPUDevice handle
|
||||||
|
fn C.sapp_wgpu_get_device() voidptr
|
||||||
|
|
||||||
|
// WebGPU: get swapchain's WGPUTextureView handle for rendering
|
||||||
|
fn C.sapp_wgpu_get_render_view() voidptr
|
||||||
|
|
||||||
|
// WebGPU: get swapchain's MSAA-resolve WGPUTextureView (may return null)
|
||||||
|
fn C.sapp_wgpu_get_resolve_view() voidptr
|
||||||
|
|
||||||
|
// WebGPU: get swapchain's WGPUTextureView for the depth-stencil surface
|
||||||
|
fn C.sapp_wgpu_get_depth_stencil_view() voidptr
|
||||||
|
|
||||||
// Android: get native activity handle
|
// Android: get native activity handle
|
||||||
fn C.sapp_android_get_native_activity() voidptr
|
fn C.sapp_android_get_native_activity() voidptr
|
||||||
|
|
||||||
// Toggle full screen
|
|
||||||
fn C.sapp_toggle_fullscreen()
|
|
||||||
|
|
||||||
// Check if full screen rendering
|
|
||||||
fn C.sapp_is_fullscreen() bool
|
|
||||||
|
|
||||||
// Get number of droped files
|
|
||||||
fn C.sapp_get_num_dropped_files() int
|
|
||||||
|
|
||||||
// Get the file path of the droped file
|
|
||||||
fn C.sapp_get_dropped_file_path(int) &byte
|
|
||||||
|
Loading…
Reference in New Issue
Block a user