headers spacing

This commit is contained in:
Peterino2 2026-09-20 02:00:59 -07:00
parent 7353322a74
commit fcf4c7ec4c
1 changed files with 23 additions and 0 deletions

View File

@ -280,9 +280,12 @@ typedef struct uhdk_event_list {
} uhdk_event_list; } uhdk_event_list;
UHDK_API void UHDK_CALL uhdk_quit(uhdk_session *session); /* Accept/request shutdown. */ UHDK_API void UHDK_CALL uhdk_quit(uhdk_session *session); /* Accept/request shutdown. */
UHDK_API void UHDK_CALL uhdk_wake(uhdk_session *session); /* Thread-safe, coalesced WAKE event. */ UHDK_API void UHDK_CALL uhdk_wake(uhdk_session *session); /* Thread-safe, coalesced WAKE event. */
/* Monotonic nanoseconds since app creation, in the same clock as event.time_ns. */ /* Monotonic nanoseconds since app creation, in the same clock as event.time_ns. */
UHDK_API uint64_t UHDK_CALL uhdk_get_time_ns(uhdk_session *session); UHDK_API uint64_t UHDK_CALL uhdk_get_time_ns(uhdk_session *session);
/* One pending deadline per session. Replaces any previous deadline; 0 cancels it. /* One pending deadline per session. Replaces any previous deadline; 0 cancels it.
* A past deadline queues WAKE at the next dispatch. On expiry the deadline is * A past deadline queues WAKE at the next dispatch. On expiry the deadline is
* cleared before delivering WAKE. Explicit wakes may coalesce with expiry but * cleared before delivering WAKE. Explicit wakes may coalesce with expiry but
@ -290,11 +293,14 @@ UHDK_API uint64_t UHDK_CALL uhdk_get_time_ns(uhdk_session *session);
* multiple timers by scheduling its earliest deadline. No real-time guarantee. * multiple timers by scheduling its earliest deadline. No real-time guarantee.
*/ */
UHDK_API uhdk_status UHDK_CALL uhdk_set_wake_deadline(uhdk_session *session, uint64_t deadline_ns); UHDK_API uhdk_status UHDK_CALL uhdk_set_wake_deadline(uhdk_session *session, uint64_t deadline_ns);
/* Linux: AUTO/false before successful startup; thereafter the selected backend /* Linux: AUTO/false before successful startup; thereafter the selected backend
* and implemented, available mechanisms. Capabilities do not guarantee success * and implemented, available mechanisms. Capabilities do not guarantee success
* for a particular operation. Other platforms retain their fixed backend. */ * for a particular operation. Other platforms retain their fixed backend. */
UHDK_API uhdk_backend UHDK_CALL uhdk_get_backend(uhdk_session *session); UHDK_API uhdk_backend UHDK_CALL uhdk_get_backend(uhdk_session *session);
UHDK_API uhdk_bool UHDK_CALL uhdk_has_capability(uhdk_session *session, uhdk_capability capability); UHDK_API uhdk_bool UHDK_CALL uhdk_has_capability(uhdk_session *session, uhdk_capability capability);
/* Best effort; the tag remains reserved until its completion is delivered. /* Best effort; the tag remains reserved until its completion is delivered.
* NOT_FOUND means no executing request has this tag (its result may be queued). */ * NOT_FOUND means no executing request has this tag (its result may be queued). */
UHDK_API uhdk_status UHDK_CALL uhdk_request_cancel(uhdk_session *session, uhdk_request_tag tag); UHDK_API uhdk_status UHDK_CALL uhdk_request_cancel(uhdk_session *session, uhdk_request_tag tag);
@ -426,6 +432,7 @@ typedef struct uhdk_frame {
* function table is already loaded. No application callbacks execute during setup. * function table is already loaded. No application callbacks execute during setup.
*/ */
UHDK_API uhdk_status UHDK_CALL uhdk_open(const uhdk_options *options, uhdk_session **out); UHDK_API uhdk_status UHDK_CALL uhdk_open(const uhdk_options *options, uhdk_session **out);
/* Begin one application iteration, including event-only iterations when hidden /* Begin one application iteration, including event-only iterations when hidden
* or minimized. Native-only sessions have a NULL GL table. Each successful call * or minimized. Native-only sessions have a NULL GL table. Each successful call
* requires end_frame, even if not drawable. * requires end_frame, even if not drawable.
@ -437,6 +444,7 @@ UHDK_API uhdk_status UHDK_CALL uhdk_open(const uhdk_options *options, uhdk_sessi
* STOPPED and final request completions are delivered before normal termination. * STOPPED and final request completions are delivered before normal termination.
*/ */
UHDK_API uhdk_bool UHDK_CALL uhdk_next_frame(uhdk_session *session, uhdk_frame *out); UHDK_API uhdk_bool UHDK_CALL uhdk_next_frame(uhdk_session *session, uhdk_frame *out);
/* Presents drawable frames and finishes the iteration. The context remains /* Presents drawable frames and finishes the iteration. The context remains
* current for resource work between iterations, including shutdown. Call quit * current for resource work between iterations, including shutdown. Call quit
* to accept a close/quit request; this suppresses presentation during draining. * to accept a close/quit request; this suppresses presentation during draining.
@ -444,9 +452,13 @@ UHDK_API uhdk_bool UHDK_CALL uhdk_next_frame(uhdk_session *session, uhdk_frame *
* for native requests between boundaries. GL calls stay on OS main. * for native requests between boundaries. GL calls stay on OS main.
*/ */
UHDK_API uhdk_status UHDK_CALL uhdk_end_frame(uhdk_session *session); UHDK_API uhdk_status UHDK_CALL uhdk_end_frame(uhdk_session *session);
UHDK_API uhdk_status UHDK_CALL uhdk_get_status(uhdk_session *session); UHDK_API uhdk_status UHDK_CALL uhdk_get_status(uhdk_session *session);
UHDK_API const uhdk_gl_functions *UHDK_CALL uhdk_get_gl(uhdk_session *session); UHDK_API const uhdk_gl_functions *UHDK_CALL uhdk_get_gl(uhdk_session *session);
UHDK_API uhdk_window *UHDK_CALL uhdk_get_window(uhdk_session *session); UHDK_API uhdk_window *UHDK_CALL uhdk_get_window(uhdk_session *session);
/* NULL safe. Discards an unfinished frame without presenting. Destroy app-owned /* NULL safe. Discards an unfinished frame without presenting. Destroy app-owned
* GL resources before close; all session handles become invalid on return. */ * GL resources before close; all session handles become invalid on return. */
UHDK_API void UHDK_CALL uhdk_close(uhdk_session *session); UHDK_API void UHDK_CALL uhdk_close(uhdk_session *session);
@ -461,14 +473,21 @@ UHDK_API uhdk_status UHDK_CALL uhdk_window_create(
const uhdk_window_desc *desc, const uhdk_window_desc *desc,
uhdk_window **out uhdk_window **out
); );
/* Destroy an additional window. The primary window is owned by close and cannot /* Destroy an additional window. The primary window is owned by close and cannot
* be destroyed separately. Pending events/requests follow the lifecycle rules. */ * be destroyed separately. Pending events/requests follow the lifecycle rules. */
UHDK_API uhdk_status UHDK_CALL uhdk_window_destroy(uhdk_window *window); UHDK_API uhdk_status UHDK_CALL uhdk_window_destroy(uhdk_window *window);
UHDK_API uhdk_status UHDK_CALL uhdk_window_set_title(uhdk_window *window, uhdk_text title); UHDK_API uhdk_status UHDK_CALL uhdk_window_set_title(uhdk_window *window, uhdk_text title);
UHDK_API uhdk_status UHDK_CALL uhdk_window_set_size(uhdk_window *window, uhdk_size size); UHDK_API uhdk_status UHDK_CALL uhdk_window_set_size(uhdk_window *window, uhdk_size size);
UHDK_API uhdk_status UHDK_CALL uhdk_window_set_state(uhdk_window *window, uhdk_window_state state); UHDK_API uhdk_status UHDK_CALL uhdk_window_set_state(uhdk_window *window, uhdk_window_state state);
UHDK_API uhdk_status UHDK_CALL uhdk_window_set_visible(uhdk_window *window, uhdk_bool visible); UHDK_API uhdk_status UHDK_CALL uhdk_window_set_visible(uhdk_window *window, uhdk_bool visible);
UHDK_API uhdk_status UHDK_CALL uhdk_window_request_focus(uhdk_window *window); UHDK_API uhdk_status UHDK_CALL uhdk_window_request_focus(uhdk_window *window);
/* Change native decoration and resize styling without recreating the window. /* Change native decoration and resize styling without recreating the window.
* The window manager may apply it asynchronously. Content dimensions remain * The window manager may apply it asynchronously. Content dimensions remain
* content-area dimensions. */ * content-area dimensions. */
@ -476,10 +495,12 @@ UHDK_API uhdk_status UHDK_CALL uhdk_window_set_style(
uhdk_window *window, uhdk_window *window,
const uhdk_window_style *style const uhdk_window_style *style
); );
UHDK_API uhdk_status UHDK_CALL uhdk_window_get_metrics( UHDK_API uhdk_status UHDK_CALL uhdk_window_get_metrics(
uhdk_window *window, uhdk_window *window,
uhdk_window_metrics *out uhdk_window_metrics *out
); );
UHDK_API void UHDK_CALL uhdk_window_invalidate(uhdk_window *window); /* Coalesced redraw event. */ UHDK_API void UHDK_CALL uhdk_window_invalidate(uhdk_window *window); /* Coalesced redraw event. */
/* The session owns one OpenGL >=3.3 core context and its loaded function table. /* The session owns one OpenGL >=3.3 core context and its loaded function table.
@ -497,6 +518,7 @@ UHDK_API void UHDK_CALL uhdk_window_invalidate(uhdk_window *window); /* Coalesce
#define UHDK_GL_CALL #define UHDK_GL_CALL
#endif #endif
typedef void(UHDK_GL_CALL *uhdk_gl_proc)(void); typedef void(UHDK_GL_CALL *uhdk_gl_proc)(void);
/* ASCII symbol name. Missing symbols return NOT_FOUND. A non-null procedure /* ASCII symbol name. Missing symbols return NOT_FOUND. A non-null procedure
* does not establish extension support. Valid until close, on OS main only. */ * does not establish extension support. Valid until close, on OS main only. */
UHDK_API uhdk_status UHDK_CALL uhdk_get_gl_proc( UHDK_API uhdk_status UHDK_CALL uhdk_get_gl_proc(
@ -504,6 +526,7 @@ UHDK_API uhdk_status UHDK_CALL uhdk_get_gl_proc(
uhdk_text name, uhdk_text name,
uhdk_gl_proc *out uhdk_gl_proc *out
); );
/* Request vsync (true) or unsynchronized presentation (false). Native compositor /* Request vsync (true) or unsynchronized presentation (false). Native compositor
* policy may override it. Unsupported control returns UNSUPPORTED. */ * policy may override it. Unsupported control returns UNSUPPORTED. */
UHDK_API uhdk_status UHDK_CALL uhdk_set_vsync(uhdk_session *session, uhdk_bool enabled); UHDK_API uhdk_status UHDK_CALL uhdk_set_vsync(uhdk_session *session, uhdk_bool enabled);