From f7fa0930cb46046f995fa1ab927aef62466e995e Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 00:29:34 +0300 Subject: feat: add SDL3-style surface, display, and loop timer API for X11, Wayland, and Cocoa --- src/common/backend.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/backend.h') diff --git a/src/common/backend.h b/src/common/backend.h index c6691eb..b52a147 100644 --- a/src/common/backend.h +++ b/src/common/backend.h @@ -8,14 +8,20 @@ struct yasl_backend_ops; struct yasl_display { const struct yasl_backend_ops *ops; struct yasl_display_cbs callbacks; + struct yasl_loop *loop; }; struct yasl_surface { struct yasl_display *display; struct yasl_surface_cbs callbacks; uint64_t frame_generation; + yasl_timer_id *timers; + int timer_count; + int timer_capacity; }; +void yasl_surface_clear_timers(struct yasl_surface *s); + static inline uint64_t yasl_frame_begin(struct yasl_surface *s) { if (++s->frame_generation == 0) ++s->frame_generation; -- cgit v1.2.3