summaryrefslogtreecommitdiff
path: root/src/window/window.c
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-10-27 14:33:25 -0500
committersanine-a <sanine.not@pm.me>2020-10-27 14:33:25 -0500
commit3ef1112d085a101aa55d11ff894f1fb515d29c27 (patch)
tree32095f981cdfedbf6a8791b834f8ab5c82f8646e /src/window/window.c
parentacc262b019206d09ce0d297f7b185862fe432601 (diff)
add mesh lua functions and refactor lua type names
Diffstat (limited to 'src/window/window.c')
-rw-r--r--src/window/window.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/window/window.c b/src/window/window.c
index da1ddc9..263bd45 100644
--- a/src/window/window.c
+++ b/src/window/window.c
@@ -99,14 +99,14 @@ bool honey_setup_window(lua_State* L)
honey_lua_element window_elements[] = {
- { "set_fullscreen", HONEY_FUNC, { .function = honey_window_set_fullscreen } },
- { "set_title", HONEY_FUNC, { .function = honey_window_set_title } },
- { "get_size", HONEY_FUNC, { .function = honey_window_get_size } },
- { "set_size", HONEY_FUNC, { .function = honey_window_set_size } },
- { "resize_bind", HONEY_FUNC, { .function = honey_window_resize_bind } },
- { "resize_unbind", HONEY_FUNC, { .function = honey_window_resize_unbind } },
- { "focus_bind", HONEY_FUNC, { .function = honey_window_focus_bind } },
- { "focus_unbind", HONEY_FUNC, { .function = honey_window_focus_unbind } },
+ { "set_fullscreen", HONEY_FUNCTION, { .function = honey_window_set_fullscreen } },
+ { "set_title", HONEY_FUNCTION, { .function = honey_window_set_title } },
+ { "get_size", HONEY_FUNCTION, { .function = honey_window_get_size } },
+ { "set_size", HONEY_FUNCTION, { .function = honey_window_set_size } },
+ { "resize_bind", HONEY_FUNCTION, { .function = honey_window_resize_bind } },
+ { "resize_unbind", HONEY_FUNCTION, { .function = honey_window_resize_unbind } },
+ { "focus_bind", HONEY_FUNCTION, { .function = honey_window_focus_bind } },
+ { "focus_unbind", HONEY_FUNCTION, { .function = honey_window_focus_unbind } },
};
honey_lua_create_table(L, window_elements, 8);
@@ -117,7 +117,7 @@ bool honey_setup_window(lua_State* L)
int honey_window_set_fullscreen(lua_State* L)
{
- if (!honey_lua_validate_types(L, 1, HONEY_BOOL))
+ if (!honey_lua_validate_types(L, 1, HONEY_BOOLEAN))
lua_error(L);
bool fullscreen = lua_toboolean(L, 1);
@@ -174,7 +174,7 @@ int honey_window_get_size(lua_State* L)
int honey_window_set_size(lua_State* L)
{
- if (!honey_lua_validate_types(L, 2, HONEY_INT, HONEY_INT))
+ if (!honey_lua_validate_types(L, 2, HONEY_INTEGER, HONEY_INTEGER))
lua_error(L);
int width = lua_tointeger(L, 1);
@@ -191,7 +191,7 @@ int honey_window_set_size(lua_State* L)
int honey_window_resize_bind(lua_State* L)
{
- if (!honey_lua_validate_types(L, 2, HONEY_FUNC, HONEY_ANY))
+ if (!honey_lua_validate_types(L, 2, HONEY_FUNCTION, HONEY_ANY))
lua_error(L);
lua_pushvalue(L, 1);
@@ -228,7 +228,7 @@ int honey_window_resize_unbind(lua_State* L)
int honey_window_focus_bind(lua_State* L)
{
- if (!honey_lua_validate_types(L, 2, HONEY_FUNC, HONEY_ANY))
+ if (!honey_lua_validate_types(L, 2, HONEY_FUNCTION, HONEY_ANY))
lua_error(L);
lua_pushvalue(L, 1);