Meego Wiki
Views

SDK/Docs/Emulator Skin

From MeeGo wiki
< SDK | Docs(Difference between revisions)
Jump to: navigation, search
(Configuration Skin)
(categorise, wikify section heading, format list)
 
(One intermediate revision not shown)
Line 1: Line 1:
-
=== How to use MeeGo emulator ===
+
== How to use MeeGo emulator ==
[[File:Qemu_screen.jpg|800px]] <br>
[[File:Qemu_screen.jpg|800px]] <br>
-
1. Rotate the skin (F9): You can press this button to rotate the skin of the emulator.<br>
+
# 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.<br>
+
# 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.<br>
+
# 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.<br>
+
# Actual size of the screen (F8): This button recover the screen to actual size.
-
5. Power off the emulator (F7): Power off the emulator.<br>
+
# Power off the emulator (F7): Power off the emulator.
=== 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.
Line 54: Line 54:
*In order to rotate the skin of the device, you should specify both the landscape and portrait parameters of the skin.
*In order to rotate the skin of the device, you should specify both the landscape and portrait parameters of the skin.
-
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 graphics and settings for the device models are stored in the MeeGo emulator directory. The default skin path of MeeGo SDK is <code>/opt/meego/qemu-gl/share/meego/skin</code>. 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:
The skin of MeeGo device is defined by XML file. This is a sample code of a very simple skin configuration file:
Line 85: Line 85:
[[File:Qemu screen2.jpg|850px]]
[[File:Qemu screen2.jpg|850px]]
-
*<strong><root> </root></strong>
+
*<strong><root> </root></strong>: 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.
-
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.
+
*<strong><landscape> </landscape> && <portrait> </portrait></strong>: In order to support skin rotation, the configuration has landscape mode and portrait mode. The two kinds of configurations include in the different sections.
 +
*<strong><skin width="1138" height="643"/></strong>: 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.
 +
*<strong><bgcolor red="255" blue="255" green="255"/></strong>: bgcolor defines the background color of the emulator, the color is defined by RGB value. This line means using white background color.
 +
*<strong><background image="background.png" posx="0" posy="50"/></strong>: background label specify the background image of the skin. posx and posy is the beginning coordinate of the skin image.
 +
*<strong><screen width="864" height="480" posx="134" posy="107"/></strong>: 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.
 +
*<strong><button image="rotate.png" posx="10" posy="4" action="Rotate device (F9)" keycode="67"/> <!-- Key: F9 --></strong>: 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.
-
*<strong><landscape> </landscape> && <portrait> </portrait></strong>
+
[[Category:SDK]]
-
In order to support skin rotation, the configuration has landscape mode and portrait mode. The two kinds of configurations include in the different sections.
+
-
 
+
-
*<strong><skin width="1138" height="643"/></strong>
+
-
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.
+
-
 
+
-
*<strong><bgcolor red="255" blue="255" green="255"/></strong>
+
-
bgcolor defines the background color of the emulator, the color is defined by RGB value. This line means using white background color.
+
-
 
+
-
*<strong><background image="background.png" posx="0" posy="50"/></strong>
+
-
background label specify the background image of the skin. posx and posy is the beginning coordinate of the skin image.
+
-
 
+
-
*<strong><screen width="864" height="480" posx="134" posy="107"/></strong>
+
-
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.
+
-
 
+
-
*<strong><button image="rotate.png" posx="10" posy="4" action="Rotate device (F9)" keycode="67"/> <!-- Key: F9 --></strong>
+
-
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.
+

Latest revision as of 10:00, 13 April 2011

How to use MeeGo emulator

Qemu screen.jpg

  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.

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. 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.
$ 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)
  • Display current resolution of the installed runtime, for example:
$ 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
  • Change the runtime to new resolution
$ 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
  • You should restart Qt Creator to load the new skin configuration, and click the "Start Emulator" button to run MeeGo in new skin resolution

Make your own emulator skin

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 screen background image, it display as the skin of the device. The image must be PNG format
  • The size of the area on which QEMU draws the OS screen, you need specify the position of the screen within the background image
  • If add buttons on the skin, you need specify the button image & the offset of the button image
  • If it supports keyboard, you also need configure the keyboard image, key value & offset, etc
  • In order to rotate the skin of the device, you should specify both the landscape and portrait parameters of the skin.

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>

Qemu screen2.jpg

  • <root> </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.
  • <landscape> </landscape> && <portrait> </portrait>: In order to support skin rotation, the configuration has landscape mode and portrait mode. The two kinds of configurations include in the different sections.
  • <skin width="1138" height="643"/>: 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 red="255" blue="255" green="255"/>: bgcolor defines the background color of the emulator, the color is defined by RGB value. This line means using white background color.
  • <background image="background.png" posx="0" posy="50"/>: background label specify the background image of the skin. posx and posy is the beginning coordinate of the skin image.
  • <screen width="864" height="480" posx="134" posy="107"/>: 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.
  • <button image="rotate.png" posx="10" posy="4" action="Rotate device (F9)" keycode="67"/> : 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.
Personal tools