From 654dcb34d61bc8313ff0d3a62e73bdf945c231ad Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 20 Mar 2024 18:23:33 +1100 Subject: Support pinning decoded images to RAM --- luals-stubs/lvgl.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'luals-stubs') diff --git a/luals-stubs/lvgl.lua b/luals-stubs/lvgl.lua index 59093000..360246f7 100644 --- a/luals-stubs/lvgl.lua +++ b/luals-stubs/lvgl.lua @@ -427,6 +427,13 @@ end function lvgl.Font(family, size, weight) end +--- Decodes an image from the filesystem and pins it into RAM, returning a +--- lightuserdata that can be passed to `img:set_src`. +--- @param path? string path to the encoded image +--- @return ImgData +function lvgl.ImgData(path) +end + --- Create a new style that can be applied to objects via `obj:add_style`. --- @param p? StyleProp Style properties that will be applied by this style. --- @return Style @@ -1248,6 +1255,12 @@ Font is a light userdata that can be uset to set style text_font. local font = {} + +--- Decoded image data that is pinned to memory. +--- @class ImgData + +local ImgData = {} + --- --- @class Style : lightuserdata --- -- cgit v1.2.3