(→Configuration Skin) |
(→Configure the Skin of Emulator) |
||
| Line 11: | Line 11: | ||
=== Configure the Skin of Emulator === | === Configure the Skin of Emulator === | ||
| - | We provide a tool to manage the skin configuration for MeeGo target. You can list current resolution of the specified target and change the resolution to other predefined resolutions. | + | We provide a tool to manage the skin configuration for MeeGo target. You can list current resolution of the specified target and change the resolution to other predefined resolutions. Open a terminal on Linux or open the MADDE terminal on Windows to run this tool: |
*List the installed runtimes, you can change the resolution of the installed runtimes. | *List the installed runtimes, you can change the resolution of the installed runtimes. | ||
1. Rotate the skin (F9): You can press this button to rotate the skin of the emulator.
2. Zoom in the emulator (F11): This button is for zooming in the emulator screen.
3. Zoom out the emulator (F12): This button is for zooming out the emulator screen.
4. Actual size of the screen (F8): This button recover the screen to actual size.
5. Power off the emulator (F7): Power off the emulator.
We provide a tool to manage the skin configuration for MeeGo target. You can list current resolution of the specified target and change the resolution to other predefined resolutions. Open a terminal on Linux or open the MADDE terminal on Windows to run this tool:
$ mad list
Runtimes information will be displayed by MADDE command.
Runtimes: meego-handset-ia32-qemu-1.1.20110110.1026-runtime (installable) meego-handset-ia32-qemu-1.1.20110118.1010-runtime (installable) meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime (installable) meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime (installable) meego-handset-ia32-qemu-1.1.90.3.20110215.10-runtime (installable) meego-netbook-ia32-qemu-1.1.20110110.1049-runtime (installable) meego-netbook-ia32-qemu-1.1.20110118.1020-runtime (installable) meego-netbook-ia32-qemu-1.1.20101031.2037-sda-runtime (installable) meego-netbook-ia32-w32-qemu-1.1.20101031.2037-sda-runtime (installable) meego-tablet-ia32-qemu-1.1.90.8.20110322.1-sda-runtime (installed) meego-tablet-ia32-sdk-1.1.90.2.20110207.22-sda-runtime (installed)
$ cd /usr/lib/madde/linux-i686/tools/qemu-meego/skin $ sudo ./setresolution -c -r meego-tablet-ia32-qemu-1.1.90.8.20110322.1-sda-runtime
It will list the current resolution of the specified runtime:
Runtime Name: meego-tablet-ia32-qemu-1.1.90.8.20110322.1-sda-runtime Skin Resolution: 864x480
$ sudo ./setresolution -s 1280x800 -r meego-tablet-ia32-qemu-1.1.90.8.20110322.1-sda-runtime
The resolution will be changed from old to the specified new one:
Change resolution from 864x480 to 1280x800
MeeGo emulator is based on QEMU with OpenGL, device skin & device simulation. It contains predefined configuration files for several MeeGo devices. You also can add devices by creating configuration files that specify the skin resources. Those basic elements of the skin resources could be included in the configuration file.
The graphics and settings for the device models are stored in the MeeGo emulator directory. The default skin path of MeeGo SDK is /opt/meego/qemu-gl/share/meego/skin. To add a new device, create a subfolder and put a <your device name>.xml file with skin resources into it. It is easiest to copy and modify one of the existing files.
The skin of MeeGo device is defined by XML file. This is a sample code of a very simple skin configuration file:
<root>
<landscape>
<skin width="1138" height="643"/>
<bgcolor red="255" blue="255" green="255"/>
<background image="background.png" posx="0" posy="50"/>
<screen width="864" height="480" posx="134" posy="107"/>
<button image="rotate.png" posx="10" posy="4" action="Rotate device (F9)" keycode="67"/>
<button image="plus.png" posx="55" posy="4" action="Emulator zoom in (F11)" keycode="87"/>
<button image="minus.png" posx="100" posy="4" action="Emulator zoom out (F12)" keycode="88"/>
<button image="actual.png" posx="145" posy="4" action="Emulator actual size (F8)" keycode="66"/>
<button image="poweroff.png" posx="190" posy="4" action="Emulator power off (F7)" keycode="65"/>
</landscape>
<portrait>
<skin width="602" height="1183"/>
<bgcolor red="255" blue="255" green="255"/>
<background image="background_p.png" posx="0" posy="50"/>
<screen width="864" height="480" posx="63" posy="184"/>
<button image="rotate.png" posx="10" posy="4" action="Rotate device (F9)" keycode="67"/>
<button image="plus.png" posx="55" posy="4" action="Emulator zoom in (F11)" keycode="87"/>
<button image="minus.png" posx="100" posy="4" action="Emulator zoom out (F12)" keycode="88"/>
<button image="actual.png" posx="145" posy="4" action="Emulator actual size (F8)" keycode="66"/>
<button image="poweroff.png" posx="190" posy="4" action="Emulator power off (F7)" keycode="65"/>
</portrait>
</root>
The configuration file begin with a <root> label and end with a </root> label. All of the configurations include in a pair of root labels to describe the whole emulator window.
In order to support skin rotation, the configuration has landscape mode and portrait mode. The two kinds of configurations include in the different sections.
This defines the skin width and height, it represent the window size of the emulator. If you don't define any buttons in the emulator window, the skin size is the same to the size of skin background image.
bgcolor defines the background color of the emulator, the color is defined by RGB value. This line means using white background color.
background label specify the background image of the skin. posx and posy is the beginning coordinate of the skin image.
screen label defines the size and offset of the guest os display. The above line defines a 864x480 resolution screen of handset device. posx and posy are the offset coordinates of the emulator screen.
This line defines a button for rotation. The button background image is rotate.png file, the offset of the button is (10,4), the keycode pass to the emulator is 67 and the shortcut for rotation is F9.