From a93aba600b1c5d019b680b9f4ff3fa85d5d43a60 Mon Sep 17 00:00:00 2001 From: allusive-dev Date: Tue, 19 Sep 2023 17:47:33 +1000 Subject: Fixed broken files/code and other errors --- src/types.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/types.h (limited to 'src/types.h') 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 + +#pragma once + +/// Some common types + +#include + +/// 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 } -- cgit v1.2.3