12#define RGB8_TO_RGB565(rgb) \
13 (u16)((((rgb >> 16) & 0xFF) >> 3) << 11 | (((rgb >> 8) & 0xFF) >> 2) << 5 | ((rgb & 0xFF) >> 3))
bool LCD_RMIsVisible(LCD_ObjID id)
Returns whether an object is visible on the screen or not.
LCD_Coordinate LCD_GetCenter(void)
Returns the center of the screen at the current orientation.
bool LCD_IsInitialized(void)
Checks if the LCD has been initialized.
LCD_Coordinate LCD_GetSize(void)
Returns the size of the screen at the current orientation.
LCD_Error LCD_FMAddFont(LCD_Font font, LCD_FontID *out_id)
Adds a new font to the font manager, and returns its ID through the out_id pointer.
LCD_Error LCD_CalcBBoxForObject(const LCD_Obj *const obj, LCD_BBox *out_bbox)
Returns the bounding box of a temporary object.
u16 LCD_GetHeight(void)
Returns the height of the screen at the current orientation.
LCD_Error LCD_SetPointColor(LCD_Color color, LCD_Coordinate point)
Sets the color of the pixel at the specified coordinates.
LCD_Error LCD_RMAdd(LCD_Obj *const obj, LCD_ObjID *out_id, u8 options)
Adds a new object to the render list, and returns its ID (if out_id is not NULL) through the out_id p...
u16 LCD_GetWidth(void)
Returns the width of the screen at the current orientation.
LCD_Error LCD_SetBackgroundColor(LCD_Color color, bool redraw_objects)
Sets the background color of the screen.
LCD_Error LCD_Init(LCD_Orientation orientation, MEM_Allocator *const alloc, const LCD_Color *const clear_to)
Initializes TFT LCD Controller.
LCD_Error LCD_RMRemove(LCD_ObjID id, bool redraw_underneath)
Removes an object from the render list by its ID. It also deallocates the memory used by that object ...
LCD_Error LCD_DEBUG_RenderBBox(LCD_ObjID id)
Debug function to render the bounding box of a component.
LCD_Error LCD_RMClear(void)
Removes all visible and non-visible objects from the screen.
LCD_Error LCD_RMRenderTemporary(LCD_Obj *const obj)
Renders the object immediately, without adding neither to the render list nor to the memory arena....
LCD_Color LCD_GetPointColor(LCD_Coordinate point)
Returns the RGB565 color of the pixel at the specified coordinates.
LCD_Error LCD_RMSetVisibility(LCD_ObjID id, bool visible, bool redraw_underneath)
Shows/hides an object on/from the screen without modifying the render list.
LCD_Error LCD_RMRender(void)
Manually triggers an update of the screen. Useful when you want to add multiple objects at once,...
LCD_Error LCD_GetBBox(LCD_ObjID id, LCD_BBox *out_bbox)
Returns the bounding box of an object in the render list.
LCD_Error LCD_FMRemoveFont(LCD_FontID id)
Removes a font from the font manager by its ID.
LCD_Error LCD_RMMove(LCD_ObjID id, LCD_Coordinate new_pos, bool redraw_underneath)
Moves an object in the render list to a new position. It also updates the object's position in the RL...
LCD_Error
Error codes returned by the GLCD library.
u32 LCD_Color
Represents a color in the RGB565 format.
Represents a generic object, made up of 1 or more basic components, that are rendered on the screen.