diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2026-01-14 00:09:26 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2026-01-14 00:11:37 -0700 |
| commit | f216280bc0fdc4a6f00187dba1d1ddc22b54097d (patch) | |
| tree | 64637e9df49011b3ec81738b4347ab7a97e88980 /cross/src | |
| parent | cc6302ee2073d1ea40608abb77ca6019feca4a2a (diff) | |
| download | montis-main.tar.gz montis-main.tar.bz2 montis-main.zip | |
It makes a bit more sense.
Diffstat (limited to 'cross/src')
| -rw-r--r-- | cross/src/runtime_requests.c | 44 | ||||
| -rw-r--r-- | cross/src/util.c | 16 |
2 files changed, 30 insertions, 30 deletions
diff --git a/cross/src/runtime_requests.c b/cross/src/runtime_requests.c index adb2b2f..cf0955c 100644 --- a/cross/src/runtime_requests.c +++ b/cross/src/runtime_requests.c @@ -5,26 +5,26 @@ #include <stdlib.h> #include <string.h> -static int soul_hot_reload_same_state_action_(soul_t *soul, void *ignore) +static int world_hot_reload_same_state_action_(world_t *world, void *ignore) { (void)ignore; - return soul_hot_reload_same_state(soul); + return world_hot_reload_same_state(world); } void montis_do_request_hot_reload(void *plugv) { - soul_t *soul = plugv; + world_t *world = plugv; - size_t n = soul->n_requested_actions++; + size_t n = world->n_requested_actions++; if (n < MAX_QUEUED_ACTIONS) { - soul->requested_actions[n].action = soul_hot_reload_same_state_action_; - soul->requested_actions[n].arg_dtor = NULL; + world->requested_actions[n].action = world_hot_reload_same_state_action_; + world->requested_actions[n].arg_dtor = NULL; } } -static int soul_do_log(soul_t *soul, void *chrs) +static int world_do_log(world_t *world, void *chrs) { - (void)soul; + (void)world; char *str = chrs; puts(str); return 0; @@ -32,17 +32,17 @@ static int soul_do_log(soul_t *soul, void *chrs) void montis_do_request_log(void *plugv, const char *str) { - soul_t *soul = plugv; + world_t *world = plugv; - size_t n = soul->n_requested_actions++; + size_t n = world->n_requested_actions++; if (n < MAX_QUEUED_ACTIONS) { - soul->requested_actions[n].action = soul_do_log; - soul->requested_actions[n].str_arg = strdup(str); - soul->requested_actions[n].arg_dtor = free; + world->requested_actions[n].action = world_do_log; + world->requested_actions[n].str_arg = strdup(str); + world->requested_actions[n].arg_dtor = free; } } -static int arksoul_do_exit(void *plugv, int ec) +static int arkworld_do_exit(void *plugv, int ec) { (void)plugv; exit(ec); @@ -51,19 +51,19 @@ static int arksoul_do_exit(void *plugv, int ec) void montis_do_request_exit(void *plugv, int ec) { - soul_t *soul = plugv; + world_t *world = plugv; - size_t n = soul->n_requested_actions++; + size_t n = world->n_requested_actions++; if (n < MAX_QUEUED_ACTIONS) { - soul->requested_actions[n].action = - (int (*)(soul_t *, void *))arksoul_do_exit; - soul->requested_actions[n].int_arg = ec; - soul->requested_actions[n].arg_dtor = NULL; + world->requested_actions[n].action = + (int (*)(world_t *, void *))arkworld_do_exit; + world->requested_actions[n].int_arg = ec; + world->requested_actions[n].arg_dtor = NULL; } } -void *arksoul_get_seat(void *ctx) +void *arkworld_get_seat(void *ctx) { - struct montis_server *server = wl_container_of(ctx, server, soul); + struct montis_server *server = wl_container_of(ctx, server, world); return server->seat; } diff --git a/cross/src/util.c b/cross/src/util.c index 0c02dfe..6497d89 100644 --- a/cross/src/util.c +++ b/cross/src/util.c @@ -6,7 +6,7 @@ static struct montis_server *server_from_ctx(void *ctx) { - struct montis_server *server = wl_container_of(ctx, server, soul); + struct montis_server *server = wl_container_of(ctx, server, world); return server; } @@ -35,7 +35,7 @@ static struct montis_toplevel *toplevel_at(struct montis_server *server, return tree ? tree->node.data : NULL; } -void *arksoul_toplevel_at(void *ctx, double lx, double ly) +void *arkworld_toplevel_at(void *ctx, double lx, double ly) { if (!ctx) { return NULL; @@ -44,7 +44,7 @@ void *arksoul_toplevel_at(void *ctx, double lx, double ly) return toplevel_at(server, lx, ly); } -void arksoul_get_toplevel_position(void *toplevel, double *x, double *y) +void arkworld_get_toplevel_position(void *toplevel, double *x, double *y) { if (!toplevel || !x || !y) { return; @@ -54,7 +54,7 @@ void arksoul_get_toplevel_position(void *toplevel, double *x, double *y) *y = tl->scene_tree->node.y; } -void arksoul_set_toplevel_position(void *toplevel, double x, double y) +void arkworld_set_toplevel_position(void *toplevel, double x, double y) { if (!toplevel) { return; @@ -63,7 +63,7 @@ void arksoul_set_toplevel_position(void *toplevel, double x, double y) wlr_scene_node_set_position(&tl->scene_tree->node, (int)x, (int)y); } -void arksoul_get_toplevel_geometry(void *toplevel, double *x, double *y, +void arkworld_get_toplevel_geometry(void *toplevel, double *x, double *y, double *w, double *h) { if (!toplevel || !x || !y || !w || !h) { @@ -78,7 +78,7 @@ void arksoul_get_toplevel_geometry(void *toplevel, double *x, double *y, *h = geo_box.height; } -void arksoul_set_toplevel_geometry(void *toplevel, double x, double y, +void arkworld_set_toplevel_geometry(void *toplevel, double x, double y, double w, double h) { if (!toplevel) { @@ -89,7 +89,7 @@ void arksoul_set_toplevel_geometry(void *toplevel, double x, double y, wlr_xdg_toplevel_set_size(tl->xdg_toplevel, (int)w, (int)h); } -void arksoul_warp_cursor(void *ctx, double lx, double ly) +void arkworld_warp_cursor(void *ctx, double lx, double ly) { if (!ctx) { return; @@ -98,7 +98,7 @@ void arksoul_warp_cursor(void *ctx, double lx, double ly) wlr_cursor_warp(server->cursor, NULL, lx, ly); } -void arksoul_focus_toplevel(void *toplevel) +void arkworld_focus_toplevel(void *toplevel) { if (!toplevel) { return; |