diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-03-07 17:22:06 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-03-07 17:22:06 +1100 |
| commit | 36a19182bec171d6376e51f5689aaf70b9d6fbad (patch) | |
| tree | b75be5f1567510ce2c60693c978a6ddf0b879905 /luals-stubs/screen.lua | |
| parent | beb1f654958c28429323fcb9622c9c8d206979a3 (diff) | |
| download | tangara-fw-36a19182bec171d6376e51f5689aaf70b9d6fbad.tar.gz | |
Use luals-stubs as the source of truth for docs, instead of maintaining
separate docs stubs
Includes introducing a cool new script to turn lua-language-server's
json output into markdown documentation.
Diffstat (limited to 'luals-stubs/screen.lua')
| -rw-r--r-- | luals-stubs/screen.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/luals-stubs/screen.lua b/luals-stubs/screen.lua new file mode 100644 index 00000000..55253f1c --- /dev/null +++ b/luals-stubs/screen.lua @@ -0,0 +1,25 @@ +--- @meta + +--- A distinct full-screen UI. Each screen has an associated LVGL UI tree and +--- group, and can be shown on-screen using the 'backstack' module. +--- Screens make use of prototype inheritance in order to provide a consistent +--- interface for the C++ firmware to work with. +--- See [Programming in Lua, chapter 16](https://www.lua.org/pil/16.2.html). +--- @class screen +local screen = {} + +--- Creates a new screen instance. +function screen:new(params) end + +--- Called just before this screen is first displayed to the user. +function screen:createUi() end + +--- Called whenever this screen is displayed to the user. +function screen:onShown() end + +--- Called whenever this screen is being hidden by the user; either because a +--- new screen is being pushed on top of this way, or because this screen has +--- been popped off of the stack. +function screen:onHidden() end + +return screen |
