#include "lua_include.h"
#include "global.h"
#include "../gif.h"
Go to the source code of this file.
◆ GifCreate()
| int GifCreate |
( |
lua_State * | L | ) |
|
Create a new GIF object.
- Parameters
-
| L | Lua state; expects arguments: 1: path (const char*) – path to the GIF file, 2: x (int) – X position on screen, 3: y (int) – Y position on screen. |
- Returns
- int Pushes 1 userdata to Lua stack: a LuaGif object.
- Note
- Allocates memory for a new Gif instance and wraps it as Lua userdata.
◆ GifPlayAsync()
| int GifPlayAsync |
( |
lua_State * | L | ) |
|
Play the GIF asynchronously.
- Parameters
-
| L | Lua state; expects argument: 1: LuaGif userdata created by GifCreate. |
- Returns
- int Returns 0; starts GIF playback in async mode.
- Note
- Call this on a LuaGif object to start animation without blocking the main thread.
◆ GifStop()
| int GifStop |
( |
lua_State * | L | ) |
|
Stop the GIF playback.
- Parameters
-
| L | Lua state; expects argument: 1: LuaGif userdata created by GifCreate. |
- Returns
- int Returns 0; stops the GIF playback.
- Note
- Call this on a LuaGif object to immediately halt animation.
◆ RegisterGifLua()
| void RegisterGifLua |
( |
lua_State * | L | ) |
|