15#include <goodisplay/gdey029T94.h>
28 return p && p->manifest().capabilities.display_lowlevel;
40 return (allowed() && d) ? d->getWidth() : 0;
46 return (allowed() && d) ? d->getHeight() : 0;
63 d->drawPixel(x, y, color);
72 d->drawLine(x0, y0, x1, y1, color);
81 d->drawRect(x, y, w, h, color);
90 d->fillRect(x, y, w, h, color);
100 auto* gfx =
static_cast<Gdey029T94*
>(d->getNativeHandle());
102 d->setTextSize(size ? size : 1);
103 d->setTextColor(color);
121 return (allowed() && d) ? d->isBusy() :
false;
Owned WAMR module instance + per-plugin state.
int host_display_draw_rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a rectangle outline.
bool host_display_is_busy(void)
True while the panel is processing a previous refresh.
int host_display_draw_pixel(int16_t x, int16_t y, uint16_t color)
Set a single pixel.
int host_display_draw_line(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Draw a line between two points.
uint16_t host_display_width(void)
Display width in pixels.
int host_display_flush(uint8_t refresh_mode)
Push the framebuffer to the panel using the given refresh mode.
int host_display_fill_rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a filled rectangle.
int host_display_draw_text(int16_t x, int16_t y, const char *text, uint8_t size, uint16_t color)
Draw text using the default GFX font.
uint16_t host_display_height(void)
Display height in pixels.
int host_display_clear(void)
Clear the framebuffer to background.
CDC Badge OS plugin host API - canonical C ABI contract.
#define HOST_ERR_NO_CAPABILITY
#define HOST_ERR_INVALID_ARG
void * plg_get_active_plugin(void)
Internal UTF-8 <-> CP437 helpers for the plugin host API boundary.
IDisplay * getDisplayInstance()
Returns lazily created singleton display instance.
std::string toDisplay(const char *utf8)
Decode a UTF-8 (with optional HTML entities) string into CP437 bytes.
void printText(Gdey029T94 *gfx, const char *text)
Draws CP437 text with the built-in 6x8 glyph font, byte-for-byte.