Start work on making xbanan portable

This will allow usage of xbanan on non banan-os platforms. I added a
"native" SDL2 port so it can be used without the window manager
This commit is contained in:
2026-05-30 01:17:54 +03:00
parent b2c642f03d
commit 2ddd67dede
20 changed files with 1508 additions and 879 deletions

15
xbanan/Events.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include "Types.h"
void register_event_fd(int fd, void* data);
void unregister_event_fd(int fd);
void on_window_close_event(WINDOW wid);
void on_window_resize_event(WINDOW wid, uint32_t width, uint32_t height);
void on_window_focus_event(WINDOW wid, bool focused);
void on_window_fullscreen_event(WINDOW wid, bool is_fullscreen);
void on_mouse_move_event(WINDOW wid, int32_t x, int32_t y);
void on_mouse_button_event(WINDOW wid, uint8_t xbutton, bool pressed);
void on_key_event(WINDOW wid, uint8_t scancode, uint8_t xmod, bool pressed);