diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 13:44:13 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 13:44:13 +0300 |
| commit | c059e3aa7f93da470f052a5cd8ee0d8dc969e679 (patch) | |
| tree | 63ffa378287ed2c606eda2e940501b9edc3d2b8b /tests | |
| parent | 87d0bc50d53dc216efb2b04495f090616318bc5c (diff) | |
rename and simplification
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/benchmark.c | 16 | ||||
| -rw-r--r-- | tests/cocoa/test_cursor.m | 2 | ||||
| -rw-r--r-- | tests/cocoa/test_keyboard.m | 2 | ||||
| -rw-r--r-- | tests/cocoa/test_native.c | 9 | ||||
| -rw-r--r-- | tests/cocoa/test_ownership.m | 2 | ||||
| -rw-r--r-- | tests/cocoa/test_tablet.m | 2 | ||||
| -rw-r--r-- | tests/common/test_app.c | 2 | ||||
| -rw-r--r-- | tests/common/test_backends.c | 29 | ||||
| -rw-r--r-- | tests/common/test_contracts.c | 12 | ||||
| -rw-r--r-- | tests/common/test_keyboard.c | 5 | ||||
| -rw-r--r-- | tests/common/test_timers.c | 2 | ||||
| -rw-r--r-- | tests/meson.build | 14 | ||||
| -rw-r--r-- | tests/test_api.cpp | 8 | ||||
| -rw-r--r-- | tests/test_lifecycle.c | 2 | ||||
| -rw-r--r-- | tests/wayland/test_app_input.c | 4 | ||||
| -rw-r--r-- | tests/wayland/test_clipboard.c | 2 | ||||
| -rw-r--r-- | tests/wayland/test_cursor.c | 4 | ||||
| -rw-r--r-- | tests/wayland/test_input.c | 2 | ||||
| -rw-r--r-- | tests/wayland/test_keyboard.c | 2 | ||||
| -rw-r--r-- | tests/wayland/test_tablet.c | 2 | ||||
| -rw-r--r-- | tests/x11/test_input.c | 4 | ||||
| -rw-r--r-- | tests/x11/test_tablet.c | 6 | ||||
| -rw-r--r-- | tests/x11/test_tablet_native.c | 4 |
23 files changed, 93 insertions, 44 deletions
diff --git a/tests/benchmark.c b/tests/benchmark.c index eecccc5..8cea45c 100644 --- a/tests/benchmark.c +++ b/tests/benchmark.c @@ -59,7 +59,7 @@ static void bench_surface_lookup(void) { if (d) { for (int i = 0; i < num_surfaces; i++) { - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Benchmark", .size = { .x = 320, .y = 240 }, }; @@ -99,7 +99,7 @@ static void bench_output_follow(void) { struct yasl_display *d = yasl_display_open(NULL, &spec); struct yasl_surface *s = NULL; if (d) { - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Benchmark", .size = { .x = 320, .y = 240 }, }; @@ -209,7 +209,7 @@ static void bench_timers(void) { static void bench_window_cold_create(void) { const int iters = 200; struct yasl_display_spec dspec = { .app_id = "org.yasl.bench.cold" }; - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Benchmark Cold", .size = { .x = 320, .y = 240 }, }; @@ -252,7 +252,7 @@ static void bench_window_warm_create(void) { return; } - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Benchmark Warm", .size = { .x = 320, .y = 240 }, }; @@ -285,7 +285,7 @@ static void bench_window_shutdown_single(void) { return; } - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Benchmark Shutdown Single", .size = { .x = 320, .y = 240 }, }; @@ -321,7 +321,7 @@ static void bench_window_shutdown_all(void) { return; } - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Benchmark Bulk Window", .size = { .x = 320, .y = 240 }, }; @@ -367,7 +367,7 @@ static void bench_window_title_update(void) { return; } - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Initial Title", .size = { .x = 320, .y = 240 }, }; @@ -422,7 +422,7 @@ static void bench_window_resize(void) { uint64_t t0 = get_time_ns(); int count = 0; for (int i = 0; i < iters; i++) { - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Resize Bench", .size = sizes[i % num_sizes], }; diff --git a/tests/cocoa/test_cursor.m b/tests/cocoa/test_cursor.m index 7a328f2..aaca815 100644 --- a/tests/cocoa/test_cursor.m +++ b/tests/cocoa/test_cursor.m @@ -17,7 +17,7 @@ int main(void) @autoreleasepool { struct yasl_display *display = yasl_display_open(NULL, NULL); assert(display); - struct yasl_surface_spec spec = {.title = "Cursor test", .size = {320, 240}}; + struct yasl_window_spec spec = {.title = "Cursor test", .size = {320, 240}}; struct yasl_surface *surface = yasl_surface_create_toplevel(display, &spec); assert(surface); NSWindow *window = (NSWindow *)yasl_surface_get_native_handle(surface); diff --git a/tests/cocoa/test_keyboard.m b/tests/cocoa/test_keyboard.m index 4854065..d6a1336 100644 --- a/tests/cocoa/test_keyboard.m +++ b/tests/cocoa/test_keyboard.m @@ -50,7 +50,7 @@ int main(void) @autoreleasepool { struct yasl_display *display = yasl_display_open(NULL, NULL); assert(display); - struct yasl_surface_spec spec = {.title = "Keyboard test", .size = {320, 240}}; + struct yasl_window_spec spec = {.title = "Keyboard test", .size = {320, 240}}; struct yasl_surface *surface = yasl_surface_create_toplevel(display, &spec); assert(surface); NSWindow *window = (NSWindow *)yasl_surface_get_native_handle(surface); diff --git a/tests/cocoa/test_native.c b/tests/cocoa/test_native.c index 0c101dd..674513d 100644 --- a/tests/cocoa/test_native.c +++ b/tests/cocoa/test_native.c @@ -48,11 +48,14 @@ static void test_window(enum yasl_backend request, bool null_spec) struct state state = {.display = yasl_display_open(NULL, null_spec ? NULL : &spec)}; assert(state.display); assert(yasl_display_backend(state.display) == YASL_BACKEND_COCOA); - struct yasl_surface_spec surface = {.title = "Native backend test", .size = {160, 100}}; + struct yasl_window_cbs callbacks = {.draw = draw}; + struct yasl_window_spec surface = { + .title = "Native backend test", .size = {160, 100}, + .cbs = &callbacks, .ud = &state, + }; state.surface = yasl_surface_create_toplevel(state.display, &surface); assert(state.surface); - struct yasl_surface_cbs callbacks = {.draw = draw}; - yasl_surface_set_callbacks(state.surface, &callbacks, &state); + assert(!state.draws); callbacks.draw = NULL; yasl_surface_schedule_redraw(state.surface); uint64_t deadline = yasl_loop_now_ns() + 3000000000ull; diff --git a/tests/cocoa/test_ownership.m b/tests/cocoa/test_ownership.m index 2b2f52d..4e3bbd6 100644 --- a/tests/cocoa/test_ownership.m +++ b/tests/cocoa/test_ownership.m @@ -10,7 +10,7 @@ int main(void) { struct yasl_display *d = yasl_display_open(NULL, NULL); assert(d); - struct yasl_surface_spec spec = {.title = "Ownership test", .size = {160, 100}}; + struct yasl_window_spec spec = {.title = "Ownership test", .size = {160, 100}}; struct yasl_surface *s = yasl_surface_create_toplevel(d, &spec); assert(s); assert(yasl_display_get_native_handle(d) == (void *)NSApp); diff --git a/tests/cocoa/test_tablet.m b/tests/cocoa/test_tablet.m index f1489a1..ed6dc64 100644 --- a/tests/cocoa/test_tablet.m +++ b/tests/cocoa/test_tablet.m @@ -49,7 +49,7 @@ int main(void) @autoreleasepool { struct yasl_display *display = yasl_display_open(NULL, NULL); assert(display && (yasl_display_caps(display) & YASL_CAP_TABLET)); - struct yasl_surface_spec spec = {.title = "Tablet test", .size = {320, 240}}; + struct yasl_window_spec spec = {.title = "Tablet test", .size = {320, 240}}; struct yasl_surface *surface = yasl_surface_create_toplevel(display, &spec); assert(surface); NSWindow *window = (NSWindow *)yasl_surface_get_native_handle(surface); diff --git a/tests/common/test_app.c b/tests/common/test_app.c index 661620c..23c9a93 100644 --- a/tests/common/test_app.c +++ b/tests/common/test_app.c @@ -43,7 +43,7 @@ static int on_init(void *ud, struct yasl_display *d) state->display = d; state->init_called = true; - struct yasl_surface_spec spec = { + struct yasl_window_spec spec = { .title = "App Runner Test", .size = {320, 240}, }; diff --git a/tests/common/test_backends.c b/tests/common/test_backends.c index cf5b1f9..28f2f52 100644 --- a/tests/common/test_backends.c +++ b/tests/common/test_backends.c @@ -121,13 +121,13 @@ static void close_window(struct yasl_surface *s, void *ud) w->surface = NULL; } -static const struct yasl_surface_cbs callbacks = { +static const struct yasl_window_cbs callbacks = { .draw = draw, .configure = configure, .close = close_window, }; static void attach(struct window *w) { - struct yasl_surface_cbs temporary = callbacks; + struct yasl_window_cbs temporary = callbacks; yasl_surface_set_callbacks(w->surface, &temporary, w); temporary.draw = NULL; temporary.configure = NULL; @@ -136,7 +136,7 @@ static void attach(struct window *w) static struct window create(struct yasl_display *d) { - struct yasl_surface_spec spec = {.title = "Backend test", .size = {160, 100}}; + struct yasl_window_spec spec = {.title = "Backend test", .size = {160, 100}}; struct yasl_surface *s = yasl_surface_create_toplevel(d, &spec); assert(s); assert(yasl_display_get_native_handle(d)); @@ -146,6 +146,27 @@ static struct window create(struct yasl_display *d) return (struct window){.surface = s, .display = d}; } +static void test_window_spec(struct yasl_loop *loop, struct yasl_display *d) +{ + struct window w = {.display = d, .destroy_on_draw = true}; + { + struct yasl_window_cbs temporary = callbacks; + struct yasl_window_spec spec = { + .title = "Callbacks at creation", .size = {160, 100}, + .cbs = &temporary, .ud = &w, + }; + w.surface = yasl_surface_create_toplevel(d, &spec); + assert(w.surface); + assert(!w.draws && !w.configures && !w.closes); + /* Neither the spec nor its callback table needs to outlive creation. */ + memset(&temporary, 0, sizeof(temporary)); + memset(&spec, 0, sizeof(spec)); + } + yasl_surface_schedule_redraw(w.surface); + pump(loop, d, NULL); + assert(w.draws == 1 && !w.surface); +} + static void x11_behavior(struct yasl_loop *loop, struct yasl_display *d, struct window *w) { Display *native = yasl_display_get_native_handle(d); @@ -371,6 +392,8 @@ int main(int argc, char **argv) spec.backend = YASL_BACKEND_X11; struct yasl_display *b = yasl_display_open(loop, &spec); assert(a && b); + test_window_spec(loop, a); + test_window_spec(loop, b); struct window wa = create(a), wb = create(b); #if YASL_HAS_WAYLAND assert(yasl_wayland_display_get_wl_display(a) != NULL); diff --git a/tests/common/test_contracts.c b/tests/common/test_contracts.c index 8580dd6..ac0065c 100644 --- a/tests/common/test_contracts.c +++ b/tests/common/test_contracts.c @@ -114,7 +114,7 @@ static void copy(struct yasl_display *d, enum yasl_selection sel, const char *te { (void)d; (void)sel; (void)text; copies++; } static void paste(struct yasl_display *d, enum yasl_selection sel, struct yasl_surface *s) { (void)d; (void)sel; (void)s; pastes++; } -static struct yasl_surface *create(struct yasl_display *d, const struct yasl_surface_spec *spec, void *graphics_device) +static struct yasl_surface *create(struct yasl_display *d, const struct yasl_window_spec *spec, void *graphics_device) { (void)d; (void)spec; (void)graphics_device; creates++; return NULL; } static void *native_device; @@ -123,7 +123,7 @@ static struct yasl_surface native_surface; static uint32_t native_caps(const struct yasl_display *d) { (void)d; return YASL_CAP_NATIVE_GRAPHICS; } static struct yasl_surface *native_create(struct yasl_display *d, - const struct yasl_surface_spec *spec, void *device) + const struct yasl_window_spec *spec, void *device) { (void)spec; native_device = device; @@ -144,7 +144,7 @@ static void test_native(void) const struct yasl_backend_ops ops = {.display_caps = native_caps, .surface_create_toplevel = native_create, .surface_get_native_frame = native_frame}; struct yasl_display d = {.ops = &ops}; - struct yasl_surface_spec spec = {.size = {100, 80}}; + struct yasl_window_spec spec = {.size = {100, 80}}; assert(yasl_surface_create_toplevel(&d, &spec) == &native_surface); assert(!native_device); assert(yasl_surface_create_native(&d, &spec, &d) == &native_surface); @@ -209,7 +209,7 @@ static void test_validation(void) yasl_display_copy(&d, YASL_CLIPBOARD, "yes"); yasl_display_paste(&d, YASL_CLIPBOARD, &s); assert(copies == 1 && pastes == 1); - struct yasl_surface_spec spec = {.size = {100, 80}}; + struct yasl_window_spec spec = {.size = {100, 80}}; assert(!yasl_surface_create_native(&d, &spec, &d) && errno == ENOTSUP); assert(!yasl_surface_create_native(&d, &spec, NULL) && errno == EINVAL); spec.size.x = 0; @@ -257,7 +257,7 @@ static int dispatch_failure(struct yasl_display *d, int timeout) { (void)d; (void)timeout; return -1; } static struct yasl_surface *create_failure(struct yasl_display *d, - const struct yasl_surface_spec *spec, void *device) + const struct yasl_window_spec *spec, void *device) { (void)d; (void)spec; (void)device; return NULL; } static int drag_starts; @@ -310,7 +310,7 @@ static void test_errors(void) d.ops = &ops; errno = ERANGE; assert(yasl_display_dispatch(&d, 0) == -1 && errno == EIO); - struct yasl_surface_spec toplevel = {.size = {120, 80}}; + struct yasl_window_spec toplevel = {.size = {120, 80}}; errno = ERANGE; assert(!yasl_surface_create_toplevel(&d, &toplevel) && errno == ENODEV); assert(yasl_display_drag_start(&d, &s, NULL, NULL, NULL)); diff --git a/tests/common/test_keyboard.c b/tests/common/test_keyboard.c index 5a7f18e..f2fc8f2 100644 --- a/tests/common/test_keyboard.c +++ b/tests/common/test_keyboard.c @@ -1,5 +1,8 @@ #include "common/keyboard.h" -#include "cocoa/keycodes.h" +#include "platform/wayland/keymap.h" +#include "platform/x11/keymap.h" +#include "platform/cocoa/keymap.h" +#include "platform/cocoa/keycodes.h" #include <assert.h> int main(void) diff --git a/tests/common/test_timers.c b/tests/common/test_timers.c index 4e95c5a..f321b2c 100644 --- a/tests/common/test_timers.c +++ b/tests/common/test_timers.c @@ -234,7 +234,7 @@ static void test_surface_timers(void) assert(yasl_display_loop(d) == loop); - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Timer Surface", .size = { .x = 160, .y = 100 }, }; diff --git a/tests/meson.build b/tests/meson.build index c06fcca..26bb5cb 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -79,7 +79,19 @@ contracts_test = executable( ) test('contracts', contracts_test) -keyboard_test = executable('yasl-keyboard-test', 'common/test_keyboard.c', +# Exercise the SDK-independent mappings even when their backend is disabled. +# Enabled backends already provide their mapping through yasl_dep. +keyboard_test_sources = files('common/test_keyboard.c') +if not has_wayland + keyboard_test_sources += files('../src/platform/wayland/keymap.c') +endif +if not has_x11 + keyboard_test_sources += files('../src/platform/x11/keymap.c') +endif +if not has_cocoa + keyboard_test_sources += files('../src/platform/cocoa/keymap.c') +endif +keyboard_test = executable('yasl-keyboard-test', keyboard_test_sources, include_directories: inc, dependencies: yasl_dep, ) test('keyboard', keyboard_test) diff --git a/tests/test_api.cpp b/tests/test_api.cpp index 129a41e..c45932a 100644 --- a/tests/test_api.cpp +++ b/tests/test_api.cpp @@ -15,6 +15,14 @@ int main() { + yasl_window_cbs callbacks{}; + yasl_window_spec window{}; + window.size = {640, 480}; + window.cbs = &callbacks; + window.ud = &window; + assert(!yasl_surface_create_toplevel(nullptr, &window)); + assert(!yasl_surface_create_native(nullptr, &window, &window)); + yasl_timing timing = yasl_surface_timing(nullptr); assert(timing.source == YASL_TIMING_UNKNOWN); assert(yasl_scale_to_device(10.0, 240) == 20); diff --git a/tests/test_lifecycle.c b/tests/test_lifecycle.c index d04662f..c54abd0 100644 --- a/tests/test_lifecycle.c +++ b/tests/test_lifecycle.c @@ -47,7 +47,7 @@ static void test_display_lifecycle_standalone(void) struct yasl_display *d = yasl_display_open(NULL, &spec); if (!d) return; /* Headless CI without Wayland */ - struct yasl_surface_spec sspec = { + struct yasl_window_spec sspec = { .title = "Test Window", .size = { .x = 320, .y = 240 }, }; diff --git a/tests/wayland/test_app_input.c b/tests/wayland/test_app_input.c index 24b8b64..2cacb5e 100644 --- a/tests/wayland/test_app_input.c +++ b/tests/wayland/test_app_input.c @@ -1,7 +1,7 @@ /* An input event callback that destroys its own surface. The app runner * must not touch the surface's entry after the callback, and must not * deliver the surface's remaining input. Needs a Wayland compositor. */ -#include "wayland/internal.h" +#include "platform/wayland/internal.h" #include "yasl/app.h" #include <assert.h> @@ -25,7 +25,7 @@ static int on_init(void *ud, struct yasl_display *d) { (void)ud; struct yasl_surface *s = yasl_surface_create_toplevel(d, - &(struct yasl_surface_spec){ .title = "App Input Test", .size = {64, 64} }); + &(struct yasl_window_spec){ .title = "App Input Test", .size = {64, 64} }); assert(s); push_key(s); push_key(s); diff --git a/tests/wayland/test_clipboard.c b/tests/wayland/test_clipboard.c index 553e84d..825564e 100644 --- a/tests/wayland/test_clipboard.c +++ b/tests/wayland/test_clipboard.c @@ -1,4 +1,4 @@ -#include "../../src/wayland/clipboard.c" +#include "../../src/platform/wayland/clipboard.c" #include <assert.h> struct received { int count; size_t len; char text[32]; }; diff --git a/tests/wayland/test_cursor.c b/tests/wayland/test_cursor.c index f7a7ba7..a4a522e 100644 --- a/tests/wayland/test_cursor.c +++ b/tests/wayland/test_cursor.c @@ -1,4 +1,4 @@ -#include "wayland/internal.h" +#include "platform/wayland/internal.h" #include <assert.h> /* Record cursor requests without a compositor or tablet hardware. */ @@ -47,7 +47,7 @@ static uint32_t pointer_version(struct wl_pointer *pointer) #define zwp_tablet_tool_v2_set_cursor tool_cursor #define wp_cursor_shape_device_v1_set_shape cursor_shape #define wl_pointer_get_version pointer_version -#include "../../src/wayland/pointer.c" +#include "../../src/platform/wayland/pointer.c" int main(void) { diff --git a/tests/wayland/test_input.c b/tests/wayland/test_input.c index 7b91a9d..feff2f3 100644 --- a/tests/wayland/test_input.c +++ b/tests/wayland/test_input.c @@ -1,4 +1,4 @@ -#include "wayland/internal.h" +#include "platform/wayland/internal.h" #include <assert.h> static void test_popup_bounds(void) diff --git a/tests/wayland/test_keyboard.c b/tests/wayland/test_keyboard.c index dbe0a94..6921322 100644 --- a/tests/wayland/test_keyboard.c +++ b/tests/wayland/test_keyboard.c @@ -1,4 +1,4 @@ -#include "../../src/wayland/keyboard.c" +#include "../../src/platform/wayland/keyboard.c" #include <assert.h> static struct yasl_input_event next(struct wayland_surface *w, enum yasl_input_kind kind) diff --git a/tests/wayland/test_tablet.c b/tests/wayland/test_tablet.c index f8982b0..8723df2 100644 --- a/tests/wayland/test_tablet.c +++ b/tests/wayland/test_tablet.c @@ -1,4 +1,4 @@ -#include "../../src/wayland/pointer.c" +#include "../../src/platform/wayland/pointer.c" #include <assert.h> static struct yasl_mouse_event next(struct wayland_surface *surface) diff --git a/tests/x11/test_input.c b/tests/x11/test_input.c index af45e76..80a6451 100644 --- a/tests/x11/test_input.c +++ b/tests/x11/test_input.c @@ -1,6 +1,6 @@ /* An isolated real X server supplies the keymap; disabling this surface's XIC * deliberately exercises text insertion when no input method is available. */ -#include "../../src/x11/window.c" +#include "../../src/platform/x11/window.c" static void check_selection_encoding(struct x11_display *d, struct x11_surface *s) { @@ -71,7 +71,7 @@ int main(void) struct yasl_display *base = yasl_display_open(NULL, &ds); assert(base); struct x11_display *d = (struct x11_display *)base; - struct yasl_surface_spec spec = {.title = "Keyboard fallback", .size = {100, 100}}; + struct yasl_window_spec spec = {.title = "Keyboard fallback", .size = {100, 100}}; struct yasl_surface *surface = yasl_surface_create_toplevel(base, &spec); assert(surface); struct x11_surface *s = (struct x11_surface *)surface; diff --git a/tests/x11/test_tablet.c b/tests/x11/test_tablet.c index ba815cb..12c183e 100644 --- a/tests/x11/test_tablet.c +++ b/tests/x11/test_tablet.c @@ -1,5 +1,5 @@ /* Exercise native XI2 samples through the backend and public input queue. */ -#include "../../src/x11/window.c" +#include "../../src/platform/x11/window.c" static struct yasl_mouse_event next(struct x11_surface *surface) { @@ -113,8 +113,8 @@ static void test_x11_gaps(struct x11_display *d, struct x11_surface *s) struct drag_test_recorder rec1 = {0}; struct drag_test_recorder rec2 = {0}; - struct yasl_surface_cbs cbs1 = {.drag = on_test_drag}; - struct yasl_surface_cbs cbs2 = {.drag = on_test_drag}; + struct yasl_window_cbs cbs1 = {.drag = on_test_drag}; + struct yasl_window_cbs cbs2 = {.drag = on_test_drag}; set_callbacks(&s->base, &cbs1, &rec1); set_callbacks(&s2.base, &cbs2, &rec2); diff --git a/tests/x11/test_tablet_native.c b/tests/x11/test_tablet_native.c index 0ddb6d8..6e7eeb4 100644 --- a/tests/x11/test_tablet_native.c +++ b/tests/x11/test_tablet_native.c @@ -108,10 +108,10 @@ int main(int argc, char **argv) struct yasl_display_spec ds = {.backend = YASL_BACKEND_X11}; struct yasl_display *display = yasl_display_open(NULL, &ds); assert(display && (yasl_display_caps(display) & YASL_CAP_TABLET)); - struct yasl_surface_spec ss = {.title = "YASL native pressure test", .size = {500, 400}}; + struct yasl_window_spec ss = {.title = "YASL native pressure test", .size = {500, 400}}; struct yasl_surface *surface = yasl_surface_create_toplevel(display, &ss); assert(surface); - struct yasl_surface_cbs cbs = {.draw = draw, .configure = configure}; + struct yasl_window_cbs cbs = {.draw = draw, .configure = configure}; yasl_surface_set_callbacks(surface, &cbs, &app); yasl_surface_schedule_redraw(surface); Display *x = yasl_display_get_native_handle(display); |
