diff options
| author | Allusive_ <[email protected]> | 2023-08-01 09:00:18 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-01 09:00:18 +1000 |
| commit | 0147e7dd165f837662a480938e2083a5ac707586 (patch) | |
| tree | 3e38624c86c7119703cddb524ac01278491c8a3f /src/types.h | |
| parent | Add files via upload (diff) | |
| download | compfy-0147e7dd165f837662a480938e2083a5ac707586.tar.xz compfy-0147e7dd165f837662a480938e2083a5ac707586.zip | |
Add files via upload
Diffstat (limited to 'src/types.h')
| -rw-r--r-- | src/types.h | 32 |
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 } |