aboutsummaryrefslogtreecommitdiff
path: root/src/types.h
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-09-19 17:47:33 +1000
committerallusive-dev <[email protected]>2023-09-19 17:47:33 +1000
commita93aba600b1c5d019b680b9f4ff3fa85d5d43a60 (patch)
tree77f8152222655657472a70e0bfa413a0495dd555 /src/types.h
parentreset (diff)
downloadcompfy-a93aba600b1c5d019b680b9f4ff3fa85d5d43a60.tar.xz
compfy-a93aba600b1c5d019b680b9f4ff3fa85d5d43a60.zip
Fixed broken files/code and other errors
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
new file mode 100644
index 0000000..c8d747b
--- /dev/null
+++ b/src/types.h
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: MPL-2.0
+// Copyright (c) 2018 Yuxuan Shui <[email protected]>
+
+#pragma once
+
+/// Some common types
+
+#include <stdint.h>
+
+/// Enumeration type to represent switches.
+typedef enum {
+ OFF = 0, // false
+ ON, // true
+ UNSET
+} switch_t;
+
+/// A structure representing margins around a rectangle.
+typedef struct {
+ int top;
+ int left;
+ int bottom;
+ int right;
+} margin_t;
+
+struct color {
+ double red, green, blue, alpha;
+};
+
+typedef uint32_t opacity_t;
+
+#define MARGIN_INIT \
+ { 0, 0, 0, 0 }