---@meta

-- GENERATED FILE — do not hand-edit.
-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md).
-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then
-- re-extract and rebuild. To add narrative content: edit
-- docs-system/overlays/<doc_id>.md, then rebuild.

--- LCD line pattern selector such as SOLID or DOTTED.
---@alias pen_type integer
--- Text rendering flags used by legacy LCD number APIs.
---@alias text_flags integer
--- Packed 16-bit RGB color value for color LCD APIs.
---@alias lcd_color_RGB565 integer
--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE.
---@alias lcd_font_size integer
--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED.
---@alias lcd_text_flags integer
--- Combined LCD text formatting bitmask covering font size and text flags.
---@alias lcd_text_format integer
--- Signed EdgeTX source value in the normalized range from -1024 to 1024.
---@alias source_range_1024 integer
--- Global timer selector such as all, total, session, throttle, or throttlepct.
---@alias timer_type string
--- Telemetry unit identifier from the EdgeTX unit list.
---@alias unit_type integer
--- Telemetry precision selector controlling decimal places.
---@alias prec_type integer

---@class Bitmap
Bitmap = {}

--- Return width, height of a bitmap object
--- @since 2.2.0
---@param name pointer point to a bitmap previously opened with Bitmap.open()
---@return integer width_in_pixels
---@return integer height_in_pixels
function Bitmap.getSize(name) end

--- Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only
once, returned object should be stored and used for drawing. If loading fails for whatever
reason the resulting bitmap object will have width and height set to zero.
--- @since 2.2.0
---@param name string full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”)
---@return object bitmap
function Bitmap.open(name) end

--- Return a resized bitmap object
--- @since 2.8.0
---@param bitmap pointer point to a bitmap previously opened with Bitmap.open()
---@param width integer the new bitmap width
---@param height integer the new bitmap height
function Bitmap.resize(bitmap, width, height) end

--- Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern()
--- @since 2.8.0
---@param bitmap pointer point to a bitmap previously opened with Bitmap.open()
---@return unknown a
function Bitmap.toMask(bitmap) end
