aboutsummaryrefslogtreecommitdiff
path: root/src/bitflags.h
diff options
context:
space:
mode:
authorThijs <thijs@thijsschreijer.nl>2023-11-16 09:09:54 +0100
committerThijs Schreijer <thijs@thijsschreijer.nl>2024-04-30 09:28:01 +0200
commitbd994461ef7c2553da9a6945c685152bad50eb8f (patch)
tree28adc32712f00a200a34357e731a570bf1a359dc /src/bitflags.h
parent47c24eed0191f8f72646be63dee94ac2b35eb062 (diff)
downloadluasystem-bd994461ef7c2553da9a6945c685152bad50eb8f.tar.gz
luasystem-bd994461ef7c2553da9a6945c685152bad50eb8f.tar.bz2
luasystem-bd994461ef7c2553da9a6945c685152bad50eb8f.zip
feat(term): getting/setting terminal config flags
Diffstat (limited to 'src/bitflags.h')
-rw-r--r--src/bitflags.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bitflags.h b/src/bitflags.h
new file mode 100644
index 0000000..0e47246
--- /dev/null
+++ b/src/bitflags.h
@@ -0,0 +1,21 @@
1#ifndef LSBITFLAGS_H
2#define LSBITFLAGS_H
3
4#include <lua.h>
5#include "compat.h"
6#include <lauxlib.h>
7#include <stdlib.h>
8
9// type used to store the bitflags
10#define LSBF_BITFLAG lua_Integer
11
12// Validates that the given index is a bitflag object and returns its value.
13// If the index is not a bitflag object, a Lua error is raised.
14// The value will be left on the stack.
15LSBF_BITFLAG lsbf_checkbitflags(lua_State *L, int index);
16
17// Pushes a new bitflag object with the given value onto the stack.
18// Might raise a Lua error if memory allocation fails.
19void lsbf_pushbitflags(lua_State *L, LSBF_BITFLAG value);
20
21#endif