Пример #1
0
static int l_window_hide(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutSetWindow(win->id);
	glutHideWindow();
	return 0;
}
Пример #2
0
static int l_window_iconify(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutSetWindow(win->id);
	glutIconifyWindow();
	return 0;
}
Пример #3
0
static int l_window_fullscreen(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutSetWindow(win->id);
	glutFullScreen();
	return 0;
}
Пример #4
0
static int l_window_show(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutSetWindow(win->id);
	glutShowWindow();
	return 0;
}
Пример #5
0
static int l_window_swap(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutSetWindow(win->id);
	glutSwapBuffers();
	return 0;
}
Пример #6
0
static int l_window_redraw(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutSetWindow(win->id);
	glutPostRedisplay();
	return 0;
}
Пример #7
0
static int l_window_destroy(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	glutDestroyWindow(win->id);
	win->id = -1;
	return 0;
}
Пример #8
0
static int l_window___gc(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	if (win->id > -1)
		l_window_destroy(L);
	return 0;
}
Пример #9
0
static int l_window_cursor(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	int cursor = luaL_checkinteger(L, 2);
	glutSetWindow(win->id);
	glutSetCursor(cursor);
	return 0;
}
Пример #10
0
static int l_window_title(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	const char* title = luaL_checkstring(L, 2);

	glutSetWindow(win->id);
	glutSetWindowTitle(title);
	return 0;
}
Пример #11
0
static int l_window_resize(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	int w = luaL_checkinteger(L, 2);
	int h = luaL_checkinteger(L, 3);

	glutSetWindow(win->id);
	glutReshapeWindow(w,h);
	return 0;
}
Пример #12
0
static int l_window_position(lua_State* L)
{
	Window* win = l_checkWindow(L, 1);
	int x = luaL_checkinteger(L, 2);
	int y = luaL_checkinteger(L, 3);

	glutSetWindow(win->id);
	glutPositionWindow(x, y);
	return 0;
}
Пример #13
0
static int l_window_free(lua_State *L)
{
	SDL_Window	*window;

	window = l_checkWindow(L, 1);

	SDL_DestroyWindow(window);

	return 0;
}