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
17
struct
SblArena
;
18
29
sbgl_platform_Result
sbgl_os_CreateWindow
(
30
struct
SblArena
* arena,
31
sbgl_InputState
* input,
32
int
width,
33
int
height,
34
const
char
* title,
35
sbgl_Window
** outWindow
36
);
37
42
void
sbgl_os_DestroyWindow
(
sbgl_Window
* window);
43
49
bool
sbgl_os_WindowShouldClose
(
sbgl_Window
* window);
50
57
void
sbgl_os_GetWindowSize
(
sbgl_Window
* window,
int
* w,
int
* h);
58
67
bool
sbgl_os_WasWindowResized
(
sbgl_Window
* window);
68
77
void
sbgl_os_SetCursorVisible
(
sbgl_Window
* window,
bool
visible);
78
88
void
sbgl_os_SetCursorLocked
(
sbgl_Window
* window,
bool
locked);
89
95
bool
sbgl_os_IsWindowFocused
(
sbgl_Window
* window);
96
101
void
sbgl_os_PollEvents
(
sbgl_Window
* window);
102
108
uint64_t
sbgl_os_GetPerfCount
(
sbgl_Window
* window);
109
115
uint64_t
sbgl_os_GetPerfFreq
(
sbgl_Window
* window);
116
122
void
*
sbgl_os_GetNativeWindowHandle
(
sbgl_Window
* window);
123
129
void
*
sbgl_os_GetNativeInstanceHandle
(
sbgl_Window
* window);
130
136
void
*
sbgl_os_GetNativeDisplayHandle
(
sbgl_Window
* window);
137
138
#endif
// SBGL_PLATFORM_H
sbgl_os_WasWindowResized
bool sbgl_os_WasWindowResized(sbgl_Window *window)
Checks if the window has been resized since the last check.
Definition
window_wayland.c:152
sbgl_os_GetPerfCount
uint64_t sbgl_os_GetPerfCount(sbgl_Window *window)
Gets the high-resolution performance counter.
Definition
window_wayland.c:201
sbgl_os_PollEvents
void sbgl_os_PollEvents(sbgl_Window *window)
Dispatches OS events (messages/protocol requests).
Definition
window_wayland.c:122
sbgl_os_SetCursorLocked
void sbgl_os_SetCursorLocked(sbgl_Window *window, bool locked)
Locks or unlocks the cursor within the window bounds.
Definition
window_wayland.c:175
sbgl_os_GetPerfFreq
uint64_t sbgl_os_GetPerfFreq(sbgl_Window *window)
Gets the performance counter frequency.
Definition
window_wayland.c:202
sbgl_os_GetNativeWindowHandle
void * sbgl_os_GetNativeWindowHandle(sbgl_Window *window)
Retrieves the raw window handle for Vulkan surface creation.
Definition
window_wayland.c:203
sbgl_os_SetCursorVisible
void sbgl_os_SetCursorVisible(sbgl_Window *window, bool visible)
Sets the visibility of the OS cursor for the given window.
Definition
window_wayland.c:160
sbgl_os_WindowShouldClose
bool sbgl_os_WindowShouldClose(sbgl_Window *window)
Checks the window's close flag.
Definition
window_wayland.c:149
sbgl_os_GetWindowSize
void sbgl_os_GetWindowSize(sbgl_Window *window, int *w, int *h)
Retrieves the current client area size.
Definition
window_wayland.c:150
sbgl_os_CreateWindow
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.
Definition
window_wayland.c:68
sbgl_os_IsWindowFocused
bool sbgl_os_IsWindowFocused(sbgl_Window *window)
Checks if the window currently has input focus.
Definition
window_wayland.c:158
sbgl_os_GetNativeDisplayHandle
void * sbgl_os_GetNativeDisplayHandle(sbgl_Window *window)
Retrieves the native display handle (Linux specific).
Definition
window_wayland.c:204
sbgl_os_GetNativeInstanceHandle
void * sbgl_os_GetNativeInstanceHandle(sbgl_Window *window)
Retrieves the native instance handle (Win32 specific).
Definition
window_x11.c:152
sbgl_os_DestroyWindow
void sbgl_os_DestroyWindow(sbgl_Window *window)
Destroys a native window.
Definition
window_wayland.c:205
sbgl_types.h
sbgl_platform_Result
sbgl_platform_Result
Result codes for platform layer operations.
Definition
sbgl_types.h:233
sbgl_input.h
Internal Input Abstraction Layer (HAL).
SblArena
Arena allocator.
Definition
sbl_arena.h:47
sbgl_InputState
Represents the real-time state of physical inputs.
Definition
sbgl_input.h:165
sbgl_Window
Native X11 window state.
Definition
linux_internal.h:50
src
core
sbgl_platform.h
Generated by
1.12.0