Migration Guide¶
From 13.3.x to 13.4.x¶
Front Panel¶
Set the explicit dependency to the UI Pack 13.4.1:
<dependency org="com.microej.pack.ui" name="ui-pack" rev="13.4.1"> <artifact name="frontpanel" type="jar"/> </dependency>
BSP¶
- The signatures of LLUI_DISPLAY_IMPL_decodeImage and LLUI_DISPLAY_IMPL_getNewImageStrideInBytes have changed:
- use jbyte in functions signatures.
- add a cast to MICROUI_Image in implementation.
- Use the MicroUI C module 2.0.1.
From 13.2.x to 13.3.x¶
Front Panel¶
Set the explicit dependency to the UI Pack 13.3.1:
<dependency org="com.microej.pack.ui" name="ui-pack" rev="13.3.1"> <artifact name="frontpanel" type="jar"/> </dependency>
BSP¶
Install the MicroUI C module 2.0.0.
The signatures of
LLUI_DISPLAY_IMPL_decodeImage
andLLUI_DISPLAY_IMPL_getNewImageStrideInBytes
have changed:- use
jbyte
in functions signatures - add a cast to
MICROUI_Image
in the implementation.
- use
From 13.1.x to 13.2.x¶
Front Panel¶
Set the explicit dependency to the UI Pack 13.2.0:
<dependency org="com.microej.pack.ui" name="ui-pack" rev="13.2.0"> <artifact name="frontpanel" type="jar"/> </dependency>
From 13.0.x to 13.1.x¶
Front Panel¶
Set the explicit dependency to the UI Pack 13.1.0:
<dependency org="com.microej.pack.ui" name="ui-pack" rev="13.1.0"> <artifact name="frontpanel" type="jar"/> </dependency>
BSP¶
- Add a cast when using
MICROUI_Image*
object:(MICROUI_ImageFormat)image->format
. - Remove parameter
MICROUI_GraphicsContext*
when callingLLUI_DISPLAY_setDrawingLimits()
. - Ensure to call
LLUI_DISPLAY_setDrawingLimits()
before callingLLUI_DISPLAY_setDrawingStatus()
orLLUI_DISPLAY_notifyAsynchronousDrawingEnd()
. - (optional) Add an implementation of
LLUI_DISPLAY_IMPL_image_heap_xxx
to control the images heap allocation; by default the internal Graphics Engine’s allocator is used. Another implementation is also available on the MicroUI C module.
From 12.x to 13.x¶
Platform Configuration Project¶
Update Architecture version: 7.16.0 or higher.
Add the following module in the module description file:
<dependency org="com.microej.clibrary.llimpl" name="microui" rev="1.0.3"/>
If not already set, set the
ea:property
bsp.project.microej.dir
in the module ivy file to configure the BSP output folder where is extracted the module.
Hardware Accelerator¶
Open -configuration project > display > display.properties
Remove optional property
hardwareAccelerator
. If old value wasdma2d
, add the following module in the module description file:<dependency org="com.microej.clibrary.llimpl" name="display-dma2d" rev="1.0.6"/>``
For the hardware accelerator DMA2D, please consult STM32F7Discovery board updates. Add the file
lldisplay_dma2d.c
, the global definesDRAWING_DMA2D_BPP=16
(or another value) andSTM32F4XX
orSTM32F7XX
For the others hardware accelerators, please contact MicroEJ support.
Front Panel¶
This chapter resumes the changes to perform. The available changes in Front Panel API are described in next chapter.
- If not already done, follow the Front Panel version 6 migration procedure detailled in chapter From 11.x to 12.x.
- Update the fp project dependency:
<dependency org="ej.tool.frontpanel" name="widget" rev="2.0.0"/>
ej.fp.event.MicroUIButtons
has been renamed inej.microui.event.EventButton
, and all othersej.fp.event.MicroUIxxx
inej.microui.event.Eventxxx
- Display abstract class
AbstractDisplayExtension
(class to extend widget Display when targetting a custom display) has been converted on the interfaceDisplayExtension
. Some methods names have changed and now take in parameter the display widget.
Front Panel API¶
ej.drawing.DWDrawing
- [Added] Equivalent of
dw_drawing.h
anddw_drawing_soft.h**
: allows to implement some drawing algorithms and/or to use the ones provided by the Graphics Engine. The drawing methods are related to the libraryej.api.drawing
. - [Added] Interface
DWDrawingDefault
: default implementation ofDWDrawing
which calls the Graphics Engine algorithms.
- [Added] Equivalent of
ej.drawing.LLDWPainter
- [Added] Equivalent of module com.microej.clibrary.llimpl#microui (
LLDW_PAINTER_impl.c
): implements allej.api.drawing
natives and redirect them to the interfaceDWDrawing
. - [Added]
setDrawer(DWDrawing)
: allows to configure the implementation ofDWDrawing
theLLDWPainter
has to use. When no drawer is configured,LLDWPainter
redirects all drawings to the internal Graphics Engine software algorithms.
- [Added] Equivalent of module com.microej.clibrary.llimpl#microui (
ej.fp.event.MicroUIButtons
- [Removed] Replaced by
EventButton
.
- [Removed] Replaced by
ej.fp.event.MicroUICommand
- [Removed] Replaced by
EventCommand
.
- [Removed] Replaced by
ej.fp.event.MicroUIEventGenerator
- [Removed] Replaced by
LLUIInput
.
- [Removed] Replaced by
ej.fp.event.MicroUIGeneric
- [Removed] Replaced by
EventGeneric
.
- [Removed] Replaced by
ej.fp.event.MicroUIPointer
- [Removed] Replaced by
EventPointer
.
- [Removed] Replaced by
ej.fp.event.MicroUIStates
- [Removed] Replaced by
EventState
.
- [Removed] Replaced by
ej.fp.event.MicroUITouch
- [Removed] Replaced by
EventTouch
.
- [Removed] Replaced by
ej.fp.widget.MicroUIDisplay
- [Removed] Replaced by
LLUIDisplayImpl
. Abstract widget display class has been replaced by an interface that a widget (which should simulate a display) has to implement to be compatible with the Graphics Engine. - [Removed]
AbstractDisplayExtension
, all available implementations andsetExtensionClass(String)
: the standard display formats (RGB565, etc.) are internally managed by the Graphics Engine. For generic formats, some APIs are available inLLUIDisplayImpl
. - [Removed]
finalizeConfiguration()
,getDisplayHeight()
,getDisplayWidth()
,getDrawingBuffer()
,setDisplayWidth(int)
,setDisplayHeight(int)
,start()
:LLUIDisplayImpl
is not an abstract widget anymore, these notions are widget dependent. - [Removed]
flush()
. - [Removed]
getNbBitsPerPixel()
. - [Removed]
switchBacklight(boolean)
.
- [Removed] Replaced by
ej.fp.widget.MicroUILED
- [Removed] Replaced by
LLUILedImpl
. Abstract widget LED class has been replaced by an interface that a widget (which should simulate a LED) has to implement to be compatible with the Graphics Engine. - [Removed]
finalizeConfiguration()
:LLUILedImpl
is not an abstract widget anymore, this notion is widget dependent. - [Removed]
getID()
: MicroUI uses the widget (which implements the interfaceLLUILedImpl
)’s label to retrieve the LED. The LED labels must be integers from 0 ton-1
.
- [Removed] Replaced by
ej.microui.display.LLUIDisplay
- [Added] Equivalent of
LLUI_DISPLAY.h
: several functions to interact with the Graphics Engine. - [Added]
blend(int,int,int)
: blends two ARGB colors and opacity level. - [Added]
convertARGBColorToColorToDraw(int)
: crops given color to display capacities. - [Added]
getDisplayPixelDepth()
: replacesMicroUIDisplay.getNbBitsPerPixel()
. - [Added]
getDWDrawerSoftware()
: gives the unique instance of Graphics Engine’s internal software drawer (instance ofDWDrawing
). - [Added]
getUIDrawerSoftware()
: gives the unique instance of Graphics Engine’s internal software drawer (instance ofUIDrawing
). - [Added]
mapMicroUIGraphicsContext(byte[])
andnewMicroUIGraphicsContext(byte[])
: maps the graphics context byte array (GraphicsContext.getSNIContext()) on an object which represents the graphics context in front panel. - [Added]
mapMicroUIImage(byte[])
andnewMicroUIImage(byte[])
: maps the image byte array (Image.getSNIContext()) on an object which represents the image in front panel. - [Added]
requestFlush(boolean)
: requests a call toLLUIDisplayImpl.flush()
. - [Added]
requestRender(void)
: requests a call toDisplayable.render()
.
- [Added] Equivalent of
ej.microui.display.LLUIDisplayImpl
- [Added] Replaces
MicroUIDisplay
, equivalent ofLLUI_DISPLAY_impl.h
. - [Added]
initialize()
: asks to initialize the widget and to return a front panel image where the Graphics Engine will perform the MicroUI drawings. - [Changed]
flush(MicroUIGraphicsContext, Image, int, int, int, int)
: asks to flush the graphics context drawn by MicroUI in image returned byinitialize()
.
- [Added] Replaces
ej.microui.display.LLUIPainter
- [Added] Equivalent of module com.microej.clibrary.llimpl#microui (
LLUI_PAINTER_impl.c
): implements allej.api.microui
natives and redirect them to the interfaceUIDrawing
. - [Added]
MicroUIGraphicsContext
: representation of a MicroUI GraphicsContext in front panel. This interface (implemented by the Graphics Engine) provides several function to get information on graphics context, clip, etc. - [Added]
MicroUIGraphicsContext#requestDrawing()
: allows to take the hand on the drawing buffer. - [Added]
MicroUIImage
: representation of a MicroUI Image in front panel. This interface (implemented by the Graphics Engine) provides several function to get information on image. - [Added]
setDrawer(UIDrawing)
: allows to configure the implementation ofUIDrawing
theLLUIPainter
has to use. When no drawer is configured,LLUIPainter
redirects all drawings to the internal Graphics Engine software algorithms.
- [Added] Equivalent of module com.microej.clibrary.llimpl#microui (
ej.microui.display.UIDrawing
- [Added] Equivalent of
ui_drawing.h
andui_drawing_soft.h**
: allows to implement some drawing algorithms and/or to use the ones provided by the Graphics Engine. The drawing methods are related to the libraryej.api.microui
. - [Added] Interface
UIDrawingDefault
: default implementation ofUIDrawing
which calls the Graphics Engine algorithms.
- [Added] Equivalent of
ej.microui.event.EventButton
- [Added] Replaces
MicroUIButton
.
- [Added] Replaces
ej.microui.event.EventCommand
- [Added] Replaces
MicroUICommand
.
- [Added] Replaces
ej.microui.event.EventGeneric
- [Added] Replaces
MicroUIGeneric
.
- [Added] Replaces
ej.microui.event.EventPointer
- [Added] Replaces
MicroUIPointer
.
- [Added] Replaces
ej.microui.event.EventQueue
- [Added] Dedicated events queue used by MicroUI.
ej.microui.event.EventState
- [Added] Replaces
MicroUIState
.
- [Added] Replaces
ej.microui.event.EventTouch
- [Added] Replaces
MicroUITouch
.
- [Added] Replaces
ej.microui.event.LLUIInput
- [Added] Replaces
MicroUIEventGenerator
.
- [Added] Replaces
ej.microui.led.LLUILedImpl
- [Added] Replaces
MicroUILED
.
- [Added] Replaces
Image Generator¶
This chapter resumes the changes to perform. The available changes in Image Generator API are described in next chapter.
This chapter only concerns platform with a custom display. In this case a dedicated image generator extension project is available. This project must be updated.
Reorganize project to use source folders
src/main/java
andsrc/main/resources
Add new
module.ivy
file:<ivy-module version="2.0" xmlns:ea="http://www.easyant.org" xmlns:m="http://www.easyant.org/ivy/maven" xmlns:ej="https://developer.microej.com" ej:version="2.0.0"> <info organisation="com.is2t.microui" module="imageGenerator-xxx" status="integration" revision="1.0.0"> <ea:build organisation="com.is2t.easyant.buildtypes" module="build-std-javalib" revision="2.+"/> </info> <configurations defaultconfmapping="default->default;provided->provided"> <conf name="default" visibility="public" description="Runtime dependencies to other artifacts"/> <conf name="provided" visibility="public" description="Compile-time dependencies to APIs provided by the platform"/> <conf name="documentation" visibility="public" description="Documentation related to the artifact (javadoc, PDF)"/> <conf name="source" visibility="public" description="Source code"/> <conf name="dist" visibility="public" description="Contains extra files like README.md, licenses"/> <conf name="test" visibility="private" description="Dependencies for test execution. It is not required for normal use of the application, and is only available for the test compilation and execution phases."/> </configurations> <publications/> <dependencies> <dependency org="com.microej.pack.ui" name="ui-pack" rev="[UI Pack version]"> <artifact name="imageGenerator" type="jar"/> </dependency> </dependencies> </ivy-module>
The artifact name prefix must be imageGenerator-
.
Update project classpath: remove classpath variable
IMAGE-GENERATOR-x.x
and add ivy file dependencyInstead of implementing
GenericDisplayExtension
, the extension class must extendBufferedImageLoader
class; check class methods to override.Add the file
src/main/resources/META-INF/services/com.microej.tool.ui.generator.MicroUIRawImageGeneratorExtension
; this file has to specify the class which extends theBufferedImageLoader
class, for instance:com.microej.generator.MyImageGeneratoExtension
Build the easyant project
Copy the jar in the platform -configuration project > dropins folder
Rebuild the platform after any changes
Image Generator API¶
com.is2t.microej.microui.image.CustomDisplayExtension
- [Removed] Replaced by
ImageConverter
andMicroUIRawImageGeneratorExtension
.
- [Removed] Replaced by
com.is2t.microej.microui.image.DisplayExtension
- [Removed]
com.is2t.microej.microui.image.GenericDisplayExtension
- [Removed] Replaced by
ImageConverter
andMicroUIRawImageGeneratorExtension
.
- [Removed] Replaced by
com.microej.tool.ui.generator.BufferedImageLoader
- [Added] Pixelated image loader (PNG, JPEG etc.).
com.microej.tool.ui.generator.Image
- [Added] Representation of an image listed in a
images.list
file.
- [Added] Representation of an image listed in a
com.microej.tool.ui.generator.ImageConverter
- [Added] Generic converter to convert an image in an output stream.
com.microej.tool.ui.generator.MicroUIRawImageGeneratorExtension
- [Added] Graphics Engine RAW image converter: used when the image (listed in
images.list
) targets a RAW format known by the Graphics Engine.
- [Added] Graphics Engine RAW image converter: used when the image (listed in
Font¶
- Open optional font(s) in -configuration project > microui/**/*.ejf
- Remove all
Dynamic
styles (selectNone
orBuilt-in
for bold, italic and underline); the number of generated fonts must be1
(the feature to renderDynamic
styles at runtime have been removed) - Save the file(s)
BSP¶
This chapter resumes the changes to perform. The available changes in LLAPI are described in next chapter.
Delete all platform header files (folder should be set in -configuration project > bsp > bsp.properties > property
output.dir
)If not possible to delete this folder, delete all UI headers files:
intern/LLDISPLAY*
intern/LLINPUT*
intern/LLLEDS*
LLDISPLAY*
LLINPUT*
LLLEDS*
Replace all
#include "LLDISPLAY.h"
,#include "LLDISPLAY_EXTRA.h"
and#include "LLDISPLAY_UTILS.h"
by#include "LLUI_DISPLAY.h"
Replace all
#include "LLDISPLAY_impl.h"
,#include "LLDISPLAY_EXTRA_drawing.h"
and#include "LLDISPLAY_EXTRA_impl.h"
by#include "LLUI_DISPLAY_impl.h"
Replace all
LLDISPLAY_EXTRA_IMAGE_xxx
byMICROUI_IMAGE_FORMAT_xxx
All
LLDISPLAY_IMPL_xxx
functions have been renamed inLLUI_DISPLAY_IMPL_xxx
LLUI_DISPLAY_IMPL_initialize
has now the paremeterLLUI_DISPLAY_SInitData* init_data
; fill it as explained in C doc.Implement new functions
void LLUI_DISPLAY_IMPL_binarySemaphoreTake(void* sem)
andvoid LLUI_DISPLAY_IMPL_binarySemaphoreGive(void* sem, bool under_isr)
Signature of
LLUI_DISPLAY_IMPL_flush
has changedAll
LLDISPLAY_EXTRA_IMPL_xxx
functions have been renamed inLLUI_DISPLAY_IMPL_xxx
Fix some functions signatures (
LLUI_DISPLAY_IMPL_hasBacklight()
, etc)Remove the functions
LLDISPLAY_IMPL_getGraphicsBufferAddress
,LLDISPLAY_IMPL_getHeight
,LLDISPLAY_IMPL_getWidth
,LLDISPLAY_IMPL_synchronize
,LLDISPLAY_EXTRA_IMPL_waitPreviousDrawing
,LLDISPLAY_EXTRA_IMPL_error
Add the end of asynchronous flush copy, call
LLUI_DISPLAY_flushDone
Add the files
LLUI_PAINTER_impl.c
andLLDW_PAINTER_impl.c
in your C configuration projectReplace the prefix
LLINPUT
in all header files, functions and defines by the new prefixLLUI_INPUT
Replace the prefix
LLLEDS
in all header files, functions and defines by the new prefixLLUI_LED
Replace the prefix
LLDISPLAY
in all header files, functions and defines by the new prefixLLUI_DISPLAY
LLAPI¶
dw_drawing_soft.h
- [Added] List of internal Graphics Engine software algorithms to perform some drawings (related to library
ej.api.drawing
).
- [Added] List of internal Graphics Engine software algorithms to perform some drawings (related to library
dw_drawing.h
- [Added] List of
ej.api.drawing
library’s drawing functions to optionally implement in platform.
- [Added] List of
LLDISPLAY.h
andintern/LLDISPLAY.h
- [Removed]
LLDISPLAY_DECODER.h
andintern/LLDISPLAY_DECODER.h
- [Removed]
LLDISPLAY_EXTRA.h
andintern/LLDISPLAY_EXTRA.h
merged inLLUI_PAINTER_impl.h
andLLDW_PAINTER_impl.h
- [Changed]
LLDISPLAY_SImage
: replaced byMICROUI_Image
. - [Removed]
LLDISPLAY_SRectangle
,LLDISPLAY_SDecoderImageData
,LLDISPLAY_SDrawImage
,LLDISPLAY_SFlipImage
,LLDISPLAY_SScaleImage
andLLDISPLAY_SRotateImage
- [Changed]
LLDISPLAY_EXTRA_drawing.h
- [Removed]
LLDISPLAY_EXTRA_impl.h
andintern/LLDISPLAY_EXTRA_impl.h
merged inLLUI_DISPLAY_impl.h
,ui_drawing.h
anddw_drawing.h
- [Changed]
LLDISPLAY_EXTRA_IMPL_setContrast(int32_t)
: replaced byLLUI_DISPLAY_IMPL_setContrast(uint32_t)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_getContrast(void)
: replaced byLLUI_DISPLAY_IMPL_getContrast(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_hasBackLight(void)
: replaced byLLUI_DISPLAY_IMPL_hasBacklight(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_setBacklight(int32_t)
: replaced byLLUI_DISPLAY_IMPL_setBacklight(uint32_t)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_getBacklight(void)
: replaced byLLUI_DISPLAY_IMPL_getBacklight(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_isColor(void)
: replaced byLLUI_DISPLAY_IMPL_isColor(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_getNumberOfColors(void)
: replaced byLLUI_DISPLAY_IMPL_getNumberOfColors(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_isDoubleBuffered(void)
: replaced byLLUI_DISPLAY_IMPL_isDoubleBuffered(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_getBacklight(void)
: replaced byLLUI_DISPLAY_IMPL_getBacklight(void)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_fillRect(void*,int32_t,void*,int32_t)
: replaced byUI_DRAWING_fillRectangle(MICROUI_GraphicsContext*,jint,jint,jint,jint)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_drawImage(void*,int32_t,void*,int32_t,void*)
: replaced byUI_DRAWING_drawImage(MICROUI_GraphicsContext*,MICROUI_Image*,jint,jint,jint,jint,jint,jint,jint)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_flipImage(void*,int32_t,void*,int32_t,void*)
: replaced byDW_DRAWING_drawFlippedImage(MICROUI_GraphicsContext*,MICROUI_Image*,jint,jint,jint,jint,jint,jint,DRAWING_Flip,jint)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_scaleImage(void*,int32_t,void*,int32_t,void*)
: replaced byDW_DRAWING_drawScaledImageNearestNeighbor(MICROUI_GraphicsContext*,MICROUI_Image*,jint,jint,jfloat,jfloat,jint)
andDW_DRAWING_drawScaledImageBilinear(MICROUI_GraphicsContext*,MICROUI_Image*,jint,jint,jfloat,jfloat,jint)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_rotateImage(void*,int32_t,void*,int32_t,void*)
: replaced byDW_DRAWING_drawRotatedImageNearestNeighbor(MICROUI_GraphicsContext*,MICROUI_Image*,jint,jint,jint,jint,jfloat,jint)
andDW_DRAWING_drawRotatedImageBilinear(MICROUI_GraphicsContext*,MICROUI_Image*,jint,jint,jint,jint,jfloat,jint)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_convertARGBColorToDisplayColor(int32_t)
andLLDISPLAY_EXTRA_IMPL_convertDisplayColorToARGBColor(int32_t)
: replaced respectively byLLUI_DISPLAY_IMPL_convertARGBColorToDisplayColor(uint32_t)
andLLUI_DISPLAY_IMPL_convertDisplayColorToARGBColor(uint32_t)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_prepareBlendingOfIndexedColors(void*,void*)
: replaced byLLUI_DISPLAY_IMPL_prepareBlendingOfIndexedColors(uint32_t*,uint32_t*)
(_optional_). - [Changed]
LLDISPLAY_EXTRA_IMPL_decodeImage(int32_t,int32_t,int32_t,void*)
: replaced byLLUI_DISPLAY_IMPL_decodeImage(uint8_t*,uint32_t,MICROUI_ImageFormat,MICROUI_Image*,bool*)
(_optional_). - [Removed]
LLDISPLAY_EXTRA_IMPL_getGraphicsBufferMemoryWidth(void)
andLLDISPLAY_EXTRA_IMPL_getGraphicsBufferMemoryHeight(void)
: replaced by elements in structureLLUI_DISPLAY_SInitData
(_optional_). - [Removed]
LLDISPLAY_EXTRA_IMPL_backlightOn(void)
andLLDISPLAY_EXTRA_IMPL_backlightOff(void)
. - [Removed]
LLDISPLAY_EXTRA_IMPL_enterDrawingMode(void)
andLLDISPLAY_EXTRA_IMPL_exitDrawingMode(void)
. - [Removed]
LLDISPLAY_EXTRA_IMPL_error(int32_t)
. - [Removed]
LLDISPLAY_EXTRA_IMPL_waitPreviousDrawing(void)
: implementation has to callLLUI_DISPLAY_notifyAsynchronousDrawingEnd(bool)
instead.
- [Changed]
LLDISPLAY_impl.h
andintern/LLDISPLAY_impl.h
merged inLLUI_DISPLAY_impl.h
- [Changed]
LLDISPLAY_IMPL_initialize(void)
: replaced byLLUI_DISPLAY_IMPL_initialize(LLUI_DISPLAY_SInitData*)
(_mandatory_). - [Changed]
LLDISPLAY_IMPL_flush(int32_t,int32_t,int32_t,int32_t,int32_t)
: replaced byLLUI_DISPLAY_IMPL_flush(MICROUI_GraphicsContext*,uint8_t*, uint32_t,uint32_t,uint32_t,uint32_t)
(_mandatory_). - [Removed]
LLDISPLAY_IMPL_getWidth(void)
,LLDISPLAY_IMPL_getHeight(void)
andLLDISPLAY_IMPL_getGraphicsBufferAddress(void)
: replaced by elements in structureLLUI_DISPLAY_SInitData
. - [Removed]
LLDISPLAY_IMPL_synchronize(void)
: implementation has to callLLUI_DISPLAY_flushDone(bool)
instead.
- [Changed]
LLDISPLAY_UTILS.h
andintern/LLDISPLAY_UTILS.h
merged inLLUI_DISPLAY.h
- [Changed]
LLDISPLAY_UTILS_getBufferAddress(int32_t)
: replaced byLLUI_DISPLAY_getBufferAddress(MICROUI_Image*)
. - [Changed]
LLDISPLAY_UTILS_setDrawingLimits(int32_t,int32_t,int32_t,int32_t,int32_t)
: replaced byLLUI_DISPLAY_setDrawingLimits(MICROUI_GraphicsContext*,jint,jint,jint,jint)
. - [Changed]
LLDISPLAY_UTILS_blend(int32_t,int32_t,int32_t)
: replaced byLLUI_DISPLAY_blend(uint32_t,uint32_t,uint32_t)
. - [Changed]
LLDISPLAY_UTILS_allocateDecoderImage(void*)
: replaced byLLUI_DISPLAY_allocateImageBuffer(MICROUI_Image*,uint8_t)
. - [Changed]
LLDISPLAY_UTILS_flushDone(void)
: replaced byLLUI_DISPLAY_flushDone(bool)
. - [Changed]
LLDISPLAY_UTILS_drawingDone(void)
: replaced byLLUI_DISPLAY_notifyAsynchronousDrawingEnd(bool)
. - [Removed]
LLDISPLAY_UTILS_getWidth(int32_t)
,LLDISPLAY_UTILS_getHeight(int32_t)
andLLDISPLAY_UTILS_getFormat(int32_t)
: useMICROUI_Image
elements instead. - [Removed]
LLDISPLAY_UTILS_enterDrawingMode(void)
andLLDISPLAY_UTILS_exitDrawingMode(void)
. - [Removed]
LLDISPLAY_UTILS_setClip(int32_t,int32_t,int32_t,int32_t,int32_t)
. - [Removed]
LLDISPLAY_UTILS_getClipX1/X2/Y1/Y2(int32_t)
: useMICROUI_GraphicsContext
elements instead. - [Removed]
LLDISPLAY_UTILS_drawPixel(int32_t,int32_t,int32_t)
andLLDISPLAY_UTILS_readPixel(int32_t,int32_t,int32_t)
.
- [Changed]
LLDW_PAINTER_impl.h
- [Added] List of
ej.api.drawing
library’s native functions implemented in module com.microej.clibrary.llimpl#microui.
- [Added] List of
LLLEDS_impl.h
andintern/LLLEDS_impl.h
merged inLLUI_LED_impl.h
- [Changed]
LLLEDS_MIN_INTENSITY
andLLLEDS_MAX_INTENSITY
: replaced respectively byLLUI_LED_MIN_INTENSITY
andLLUI_LED_MAX_INTENSITY
. - [Changed]
LLLEDS_IMPL_initialize(void)
: replaced byLLUI_LED_IMPL_initialize(void)
. - [Changed]
LLLEDS_IMPL_getIntensity(int32_t)
: replaced byLLUI_LED_IMPL_getIntensity(jint)
. - [Changed]
LLLEDS_IMPL_setIntensity(int32_t,int32_t)
: replaced byLLUI_LED_IMPL_setIntensity(jint,jint)
.
- [Changed]
LLINPUT.h
andintern/LLINPUT.h
merged inLLUI_INPUT.h
- [Changed]
LLINPUT_sendEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendEvent(jint,jint)
. - [Changed]
LLINPUT_sendEvents(int32_t,int32_t*,int32_t)
: replaced byLLUI_INPUT_sendEvents(jint,jint*,jint)
. - [Changed]
LLINPUT_sendCommandEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendCommandEvent(jint,jint)
. - [Changed]
LLINPUT_sendButtonPressedEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendButtonPressedEvent(jint,jint)
. - [Changed]
LLINPUT_sendButtonReleasedEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendButtonReleasedEvent()jint,jint
. - [Changed]
LLINPUT_sendButtonRepeatedEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendButtonRepeatedEvent(jint,jint)
. - [Changed]
LLINPUT_sendButtonLongEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendButtonLongEvent(jint,jint)
. - [Changed]
LLINPUT_sendPointerPressedEvent(int32_t,int32_t,int32_t,int32_t,int32_t)
: replaced byLLUI_INPUT_sendPointerPressedEvent(jint,jint,jint,jint,LLUI_INPUT_Pointer)
. - [Changed]
LLINPUT_sendPointerReleasedEvent(int32_t,int32_t)
: replaced byLLUI_INPUT_sendPointerReleasedEvent(jint,jint)
. - [Changed]
LLINPUT_sendPointerMovedEvent(int32_t,int32_t,int32_t,int32_t)
: replaced byLLUI_INPUT_sendPointerMovedEvent(jint,jint,jint,LLUI_INPUT_Pointer)
. - [Changed]
LLINPUT_sendTouchPressedEvent(int32_t,int32_t,int32_t)
: replaced byLLUI_INPUT_sendTouchPressedEvent(jint,jint,jint)
. - [Changed]
LLINPUT_sendTouchReleasedEvent(int32_t)
: replaced byLLUI_INPUT_sendTouchReleasedEvent(jint)
. - [Changed]
LLINPUT_sendTouchMovedEvent(int32_t,int32_t,int32_t)
: replaced byLLUI_INPUT_sendTouchMovedEvent(jint,jint,jint)
. - [Changed]
LLINPUT_sendStateEvent(int32_t,int32_t,int32_t)
: replaced byLLUI_INPUT_sendStateEvent(jint,jint,jint)
. - [Changed]
LLINPUT_getMaxEventsBufferUsage(void)
: replaced byLLUI_INPUT_getMaxEventsBufferUsage(void)
.
- [Changed]
LLINPUT_impl.h
andintern/LLINPUT_impl.h
merged inLLUI_INPUT_impl.h
- [Changed]
LLINPUT_IMPL_initialize(void)
: replaced byLLUI_INPUT_IMPL_initialize(void)
(_mandatory_). - [Changed]
LLINPUT_IMPL_getInitialStateValue(int32_t,int32_t)
: replaced byLLUI_INPUT_IMPL_getInitialStateValue(jint,jint)
(_mandatory_). - [Changed]
LLINPUT_IMPL_enterCriticalSection(void)
: replaced byLLUI_INPUT_IMPL_enterCriticalSection(void)
(_mandatory_). - [Changed]
LLINPUT_IMPL_leaveCriticalSection(void)
: replaced byLLUI_INPUT_IMPL_leaveCriticalSection(void)
(_mandatory_).
- [Changed]
LLUI_DISPLAY.h
- [Added] Renaming of
LLDISPLAY_UTILS.h
. - [Added] Several functions to interact with the Graphics Engine and to get information on images, graphics context, clip, etc.
- [Added]
LLUI_DISPLAY_requestFlush(bool)
: requests a call toLLUI_DISPLAY_IMPL_flush()
. - [Added]
LLUI_DISPLAY_requestRender(void)
: requests a call toDisplayable.render()
. - [Added]
LLUI_DISPLAY_freeImageBuffer(MICROUI_Image*)
: frees an image previously allocated byLLUI_DISPLAY_allocateImageBuffer(MICROUI_Image*,uint8_t)
. - [Added]
LLUI_DISPLAY_requestDrawing(MICROUI_GraphicsContext*,SNI_callback)
: allows to take the hand on the shared drawing buffer. - [Added]
LLUI_DISPLAY_setDrawingStatus(DRAWING_Status)
: specifies the drawing status to the Graphics Engine.
- [Added] Renaming of
LLUI_DISPLAY_impl.h
- [Added] Merge of
LLDISPLAY_EXTRA_impl.h
andLLDISPLAY_impl.h
. - [Added] Structure
LLUI_DISPLAY_SInitData
: implementation has to fill it inLLUI_DISPLAY_IMPL_initialize(LLUI_DISPLAY_SInitData*)
. - [Added]
LLUI_DISPLAY_IMPL_binarySemaphoreTake(void*)
andLLUI_DISPLAY_IMPL_binarySemaphoreGive(void*,bool)
: implementation has to manage a binary semaphore (_mandatory_). - [Added]
LLUI_DISPLAY_IMPL_getNewImageStrideInBytes(MICROUI_ImageFormat,uint32_t,uint32_t,uint32_t)
: allows to set an image stride different than image side (_optional_).
- [Added] Merge of
LLUI_PAINTER_impl.h
- [Added] List of
ej.api.microui
library’s native functions implemented in module com.microej.clibrary.llimpl#microui. - [Added]
MICROUI_ImageFormat
: MicroUI Image pixel format. - [Added]
MICROUI_Image
: MicroUI Image representation. - [Added]
MICROUI_GraphicsContext
: MicroUI GraphicsContext representation.
- [Added] List of
ui_drawing_soft.h
- [Added] List of internal Graphics Engine software algorithms to perform some drawings (related to library
ej.api.microui
).
- [Added] List of internal Graphics Engine software algorithms to perform some drawings (related to library
ui_drawing.h
- [Added] List of
ej.api.microui
library’s drawing functions to optionally implement in platform.
- [Added] List of
Custom Native Drawing Functions¶
- In custom UI native methods, replace
LLDISPLAY_UTILS_getBufferAddress(xxx);
by(uint32_t)LLUI_DISPLAY_getBufferAddress(xxx)
(new function returnsuint8_t*
), whereuint32_t xxx
is replaced byMICROUI_Image* xxx
or byMICROUI_GraphicsContext* xxx
. - Replace
LLDISPLAY_UTILS_getFormat(xxx)
byxxx->format
, whereuint32_t xxx
is replaced byMICROUI_Image* xxx
or byMICROUI_GraphicsContext* xxx
. - Replace call to
LLDISPLAY_allocateDecoderImage
by a call toLLUI_DISPLAY_allocateImageBuffer
- Optional: implement drawing functions listed in
ui_drawing.h
following the available examples inLLUI_PAINTER_impl.c
andLLDW_PAINTER_impl.c
files comments.
Application¶
- See application Migration Guide.
From 11.x to 12.x¶
Platform Configuration Project¶
- Update Architecture version: 7.11.0 or higher.
Front Panel¶
Create a new Front Panel Project (next sections explain how to update each widget):
- Verify that FrontPanelDesigner is at least version 6: Help > About > Installations Details > Plug-ins.
- Create a new front panel project: File > New > Project… > MicroEJ > MicroEJ Front Panel Project, choose a name and press Finish.
- Move files from
[old project]/src
to[new project]/src/main/java
. - Move files from
[old project]/resources
to[new project]/src/main/resources
. - Move files from
[old project]/definitions
to[new project]/src/main/resources
, except yourxxx.fp
file. - If existing delete file
[new project]/src/main/java/microui.properties
. - Delete file
[new project]/src/main/resources/.fp.xsd
. - Delete file
[new project]/src/main/resources/.fp1.0.xsd
. - Delete file
[new project]/src/main/resources/widgets.desc
. - Open
[old project]/definitions/xxx.fp
. - Copy
device
attributes (name
andskin
) from[old project]/definitions/xxx.fp
to[new project]/src/main/resources/xxx.fp
. - Copy content of
body
(notbody
tag itself) from[old project]/definitions/xxx.fp
underdevice
group of[new project]/src/main/resources/xxx.fp
.
Widget “led2states”:
- Rename
led2states
byej.fp.widget.LED
. - Rename the attribute
id
bylabel
.
- Rename
Widget “pixelatedDisplay”:
- Rename
pixelatedDisplay
byej.fp.widget.Display
. - Remove the attribute
id
. - (if set) Remove the attribute
initialColor
if its value is0
- (if set) Rename the attribute
mask
byfilter
; this image must have the same size in pixels than display itself (width
*height
). - (if set) Rename the attribute
realWidth
bydisplayWidth
. - (if set) Rename the attribute
realHeight
bydisplayHeight
. - (if set) Rename the attribute
transparencyLevel
byalpha
; change the value:newValue = 255 - oldValue
. - (if set) Remove the attribute
residualFactor
(not supported). - (if set) If
extensionClass
is specified: follow next notes.
- Rename
Widget “pixelatedDisplay”:
ej.fp.widget.Display
Extension Class:- Open the class
- Extends
ej.fp.widget.MicroUIDisplay.AbstractDisplayExtension
instead ofcom.is2t.microej.frontpanel.display.DisplayExtension
. - Rename method
convertDisplayColorToRGBColor
toconvertDisplayColorToARGBColor
. - Rename method
convertRGBColorToDisplayColor
toconvertARGBColorToDisplayColor
.
Widget “pointer”:
- Rename
pointer
byej.fp.widget.Pointer
. - Remove the attribute
id
. - (if set) Rename the attribute
realWidth
byareaWidth
. - (if set) Rename the attribute
realHeight
byareaHeight
. - Keep or remove the attribute
listenerClass
according next notes.
- Rename
Widget “pointer”:
ej.fp.widget.Pointer
Listener Class:This extension class is useless if the implementation respects these rules:
- (a)
press
method is sending apress
MicroUI Pointer event. - (b)
release
method is sending arelease
MicroUI Pointer event. - (c )
move
method is sending amove
MicroUI Pointer event. - (d) The MicroUI Pointer event generator name is
POINTER
whenej.fp.widget.Pointer
’stouch
attribute isfalse
(or not set). - (e) The MicroUI Pointer event generator name is
TOUCH
whenej.fp.widget.Pointer
’stouch
attribute istrue
.
If only (d) or (e) is different:
- Open the listener class.
- Extends the class
ej.fp.widget.Pointer.PointerListenerToPointerEvents
instead of implementing the interfacecom.is2t.microej.frontpanel.input.listener.PointerListener
. - Implements the method
getMicroUIGeneratorTag()
.
In all other cases:
- Open the listener class.
- Implements the interface
ej.fp.widget.Pointer.PointerListener
instead ofcom.is2t.microej.frontpanel.input.listener.PointerListener
.
- (a)
Widget “push”:
- Rename
push
byej.fp.widget.Button
. - Rename the attribute
id
bylabel
. - (if set) Review
filter
image: this image must have the same size in pixels than the buttonskin
. - (if set) Remove the attribute
hotkey
(not supported). - Keep or remove the attribute
listenerClass
according next notes.
- Rename
Widget “push”:
ej.fp.widget.Button
Listener Class:This extension class is useless if the implementation respects these rules:
- (a)
press
method is sending apress
MicroUI Buttons event with buttonlabel
(equals to old buttonid
) as button index. - (b)
release
method is sending arelease
MicroUI Buttons event with buttonlabel
(equals to old buttonid
) as button index. - (c ) The MicroUI Buttons event generator name is
BUTTONS
.
If only (c ) is different:
- Open the listener class.
- Extends the class
ej.fp.widget.Button.ButtonListenerToButtonEvents
instead of implementing the interfacecom.is2t.microej.frontpanel.input.listener.ButtonListener
. - Overrides the method
getMicroUIGeneratorTag()
.
In all other cases:
- Open the listener class.
- Implements the interface
ej.fp.widget.Button.ButtonListener
instead ofcom.is2t.microej.frontpanel.input.listener.ButtonListener
.
- (a)
Widget “repeatPush”:
- Rename
repeatPush
byej.fp.widget.RepeatButton
. - (if set) Remove the attribute
sendPressRelease
(not supported). - Same rules than widget push.
- Rename
Widget “longPush”:
- Rename
longPush
byej.fp.widget.LongButton
. - Same rules than widget push.
- Rename
Widget “joystick”:
- Rename
joystick
byej.fp.widget.Joystick
. - Remove the attribute
id
. - (if set) Rename the attribute
mask
byfilter
; this image must have the same size in pixels than joystickskin
. - (if set) Remove the attribute
hotkeys
(not supported). - Keep or remove the attribute
listenerClass
according next notes.
- Rename
Widget “joystick”:
ej.fp.widget.Joystick
Listener Class:This extension class is useless if the implementation respects these rules:
- (a)
press
methods are sending some MicroUI Command eventsUP
,DOWN
,LEFT
,RIGHT
andSELECT
. - (b)
repeat
methods are sending same MicroUI Command eventsUP
,DOWN
,LEFT
,RIGHT
andSELECT
. - (c )
release
methods are sending nothing. - (d) The MicroUI Command event generator name is
JOYSTICK
.
If only (d) is different:
- Open the listener class
- Extends the class
ej.fp.widget.Joystick.JoystickListenerToCommandEvents
instead of implementing the interfacecom.is2t.microej.frontpanel.input.listener.JoystickListener
. - Overrides the method
getMicroUIGeneratorTag()
.
In all other cases:
- Open the listener class.
- Implements the interface
ej.fp.widget.Joystick.JoystickListener
instead ofcom.is2t.microej.frontpanel.input.listener.JoystickListener
.
- (a)
Others Widgets:
These widgets may have not been migrated. Check in
ej.tool.frontpanel.widget
library if some widgets are compatible or write your own widgets.
Application¶
- See application Migration Guide.
From 9.x to 10.x¶
Platform Configuration Project¶
- Update Architecture version: 6.13.0 or higher.
- Edit
display/display.properties
- Add property
imagesHeap.size=xxx
; this value fixes the images heap size when using the platform in command line (to build a firmware) - In platform linker file (standalone mode with MicroEJ linker): remove the image heap reserved section and put the section
.bss.microui.display.imagesHeap
instead.
BSP¶
- In BSP linker file: remove the image heap reserved section and put the section
.bss.microui.display.imagesHeap
instead - Edit
LLDISPLAY*.c
: remove the functionsLLDISPLAY_IMPL_getWorkingBufferStartAddress
andLLDISPLAY_IMPL_getWorkingBufferEndAddress
Application¶
- See application Migration Guide.
From 8.x to 9.x¶
Application¶
- See application Migration Guide.
From 7.x to 8.x¶
Platform Configuration Project¶
- Update Architecture version: 6.4.0 or higher.
- Edit
display/display.properties
: remove propertymode=xxx
BSP¶
Edit
LLDISPLAY*.c
For LLDISPLAY
SWITCH
- Remove the function
LLDISPLAY_SWITCH_IMPL_getDisplayBufferAddress()
- Replace the function
void LLDISPLAY_SWITCH_IMPL_getDisplayBufferAddress()
byint32_t LLDISPLAY_IMPL_flush()
- In this function, return the old LCD frame buffer address
- Replace the function
LLDISPLAY_COPY_IMPL_getBackBufferAddress()
byLLDISPLAY_IMPL_getGraphicsBufferAddress()
- Remove the function
For LLDISPLAY
COPY
- Replace the function
void LLDISPLAY_COPY_IMPL_copyBuffer()
byint32_t LLDISPLAY_IMPL_flush()
- In this function, return the back buffer address (given in argument)
- Replace the function
LLDISPLAY_COPY_IMPL_getBackBufferAddress()
byLLDISPLAY_IMPL_getGraphicsBufferAddress()
- Replace the function
For LLDISPLAY
DIRECT
- Add the function
void LLDISPLAY_IMPL_synchorize(void)
(do nothing) - Add the function
int32_t LLDISPLAY_IMPL_flush()
- In this function, just return the back buffer address (given in argument)
- Add the function
Replace h file
LLDISPLAY_SWITCH_IMPL.h
,LLDISPLAY_COPY_IMPL.h
orLLDISPLAY_DIRECT_IMPL.h
byLLDISPLAY_IMPL.h
Replace all functions
LLDISPLAY_SWITCH_IMPL_xxx
,LLDISPLAY_COPY_IMPL_xxx
andLLDISPLAY_DIRECT_IMPL_xxx
byLLDISPLAY_IMPL_xxx
Remove the argument
int32_t type
fromgetWidth
andgetHeight
STM32 Platforms with DMA2D only¶
In platform configuration project, edit
display/display.properties
Add property
hardwareAccelerator=dma2d
In BSP project, edit
LLDISPLAY*.c
simplify following functions (see STM32F7Discovery board implementation)
LLDISPLAY_EXTRA_IMPL_fillRect LLDISPLAY_EXTRA_IMPL_drawImage LLDISPLAY_EXTRA_IMPL_waitPreviousDrawing
Add the following function
void LLDISPLAY_EXTRA_IMPL_error(int32_t errorCode) { printf("lldisplay error: %d\n", errorCode); while(1); }
Launch an application with images and fillrect
Compile, link and debug the BSP
Set some breakpoints on three functions
Ensure the functions are called