From 3b8af02be94a510e385f44d58c35c86bb89424a6 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 08:41:51 +0300 Subject: refactor: simplify public API and isolate native extensions Separate loop/timer and native interoperability APIs from the portable surface header. Unify dispatch, geometry queries, and timer callbacks; keep framebuffer bookkeeping and frame clocks private, and hide implementation symbols. Update backends, documentation, examples, and API/integration coverage. Verify exports, strict C/C++ installed consumers, and normal plus ASan/UBSan suites. --- src/wayland/api.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/wayland/api.h') diff --git a/src/wayland/api.h b/src/wayland/api.h index 8252041..87e896d 100644 --- a/src/wayland/api.h +++ b/src/wayland/api.h @@ -9,7 +9,6 @@ struct wayland_surface; struct wayland_display *wayland_display_open(struct yasl_loop *loop, const struct yasl_display_spec *spec); void wayland_display_close(struct wayland_display *d); uint32_t wayland_display_caps(const struct wayland_display *d); -void wayland_display_dispatch(struct wayland_display *d); int wayland_display_dispatch_timeout(struct wayland_display *d, int timeout_ms); void wayland_display_flush(struct wayland_display *d); int wayland_display_modifiers(const struct wayland_display *d); @@ -17,7 +16,8 @@ void wayland_display_copy(struct wayland_display *d, enum yasl_selection sel, co void wayland_display_paste(struct wayland_display *d, enum yasl_selection sel, struct wayland_surface *target); bool wayland_display_drag_start(struct wayland_display *d, struct wayland_surface *origin, const struct yasl_drag_image *image, const struct yasl_drag_listener *l, void *ud); void wayland_display_drag_cancel(struct wayland_display *d); -struct wayland_surface *wayland_surface_create_toplevel(struct wayland_display *d, const struct yasl_surface_spec *spec); +struct wayland_surface *wayland_surface_create_toplevel(struct wayland_display *d, + const struct yasl_surface_spec *spec, void *graphics_device); struct wayland_surface *wayland_surface_create_popup(struct wayland_surface *parent, const struct yasl_popup_spec *spec); bool wayland_surface_popup_reposition(struct wayland_surface *popup, const struct yasl_popup_spec *spec); void wayland_surface_destroy(struct wayland_surface *s); @@ -27,8 +27,7 @@ void wayland_surface_set_title(struct wayland_surface *s, const char *title); void wayland_surface_schedule_redraw(struct wayland_surface *s); bool wayland_surface_present(struct wayland_surface *s, const struct yasl_framebuffer *fb, const struct yasl_damage_list *damage); bool wayland_surface_input_poll(struct wayland_surface *s, struct yasl_input_event *ev); -struct yasl_vector2i wayland_surface_size(const struct wayland_surface *s); -uint32_t wayland_surface_scale_120(const struct wayland_surface *s); +struct yasl_geometry wayland_surface_geometry(const struct wayland_surface *s); uint32_t wayland_surface_state(const struct wayland_surface *s); struct yasl_timing wayland_surface_timing(const struct wayland_surface *s); uint64_t wayland_surface_frame_time_ns(struct wayland_surface *s, uint64_t now); -- cgit v1.2.3