SBgl 0.1.0
A graphics framework in C99
Loading...
Searching...
No Matches
sbgl_platform.h
Go to the documentation of this file.
1
9#ifndef SBGL_PLATFORM_H
10#define SBGL_PLATFORM_H
11
12#include "sbgl_types.h"
13#include "sbgl_input.h"
14#include <stdbool.h>
15#include <stdint.h>
16
17struct SblArena;
18
30 struct SblArena* arena,
31 sbgl_InputState* input,
32 int width,
33 int height,
34 const char* title,
35 sbgl_Window** outWindow
36);
37
43
50
57void sbgl_os_GetWindowSize(sbgl_Window* window, int* w, int* h);
58
68
77void sbgl_os_SetCursorVisible(sbgl_Window* window, bool visible);
78
88void sbgl_os_SetCursorLocked(sbgl_Window* window, bool locked);
89
96
101void sbgl_os_PollEvents(sbgl_Window* window);
102
108uint64_t sbgl_os_GetPerfCount(sbgl_Window* window);
109
115uint64_t sbgl_os_GetPerfFreq(sbgl_Window* window);
116
123
130
137
138#endif // SBGL_PLATFORM_H
bool sbgl_os_WasWindowResized(sbgl_Window *window)
Checks if the window has been resized since the last check.
uint64_t sbgl_os_GetPerfCount(sbgl_Window *window)
Gets the high-resolution performance counter.
void sbgl_os_PollEvents(sbgl_Window *window)
Dispatches OS events (messages/protocol requests).
void sbgl_os_SetCursorLocked(sbgl_Window *window, bool locked)
Locks or unlocks the cursor within the window bounds.
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_SetCursorVisible(sbgl_Window *window, bool visible)
Sets the visibility of the OS cursor for the given 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.
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.
bool sbgl_os_IsWindowFocused(sbgl_Window *window)
Checks if the window currently has input focus.
void * sbgl_os_GetNativeDisplayHandle(sbgl_Window *window)
Retrieves the native display handle (Linux specific).
void * sbgl_os_GetNativeInstanceHandle(sbgl_Window *window)
Retrieves the native instance handle (Win32 specific).
Definition window_x11.c:152
void sbgl_os_DestroyWindow(sbgl_Window *window)
Destroys a native window.
sbgl_platform_Result
Result codes for platform layer operations.
Definition sbgl_types.h:233
Internal Input Abstraction Layer (HAL).
Arena allocator.
Definition sbl_arena.h:47
Represents the real-time state of physical inputs.
Definition sbgl_input.h:165
Native X11 window state.