diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2026-03-02 18:31:39 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2026-03-02 18:31:39 +0100 |
| commit | 651c32bad4f336eee9cf423eec5f7b1057a58adf (patch) | |
| tree | 7d265138d8048027044fdc45fedc52a298e79049 /lib/CWayland | |
| parent | 44796b1b1493a67dcdfec8f9846dce14e7ecf4a4 (diff) | |
build: link against libwayland
Diffstat (limited to 'lib/CWayland')
| -rw-r--r-- | lib/CWayland/CWayland.c | 7 | ||||
| -rw-r--r-- | lib/CWayland/CWayland.h | 20 |
2 files changed, 25 insertions, 2 deletions
diff --git a/lib/CWayland/CWayland.c b/lib/CWayland/CWayland.c index 2b9bf6d..10c1cc2 100644 --- a/lib/CWayland/CWayland.c +++ b/lib/CWayland/CWayland.c @@ -1,6 +1,9 @@ -#include <lean/lean.h> +#include "CWayland.h" +#include <wayland-client.h> lean_obj_res lean_test_answer() { - return lean_io_result_mk_ok(lean_int_to_int(42)); + struct wl_display* disp = wl_display_connect(NULL); + wl_fixed_t fixed = wl_fixed_from_double(42.0); + return lean_io_result_mk_ok(lean_int_to_int(wl_fixed_to_int(fixed))); }
\ No newline at end of file diff --git a/lib/CWayland/CWayland.h b/lib/CWayland/CWayland.h new file mode 100644 index 0000000..42bc5ee --- /dev/null +++ b/lib/CWayland/CWayland.h @@ -0,0 +1,20 @@ +#pragma once + +#include <lean/lean.h> + +// Display + +lean_obj_res waylean_display_new(void); + +// Event Loop + +lean_obj_res waylean_event_loop_new (void); +lean_obj_res waylean_event_loop_add_display(lean_obj_arg event_loop, + lean_obj_arg display); +lean_obj_res waylean_event_loop_add_timer (lean_obj_arg event_loop, + unsigned delay_ms, + lean_obj_arg message); +lean_obj_res waylean_event_loop_add_signal (lean_obj_arg event_loop, + int signum, + lean_obj_arg message); +lean_obj_res waylean_event_loop_poll (lean_obj_arg event_loop);
\ No newline at end of file |
