---@meta -- Generated from native/src/bindings/core/gui.cpp. Do not edit. ---@alias GuiColor integer ---@alias GuiFont integer ---@alias GuiTextStyle integer ---@class GuiLib ---@field FONT_SMALL GuiFont Small auxiliary text. ---@field FONT_UI GuiFont Normal controls and labels. ---@field FONT_BODY GuiFont Normal reading text. ---@field FONT_LARGE GuiFont Headings and prominent values. ---@field STYLE_NORMAL GuiTextStyle ---@field STYLE_BOLD GuiTextStyle gui = {} gui.FONT_SMALL = 0 gui.FONT_UI = 0 gui.FONT_BODY = 0 gui.FONT_LARGE = 0 gui.STYLE_NORMAL = 0 gui.STYLE_BOLD = 0 ---Returns the live frame width. ---@return integer function gui.getWidth() end ---Returns the live frame height. ---@return integer function gui.getHeight() end ---Rotates the live frame without changing the saved preference. ---@param degrees integer 0, 90, 180, or 270 clockwise. function gui.setRotation(degrees) end ---Returns the rotation of the live frame. ---@return integer Degrees clockwise for the live frame. function gui.getRotation() end ---Returns an opaque native color. E-ink implementations quantize RGB to available grayscale. ---@param r integer 0 through 255. ---@param g integer 0 through 255. ---@param b integer 0 through 255. ---@return GuiColor function gui.color(r, g, b) end ---Clears the frame. ---@param color? GuiColor Defaults to white. function gui.clear(color) end ---Fills a rectangle. ---@param x integer ---@param y integer ---@param w integer ---@param h integer ---@param color GuiColor function gui.fillRect(x, y, w, h, color) end ---Outlines a rectangle. ---@param x integer ---@param y integer ---@param w integer ---@param h integer ---@param color GuiColor function gui.drawRect(x, y, w, h, color) end ---Draws a line. ---@param x1 integer ---@param y1 integer ---@param x2 integer ---@param y2 integer ---@param color GuiColor ---@param width? integer Defaults to one pixel. function gui.drawLine(x1, y1, x2, y2, color, width) end ---Draws a single pixel. ---@param x integer ---@param y integer ---@param color GuiColor function gui.drawPixel(x, y, color) end ---Outlines a circle. ---@param x integer Center. ---@param y integer Center. ---@param radius integer ---@param color GuiColor ---@param width? integer Defaults to one pixel. function gui.drawCircle(x, y, radius, color, width) end ---Fills a circle. ---@param x integer Center. ---@param y integer Center. ---@param radius integer ---@param color GuiColor ---@param background? GuiColor Surface behind an anti-aliased edge. function gui.fillCircle(x, y, radius, color, background) end ---Draws an anti-aliased rounded fill, optional gradient, and optional border in one pass. ---@param x integer ---@param y integer ---@param w integer ---@param h integer ---@param radius integer ---@param background GuiColor Surface behind the anti-aliased edge. ---@param top? GuiColor Fill, or gradient top; omitted for no fill. ---@param bottom? GuiColor Gradient bottom; defaults to top. Panels without a gradient use top. ---@param border? GuiColor Omitted for no border. function gui.roundRect(x, y, w, h, radius, background, top, bottom, border) end ---Temporarily gives the app the full panel, including firmware chrome. ---@param on boolean function gui.setFullscreen(on) end ---Fills a polygon. ---@param xs integer[] ---@param ys integer[] ---@param color GuiColor function gui.fillPolygon(xs, ys, color) end ---Draws a bitmap. ---@param path string Absolute BMP path. ---@param x? integer Left edge; defaults to centered. ---@param y? integer Top edge; defaults to centered. ---@param maxWidth? integer Defaults to panel width. ---@param maxHeight? integer Defaults to panel height. ---@return true? ok ---@return string? error function gui.drawBmp(path, x, y, maxWidth, maxHeight) end ---Measures a text run. ---@param font GuiFont Use a named gui.FONT_* role. ---@param text string ---@param style? GuiTextStyle Defaults to gui.STYLE_NORMAL. ---@return integer function gui.getTextWidth(font, text, style) end ---Returns the line height of a font role. ---@param font GuiFont Use a named gui.FONT_* role. ---@param style? GuiTextStyle Defaults to gui.STYLE_NORMAL. ---@return integer function gui.getFontHeight(font, style) end ---Draws a text run with its top-left corner at x, y. ---@param font GuiFont Use a named gui.FONT_* role. ---@param x integer Left edge. ---@param y integer Top edge. ---@param text string ---@param color? GuiColor Defaults to black. ---@param style? GuiTextStyle Defaults to gui.STYLE_NORMAL. ---@param background? GuiColor Omitted for transparent text. function gui.drawText(font, x, y, text, color, style, background) end