CFBD_GraphicDeviceOperation¶
Module: Graphics Device Abstraction
Virtual operation table for graphics device functionality. More...
#include <graphic_device.h>
Public Attributes¶
| Name | |
|---|---|
| int(*)(CFBD_GraphicDevice *device, void *init_args) | init Initialize the graphics device. |
| CFBD_Bool(*)(CFBD_GraphicDevice *device, uint16_t x, uint16_t y) | setPixel Set a single pixel at (x, y) to the active drawing color. |
| CFBD_Bool(*)(CFBD_GraphicDevice *device, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *source) | setArea Write a block of pixel data to a rectangular area. |
| GraphicFrameOperation | update Push the local frame buffer to the display. |
| GraphicFrameOperation | clear Clear the entire display and frame buffer. |
| GraphicFrameOperation | revert Revert to the previous frame content (if supported). |
| GraphicAreaOperations | update_area Update a rectangular area on the display. |
| GraphicAreaOperations | clear_area Clear a rectangular area on the display and buffer. |
| GraphicAreaOperations | revert_area Revert a rectangular area to its previous content. |
| GraphicOLEDSelfOperation | open Open/enable the graphics device. |
| GraphicOLEDSelfOperation | close Close/disable the graphics device. |
| GraphicOLED_QueryOperation | self_consult Query device properties and capabilities. |
| GraphicOLED_PropertySetsOperation | self_sets Set the properties for devices supports. |
Detailed Description¶
Virtual operation table for graphics device functionality.
Note: All function pointers must be non-NULL unless explicitly documented otherwise.
This structure defines the complete interface for graphics rendering operations. Device implementations populate this table with concrete implementations tailored to specific hardware capabilities.
The operation table provides:
- Device initialization and lifecycle management
- Pixel and area rendering operations
- Frame-level update, clear, and revert operations
- Device property queries
Public Attributes Documentation¶
variable init¶
Initialize the graphics device.
Parameters:
- device Pointer to the CFBD_GraphicDevice instance.
- init_args Optional device-specific initialization arguments.
Return: int Status code; typically 0 for success, negative for errors.
variable setPixel¶
Set a single pixel at (x, y) to the active drawing color.
Parameters:
- device Pointer to the CFBD_GraphicDevice instance.
- x X coordinate of the pixel.
- y Y coordinate of the pixel.
Return: CFBD_Bool CFBD_TRUE on success, CFBD_FALSE on failure.
variable setArea¶
CFBD_Bool(*)(CFBD_GraphicDevice *device, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *source) setArea;
Write a block of pixel data to a rectangular area.
Parameters:
- device Pointer to the CFBD_GraphicDevice instance.
- x X coordinate of the area's top-left corner.
- y Y coordinate of the area's top-left corner.
- width Width of the area in pixels.
- height Height of the area in pixels.
- source Pointer to source pixel data. Format is device-dependent.
Return: CFBD_Bool CFBD_TRUE on success, CFBD_FALSE on failure.
variable update¶
Push the local frame buffer to the display.
Synchronizes the local frame buffer with the physical display, making all buffered changes visible.
variable clear¶
Clear the entire display and frame buffer.
Clears all pixels by writing zero/off states to all display locations.
variable revert¶
Revert to the previous frame content (if supported).
Not all devices support frame revert; may return CFBD_FALSE if unavailable.
variable update_area¶
Update a rectangular area on the display.
variable clear_area¶
Clear a rectangular area on the display and buffer.
variable revert_area¶
Revert a rectangular area to its previous content.
variable open¶
Open/enable the graphics device.
Powers on the device and prepares it for rendering operations.
variable close¶
Close/disable the graphics device.
Powers off the device and releases hardware resources.
variable self_consult¶
Query device properties and capabilities.
Supported standard properties:
- "width" (uint16_t): Display width in pixels
- "height" (uint16_t): Display height in pixels
- "rgb" (CFBD_Bool): RGB color support indicator
variable self_sets¶
Set the properties for devices supports.
- "color": if the devices supports color, thats it :)
Updated on 2026-02-03 at 13:21:55 +0000