summaryrefslogtreecommitdiff
path: root/src/main/engine/ui
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-19 15:57:13 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-19 15:58:04 +0200
commit73195399de0a6b5de27a838bba2daedc8ff2ae65 (patch)
tree4b2906c08d94af5eda8e4d778b3d973ff78e443d /src/main/engine/ui
parentbc803cb0a6d7095a45eec4413c55dd113c0eb659 (diff)
downloadtris-73195399de0a6b5de27a838bba2daedc8ff2ae65.tar.gz
tris-73195399de0a6b5de27a838bba2daedc8ff2ae65.zip
Add reference to UI in the Engine structure
Diffstat (limited to 'src/main/engine/ui')
-rw-r--r--src/main/engine/ui/types.h28
-rw-r--r--src/main/engine/ui/ui.h5
-rw-r--r--src/main/engine/ui/x11/ui.c2
3 files changed, 30 insertions, 5 deletions
diff --git a/src/main/engine/ui/types.h b/src/main/engine/ui/types.h
new file mode 100644
index 0000000..dafefd9
--- /dev/null
+++ b/src/main/engine/ui/types.h
@@ -0,0 +1,28 @@
+/*-
+* Copyright (C) 2025 Alessandro Iezzi <aiezzi AT alessandroiezzi PERIOD it>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __TYPES_H__
+#define __TYPES_H__
+
+typedef struct UI {
+ int width;
+ int height;
+} UI;
+
+#endif /* __TYPES_H__ */
diff --git a/src/main/engine/ui/ui.h b/src/main/engine/ui/ui.h
index 2cb8d32..03d5913 100644
--- a/src/main/engine/ui/ui.h
+++ b/src/main/engine/ui/ui.h
@@ -20,10 +20,7 @@
#ifndef __UI_H__
#define __UI_H__
-typedef struct UI {
- int width;
- int height;
-} UI;
+#include "types.h"
UI *ui_init(int w, int h);
void ui_loop(void);
diff --git a/src/main/engine/ui/x11/ui.c b/src/main/engine/ui/x11/ui.c
index 89004c8..98a94b1 100644
--- a/src/main/engine/ui/x11/ui.c
+++ b/src/main/engine/ui/x11/ui.c
@@ -25,7 +25,7 @@
#include <unistd.h>
#include <time.h>
#include "../../../util.h"
-#include "../ui.h"
+#include "../types.h"
static Display *display;
static Window window;