From ffa6d38ceb4a29134f00d4a51947f3b359435661 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Sun, 18 May 2025 18:33:16 +0200 Subject: Move UI inside engine --- src/main/engine/ui/ui.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/engine/ui/ui.h (limited to 'src/main/engine/ui/ui.h') diff --git a/src/main/engine/ui/ui.h b/src/main/engine/ui/ui.h new file mode 100644 index 0000000..06cd515 --- /dev/null +++ b/src/main/engine/ui/ui.h @@ -0,0 +1,30 @@ +/*- + * Copyright (C) 2025 Alessandro Iezzi + * + * This file is part of Tris Game. + * + * Tris Game is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tris Game is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tris Game. If not, see . + */ + +#ifndef __UI_H__ +#define __UI_H__ + +void ui_init(int w, int h); +void ui_loop(void); +void ui_set_title(const char *title); +void ui_set_loop_listener(void (*event)()); +void ui_set_mouse_press_listener(void (*event)()); +void ui_set_generic_listener(void (*generic_event)(int type)); + +#endif /* __UI_H__ */ -- cgit v1.2.3