MicroUI Static Initializer

Inputs

The XML file used as input by the MicroUI Static Initialization Tool may contain tags related to the Input component as described below.

Event Generators Description
<eventgenerators>
<!-- Generic Event Generators -->
    <eventgenerator name="GENERIC" class="foo.bar.Zork">
        <property name="PROP1" value="3"/>
        <property name="PROP2" value="aaa"/>
    </eventgenerator>

    <!-- Predefined Event Generators -->
    <command name="COMMANDS"/>
    <buttons name="BUTTONS" extended="3"/>
    <buttons name="JOYSTICK" extended="5"/>
    <pointer name="POINTER" width="1200" height="1200"/>
    <touch name="TOUCH" display="DISPLAY"/>
    <states name="STATES" numbers="NUMBERS" values="VALUES"/>

</eventgenerators>

<array name="NUMBERS">
    <elem value="3"/>
    <elem value="2"/>
    <elem value="5"/>
</array>

<array name="VALUES">
    <elem value="2"/>
    <elem value="0"/>
    <elem value="1"/>
</array>
Event Generators Static Definition
Tag Attributes Description
eventgenerators   The list of event generators.
priority Optional. An integer value. Defines the internal display thread priority. Default value is 5.
eventgenerator   Describes a generic event generator. See also Generic Event Generators.
name The logical name.
class The event generator class (must extend the ej.microui.event.generator.GenericEventGenerator class). This class must be available in the MicroEJ Application classpath.
listener Optional. Default listener’s logical name. Only a display is a valid listener. If no listener is specified the listener is the default display.
property   A generic event generator property. The generic event generator will receive this property at startup, via the method setProperty.
name The property key.
value The property value.
command   The default event generator Command.
name The logical name.
listener Optional. Default listener’s logical name. Only a display is a valid listener. If no listener is specified, then the listener is the default display.
buttons   The default event generator Buttons.
name The logical name.
extended Optional. An integer value. Defines the number of buttons which support the MicroUI extended features (elapsed time, click and double-click).
listener Optional. Default listener’s logical name. Only a display is a valid listener. If no listener is specified, then the listener is the default display.
pointer   The default event generator Pointer.
name The logical name.
width An integer value. Defines the pointer area width.
height An integer value. Defines the pointer area heigth.
extended Optional. An integer value. Defines the number of pointer buttons (right click, left click, etc.) which support the MicroUI extended features (elapsed time, click and double-click).
listener Optional. Default listener’s logical name. Only a display is a valid listener. If no listener is specified, then the listener is the default display.
touch   The default event generator Touch.
name The logical name.
display Logical name of the Display with which the touch is associated.
listener Optional. Default listener’s logical name. Only a display is a valid listener. If no listener is specified, then the listener is the default display.
states   An event generator that manages a group of state machines. The state of a machine is changed by sending an event using LLINPUT_sendStateEvent.
name The logical name.
numbers The logical name of the array which defines the number of state machines for this States generator, and their range of state values. The IDs of the state machines start at 0. The number of state machines managed by the States generator is equal to the size of the numbers array, and the value of each entry in the array is the number of different values supported for that state machine. State machine values for state machine i can be in the range 0 to numbers[i]-1.
values Optional. The logical name of the array which defines the initial state values of the state machines for this States generator. The values array must be the same size as the numbers array. If initial state values are specified using a values array, then the LLINPUT_IMPL_getInitialStateValue function is not called; otherwise that function is used to establish the initial values [1]
listener Optional. Default listener’s logical name. Only a display is a valid listener. If no listener is specified, then the listener is the default display.
array   An array of values.
name The logical name.
elem   A value.
value An integer value.
[1]Exception: When using MicroEJ Platform, where there is no equivalent to the LLINPUT_IMPL_getInitialStateValue function. If no values array is provided, and the MicroEJ Platform is being used, all state machines take 0 as their initial state value.

Display

The display component augments the static initialization file with:

  • The configuration of each display.
  • Fonts that are implicitly embedded within the application (also called system fonts). Applications can also embed their own fonts.
<display name="DISPLAY"/>

<fonts>
    <font file="resources\fonts\myfont.ejf">
        <range name="LATIN" sections="0-2"/>
        <customrange start="0x21" end="0x3f"/>
    </font>
    <font file="C:\data\myfont.ejf"/>
</fonts>
Display Static Initialization XML Tags Definition
Tag Attributes Description
display   The display element describes one display.
name The logical name of the display.
priority Optional. An integer value. Defines the internal display thread priority. Default value is 5.
default true or false. Defines this display to be the default display. By default the very first display described in the XML file is the default display.
fonts   The list of system fonts. The system fonts are available for all displays.
font   A system font.
file The font file path. The path may be absolute or relative to the XML file.
range   A font generic range.
name The generic range name (LATIN, HAN, etc.)
sections

Optional. Defines one or several sub parts of the generic range.

“1”: add only part 1 of the range

“1-5”: add parts 1 to 5

“1,5”: add parts 1 and 5

These combinations are allowed:

“1,5,6-8” add parts 1, 5, and 6 through 8

By default, all range parts are embedded.

customrange   A font-specific range.
start UTF16 value of the very first character to embed.
end UTF16 value of the very last character to embed.