wayland: Move initialization to the Rust side

This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there.

The second benefit is that it allows outputs to become part of new state management.
This commit is contained in:
Dorota Czaplejewicz
2022-01-23 17:12:33 +00:00
parent 1b72cbdfaa
commit f4f44a49ae
9 changed files with 148 additions and 91 deletions

View File

@ -4,6 +4,12 @@
struct squeek_wayland *squeek_wayland = NULL;
void squeek_wayland_init_global(struct squeek_outputs *outputs) {
struct squeek_wayland *wayland = {0};
wayland->outputs = outputs;
squeek_wayland = wayland;
}
// The following functions only exist
// to create linkable symbols out of inline functions,
// because those are not directly callable from Rust