|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
SDL2 module C API — function declarations for SDL2 bindings exported to MXVM programs. More...
#include <stdint.h>

Go to the source code of this file.
Functions | |
Core SDL functions | |
| int64_t | init (void) |
| Initialize SDL2 subsystems. | |
| void | quit (void) |
| Shut down SDL2 and release all resources. | |
Window management | |
| int64_t | create_window (const char *title, int64_t x, int64_t y, int64_t w, int64_t h, int64_t flags) |
| Create an SDL window. | |
| void | destroy_window (int64_t window_id) |
| Destroy a window by ID. | |
| void | set_window_title (int64_t window_id, const char *title) |
| Set the title of a window. | |
| void | set_window_position (int64_t window_id, int64_t x, int64_t y) |
| Set the position of a window. | |
| void | get_window_size (int64_t window_id, int64_t *w, int64_t *h) |
| Get the size of a window. | |
| void | set_window_fullscreen (int64_t window_id, int64_t fullscreen) |
| Set or clear fullscreen mode for a window. | |
| void | set_window_icon (uint64_t window_id, const char *path) |
| Set the window icon from an image file. | |
Renderer management | |
| int64_t | create_renderer (int64_t window_id, int64_t index, int64_t flags) |
| Create a hardware-accelerated renderer for a window. | |
| void | destroy_renderer (int64_t renderer_id) |
| Destroy a renderer by ID. | |
| void | set_draw_color (int64_t renderer_id, int64_t r, int64_t g, int64_t b, int64_t a) |
| Set the current draw color (RGBA). | |
| void | clear (int64_t renderer_id) |
| Clear the renderer with the current draw color. | |
| void | present (int64_t renderer_id) |
| Present the renderer's back buffer to the screen. | |
| void | get_renderer_output_size (int64_t renderer_id, int64_t *w, int64_t *h) |
| Get the renderer output size. | |
Drawing functions | |
| void | draw_point (int64_t renderer_id, int64_t x, int64_t y) |
| Draw a single pixel. | |
| void | draw_line (int64_t renderer_id, int64_t x1, int64_t y1, int64_t x2, int64_t y2) |
| Draw a line between two points. | |
| void | draw_rect (int64_t renderer_id, int64_t x, int64_t y, int64_t w, int64_t h) |
| Draw a rectangle outline. | |
| void | fill_rect (int64_t renderer_id, int64_t x, int64_t y, int64_t w, int64_t h) |
| Draw a filled rectangle. | |
Event handling | |
| int64_t | poll_event (void) |
| Poll for a pending SDL event. | |
| int64_t | get_event_type (void) |
| Get the type of the last polled event. | |
| int64_t | get_key_code (void) |
| Get the key code from the last keyboard event. | |
| int64_t | get_mouse_x (void) |
| Get the mouse x coordinate from the last mouse event. | |
| int64_t | get_mouse_y (void) |
| Get the mouse y coordinate from the last mouse event. | |
| int64_t | get_mouse_button (void) |
| Get the mouse button from the last mouse event. | |
Surface functions | |
| int64_t | create_rgb_surface (int64_t width, int64_t height, int64_t depth) |
| Create an RGB surface. | |
| void | free_surface (int64_t surf_ptr) |
| Free a surface. | |
| int64_t | blit_surface (int64_t src_ptr, int64_t dst_ptr, int64_t x, int64_t y) |
| Blit a source surface onto a destination surface at (x, y). | |
Mouse state functions | |
| int64_t | get_mouse_state (int64_t *x, int64_t *y) |
| Get the current mouse state with pointer coordinates. | |
| int64_t | get_relative_mouse_state (int64_t *x, int64_t *y) |
| Get the relative mouse state. | |
| int64_t | get_mouse_buttons (void) |
| Get the current mouse button bitmask (pointerless variant). | |
| int64_t | get_relative_mouse_x (void) |
| Get the relative mouse x delta (pointerless variant). | |
| int64_t | get_relative_mouse_y (void) |
| Get the relative mouse y delta (pointerless variant). | |
| int64_t | get_relative_mouse_buttons (void) |
| Get the relative mouse button bitmask (pointerless variant). | |
Keyboard state functions | |
| int64_t | get_keyboard_state (int64_t *numkeys) |
| Get the keyboard state array. | |
| int64_t | is_key_pressed (int64_t scancode) |
| Check whether a specific key is currently pressed. | |
| int64_t | get_num_keys (void) |
| Get the total number of keyboard keys. | |
Clipboard functions | |
| void | set_clipboard_text (const char *text) |
| Set the system clipboard text. | |
| const char * | get_clipboard_text (void) |
| Get the system clipboard text. | |
Cursor functions | |
| void | show_cursor (int64_t show) |
| Show or hide the mouse cursor. | |
Texture functions | |
| int64_t | create_texture (int64_t renderer_id, int64_t format, int64_t access, int64_t w, int64_t h) |
| Create a blank texture. | |
| void | destroy_texture (int64_t texture_id) |
| Destroy a texture. | |
| int64_t | load_texture (int64_t renderer_id, const char *file_path) |
| Load a texture from an image file. | |
| int64_t | load_texture_color_key (int64_t renderer_id, const char *file_path) |
| Load a BMP file as a texture with black color-key transparency. | |
| int64_t | load_texture_color_key_rgb (int64_t renderer_id, const char *file_path, int64_t r, int64_t g, int64_t b) |
| Load a BMP file as a texture with a custom RGB color-key transparency. | |
| void | render_texture (int64_t renderer_id, int64_t texture_id, int64_t src_x, int64_t src_y, int64_t src_w, int64_t src_h, int64_t dst_x, int64_t dst_y, int64_t dst_w, int64_t dst_h) |
| Render a portion of a texture to a destination rectangle. | |
Timing functions | |
| int64_t | get_ticks (void) |
| Get the number of milliseconds since SDL initialization. | |
| void | delay (int64_t ms) |
| Pause execution for the given number of milliseconds. | |
Audio functions | |
| int64_t | open_audio (int64_t freq, int64_t format, int64_t channels, int64_t samples) |
| Open the audio device. | |
| void | close_audio (void) |
| Close the audio device. | |
| void | pause_audio (int64_t pause_on) |
| Pause or unpause audio playback. | |
| int64_t | load_wav (const char *file_path, int64_t *audio_buf, int64_t *audio_len, int64_t *audio_spec) |
| Load a WAV file. | |
| void | free_wav (int64_t audio_buf) |
| Free a loaded WAV buffer. | |
| int64_t | queue_audio (const void *data, int64_t len) |
| Queue audio data for playback. | |
| int64_t | get_queued_audio_size (void) |
| Get the number of bytes of queued audio. | |
| void | clear_queued_audio (void) |
| Clear all queued audio data. | |
Texture pixel access | |
| int64_t | update_texture (int64_t texture_id, const void *pixels, int64_t pitch) |
| Update a texture with new pixel data. | |
| int64_t | lock_texture (int64_t texture_id, void **pixels, int64_t *pitch) |
| Lock a texture for direct pixel access. | |
| void | unlock_texture (int64_t texture_id) |
| Unlock a previously locked texture. | |
Text rendering (SDL_ttf) | |
| int64_t | init_text (void) |
| Initialize the SDL_ttf text rendering subsystem. | |
| void | quit_text (void) |
| Shut down the SDL_ttf subsystem. | |
| int64_t | load_font (const char *file, int64_t ptsize) |
| Load a TrueType font. | |
| void | draw_text (int64_t renderer_id, int64_t font_id, const char *text, int64_t x, int64_t y, int64_t r, int64_t g, int64_t b, int64_t a) |
| Draw text with a font at the given position and color. | |
Render targets | |
| int64_t | create_render_target (int64_t renderer_id, int64_t width, int64_t height) |
| Create an off-screen render target texture. | |
| void | set_render_target (int64_t renderer_id, int64_t target_id) |
| Set the current render target (0 to render to the window). | |
| void | destroy_render_target (int64_t target_id) |
| Destroy a render target texture. | |
| void | present_scaled (int64_t renderer_id, int64_t target_id, int64_t scale_width, int64_t scale_height) |
| Present a render target scaled to the given dimensions. | |
| void | present_stretched (int64_t renderer_id, int64_t target_id, int64_t dst_width, int64_t dst_height) |
| Present a render target stretched to the given dimensions. | |
SDL2 module C API — function declarations for SDL2 bindings exported to MXVM programs.
Definition in file mx_sdl.h.
| int64_t blit_surface | ( | int64_t | src_ptr, |
| int64_t | dst_ptr, | ||
| int64_t | x, | ||
| int64_t | y ) |
Blit a source surface onto a destination surface at (x, y).
Definition at line 684 of file sdl.c.
Referenced by mxvm_sdl_blit_surface().
| void clear | ( | int64_t | renderer_id | ) |
Clear the renderer with the current draw color.
Definition at line 212 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_clear().
| void clear_queued_audio | ( | void | ) |
Clear all queued audio data.
Definition at line 510 of file sdl.c.
Referenced by mxvm_sdl_clear_queued_audio().
| void close_audio | ( | void | ) |
| int64_t create_render_target | ( | int64_t | renderer_id, |
| int64_t | width, | ||
| int64_t | height ) |
Create an off-screen render target texture.
Definition at line 146 of file sdl.c.
References g_render_target_count, g_renderer_count, g_renderers, g_target_heights, and g_target_widths.
Referenced by mxvm_sdl_create_render_target().
| int64_t create_renderer | ( | int64_t | window_id, |
| int64_t | index, | ||
| int64_t | flags ) |
Create a hardware-accelerated renderer for a window.
| window_id | Target window |
| index | Rendering driver index (-1 for first available) |
| flags | SDL renderer flags |
Definition at line 121 of file sdl.c.
References g_renderer_count, g_renderers, g_window_count, and g_windows.
Referenced by mxvm_sdl_create_renderer().
| int64_t create_rgb_surface | ( | int64_t | width, |
| int64_t | height, | ||
| int64_t | depth ) |
Create an RGB surface.
Definition at line 663 of file sdl.c.
Referenced by mxvm_sdl_create_rgb_surface().
| int64_t create_texture | ( | int64_t | renderer_id, |
| int64_t | format, | ||
| int64_t | access, | ||
| int64_t | w, | ||
| int64_t | h ) |
Create a blank texture.
| renderer_id | Renderer handle |
| format | Pixel format |
| access | Texture access pattern (static, streaming, target) |
| w | Width |
| h | Height |
Definition at line 268 of file sdl.c.
References g_renderer_count, g_renderers, g_texture_count, and g_textures.
Referenced by mxvm_sdl_create_texture().
| int64_t create_window | ( | const char * | title, |
| int64_t | x, | ||
| int64_t | y, | ||
| int64_t | w, | ||
| int64_t | h, | ||
| int64_t | flags ) |
Create an SDL window.
| title | Window title |
| x | Initial x position |
| y | Initial y position |
| w | Width in pixels |
| h | Height in pixels |
| flags | SDL window flags |
Definition at line 86 of file sdl.c.
References g_window_count, and g_windows.
Referenced by mxvm_sdl_create_window().
| void delay | ( | int64_t | ms | ) |
Pause execution for the given number of milliseconds.
Definition at line 454 of file sdl.c.
Referenced by mxvm_sdl_delay().
| void destroy_render_target | ( | int64_t | target_id | ) |
Destroy a render target texture.
Definition at line 178 of file sdl.c.
Referenced by mxvm_sdl_destroy_render_target().
| void destroy_renderer | ( | int64_t | renderer_id | ) |
Destroy a renderer by ID.
Definition at line 139 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_destroy_renderer().
| void destroy_texture | ( | int64_t | texture_id | ) |
Destroy a texture.
Definition at line 286 of file sdl.c.
References g_texture_count, and g_textures.
Referenced by mxvm_sdl_destroy_texture().
| void destroy_window | ( | int64_t | window_id | ) |
Destroy a window by ID.
Definition at line 106 of file sdl.c.
References g_window_count, and g_windows.
Referenced by mxvm_sdl_destroy_window().
| void draw_line | ( | int64_t | renderer_id, |
| int64_t | x1, | ||
| int64_t | y1, | ||
| int64_t | x2, | ||
| int64_t | y2 ) |
Draw a line between two points.
Definition at line 248 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_draw_line().
| void draw_point | ( | int64_t | renderer_id, |
| int64_t | x, | ||
| int64_t | y ) |
Draw a single pixel.
Definition at line 242 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_draw_point().
| void draw_rect | ( | int64_t | renderer_id, |
| int64_t | x, | ||
| int64_t | y, | ||
| int64_t | w, | ||
| int64_t | h ) |
Draw a rectangle outline.
Definition at line 254 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_draw_rect().
| void draw_text | ( | int64_t | renderer_id, |
| int64_t | font_id, | ||
| const char * | text, | ||
| int64_t | x, | ||
| int64_t | y, | ||
| int64_t | r, | ||
| int64_t | g, | ||
| int64_t | b, | ||
| int64_t | a ) |
Draw text with a font at the given position and color.
Definition at line 640 of file sdl.c.
References g_font_count, g_fonts, g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_draw_text().
| void fill_rect | ( | int64_t | renderer_id, |
| int64_t | x, | ||
| int64_t | y, | ||
| int64_t | w, | ||
| int64_t | h ) |
Draw a filled rectangle.
Definition at line 261 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_fill_rect().
| void free_surface | ( | int64_t | surf_ptr | ) |
| void free_wav | ( | int64_t | audio_buf | ) |
| const char * get_clipboard_text | ( | void | ) |
Get the system clipboard text.
Definition at line 561 of file sdl.c.
Referenced by mxvm_sdl_get_clipboard_text().
| int64_t get_event_type | ( | void | ) |
Get the type of the last polled event.
Definition at line 186 of file sdl.c.
References g_event.
Referenced by mxvm_sdl_get_event_type().
| int64_t get_key_code | ( | void | ) |
Get the key code from the last keyboard event.
Definition at line 190 of file sdl.c.
References g_event.
Referenced by mxvm_sdl_get_key_code().
| int64_t get_keyboard_state | ( | int64_t * | numkeys | ) |
Get the keyboard state array.
| [out] | numkeys | Receives number of keys |
Definition at line 536 of file sdl.c.
Referenced by mxvm_sdl_get_keyboard_state().
| int64_t get_mouse_button | ( | void | ) |
Get the mouse button from the last mouse event.
Definition at line 202 of file sdl.c.
References g_event.
Referenced by mxvm_sdl_get_mouse_button().
| int64_t get_mouse_buttons | ( | void | ) |
Get the current mouse button bitmask (pointerless variant).
Definition at line 514 of file sdl.c.
Referenced by mxvm_sdl_get_mouse_buttons().
| int64_t get_mouse_state | ( | int64_t * | x, |
| int64_t * | y ) |
Get the current mouse state with pointer coordinates.
| [out] | x | Receives mouse x position |
| [out] | y | Receives mouse y position |
Definition at line 693 of file sdl.c.
Referenced by mxvm_sdl_get_mouse_state().
| int64_t get_mouse_x | ( | void | ) |
Get the mouse x coordinate from the last mouse event.
Definition at line 194 of file sdl.c.
References g_event.
Referenced by mxvm_sdl_get_mouse_x().
| int64_t get_mouse_y | ( | void | ) |
Get the mouse y coordinate from the last mouse event.
Definition at line 198 of file sdl.c.
References g_event.
Referenced by mxvm_sdl_get_mouse_y().
| int64_t get_num_keys | ( | void | ) |
Get the total number of keyboard keys.
Definition at line 551 of file sdl.c.
Referenced by mxvm_sdl_get_num_keys().
| int64_t get_queued_audio_size | ( | void | ) |
Get the number of bytes of queued audio.
Definition at line 506 of file sdl.c.
Referenced by mxvm_sdl_get_queued_audio_size().
| int64_t get_relative_mouse_buttons | ( | void | ) |
Get the relative mouse button bitmask (pointerless variant).
Definition at line 531 of file sdl.c.
Referenced by mxvm_sdl_get_relative_mouse_buttons().
| int64_t get_relative_mouse_state | ( | int64_t * | x, |
| int64_t * | y ) |
Get the relative mouse state.
| [out] | x | Receives relative x delta |
| [out] | y | Receives relative y delta |
Definition at line 703 of file sdl.c.
Referenced by mxvm_sdl_get_relative_mouse_state().
| int64_t get_relative_mouse_x | ( | void | ) |
Get the relative mouse x delta (pointerless variant).
Definition at line 519 of file sdl.c.
Referenced by mxvm_sdl_get_relative_mouse_x().
| int64_t get_relative_mouse_y | ( | void | ) |
Get the relative mouse y delta (pointerless variant).
Definition at line 525 of file sdl.c.
Referenced by mxvm_sdl_get_relative_mouse_y().
| void get_renderer_output_size | ( | int64_t | renderer_id, |
| int64_t * | w, | ||
| int64_t * | h ) |
Get the renderer output size.
| [out] | w | Receives width |
| [out] | h | Receives height |
Definition at line 596 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_get_renderer_output_size().
| int64_t get_ticks | ( | void | ) |
Get the number of milliseconds since SDL initialization.
Definition at line 450 of file sdl.c.
Referenced by mxvm_sdl_get_ticks().
| void get_window_size | ( | int64_t | window_id, |
| int64_t * | w, | ||
| int64_t * | h ) |
Get the size of a window.
| [out] | w | Receives width |
| [out] | h | Receives height |
Definition at line 581 of file sdl.c.
References g_window_count, and g_windows.
Referenced by mxvm_sdl_get_window_size().
| int64_t init | ( | void | ) |
Initialize SDL2 subsystems.
Definition at line 26 of file sdl.c.
Referenced by action_interpret(), and mxvm_sdl_init().
| int64_t init_text | ( | void | ) |
Initialize the SDL_ttf text rendering subsystem.
Definition at line 609 of file sdl.c.
Referenced by mxvm_sdl_init_text().
| int64_t is_key_pressed | ( | int64_t | scancode | ) |
Check whether a specific key is currently pressed.
| scancode | SDL scancode |
Definition at line 543 of file sdl.c.
Referenced by mxvm_sdl_is_key_pressed().
| int64_t load_font | ( | const char * | file, |
| int64_t | ptsize ) |
Load a TrueType font.
| file | Font file path |
| ptsize | Font point size |
Definition at line 626 of file sdl.c.
References g_font_count, and g_fonts.
Referenced by mxvm_sdl_load_font().
| int64_t load_texture | ( | int64_t | renderer_id, |
| const char * | file_path ) |
Load a texture from an image file.
| renderer_id | Renderer handle |
| file_path | Path to the image file |
Load a texture from an image file.
Loads the bitmap via SDL_LoadBMP, sets pure black (0,0,0) as the transparent color key with SDL_SetColorKey, then creates an accelerated texture from the surface. The surface is freed after texture creation.
| renderer_id | Index into the renderer array. |
| file_path | Path to the .bmp file. |
Definition at line 306 of file sdl.c.
References g_renderer_count, g_renderers, g_texture_count, and g_textures.
Referenced by mxvm_sdl_load_texture().
| int64_t load_texture_color_key | ( | int64_t | renderer_id, |
| const char * | file_path ) |
Load a BMP file as a texture with black color-key transparency.
Definition at line 330 of file sdl.c.
References g_renderer_count, g_renderers, g_texture_count, and g_textures.
Referenced by mxvm_sdl_load_texture_color_key().
| int64_t load_texture_color_key_rgb | ( | int64_t | renderer_id, |
| const char * | file_path, | ||
| int64_t | r, | ||
| int64_t | g, | ||
| int64_t | b ) |
Load a BMP file as a texture with a custom RGB color-key transparency.
Load a BMP file as a texture with a custom RGB color-key transparency.
Loads the bitmap via SDL_LoadBMP, sets the specified (r, g, b) color as the transparent color key with SDL_SetColorKey, then creates an accelerated texture from the surface. The surface is freed after texture creation.
| renderer_id | Index into the renderer array. |
| file_path | Path to the .bmp file. |
| r | Red component of the color key (0–255). |
| g | Green component of the color key (0–255). |
| b | Blue component of the color key (0–255). |
Definition at line 371 of file sdl.c.
References g_renderer_count, g_renderers, g_texture_count, and g_textures.
Referenced by mxvm_sdl_load_texture_color_key_rgb().
| int64_t load_wav | ( | const char * | file_path, |
| int64_t * | audio_buf, | ||
| int64_t * | audio_len, | ||
| int64_t * | audio_spec ) |
Load a WAV file.
| file_path | Path to the WAV file | |
| [out] | audio_buf | Receives the audio buffer pointer |
| [out] | audio_len | Receives the audio length in bytes |
| [out] | audio_spec | Receives the audio spec pointer |
Definition at line 478 of file sdl.c.
Referenced by mxvm_sdl_load_wav().
| int64_t lock_texture | ( | int64_t | texture_id, |
| void ** | pixels, | ||
| int64_t * | pitch ) |
Lock a texture for direct pixel access.
| [out] | pixels | Receives pointer to pixel data |
| [out] | pitch | Receives row pitch in bytes |
Definition at line 434 of file sdl.c.
References g_texture_count, and g_textures.
Referenced by mxvm_sdl_lock_texture().
| int64_t open_audio | ( | int64_t | freq, |
| int64_t | format, | ||
| int64_t | channels, | ||
| int64_t | samples ) |
Open the audio device.
| freq | Sample rate (e.g. 44100) |
| format | Audio format |
| channels | Number of channels |
| samples | Buffer size in samples |
Definition at line 458 of file sdl.c.
Referenced by mxvm_sdl_open_audio().
| void pause_audio | ( | int64_t | pause_on | ) |
Pause or unpause audio playback.
Definition at line 474 of file sdl.c.
Referenced by mxvm_sdl_pause_audio().
| int64_t poll_event | ( | void | ) |
Poll for a pending SDL event.
Definition at line 182 of file sdl.c.
References g_event.
Referenced by mxvm_sdl_poll_event().
| void present | ( | int64_t | renderer_id | ) |
Present the renderer's back buffer to the screen.
Definition at line 218 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_present().
| void present_scaled | ( | int64_t | renderer_id, |
| int64_t | target_id, | ||
| int64_t | scale_width, | ||
| int64_t | scale_height ) |
Present a render target scaled to the given dimensions.
Definition at line 224 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_present_scaled().
| void present_stretched | ( | int64_t | renderer_id, |
| int64_t | target_id, | ||
| int64_t | dst_width, | ||
| int64_t | dst_height ) |
Present a render target stretched to the given dimensions.
Definition at line 233 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_present_stretched().
| int64_t queue_audio | ( | const void * | data, |
| int64_t | len ) |
Queue audio data for playback.
Definition at line 502 of file sdl.c.
Referenced by mxvm_sdl_queue_audio().
| void quit | ( | void | ) |
Shut down SDL2 and release all resources.
Definition at line 34 of file sdl.c.
References g_font_count, g_fonts, g_render_target_count, g_renderer_count, g_renderers, g_target_heights, g_target_widths, g_texture_count, g_textures, g_window_count, and g_windows.
Referenced by mxvm_sdl_quit().
| void quit_text | ( | void | ) |
Shut down the SDL_ttf subsystem.
Definition at line 613 of file sdl.c.
References g_font_count, and g_fonts.
Referenced by mxvm_sdl_quit_text().
| void render_texture | ( | int64_t | renderer_id, |
| int64_t | texture_id, | ||
| int64_t | src_x, | ||
| int64_t | src_y, | ||
| int64_t | src_w, | ||
| int64_t | src_h, | ||
| int64_t | dst_x, | ||
| int64_t | dst_y, | ||
| int64_t | dst_w, | ||
| int64_t | dst_h ) |
Render a portion of a texture to a destination rectangle.
Definition at line 397 of file sdl.c.
References g_renderer_count, g_renderers, g_texture_count, and g_textures.
Referenced by mxvm_sdl_render_texture().
| void set_clipboard_text | ( | const char * | text | ) |
Set the system clipboard text.
Definition at line 557 of file sdl.c.
Referenced by mxvm_sdl_set_clipboard_text().
| void set_draw_color | ( | int64_t | renderer_id, |
| int64_t | r, | ||
| int64_t | g, | ||
| int64_t | b, | ||
| int64_t | a ) |
Set the current draw color (RGBA).
Definition at line 206 of file sdl.c.
References g_renderer_count, and g_renderers.
Referenced by mxvm_sdl_set_draw_color().
| void set_render_target | ( | int64_t | renderer_id, |
| int64_t | target_id ) |
Set the current render target (0 to render to the window).
Definition at line 173 of file sdl.c.
Referenced by mxvm_sdl_set_render_target().
| void set_window_fullscreen | ( | int64_t | window_id, |
| int64_t | fullscreen ) |
Set or clear fullscreen mode for a window.
Definition at line 590 of file sdl.c.
References g_window_count, and g_windows.
Referenced by mxvm_sdl_set_window_fullscreen().
| void set_window_icon | ( | uint64_t | window_id, |
| const char * | path ) |
Set the window icon from an image file.
Definition at line 113 of file sdl.c.
References g_windows.
Referenced by mxvm_sdl_set_window_icon().
| void set_window_position | ( | int64_t | window_id, |
| int64_t | x, | ||
| int64_t | y ) |
Set the position of a window.
Definition at line 575 of file sdl.c.
References g_window_count, and g_windows.
Referenced by mxvm_sdl_set_window_position().
| void set_window_title | ( | int64_t | window_id, |
| const char * | title ) |
Set the title of a window.
Definition at line 569 of file sdl.c.
References g_window_count, and g_windows.
Referenced by mxvm_sdl_set_window_title().
| void show_cursor | ( | int64_t | show | ) |
Show or hide the mouse cursor.
Definition at line 605 of file sdl.c.
Referenced by mxvm_sdl_show_cursor().
| void unlock_texture | ( | int64_t | texture_id | ) |
Unlock a previously locked texture.
Definition at line 444 of file sdl.c.
References g_texture_count, and g_textures.
Referenced by mxvm_sdl_unlock_texture().
| int64_t update_texture | ( | int64_t | texture_id, |
| const void * | pixels, | ||
| int64_t | pitch ) |
Update a texture with new pixel data.
Definition at line 427 of file sdl.c.
References g_texture_count, and g_textures.
Referenced by mxvm_sdl_update_texture().