Abstraction Layer API
Principle
The MicroUI implementation for MicroEJ requires an Abstraction Layer implementation. This Abstraction Layer implementation finalizes the MicroUI implementation started with the static initialization step (see Static Initialization) for a given VEE Port.
The Abstraction Layer implementation consists in a set of headers files to implement in C to target the hardware drivers. Some functions are mandatory, others are not. Some other headers files are also available to call UI engines internal functions.
For the simulator, some Front Panel interfaces and classes allow to specify the simulated VEE Port characteristics.
Embedded VEE Port
MicroUI Embedded Abstraction Layer API
The specification of header files names is:
Name starts with
LLUI_.Second part name refers the UI engine:
DISPLAY,INPUT,LED.Files whose name ends with
_impllist functions to implement over hardware.Files whose name has no suffix list internal UI engines functions.
There are some exceptions :
LLUI_PAINTER_impl.handLLDW_PAINTER_impl.hlist a subpart of UI Graphics Engine functions to implement (all MicroUI native drawing methods).ui_drawing_soft.handdw_drawing_soft.hlist all drawing methods implemented by the Graphics Engine.microui_constants.his the file generated by the MicroUI Static Initializer (see Static Initialization).
The MicroUI C module provides a default implementation of the UI Pack Abstraction Layer API:
LLUI_PAINTER_impl.candLLDW_PAINTER_impl.cmanage the synchronization with the Graphics Engine and redirect all drawings toui_drawing.handui_image_drawing.h.ui_drawing.handui_image_drawing.hlist all drawing methods the VEE Port can implement.ui_drawing.candui_image_drawing.care the default implementation ofui_drawing.handui_image_drawing.hthat redirects all drawings toui_drawing_soft.handdw_drawing_soft.h.
The BSP has to implement LLUI_xxx header files and optionally ui_drawing.h and ui_image_drawing.h (to draw using a GPU and/or to draw in a custom BufferedImage).
All header files and their aims are described in next UI engines chapters: LED, Input and Display.
Simulator
MicroUI Simulator Abstraction Layer API
In the simulator the three UI engines are grouped in a mock called Front Panel.
The Front Panel comes with a set of classes and interfaces which are the equivalent of headers file (*.h) of Embedded VEE Port.
The specification of class names is:
Package are the same than the MicroUI library (ej.microui.display, ej.microui.event, ej.microui.led).
Name start with
LLUI.The second part of the name refers the UI engine:
Display,Input,Led.Files whose name ends with
Impllist methods to implement like in the embedded VEE Port.Files whose name has no suffix list internal UI engine functions.
There are some exceptions :
LLUIPainter.javaandLLDWPainter.javalist a subpart of UI Graphics Engine functions (all MicroUI native drawing methods).UIDrawing.javaandDWDrawing.javalist all drawing methods the VEE Port can implement (and already implemented by the Graphics Engine).EventXXXlist methods to create input events compatible with MicroUI implementation.
All files and their aims are described in Simulation.
