diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 00:29:34 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 00:29:34 +0300 |
| commit | f7fa0930cb46046f995fa1ab927aef62466e995e (patch) | |
| tree | f5ac4e1579811b5d69498a19d0bdfbf128a1d62b /src/common/backend.h | |
| parent | 624d1371304a5ae4b3429ad5e4267aac7cd03dfd (diff) | |
feat: add SDL3-style surface, display, and loop timer API for X11, Wayland, and Cocoa
Diffstat (limited to 'src/common/backend.h')
| -rw-r--r-- | src/common/backend.h | 6 |
1 files changed, 6 insertions, 0 deletions
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; |
