summaryrefslogtreecommitdiff
path: root/examples/simple_window.c
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 13:44:13 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 13:44:13 +0300
commitc059e3aa7f93da470f052a5cd8ee0d8dc969e679 (patch)
tree63ffa378287ed2c606eda2e940501b9edc3d2b8b /examples/simple_window.c
parent87d0bc50d53dc216efb2b04495f090616318bc5c (diff)
rename and simplification
Diffstat (limited to 'examples/simple_window.c')
-rw-r--r--examples/simple_window.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/simple_window.c b/examples/simple_window.c
index 85db04a..797de3b 100644
--- a/examples/simple_window.c
+++ b/examples/simple_window.c
@@ -120,23 +120,23 @@ int main(void)
return 1;
}
- struct yasl_surface_spec surf_spec = {
+ struct yasl_window_cbs window_cbs = {
+ .draw = on_draw,
+ .configure = on_configure,
+ .close = on_close,
+ };
+ struct yasl_window_spec window_spec = {
.title = "YASL Interactive Window (Pen & Touch Enabled)",
.size = { .x = 640, .y = 480 },
+ .cbs = &window_cbs,
};
- struct yasl_surface *s = yasl_surface_create_toplevel(d, &surf_spec);
+ struct yasl_surface *s = yasl_surface_create_toplevel(d, &window_spec);
if (!s) {
fprintf(stderr, "Failed to create surface\n");
yasl_display_close(d);
return 1;
}
- struct yasl_surface_cbs surf_cbs = {
- .draw = on_draw,
- .configure = on_configure,
- .close = on_close,
- };
- yasl_surface_set_callbacks(s, &surf_cbs, NULL);
yasl_surface_schedule_redraw(s);
printf("=== YASL Demo Running ===\n");