|
SBgl 0.1.0
A graphics framework in C99
|
Internal Platform Abstraction Layer (HAL). More...


Go to the source code of this file.
Functions | |
| sbgl_platform_Result | sbgl_os_CreateWindow (struct SblArena *arena, sbgl_InputState *input, int width, int height, const char *title, sbgl_Window **outWindow) |
| Creates a native OS window. | |
| void | sbgl_os_DestroyWindow (sbgl_Window *window) |
| Destroys a native window. | |
| bool | sbgl_os_WindowShouldClose (sbgl_Window *window) |
| Checks the window's close flag. | |
| void | sbgl_os_GetWindowSize (sbgl_Window *window, int *w, int *h) |
| Retrieves the current client area size. | |
| bool | sbgl_os_WasWindowResized (sbgl_Window *window) |
| Checks if the window has been resized since the last check. | |
| void | sbgl_os_SetCursorVisible (sbgl_Window *window, bool visible) |
| Sets the visibility of the OS cursor for the given window. | |
| void | sbgl_os_SetCursorLocked (sbgl_Window *window, bool locked) |
| Locks or unlocks the cursor within the window bounds. | |
| bool | sbgl_os_IsWindowFocused (sbgl_Window *window) |
| Checks if the window currently has input focus. | |
| void | sbgl_os_PollEvents (sbgl_Window *window) |
| Dispatches OS events (messages/protocol requests). | |
| uint64_t | sbgl_os_GetPerfCount (sbgl_Window *window) |
| Gets the high-resolution performance counter. | |
| uint64_t | sbgl_os_GetPerfFreq (sbgl_Window *window) |
| Gets the performance counter frequency. | |
| void * | sbgl_os_GetNativeWindowHandle (sbgl_Window *window) |
| Retrieves the raw window handle for Vulkan surface creation. | |
| void * | sbgl_os_GetNativeInstanceHandle (sbgl_Window *window) |
| Retrieves the native instance handle (Win32 specific). | |
| void * | sbgl_os_GetNativeDisplayHandle (sbgl_Window *window) |
| Retrieves the native display handle (Linux specific). | |
Internal Platform Abstraction Layer (HAL).
Defines the strict interface that OS-specific implementations must follow. Prevents OS headers (windows.h, wayland-client.h) from leaking into the core.
Definition in file sbgl_platform.h.
| sbgl_platform_Result sbgl_os_CreateWindow | ( | struct SblArena * | arena, |
| sbgl_InputState * | input, | ||
| int | width, | ||
| int | height, | ||
| const char * | title, | ||
| sbgl_Window ** | outWindow ) |
Creates a native OS window.
| arena | Arena to allocate the window state from. |
| input | Pointer to input state. |
| width | Initial width. |
| height | Initial height. |
| title | Window title. |
| outWindow | Pointer to store the created window. |
Definition at line 68 of file window_wayland.c.
| void sbgl_os_DestroyWindow | ( | sbgl_Window * | window | ) |
Destroys a native window.
| window | The window to destroy. |
Definition at line 205 of file window_wayland.c.
| void * sbgl_os_GetNativeDisplayHandle | ( | sbgl_Window * | window | ) |
Retrieves the native display handle (Linux specific).
| window | The window handle. |
Definition at line 204 of file window_wayland.c.
| void * sbgl_os_GetNativeInstanceHandle | ( | sbgl_Window * | window | ) |
Retrieves the native instance handle (Win32 specific).
| window | The window handle. |
Definition at line 152 of file window_x11.c.
| void * sbgl_os_GetNativeWindowHandle | ( | sbgl_Window * | window | ) |
Retrieves the raw window handle for Vulkan surface creation.
| window | The window handle. |
Definition at line 203 of file window_wayland.c.
| uint64_t sbgl_os_GetPerfCount | ( | sbgl_Window * | window | ) |
Gets the high-resolution performance counter.
| window | The window handle. |
Definition at line 201 of file window_wayland.c.
| uint64_t sbgl_os_GetPerfFreq | ( | sbgl_Window * | window | ) |
Gets the performance counter frequency.
| window | The window handle. |
Definition at line 202 of file window_wayland.c.
| void sbgl_os_GetWindowSize | ( | sbgl_Window * | window, |
| int * | w, | ||
| int * | h ) |
Retrieves the current client area size.
| window | The window handle. |
| w | Pointer to store width. |
| h | Pointer to store height. |
Definition at line 150 of file window_wayland.c.
| bool sbgl_os_IsWindowFocused | ( | sbgl_Window * | window | ) |
Checks if the window currently has input focus.
| window | The native window handle. |
Definition at line 158 of file window_wayland.c.
| void sbgl_os_PollEvents | ( | sbgl_Window * | window | ) |
Dispatches OS events (messages/protocol requests).
| window | The window to process events for. |
Definition at line 122 of file window_wayland.c.
| void sbgl_os_SetCursorLocked | ( | sbgl_Window * | window, |
| bool | locked ) |
Locks or unlocks the cursor within the window bounds.
When locked, the cursor is typically constrained to the window center to support relative motion for 3D navigation.
| window | The native window handle. |
| locked | True to capture the cursor, false to release it. |
Definition at line 175 of file window_wayland.c.
| void sbgl_os_SetCursorVisible | ( | sbgl_Window * | window, |
| bool | visible ) |
Sets the visibility of the OS cursor for the given window.
Provides a platform-agnostic way to show or hide the mouse pointer.
| window | The native window handle. |
| visible | True to show the cursor, false to hide it. |
Definition at line 160 of file window_wayland.c.
| bool sbgl_os_WasWindowResized | ( | sbgl_Window * | window | ) |
Checks if the window has been resized since the last check.
Resets the internal resize flag to false upon returning.
| window | The window handle. |
Definition at line 152 of file window_wayland.c.
| bool sbgl_os_WindowShouldClose | ( | sbgl_Window * | window | ) |
Checks the window's close flag.
| window | The window to check. |
Definition at line 149 of file window_wayland.c.