<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.meego.com/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.meego.com/index.php?title=Special:Contributions/Jketreno&amp;feed=atom&amp;limit=50&amp;target=Jketreno&amp;year=&amp;month=</id>
		<title>MeeGo wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.meego.com/index.php?title=Special:Contributions/Jketreno&amp;feed=atom&amp;limit=50&amp;target=Jketreno&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Special:Contributions/Jketreno"/>
		<updated>2013-05-26T03:47:39Z</updated>
		<subtitle>From MeeGo wiki</subtitle>
		<generator>MediaWiki 1.16.2</generator>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-10T22:03:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Touch Latency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
==Touch Latency==&lt;br /&gt;
When dealing with touch based interaction concepts, it is critical to minimize time difference between when the user attempts to interact with the UI and when the user receives feedback that something is happening.  The variables at play which contribute heavily to this latency include:&lt;br /&gt;
&lt;br /&gt;
# Firmware touch detection (it takes time for the hardware to filter out noise to determine that an actual finger touched the screen vs. an errant capacitance change)&lt;br /&gt;
# Kernel driver processing time&lt;br /&gt;
# Time between when the kernel is done and when the X input driver pulls the event out&lt;br /&gt;
# X input driver processing&lt;br /&gt;
# Time between when the input driver is done and when an Qt application receives the event&lt;br /&gt;
# Qt processing time&lt;br /&gt;
# Application code processing time which results in the UI changing&lt;br /&gt;
# The time between when the UI changes and when the next vblank occurs such that the user can actually *see* the result (which may require additional time to post a damage event to the window manager, the compositing of the new UI, and then a vblank)&lt;br /&gt;
&lt;br /&gt;
By instrumenting the xorg-x11-driver-mtev we can determine the amount of time spent between 2 through 5.  By instrumenting Qt we can determine the time spent between 5 and 7.  Accurately measuring the time between 7 and 8 is difficult.  For the purpose of measuring the part that we can control in the touch stack, measuring 2 through 7 is sufficient.&lt;br /&gt;
&lt;br /&gt;
The patches to add this information can be found here:&lt;br /&gt;
&lt;br /&gt;
* [http://api.meego.com/public/source/home:jketreno:touch-latency/xorg-x11-drv-mtev/debug.patch?rev=b3b40537385aa6b1aabda46fd851e05b xorg-x11-drv-mtev]&lt;br /&gt;
* [http://api.meego.com/public/source/home:jketreno:touch-latency/qt/qtTouchLatencyDebug.patch?rev=8636c4689650fd41c2121f56fce95714 Qt Touch Latency Debug patch]&lt;br /&gt;
&lt;br /&gt;
Versions of Qt and xorg-x11-drv-mtev with the above patches applied can be found in my home project in the [http://build.meego.com/project/show?project=home%3Ajketreno%3Atouch-latency MeeGo OBS system].&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:MtevTouchLatencyDebug.patch</id>
		<title>File:MtevTouchLatencyDebug.patch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:MtevTouchLatencyDebug.patch"/>
				<updated>2011-06-10T20:32:10Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-10T00:48:30Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Touch Latency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
==Touch Latency==&lt;br /&gt;
When dealing with touch based interaction concepts, it is critical to minimize time difference between when the user attempts to interact with the UI and when the user receives feedback that something is happening.  The variables at play which contribute heavily to this latency include:&lt;br /&gt;
&lt;br /&gt;
# Firmware touch detection (it takes time for the hardware to filter out noise to determine that an actual finger touched the screen vs. an errant capacitance change)&lt;br /&gt;
# Kernel driver processing time&lt;br /&gt;
# Time between when the kernel is done and when the X input driver pulls the event out&lt;br /&gt;
# X input driver processing&lt;br /&gt;
# Time between when the input driver is done and when an Qt application receives the event&lt;br /&gt;
# Qt processing time&lt;br /&gt;
# Application code processing time which results in the UI changing&lt;br /&gt;
# The time between when the UI changes and when the next vblank occurs such that the user can actually *see* the result (which may require additional time to post a damage event to the window manager, the compositing of the new UI, and then a vblank)&lt;br /&gt;
&lt;br /&gt;
By instrumenting the xorg-x11-driver-mtev we can determine the amount of time spent between 2 through 5.  By instrumenting Qt we can determine the time spent between 5 and 7.  Accurately measuring the time between 7 and 8 is difficult.  For the purpose of measuring the part that we can control in the touch stack, measuring 2 through 7 is sufficient.&lt;br /&gt;
&lt;br /&gt;
The patches to add this information can be found here:&lt;br /&gt;
&lt;br /&gt;
* [http://api.meego.com/public/source/home:jketreno/xorg-x11-drv-mtev/debug.patch?rev=a64635cf9c7fd59d898a7e2d63aa5d4e xorg-x11-drv-mtev]&lt;br /&gt;
* [http://wiki.meego.com/images/QtTouchLatencyDebug.patch Qt Touch Latency Debug patch]&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:QtTouchLatencyDebug.patch</id>
		<title>File:QtTouchLatencyDebug.patch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:QtTouchLatencyDebug.patch"/>
				<updated>2011-06-10T00:46:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-10T00:45:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Touch Latency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
==Touch Latency==&lt;br /&gt;
When dealing with touch based interaction concepts, it is critical to minimize time difference between when the user attempts to interact with the UI and when the user receives feedback that something is happening.  The variables at play which contribute heavily to this latency include:&lt;br /&gt;
&lt;br /&gt;
# Firmware touch detection (it takes time for the hardware to filter out noise to determine that an actual finger touched the screen vs. an errant capacitance change)&lt;br /&gt;
# Kernel driver processing time&lt;br /&gt;
# Time between when the kernel is done and when the X input driver pulls the event out&lt;br /&gt;
# X input driver processing&lt;br /&gt;
# Time between when the input driver is done and when an Qt application receives the event&lt;br /&gt;
# Qt processing time&lt;br /&gt;
# Application code processing time which results in the UI changing&lt;br /&gt;
# The time between when the UI changes and when the next vblank occurs such that the user can actually *see* the result (which may require additional time to post a damage event to the window manager, the compositing of the new UI, and then a vblank)&lt;br /&gt;
&lt;br /&gt;
By instrumenting the xorg-x11-driver-mtev we can determine the amount of time spent between 2 through 5.  By instrumenting Qt we can determine the time spent between 5 and 7.  Accurately measuring the time between 7 and 8 is difficult.  For the purpose of measuring the part that we can control in the touch stack, measuring 2 through 7 is sufficient.&lt;br /&gt;
&lt;br /&gt;
The patches I used can be found here:&lt;br /&gt;
&lt;br /&gt;
* [http://api.meego.com/public/source/home:jketreno/xorg-x11-drv-mtev/debug.patch?rev=a64635cf9c7fd59d898a7e2d63aa5d4e&amp;amp; xorg-x11-drv-mtev]&lt;br /&gt;
* [ Qt]&lt;br /&gt;
[[Media:qtTouchLatencyDebug.patch]]&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-10T00:45:15Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Touch Latency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
==Touch Latency==&lt;br /&gt;
When dealing with touch based interaction concepts, it is critical to minimize time difference between when the user attempts to interact with the UI and when the user receives feedback that something is happening.  The variables at play which contribute heavily to this latency include:&lt;br /&gt;
&lt;br /&gt;
# Firmware touch detection (it takes time for the hardware to filter out noise to determine that an actual finger touched the screen vs. an errant capacitance change)&lt;br /&gt;
# Kernel driver processing time&lt;br /&gt;
# Time between when the kernel is done and when the X input driver pulls the event out&lt;br /&gt;
# X input driver processing&lt;br /&gt;
# Time between when the input driver is done and when an Qt application receives the event&lt;br /&gt;
# Qt processing time&lt;br /&gt;
# Application code processing time which results in the UI changing&lt;br /&gt;
# The time between when the UI changes and when the next vblank occurs such that the user can actually *see* the result (which may require additional time to post a damage event to the window manager, the compositing of the new UI, and then a vblank)&lt;br /&gt;
&lt;br /&gt;
By instrumenting the xorg-x11-driver-mtev we can determine the amount of time spent between 2 through 5.  By instrumenting Qt we can determine the time spent between 5 and 7.  Accurately measuring the time between 7 and 8 is difficult.  For the purpose of measuring the part that we can control in the touch stack, measuring 2 through 7 is sufficient.&lt;br /&gt;
&lt;br /&gt;
The patches I used can be found here:&lt;br /&gt;
&lt;br /&gt;
* [http://api.meego.com/public/source/home:jketreno/xorg-x11-drv-mtev/debug.patch?rev=a64635cf9c7fd59d898a7e2d63aa5d4e&amp;amp; xorg-x11-drv-mtev]&lt;br /&gt;
* [ Qt]&lt;br /&gt;
[[Media:qtTouchLatencyDebug.patch Qt Latency Debug Patch]]&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-10T00:44:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Touch Latency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
==Touch Latency==&lt;br /&gt;
When dealing with touch based interaction concepts, it is critical to minimize time difference between when the user attempts to interact with the UI and when the user receives feedback that something is happening.  The variables at play which contribute heavily to this latency include:&lt;br /&gt;
&lt;br /&gt;
# Firmware touch detection (it takes time for the hardware to filter out noise to determine that an actual finger touched the screen vs. an errant capacitance change)&lt;br /&gt;
# Kernel driver processing time&lt;br /&gt;
# Time between when the kernel is done and when the X input driver pulls the event out&lt;br /&gt;
# X input driver processing&lt;br /&gt;
# Time between when the input driver is done and when an Qt application receives the event&lt;br /&gt;
# Qt processing time&lt;br /&gt;
# Application code processing time which results in the UI changing&lt;br /&gt;
# The time between when the UI changes and when the next vblank occurs such that the user can actually *see* the result (which may require additional time to post a damage event to the window manager, the compositing of the new UI, and then a vblank)&lt;br /&gt;
&lt;br /&gt;
By instrumenting the xorg-x11-driver-mtev we can determine the amount of time spent between 2 through 5.  By instrumenting Qt we can determine the time spent between 5 and 7.  Accurately measuring the time between 7 and 8 is difficult.  For the purpose of measuring the part that we can control in the touch stack, measuring 2 through 7 is sufficient.&lt;br /&gt;
&lt;br /&gt;
The patches I used can be found here:&lt;br /&gt;
&lt;br /&gt;
* [http://api.meego.com/public/source/home:jketreno/xorg-x11-drv-mtev/debug.patch?rev=a64635cf9c7fd59d898a7e2d63aa5d4e&amp;amp; xorg-x11-drv-mtev]&lt;br /&gt;
* [ Qt]&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-09T23:05:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
==Touch Latency==&lt;br /&gt;
When dealing with touch based interaction concepts, it is critical to minimize time difference between when the user attempts to interact with the UI and when the user receives feedback that something is happening.  The variables at play which contribute heavily to this latency include:&lt;br /&gt;
&lt;br /&gt;
# Firmware touch detection (it takes time for the hardware to filter out noise to determine that an actual finger touched the screen vs. an errant capacitance change)&lt;br /&gt;
# Kernel driver processing time&lt;br /&gt;
# Time between when the kernel is done and when the X input driver pulls the event out&lt;br /&gt;
# X input driver processing&lt;br /&gt;
# Time between when the input driver is done and when an Qt application receives the event&lt;br /&gt;
# Qt processing time&lt;br /&gt;
# Application code processing time which results in the UI changing&lt;br /&gt;
# The time between when the UI changes and when the next vblank occurs such that the user can actually *see* the result (which may require additional time to post a damage event to the window manager, the compositing of the new UI, and then a vblank)&lt;br /&gt;
&lt;br /&gt;
By instrumenting the xorg-x11-driver-mtev we can determine the amount of time spent between 2 through 5.  By instrumenting Qt we can determine the time spent between 5 and 7.  Accurately measuring the time between 7 and 8 is difficult.  For the purpose of measuring the part that we can control in the touch stack, measuring 2 through 7 is sufficient.&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-09T22:47:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev uses libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-09T17:20:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev users libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
&lt;br /&gt;
=Using Touch with MeeGo=&lt;br /&gt;
MeeGo 1.2 provides a GestureArea element derived from the qml-gesturearea project.  &lt;br /&gt;
&lt;br /&gt;
==Gesture support in Qt==&lt;br /&gt;
As gesture support is added to the official versions QML, MeeGo will work to maintain compatibility with those features in a way which allows applications written with the MeeGo Components' GestureArea to still work.&lt;br /&gt;
&lt;br /&gt;
For the current status of Gesture support in Qt, you can see the following bugreports:&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea]&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
* [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 Additional information].&lt;br /&gt;
&lt;br /&gt;
==multiple input device support==&lt;br /&gt;
Qt on MeeGo is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
==core pointer==&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.   This is typically the behavior you want.&lt;br /&gt;
&lt;br /&gt;
However, if you don't want the touch device to control the pointer, you can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
==meego packages you may need==&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==touch doesn't work on my system==&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-06-09T16:34:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* multiple input device support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev users libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=17865 BMC#17865] if you have something to add to this topic.&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/theme-assets</id>
		<title>User:Jketreno/theme-assets</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/theme-assets"/>
				<updated>2011-05-09T16:46:57Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* thoughts on asset theme scaling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The assets used in the visual design of our applications can be broken down into categories:&lt;br /&gt;
&lt;br /&gt;
* Icons assets&lt;br /&gt;
* Non-Icon assets&lt;br /&gt;
&lt;br /&gt;
Icons are typically fixed size and connote a contextual meaning.   Non-icon assets are used as graphical filler; they provide the backgrounds, borders, and color but do not add any specific meaning.&lt;br /&gt;
&lt;br /&gt;
This document covers the methodology and work-flow used by MeeGo to order to provide the highest quality visual experience on a broad spectrum of devices while developing icons and non-icon assets.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the reader is familiar with Density Independence.  For a general overview of that topic, see [[~jketreno/scaling|Density Independence]].&lt;br /&gt;
&lt;br /&gt;
=Graphical Theme Assets Details=&lt;br /&gt;
==Pixel vs. Vector==&lt;br /&gt;
There are two formats in which graphical assets can be provided for MeeGo: '''pixel''' and '''vector'''.&lt;br /&gt;
&lt;br /&gt;
'''Pixel''' (sometimes referred to as raster) assets specify the ARGB color values of each individual pixel.  The quality of what the user sees on their display is heavily dependent on the display density for which the graphical asset was designed.  When designed for a 300DPI screen, an icon intended to be one 1/2&amp;quot; x 1/2&amp;quot; will need to be 150x150 pixels.  When viewed on a 150DPI screen, in order to maintain the same physical size, the asset will need to be scaled down by 50%.  The MeeGo theming image provider will perform this scaling for applications, using a smooth scaling algorithm to reduce artifacts.  Designing for a high DPI and scaling down is the recommended technique for pixel based graphics.&lt;br /&gt;
&lt;br /&gt;
'''Vector''' (sometimes referred to as scalable) assets are specified by paths defined by mathematical equations and are effectively resolution independent which means they can be rasterized at varying densities and sizes without introducing scaling artifacts.&lt;br /&gt;
&lt;br /&gt;
===Virtual Pixel===&lt;br /&gt;
As vector graphics are density independent, there needs to be a way to map the units used within the vector graphic to physical pixels during rasterization.  MeeGo accomplishes this by using a default virtual density of 330 pixels per inch for vector graphics.  This allows the vector graphic to use any real world unit of measure desired while allowing  [[~jketreno/theme-assets#Border_Images|Border Images]] (which may be relative to the rasterized vector graphic) to be specified in a density independent manner.&lt;br /&gt;
&lt;br /&gt;
==Recommended usages for pixel and vector assets==&lt;br /&gt;
Icons, which are typically only scaled to maintain a consistent physical size on the display (for example a button icon which should always be 8mm x 8mm, regardless of the device DPI) should be provided as a pixel asset.  If the asset is designed for a high density display, there will be minimal artifacts when scaled down to lower density displays.  MeeGo will automatically scale pixel assets to new sizes as needed.  See the section on [[~jketreno/theme-assets#dynamic asset scaling|Dynamic Asset Scaling]] for details on how this is accomplished.&lt;br /&gt;
&lt;br /&gt;
Non-icon assets, which may be arbitrarily scaled in X and Y dimension, are best provided as a vector graphic.  This is to reduce banding and aliasing artifacts which would typically occur in gradients, drop shadows, and other effects.  &lt;br /&gt;
&lt;br /&gt;
MeeGo provides a caching mechanism to alleviate the cost of rasterizing a vector asset.&lt;br /&gt;
&lt;br /&gt;
===Downscaling Example===&lt;br /&gt;
The following example illustrates a possible pitfall if fine line details are used when drawing pixel graphics at higher DPI screens &lt;br /&gt;
&lt;br /&gt;
[[File:downscaling-example.png|border|center|148px|Downscaling from 330DPI to 165DPI]]&lt;br /&gt;
Above illustrates scaling of a pixel asset from 330DPI to various DPIs.&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-example.png|frame|center|446px|Downscaling a 9mm x 9mm asset from 330DPI to 110DPI]]&lt;br /&gt;
&lt;br /&gt;
===Upscaling Example===&lt;br /&gt;
The effect of upscaling a pixel vs. vector asset is shown here:&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-vs-pixel.png|border|center|512px|Pixel vs. Scalable]]&lt;br /&gt;
&lt;br /&gt;
In the above example the 32x32 red circle, with a one pixel border, was scaled to be four times larger.  Applying a cubic filter helps to reduce aliasing but muddies the result.  &lt;br /&gt;
&lt;br /&gt;
The vector asset is very clean at the new target size.&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why vector graphics are not used everywhere:&lt;br /&gt;
&lt;br /&gt;
# Time -- Some artistic techniques are difficult to express in terms of paths, fills, and filters.  Requiring all assets to always be provided in a scalable form places undo restrictions on the graphic designer.&lt;br /&gt;
# Compatibility -- some paths, fills, and filters do not produce the same results in the tools building them and the software used in MeeGo to rasterize the asset.&lt;br /&gt;
&lt;br /&gt;
===Dynamic Asset Scaling===&lt;br /&gt;
&lt;br /&gt;
'''todo''' Describe the logic flow for pixel asset priority, vector priority, scaling, interleaving, etc.&lt;br /&gt;
&lt;br /&gt;
==Icon Assets==&lt;br /&gt;
===Editing and naming conventions===&lt;br /&gt;
Icons for MeeGo have two states: &lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
Providing a separate for each state is error prone and inefficient.  For designers, it requires that multiple files be opened and managed visually which makes quick changes and uniformity more difficult.  For loading efficiency, the more files that have to be opened and read, the slower the system behaves.  &lt;br /&gt;
&lt;br /&gt;
To improve on this, MeeGo icons provide both states in a single graphical asset.  QML elements which use the Icons for button states rely on other means (background colors, alpha overlays, etc.) to provide additional state visualizations (mainly selected and disabled.)&lt;br /&gt;
&lt;br /&gt;
Eventually MeeGo will provide an icon tile management layer to preload all rasterized assets into a large texture set which can be loaded once and then sliced at run-time.&lt;br /&gt;
====Pixel based assets====&lt;br /&gt;
For pixel based icon assets the following naming convention is used:&lt;br /&gt;
 icon-NAME-multistate.EXTENSION&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;close&amp;quot;&lt;br /&gt;
* '''EXTENSION''' is one of the recognized image extensions.  While the system supports both PNG and JPG, it is recommended that only PNG be used.&lt;br /&gt;
&lt;br /&gt;
In terms of a regular expression, the above maps to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;icon-[[:alnum:]]+multistate.(png|jpg)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphical asset is laid out internally such that the pixel width of the individual icon is the width of the total asset divided by two..  For example:&lt;br /&gt;
&lt;br /&gt;
[[File:icon-close-multistate.png|border|120px|center|icon-close-multistate.png]]&lt;br /&gt;
&lt;br /&gt;
The above file ('''icon-close-multistate.png''') provides a 120x50 pixel icon asset.  Each icon is then 60x50 pixels. &lt;br /&gt;
&lt;br /&gt;
====Scalable assets====&lt;br /&gt;
For scalable icon assets, the naming convention is much simpler:&lt;br /&gt;
 icon-NAME-multistate.svg&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;back&amp;quot;&lt;br /&gt;
MeeGo will parse the SVG looking for three top level groups with the following names:&lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
&lt;br /&gt;
==Non-Icon Assets==&lt;br /&gt;
Non-Icon assets (such as button backgrounds, borders, drop shadows)&lt;br /&gt;
&lt;br /&gt;
===Border Images===&lt;br /&gt;
When a non-icon asset is used as an element background image, it is scaled to fill the entire element.  The scaling is applied uniformly across the entire asset.  For assets that contain a border, this uniform scaling is not what is typically desired.  MeeGo provides a mechanism for the asset designer to specify the region of the graphical element that should be stretched and the region which should not be scaled.  These types of graphic assets are referred to as a &amp;quot;Border Image&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:border-slicing.png|frame|center|Border Image]]&lt;br /&gt;
&lt;br /&gt;
In the above image, a 4 pixel border is provided on all sides.  When scaled to arbitrary sizes, scaling is only applied to non-border portions:&lt;br /&gt;
&lt;br /&gt;
[[File:border-streched.png|frame|center|Border Image -- Scaled to 200x32]]&lt;br /&gt;
&lt;br /&gt;
====Border Image Specification====&lt;br /&gt;
Two approaches:&lt;br /&gt;
* Per-asset .sci file provided which contains the border widths.  For example:&lt;br /&gt;
 $ cat background.sci&lt;br /&gt;
 border.left: 5&lt;br /&gt;
 border.right: 5&lt;br /&gt;
 border.top: 5&lt;br /&gt;
 border.bottom: 5&lt;br /&gt;
 source:background.png&lt;br /&gt;
* Per-directory .sci file.  For example:&lt;br /&gt;
 $ cat index.sci&lt;br /&gt;
 # Format:&lt;br /&gt;
 # image-source top right bottom left&lt;br /&gt;
 background.png 5 5 5 5&lt;br /&gt;
 foreground.png 10 2 10 2&lt;br /&gt;
&lt;br /&gt;
To refrence '''background.png''' with the border image properties, QML would refer to the virtual asset '''background.png.sci'''.&lt;br /&gt;
&lt;br /&gt;
If both an index.sci and a separate asset .sci file are provided, the separate file will override the index.sci.&lt;br /&gt;
&lt;br /&gt;
====Border Image: Pixel vs. Vector====&lt;br /&gt;
Image slicing for pixel assets are specified in pixels which means the border element is not scaled relative to the screen pixel density.  The measurable size of a border on a high density display will be smaller than a display with a lower density.&lt;br /&gt;
&lt;br /&gt;
With vector assets, the border size is specified in a virtual pixel representing 330 pixels per inch.  This allows MeeGo to scale the border region proportional with the display density, ensuring a uniform look across multiple display profiles.&lt;br /&gt;
&lt;br /&gt;
=thoughts on asset theme scaling=&lt;br /&gt;
The following is a place holder for discussing the asset caching and rescaling support by the image provider.&lt;br /&gt;
 &lt;br /&gt;
 // '''provider''' is a placeholder for the image provider name below&lt;br /&gt;
 BorderImage {&lt;br /&gt;
   width: 1024&lt;br /&gt;
   height: 768&lt;br /&gt;
   source: &amp;quot;image://provider[/dimensions[/units]]/resource[.ext]&amp;quot;  &amp;lt;-- Optional extension to override the default priority ordering&lt;br /&gt;
   source: &amp;quot;image://provider/100x75/resource&amp;quot;      &amp;lt;-- width is 100 pixels, height 75 pixels&lt;br /&gt;
   source: &amp;quot;image://provider/2.5x2.0/mm/resource&amp;quot;  &amp;lt;-- width is 2.5 millimeters, height is 2.0 millimeters&lt;br /&gt;
   source: theme.avatar.source                  &amp;lt;-- width and height is specified by the theme &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 theme.avatar contains:&lt;br /&gt;
 { &lt;br /&gt;
   width    &amp;lt;--- In pixels&lt;br /&gt;
   height   &amp;lt;--- In pixels&lt;br /&gt;
   source   &amp;lt;--- Uses the uber theme image provider&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 width: 20                &amp;lt;--- hard coded, non density independent&lt;br /&gt;
 width: mm2px(5)          &amp;lt;---hard coded, density independent &lt;br /&gt;
 width: theme.avatar.width &amp;lt;--- theme over-ridable, density independent&lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
Supporting the scaled size of the border in a border image via the theme may require creating a new &amp;quot;borderimage&amp;quot; replacement that supports a set of target border size properties.  Usage example is to take a 1px border from a pixel asset and have the border actually scaled to 2mm on the display&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming Specifics=&lt;br /&gt;
==Directory structure==&lt;br /&gt;
==Naming conventions==&lt;br /&gt;
==Installation process==&lt;br /&gt;
==Tile cache==&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming in Applications=&lt;br /&gt;
==MeeGo.Components==&lt;br /&gt;
==Density Independence==&lt;br /&gt;
==Fonts==&lt;br /&gt;
==MeeGo Image Providers==&lt;br /&gt;
'''todo''' describe how and where assets are placed into the distribution, how they are rasterized, where cached assets are stored, how tile caches are built, and how the image loaders tie it all together...&lt;br /&gt;
&lt;br /&gt;
=Tool compatibility=&lt;br /&gt;
Graphic designers use a variety of tools, depending on personal preference and the task at hand.  Not all features exposed by some tools are compatible with other tools, or with the infrastructure used on MeeGo for extracting and managing visual assets.  This section is intended to call out known compatibility issues and work arounds.&lt;br /&gt;
==Photoshop==&lt;br /&gt;
==Gimp==&lt;br /&gt;
==Illustrator==&lt;br /&gt;
==Inkscape==&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/theme-assets</id>
		<title>User:Jketreno/theme-assets</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/theme-assets"/>
				<updated>2011-05-09T15:45:36Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* thoughts on asset theme scaling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The assets used in the visual design of our applications can be broken down into categories:&lt;br /&gt;
&lt;br /&gt;
* Icons assets&lt;br /&gt;
* Non-Icon assets&lt;br /&gt;
&lt;br /&gt;
Icons are typically fixed size and connote a contextual meaning.   Non-icon assets are used as graphical filler; they provide the backgrounds, borders, and color but do not add any specific meaning.&lt;br /&gt;
&lt;br /&gt;
This document covers the methodology and work-flow used by MeeGo to order to provide the highest quality visual experience on a broad spectrum of devices while developing icons and non-icon assets.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the reader is familiar with Density Independence.  For a general overview of that topic, see [[~jketreno/scaling|Density Independence]].&lt;br /&gt;
&lt;br /&gt;
=Graphical Theme Assets Details=&lt;br /&gt;
==Pixel vs. Vector==&lt;br /&gt;
There are two formats in which graphical assets can be provided for MeeGo: '''pixel''' and '''vector'''.&lt;br /&gt;
&lt;br /&gt;
'''Pixel''' (sometimes referred to as raster) assets specify the ARGB color values of each individual pixel.  The quality of what the user sees on their display is heavily dependent on the display density for which the graphical asset was designed.  When designed for a 300DPI screen, an icon intended to be one 1/2&amp;quot; x 1/2&amp;quot; will need to be 150x150 pixels.  When viewed on a 150DPI screen, in order to maintain the same physical size, the asset will need to be scaled down by 50%.  The MeeGo theming image provider will perform this scaling for applications, using a smooth scaling algorithm to reduce artifacts.  Designing for a high DPI and scaling down is the recommended technique for pixel based graphics.&lt;br /&gt;
&lt;br /&gt;
'''Vector''' (sometimes referred to as scalable) assets are specified by paths defined by mathematical equations and are effectively resolution independent which means they can be rasterized at varying densities and sizes without introducing scaling artifacts.&lt;br /&gt;
&lt;br /&gt;
===Virtual Pixel===&lt;br /&gt;
As vector graphics are density independent, there needs to be a way to map the units used within the vector graphic to physical pixels during rasterization.  MeeGo accomplishes this by using a default virtual density of 330 pixels per inch for vector graphics.  This allows the vector graphic to use any real world unit of measure desired while allowing  [[~jketreno/theme-assets#Border_Images|Border Images]] (which may be relative to the rasterized vector graphic) to be specified in a density independent manner.&lt;br /&gt;
&lt;br /&gt;
==Recommended usages for pixel and vector assets==&lt;br /&gt;
Icons, which are typically only scaled to maintain a consistent physical size on the display (for example a button icon which should always be 8mm x 8mm, regardless of the device DPI) should be provided as a pixel asset.  If the asset is designed for a high density display, there will be minimal artifacts when scaled down to lower density displays.  MeeGo will automatically scale pixel assets to new sizes as needed.  See the section on [[~jketreno/theme-assets#dynamic asset scaling|Dynamic Asset Scaling]] for details on how this is accomplished.&lt;br /&gt;
&lt;br /&gt;
Non-icon assets, which may be arbitrarily scaled in X and Y dimension, are best provided as a vector graphic.  This is to reduce banding and aliasing artifacts which would typically occur in gradients, drop shadows, and other effects.  &lt;br /&gt;
&lt;br /&gt;
MeeGo provides a caching mechanism to alleviate the cost of rasterizing a vector asset.&lt;br /&gt;
&lt;br /&gt;
===Downscaling Example===&lt;br /&gt;
The following example illustrates a possible pitfall if fine line details are used when drawing pixel graphics at higher DPI screens &lt;br /&gt;
&lt;br /&gt;
[[File:downscaling-example.png|border|center|148px|Downscaling from 330DPI to 165DPI]]&lt;br /&gt;
Above illustrates scaling of a pixel asset from 330DPI to various DPIs.&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-example.png|frame|center|446px|Downscaling a 9mm x 9mm asset from 330DPI to 110DPI]]&lt;br /&gt;
&lt;br /&gt;
===Upscaling Example===&lt;br /&gt;
The effect of upscaling a pixel vs. vector asset is shown here:&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-vs-pixel.png|border|center|512px|Pixel vs. Scalable]]&lt;br /&gt;
&lt;br /&gt;
In the above example the 32x32 red circle, with a one pixel border, was scaled to be four times larger.  Applying a cubic filter helps to reduce aliasing but muddies the result.  &lt;br /&gt;
&lt;br /&gt;
The vector asset is very clean at the new target size.&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why vector graphics are not used everywhere:&lt;br /&gt;
&lt;br /&gt;
# Time -- Some artistic techniques are difficult to express in terms of paths, fills, and filters.  Requiring all assets to always be provided in a scalable form places undo restrictions on the graphic designer.&lt;br /&gt;
# Compatibility -- some paths, fills, and filters do not produce the same results in the tools building them and the software used in MeeGo to rasterize the asset.&lt;br /&gt;
&lt;br /&gt;
===Dynamic Asset Scaling===&lt;br /&gt;
&lt;br /&gt;
'''todo''' Describe the logic flow for pixel asset priority, vector priority, scaling, interleaving, etc.&lt;br /&gt;
&lt;br /&gt;
==Icon Assets==&lt;br /&gt;
===Editing and naming conventions===&lt;br /&gt;
Icons for MeeGo have two states: &lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
Providing a separate for each state is error prone and inefficient.  For designers, it requires that multiple files be opened and managed visually which makes quick changes and uniformity more difficult.  For loading efficiency, the more files that have to be opened and read, the slower the system behaves.  &lt;br /&gt;
&lt;br /&gt;
To improve on this, MeeGo icons provide both states in a single graphical asset.  QML elements which use the Icons for button states rely on other means (background colors, alpha overlays, etc.) to provide additional state visualizations (mainly selected and disabled.)&lt;br /&gt;
&lt;br /&gt;
Eventually MeeGo will provide an icon tile management layer to preload all rasterized assets into a large texture set which can be loaded once and then sliced at run-time.&lt;br /&gt;
====Pixel based assets====&lt;br /&gt;
For pixel based icon assets the following naming convention is used:&lt;br /&gt;
 icon-NAME-multistate.EXTENSION&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;close&amp;quot;&lt;br /&gt;
* '''EXTENSION''' is one of the recognized image extensions.  While the system supports both PNG and JPG, it is recommended that only PNG be used.&lt;br /&gt;
&lt;br /&gt;
In terms of a regular expression, the above maps to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;icon-[[:alnum:]]+multistate.(png|jpg)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphical asset is laid out internally such that the pixel width of the individual icon is the width of the total asset divided by two..  For example:&lt;br /&gt;
&lt;br /&gt;
[[File:icon-close-multistate.png|border|120px|center|icon-close-multistate.png]]&lt;br /&gt;
&lt;br /&gt;
The above file ('''icon-close-multistate.png''') provides a 120x50 pixel icon asset.  Each icon is then 60x50 pixels. &lt;br /&gt;
&lt;br /&gt;
====Scalable assets====&lt;br /&gt;
For scalable icon assets, the naming convention is much simpler:&lt;br /&gt;
 icon-NAME-multistate.svg&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;back&amp;quot;&lt;br /&gt;
MeeGo will parse the SVG looking for three top level groups with the following names:&lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
&lt;br /&gt;
==Non-Icon Assets==&lt;br /&gt;
Non-Icon assets (such as button backgrounds, borders, drop shadows)&lt;br /&gt;
&lt;br /&gt;
===Border Images===&lt;br /&gt;
When a non-icon asset is used as an element background image, it is scaled to fill the entire element.  The scaling is applied uniformly across the entire asset.  For assets that contain a border, this uniform scaling is not what is typically desired.  MeeGo provides a mechanism for the asset designer to specify the region of the graphical element that should be stretched and the region which should not be scaled.  These types of graphic assets are referred to as a &amp;quot;Border Image&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:border-slicing.png|frame|center|Border Image]]&lt;br /&gt;
&lt;br /&gt;
In the above image, a 4 pixel border is provided on all sides.  When scaled to arbitrary sizes, scaling is only applied to non-border portions:&lt;br /&gt;
&lt;br /&gt;
[[File:border-streched.png|frame|center|Border Image -- Scaled to 200x32]]&lt;br /&gt;
&lt;br /&gt;
====Border Image Specification====&lt;br /&gt;
Two approaches:&lt;br /&gt;
* Per-asset .sci file provided which contains the border widths.  For example:&lt;br /&gt;
 $ cat background.sci&lt;br /&gt;
 border.left: 5&lt;br /&gt;
 border.right: 5&lt;br /&gt;
 border.top: 5&lt;br /&gt;
 border.bottom: 5&lt;br /&gt;
 source:background.png&lt;br /&gt;
* Per-directory .sci file.  For example:&lt;br /&gt;
 $ cat index.sci&lt;br /&gt;
 # Format:&lt;br /&gt;
 # image-source top right bottom left&lt;br /&gt;
 background.png 5 5 5 5&lt;br /&gt;
 foreground.png 10 2 10 2&lt;br /&gt;
&lt;br /&gt;
To refrence '''background.png''' with the border image properties, QML would refer to the virtual asset '''background.png.sci'''.&lt;br /&gt;
&lt;br /&gt;
If both an index.sci and a separate asset .sci file are provided, the separate file will override the index.sci.&lt;br /&gt;
&lt;br /&gt;
====Border Image: Pixel vs. Vector====&lt;br /&gt;
Image slicing for pixel assets are specified in pixels which means the border element is not scaled relative to the screen pixel density.  The measurable size of a border on a high density display will be smaller than a display with a lower density.&lt;br /&gt;
&lt;br /&gt;
With vector assets, the border size is specified in a virtual pixel representing 330 pixels per inch.  This allows MeeGo to scale the border region proportional with the display density, ensuring a uniform look across multiple display profiles.&lt;br /&gt;
&lt;br /&gt;
=thoughts on asset theme scaling=&lt;br /&gt;
The following is a place holder for discussing the asset caching and rescaling support by the image provider.&lt;br /&gt;
 &lt;br /&gt;
 // '''provider''' is a placeholder for the image provider name below&lt;br /&gt;
 BorderImage {&lt;br /&gt;
     width: 1024&lt;br /&gt;
     height: 768&lt;br /&gt;
     source: &amp;quot;image://provider[/dimensions[/units]]/resource[.ext]&amp;quot;  &amp;lt;-- Optional extension to override the default priority ordering&lt;br /&gt;
     source: &amp;quot;image://provider/100x75/resource&amp;quot;      &amp;lt;-- width is 100 pixels, height 75 pixels&lt;br /&gt;
     source: &amp;quot;image://provider/2.5x2.0/mm/resource&amp;quot;  &amp;lt;-- width is 2.5 millimeters, height is 2.0 millimeters&lt;br /&gt;
     source: theme.avatar.source                  &amp;lt;-- width and height is specified by the theme &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 theme.avatar contains:&lt;br /&gt;
 { &lt;br /&gt;
     width    &amp;lt;--- In pixels&lt;br /&gt;
     height   &amp;lt;--- In pixels&lt;br /&gt;
     source   &amp;lt;--- Uses the uber theme image provider&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 width: 20                &amp;lt;--- hard coded, non density independent&lt;br /&gt;
 width: mm2px(5)          &amp;lt;---hard coded, density independent &lt;br /&gt;
 width: theme.avatar.width &amp;lt;--- theme over-ridable, density independent&lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
Supporting the scaled size of the border in a border image via the theme may require creating a new &amp;quot;borderimage&amp;quot; replacement that supports a set of target border size properties.  Usage example is to take a 1px border from a pixel asset and have the border actually scaled to 2mm on the display&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming Specifics=&lt;br /&gt;
==Directory structure==&lt;br /&gt;
==Naming conventions==&lt;br /&gt;
==Installation process==&lt;br /&gt;
==Tile cache==&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming in Applications=&lt;br /&gt;
==MeeGo.Components==&lt;br /&gt;
==Density Independence==&lt;br /&gt;
==Fonts==&lt;br /&gt;
==MeeGo Image Providers==&lt;br /&gt;
'''todo''' describe how and where assets are placed into the distribution, how they are rasterized, where cached assets are stored, how tile caches are built, and how the image loaders tie it all together...&lt;br /&gt;
&lt;br /&gt;
=Tool compatibility=&lt;br /&gt;
Graphic designers use a variety of tools, depending on personal preference and the task at hand.  Not all features exposed by some tools are compatible with other tools, or with the infrastructure used on MeeGo for extracting and managing visual assets.  This section is intended to call out known compatibility issues and work arounds.&lt;br /&gt;
==Photoshop==&lt;br /&gt;
==Gimp==&lt;br /&gt;
==Illustrator==&lt;br /&gt;
==Inkscape==&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/theme-assets</id>
		<title>User:Jketreno/theme-assets</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/theme-assets"/>
				<updated>2011-05-09T15:43:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* thoughts on asset theme scaling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The assets used in the visual design of our applications can be broken down into categories:&lt;br /&gt;
&lt;br /&gt;
* Icons assets&lt;br /&gt;
* Non-Icon assets&lt;br /&gt;
&lt;br /&gt;
Icons are typically fixed size and connote a contextual meaning.   Non-icon assets are used as graphical filler; they provide the backgrounds, borders, and color but do not add any specific meaning.&lt;br /&gt;
&lt;br /&gt;
This document covers the methodology and work-flow used by MeeGo to order to provide the highest quality visual experience on a broad spectrum of devices while developing icons and non-icon assets.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the reader is familiar with Density Independence.  For a general overview of that topic, see [[~jketreno/scaling|Density Independence]].&lt;br /&gt;
&lt;br /&gt;
=Graphical Theme Assets Details=&lt;br /&gt;
==Pixel vs. Vector==&lt;br /&gt;
There are two formats in which graphical assets can be provided for MeeGo: '''pixel''' and '''vector'''.&lt;br /&gt;
&lt;br /&gt;
'''Pixel''' (sometimes referred to as raster) assets specify the ARGB color values of each individual pixel.  The quality of what the user sees on their display is heavily dependent on the display density for which the graphical asset was designed.  When designed for a 300DPI screen, an icon intended to be one 1/2&amp;quot; x 1/2&amp;quot; will need to be 150x150 pixels.  When viewed on a 150DPI screen, in order to maintain the same physical size, the asset will need to be scaled down by 50%.  The MeeGo theming image provider will perform this scaling for applications, using a smooth scaling algorithm to reduce artifacts.  Designing for a high DPI and scaling down is the recommended technique for pixel based graphics.&lt;br /&gt;
&lt;br /&gt;
'''Vector''' (sometimes referred to as scalable) assets are specified by paths defined by mathematical equations and are effectively resolution independent which means they can be rasterized at varying densities and sizes without introducing scaling artifacts.&lt;br /&gt;
&lt;br /&gt;
===Virtual Pixel===&lt;br /&gt;
As vector graphics are density independent, there needs to be a way to map the units used within the vector graphic to physical pixels during rasterization.  MeeGo accomplishes this by using a default virtual density of 330 pixels per inch for vector graphics.  This allows the vector graphic to use any real world unit of measure desired while allowing  [[~jketreno/theme-assets#Border_Images|Border Images]] (which may be relative to the rasterized vector graphic) to be specified in a density independent manner.&lt;br /&gt;
&lt;br /&gt;
==Recommended usages for pixel and vector assets==&lt;br /&gt;
Icons, which are typically only scaled to maintain a consistent physical size on the display (for example a button icon which should always be 8mm x 8mm, regardless of the device DPI) should be provided as a pixel asset.  If the asset is designed for a high density display, there will be minimal artifacts when scaled down to lower density displays.  MeeGo will automatically scale pixel assets to new sizes as needed.  See the section on [[~jketreno/theme-assets#dynamic asset scaling|Dynamic Asset Scaling]] for details on how this is accomplished.&lt;br /&gt;
&lt;br /&gt;
Non-icon assets, which may be arbitrarily scaled in X and Y dimension, are best provided as a vector graphic.  This is to reduce banding and aliasing artifacts which would typically occur in gradients, drop shadows, and other effects.  &lt;br /&gt;
&lt;br /&gt;
MeeGo provides a caching mechanism to alleviate the cost of rasterizing a vector asset.&lt;br /&gt;
&lt;br /&gt;
===Downscaling Example===&lt;br /&gt;
The following example illustrates a possible pitfall if fine line details are used when drawing pixel graphics at higher DPI screens &lt;br /&gt;
&lt;br /&gt;
[[File:downscaling-example.png|border|center|148px|Downscaling from 330DPI to 165DPI]]&lt;br /&gt;
Above illustrates scaling of a pixel asset from 330DPI to various DPIs.&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-example.png|frame|center|446px|Downscaling a 9mm x 9mm asset from 330DPI to 110DPI]]&lt;br /&gt;
&lt;br /&gt;
===Upscaling Example===&lt;br /&gt;
The effect of upscaling a pixel vs. vector asset is shown here:&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-vs-pixel.png|border|center|512px|Pixel vs. Scalable]]&lt;br /&gt;
&lt;br /&gt;
In the above example the 32x32 red circle, with a one pixel border, was scaled to be four times larger.  Applying a cubic filter helps to reduce aliasing but muddies the result.  &lt;br /&gt;
&lt;br /&gt;
The vector asset is very clean at the new target size.&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why vector graphics are not used everywhere:&lt;br /&gt;
&lt;br /&gt;
# Time -- Some artistic techniques are difficult to express in terms of paths, fills, and filters.  Requiring all assets to always be provided in a scalable form places undo restrictions on the graphic designer.&lt;br /&gt;
# Compatibility -- some paths, fills, and filters do not produce the same results in the tools building them and the software used in MeeGo to rasterize the asset.&lt;br /&gt;
&lt;br /&gt;
===Dynamic Asset Scaling===&lt;br /&gt;
&lt;br /&gt;
'''todo''' Describe the logic flow for pixel asset priority, vector priority, scaling, interleaving, etc.&lt;br /&gt;
&lt;br /&gt;
==Icon Assets==&lt;br /&gt;
===Editing and naming conventions===&lt;br /&gt;
Icons for MeeGo have two states: &lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
Providing a separate for each state is error prone and inefficient.  For designers, it requires that multiple files be opened and managed visually which makes quick changes and uniformity more difficult.  For loading efficiency, the more files that have to be opened and read, the slower the system behaves.  &lt;br /&gt;
&lt;br /&gt;
To improve on this, MeeGo icons provide both states in a single graphical asset.  QML elements which use the Icons for button states rely on other means (background colors, alpha overlays, etc.) to provide additional state visualizations (mainly selected and disabled.)&lt;br /&gt;
&lt;br /&gt;
Eventually MeeGo will provide an icon tile management layer to preload all rasterized assets into a large texture set which can be loaded once and then sliced at run-time.&lt;br /&gt;
====Pixel based assets====&lt;br /&gt;
For pixel based icon assets the following naming convention is used:&lt;br /&gt;
 icon-NAME-multistate.EXTENSION&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;close&amp;quot;&lt;br /&gt;
* '''EXTENSION''' is one of the recognized image extensions.  While the system supports both PNG and JPG, it is recommended that only PNG be used.&lt;br /&gt;
&lt;br /&gt;
In terms of a regular expression, the above maps to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;icon-[[:alnum:]]+multistate.(png|jpg)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphical asset is laid out internally such that the pixel width of the individual icon is the width of the total asset divided by two..  For example:&lt;br /&gt;
&lt;br /&gt;
[[File:icon-close-multistate.png|border|120px|center|icon-close-multistate.png]]&lt;br /&gt;
&lt;br /&gt;
The above file ('''icon-close-multistate.png''') provides a 120x50 pixel icon asset.  Each icon is then 60x50 pixels. &lt;br /&gt;
&lt;br /&gt;
====Scalable assets====&lt;br /&gt;
For scalable icon assets, the naming convention is much simpler:&lt;br /&gt;
 icon-NAME-multistate.svg&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;back&amp;quot;&lt;br /&gt;
MeeGo will parse the SVG looking for three top level groups with the following names:&lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
&lt;br /&gt;
==Non-Icon Assets==&lt;br /&gt;
Non-Icon assets (such as button backgrounds, borders, drop shadows)&lt;br /&gt;
&lt;br /&gt;
===Border Images===&lt;br /&gt;
When a non-icon asset is used as an element background image, it is scaled to fill the entire element.  The scaling is applied uniformly across the entire asset.  For assets that contain a border, this uniform scaling is not what is typically desired.  MeeGo provides a mechanism for the asset designer to specify the region of the graphical element that should be stretched and the region which should not be scaled.  These types of graphic assets are referred to as a &amp;quot;Border Image&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:border-slicing.png|frame|center|Border Image]]&lt;br /&gt;
&lt;br /&gt;
In the above image, a 4 pixel border is provided on all sides.  When scaled to arbitrary sizes, scaling is only applied to non-border portions:&lt;br /&gt;
&lt;br /&gt;
[[File:border-streched.png|frame|center|Border Image -- Scaled to 200x32]]&lt;br /&gt;
&lt;br /&gt;
====Border Image Specification====&lt;br /&gt;
Two approaches:&lt;br /&gt;
* Per-asset .sci file provided which contains the border widths.  For example:&lt;br /&gt;
 $ cat background.sci&lt;br /&gt;
 border.left: 5&lt;br /&gt;
 border.right: 5&lt;br /&gt;
 border.top: 5&lt;br /&gt;
 border.bottom: 5&lt;br /&gt;
 source:background.png&lt;br /&gt;
* Per-directory .sci file.  For example:&lt;br /&gt;
 $ cat index.sci&lt;br /&gt;
 # Format:&lt;br /&gt;
 # image-source top right bottom left&lt;br /&gt;
 background.png 5 5 5 5&lt;br /&gt;
 foreground.png 10 2 10 2&lt;br /&gt;
&lt;br /&gt;
To refrence '''background.png''' with the border image properties, QML would refer to the virtual asset '''background.png.sci'''.&lt;br /&gt;
&lt;br /&gt;
If both an index.sci and a separate asset .sci file are provided, the separate file will override the index.sci.&lt;br /&gt;
&lt;br /&gt;
====Border Image: Pixel vs. Vector====&lt;br /&gt;
Image slicing for pixel assets are specified in pixels which means the border element is not scaled relative to the screen pixel density.  The measurable size of a border on a high density display will be smaller than a display with a lower density.&lt;br /&gt;
&lt;br /&gt;
With vector assets, the border size is specified in a virtual pixel representing 330 pixels per inch.  This allows MeeGo to scale the border region proportional with the display density, ensuring a uniform look across multiple display profiles.&lt;br /&gt;
&lt;br /&gt;
=thoughts on asset theme scaling=&lt;br /&gt;
     /* Not done yet -- auto scaling and caching from an asset daemon with target size scaling:&lt;br /&gt;
     *&lt;br /&gt;
     * source: &amp;quot;image://&amp;quot; + unit + &amp;quot;/&amp;quot; + w + &amp;quot;x&amp;quot; + h &amp;quot;/text-bg&amp;quot; &lt;br /&gt;
     * &lt;br /&gt;
 &lt;br /&gt;
 // Every image used could be a BorderImage ('''provider''' is a placeholder for the image provider name below)&lt;br /&gt;
 BorderImage {&lt;br /&gt;
     width: 1024&lt;br /&gt;
     height: 768&lt;br /&gt;
     source: &amp;quot;image://provider[/dimensions[/units]]/resource[.ext]&amp;quot;  &amp;lt;-- Optional extension to override the default priority ordering&lt;br /&gt;
     source: &amp;quot;image://provider/100x75/resource&amp;quot;      &amp;lt;-- width is 100 pixels, height 75 pixels&lt;br /&gt;
     source: &amp;quot;image://provider/2.5x2.0/mm/resource&amp;quot;  &amp;lt;-- width is 2.5 millimeters, height is 2.0 millimeters&lt;br /&gt;
     source: theme.avatar.source                  &amp;lt;-- width and height is specified by the theme &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 theme.avatar contains:&lt;br /&gt;
 { &lt;br /&gt;
     width    &amp;lt;--- In pixels&lt;br /&gt;
     height   &amp;lt;--- In pixels&lt;br /&gt;
     source   &amp;lt;--- Uses the uber theme image provider&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 width: 20                &amp;lt;--- hard coded, non density independent&lt;br /&gt;
 width: mm2px(5)          &amp;lt;---hard coded, density independent &lt;br /&gt;
 width: theme.avatar.width &amp;lt;--- theme over-ridable, density independent&lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
supporting the scaled size of the border in a border image via the theme; probably requires creating a new &amp;quot;borderimage&amp;quot; replacement that supports a set of target border size properties.  Usage example is to take a 1px border from a pixel asset and have the border actually scaled to 2mm on the display&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     *&lt;br /&gt;
     * So, instead, set the source width and height to the scaled dimensions : */&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming Specifics=&lt;br /&gt;
==Directory structure==&lt;br /&gt;
==Naming conventions==&lt;br /&gt;
==Installation process==&lt;br /&gt;
==Tile cache==&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming in Applications=&lt;br /&gt;
==MeeGo.Components==&lt;br /&gt;
==Density Independence==&lt;br /&gt;
==Fonts==&lt;br /&gt;
==MeeGo Image Providers==&lt;br /&gt;
'''todo''' describe how and where assets are placed into the distribution, how they are rasterized, where cached assets are stored, how tile caches are built, and how the image loaders tie it all together...&lt;br /&gt;
&lt;br /&gt;
=Tool compatibility=&lt;br /&gt;
Graphic designers use a variety of tools, depending on personal preference and the task at hand.  Not all features exposed by some tools are compatible with other tools, or with the infrastructure used on MeeGo for extracting and managing visual assets.  This section is intended to call out known compatibility issues and work arounds.&lt;br /&gt;
==Photoshop==&lt;br /&gt;
==Gimp==&lt;br /&gt;
==Illustrator==&lt;br /&gt;
==Inkscape==&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-05-06T19:03:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
MeeGo Units are now available in the MeeGo.Components project.&lt;br /&gt;
 git clone git://meego.gitorious.org/meego-ux/meego-ux-components&lt;br /&gt;
 cd meego-ux-components&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Components:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.Components 0.1&lt;br /&gt;
You can then instantiate and reference the Units:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     Units { id: units }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''. &lt;br /&gt;
==Methods==&lt;br /&gt;
 int mm2px(real millimeters)&lt;br /&gt;
 int inch2px(real inches)&lt;br /&gt;
 int vp2px(real virtualPixels)&lt;br /&gt;
==Properties==&lt;br /&gt;
 property real '''mm'''   // Pixels per millimeter&lt;br /&gt;
 property real '''inch''' // Pixels per inch&lt;br /&gt;
 property real '''vp'''   // Pixels per &amp;quot;virtual-pixel&amp;quot;&lt;br /&gt;
====a note on rounding====&lt;br /&gt;
Since the value of the properties returned by Units are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() methods exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
==Examples==&lt;br /&gt;
Create a 10cm x 5cm box:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     Units { id: units }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     // Since this image will be scaled on many devices, &lt;br /&gt;
     // smooth the scaling so the image looks better&lt;br /&gt;
     smooth: true &lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-05-06T19:01:50Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
MeeGo Units are now available in the MeeGo.Components project.&lt;br /&gt;
 git clone git://meego.gitorious.org/meego-ux/meego-ux-components&lt;br /&gt;
 cd meego-ux-components&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Components:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.Components 0.1&lt;br /&gt;
You can then instantiate and reference the Units:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     Units { id: units }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''. &lt;br /&gt;
==Methods==&lt;br /&gt;
 int mm2px(real millimeters)&lt;br /&gt;
 int inch2px(real inches)&lt;br /&gt;
 int vp2px(real virtualPixels)&lt;br /&gt;
==Properties==&lt;br /&gt;
 property real '''mm'''   // Pixels per millimeter&lt;br /&gt;
 property real '''inch''' // Pixels per inch&lt;br /&gt;
 property real '''vp'''   // Pixels per &amp;quot;virtual-pixel&amp;quot;&lt;br /&gt;
====a note on rounding====&lt;br /&gt;
Since the value of the properties returned by Units are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() methods exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
==Examples==&lt;br /&gt;
Create a 10cm x 5cm box:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     Units { id: units }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
     sourceSize.width: units.mm2px(9.5)&lt;br /&gt;
     sourceSize.height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-04-25T18:11:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
 git clone '''todo -- where is the code repository???'''&lt;br /&gt;
 cd meego-units&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Units plug-in:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.units 1.0&lt;br /&gt;
This loads the libmeegounitsplugin adds a new QML type called 'MeeGoUnits'  Since plug-ins do not have direct access to the global object namespace, the plug-in can't automatically populate a top level namespace with a 'Units' element--so you must instantiate it within your top level widget:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''.  The properties exposed are '''mm''', '''inch''', '''vp''', and '''density'''.  All three are implemented as properties with notification signals, so if the underlying device PPI changes, all UI elements can be re-laid out.  This is useful when moving (at run-time) an application from a small handset screen to a larger display (for example via an attached HDMI)&lt;br /&gt;
&lt;br /&gt;
Extending the above example to set the rectangle size to be 10cm x 5cm:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
Using the conversion properties is pretty straight forward and works as you would expect.  The following instantiates a 1cm x 1cm rectangle, offset from the top left of its parent by 1cm:&lt;br /&gt;
    Rectangle {&lt;br /&gt;
        x: units.mm2px(10.0)&lt;br /&gt;
        y: units.mm2px(10.0)&lt;br /&gt;
        width: units.mm2px(10.0)&lt;br /&gt;
        height: units.mm2px(10.0)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==a note on rounding==&lt;br /&gt;
Since the value of the properties returned by MeeGoUnits are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() conversion method exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
     sourceSize.width: units.mm2px(9.5)&lt;br /&gt;
     sourceSize.height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===thoughts on asset theme scaling===&lt;br /&gt;
     /* Not done yet -- auto scaling and caching from an asset daemon with target size scaling:&lt;br /&gt;
     *&lt;br /&gt;
     * source: &amp;quot;image://&amp;quot; + unit + &amp;quot;/&amp;quot; + w + &amp;quot;x&amp;quot; + h &amp;quot;/text-bg&amp;quot; &lt;br /&gt;
     * &lt;br /&gt;
&lt;br /&gt;
BorderImage {&lt;br /&gt;
width: 1024&lt;br /&gt;
height: 768&lt;br /&gt;
source: &amp;quot;image://super{/dimensions{/units}}/resource{.ext}&amp;quot;&lt;br /&gt;
source: &amp;quot;image://super/&amp;quot; + width + &amp;quot;x&amp;quot; + height + &amp;quot;/px/resource&amp;quot;&lt;br /&gt;
source: theme.avatar.source&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
theme.avatar contains:&lt;br /&gt;
{ &lt;br /&gt;
width    &amp;lt;--- In pixels&lt;br /&gt;
height   &amp;lt;--- In pixels&lt;br /&gt;
source   &amp;lt;--- uses the uber theme image provider&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
width: 20                &amp;lt;--- hard coded, non density independent&lt;br /&gt;
width: mm2px(5)          &amp;lt;---hard coded, density independent &lt;br /&gt;
width: theme.avatarWidth &amp;lt;--- theme over-ridable, density independent&lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
supporting the scaled size of the border in a border image via the theme; probably requires creating a new &amp;quot;borderimage&amp;quot; replacement that supports a set of target border size properties.  Usage example is to take a 1px border from a pixel asset and have the border actually scaled to 2mm on the display&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     *&lt;br /&gt;
     * So, instead, set the source width and height to the scaled dimensions : */&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-04-25T18:10:26Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
 git clone '''todo -- where is the code repository???'''&lt;br /&gt;
 cd meego-units&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Units plug-in:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.units 1.0&lt;br /&gt;
This loads the libmeegounitsplugin adds a new QML type called 'MeeGoUnits'  Since plug-ins do not have direct access to the global object namespace, the plug-in can't automatically populate a top level namespace with a 'Units' element--so you must instantiate it within your top level widget:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''.  The properties exposed are '''mm''', '''inch''', '''vp''', and '''density'''.  All three are implemented as properties with notification signals, so if the underlying device PPI changes, all UI elements can be re-laid out.  This is useful when moving (at run-time) an application from a small handset screen to a larger display (for example via an attached HDMI)&lt;br /&gt;
&lt;br /&gt;
Extending the above example to set the rectangle size to be 10cm x 5cm:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
Using the conversion properties is pretty straight forward and works as you would expect.  The following instantiates a 1cm x 1cm rectangle, offset from the top left of its parent by 1cm:&lt;br /&gt;
    Rectangle {&lt;br /&gt;
        x: units.mm2px(10.0)&lt;br /&gt;
        y: units.mm2px(10.0)&lt;br /&gt;
        width: units.mm2px(10.0)&lt;br /&gt;
        height: units.mm2px(10.0)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==a note on rounding==&lt;br /&gt;
Since the value of the properties returned by MeeGoUnits are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() conversion method exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
     sourceSize.width: units.mm2px(9.5)&lt;br /&gt;
     sourceSize.height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
     /* Not done yet -- auto scaling and caching from an asset daemon with target size scaling:&lt;br /&gt;
     *&lt;br /&gt;
     * source: &amp;quot;image://&amp;quot; + unit + &amp;quot;/&amp;quot; + w + &amp;quot;x&amp;quot; + h &amp;quot;/text-bg&amp;quot; &lt;br /&gt;
     * &lt;br /&gt;
&lt;br /&gt;
BorderImage {&lt;br /&gt;
width: 1024&lt;br /&gt;
height: 768&lt;br /&gt;
source: &amp;quot;image://super{/dimensions{/units}}/resource{.ext}&amp;quot;&lt;br /&gt;
source: &amp;quot;image://super/&amp;quot; + width + &amp;quot;x&amp;quot; + height + &amp;quot;/px/resource&amp;quot;&lt;br /&gt;
source: theme.avatar.source&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
theme.avatar contains:&lt;br /&gt;
{ &lt;br /&gt;
width    &amp;lt;--- In pixels&lt;br /&gt;
height   &amp;lt;--- In pixels&lt;br /&gt;
source   &amp;lt;--- uses the uber theme image provider&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
width: 20                &amp;lt;--- hard coded, non density independent&lt;br /&gt;
width: mm2px(5)          &amp;lt;---hard coded, density independent &lt;br /&gt;
width: theme.avatarWidth &amp;lt;--- theme over-ridable, density independent&lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
supporting the scaled size of the border in a border image via the theme; probably requires creating a new &amp;quot;borderimage&amp;quot; replacement that supports a set of target border size properties.  Usage example is to take a 1px border from a pixel asset and have the border actually scaled to 2mm on the display&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     *&lt;br /&gt;
     * So, instead, set the source width and height to the scaled dimensions : */&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-04-25T18:05:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
 git clone '''todo -- where is the code repository???'''&lt;br /&gt;
 cd meego-units&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Units plug-in:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.units 1.0&lt;br /&gt;
This loads the libmeegounitsplugin adds a new QML type called 'MeeGoUnits'  Since plug-ins do not have direct access to the global object namespace, the plug-in can't automatically populate a top level namespace with a 'Units' element--so you must instantiate it within your top level widget:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''.  The properties exposed are '''mm''', '''inch''', '''vp''', and '''density'''.  All three are implemented as properties with notification signals, so if the underlying device PPI changes, all UI elements can be re-laid out.  This is useful when moving (at run-time) an application from a small handset screen to a larger display (for example via an attached HDMI)&lt;br /&gt;
&lt;br /&gt;
Extending the above example to set the rectangle size to be 10cm x 5cm:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
Using the conversion properties is pretty straight forward and works as you would expect.  The following instantiates a 1cm x 1cm rectangle, offset from the top left of its parent by 1cm:&lt;br /&gt;
    Rectangle {&lt;br /&gt;
        x: units.mm2px(10.0)&lt;br /&gt;
        y: units.mm2px(10.0)&lt;br /&gt;
        width: units.mm2px(10.0)&lt;br /&gt;
        height: units.mm2px(10.0)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==a note on rounding==&lt;br /&gt;
Since the value of the properties returned by MeeGoUnits are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() conversion method exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
     sourceSize.width: units.mm2px(9.5)&lt;br /&gt;
     sourceSize.height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
     /* Not done yet -- auto scaling and caching from an asset daemon with target size scaling:&lt;br /&gt;
     *&lt;br /&gt;
     * source: &amp;quot;image://&amp;quot; + unit + &amp;quot;/&amp;quot; + w + &amp;quot;x&amp;quot; + h &amp;quot;/text-bg&amp;quot; &lt;br /&gt;
     * &lt;br /&gt;
&lt;br /&gt;
BorderImage {&lt;br /&gt;
width: 1024&lt;br /&gt;
height: 768&lt;br /&gt;
source: &amp;quot;image://super{/dimensions{/units}}/resource{.ext}&amp;quot;&lt;br /&gt;
source: &amp;quot;image://super/&amp;quot; + width + &amp;quot;x&amp;quot; + height + &amp;quot;/px/resource&amp;quot;&lt;br /&gt;
source: theme.avatar.source&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
theme.avatar contains:&lt;br /&gt;
{ &lt;br /&gt;
width    &amp;lt;--- In pixels&lt;br /&gt;
height   &amp;lt;--- In pixels&lt;br /&gt;
source   &amp;lt;--- uses the uber theme image provider&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
width: 20                &amp;lt;--- hard coded, non density independent&lt;br /&gt;
width: mm2px(5)          &amp;lt;---hard coded, density independent &lt;br /&gt;
width: theme.avatarWidth &amp;lt;--- theme over-ridable, density independent&lt;br /&gt;
&lt;br /&gt;
     *&lt;br /&gt;
     * So, instead, set the source width and height to the scaled dimensions : */&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Icon-close-multistate.png</id>
		<title>File:Icon-close-multistate.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Icon-close-multistate.png"/>
				<updated>2011-04-22T22:29:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Border-slicing.png</id>
		<title>File:Border-slicing.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Border-slicing.png"/>
				<updated>2011-04-22T22:28:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Border-streched.png</id>
		<title>File:Border-streched.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Border-streched.png"/>
				<updated>2011-04-22T22:28:08Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Downscaling-example.png</id>
		<title>File:Downscaling-example.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Downscaling-example.png"/>
				<updated>2011-04-22T22:26:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Scalable-vs-pixel.png</id>
		<title>File:Scalable-vs-pixel.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Scalable-vs-pixel.png"/>
				<updated>2011-04-22T22:25:35Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Scalable-example.png</id>
		<title>File:Scalable-example.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Scalable-example.png"/>
				<updated>2011-04-22T22:25:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/theme-assets</id>
		<title>User:Jketreno/theme-assets</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/theme-assets"/>
				<updated>2011-04-22T22:21:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The assets used in the visual design of our applications can be broken down into categories:&lt;br /&gt;
&lt;br /&gt;
* Icons assets&lt;br /&gt;
* Non-Icon assets&lt;br /&gt;
&lt;br /&gt;
Icons are typically fixed size and connote a contextual meaning.   Non-icon assets are used as graphical filler; they provide the backgrounds, borders, and color but do not add any specific meaning.&lt;br /&gt;
&lt;br /&gt;
This document covers the methodology and work-flow used by MeeGo to order to provide the highest quality visual experience on a broad spectrum of devices while developing icons and non-icon assets.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the reader is familiar with Density Independence.  For a general overview of that topic, see [[~jketreno/scaling|Density Independence]].&lt;br /&gt;
&lt;br /&gt;
=Graphical Theme Assets Details=&lt;br /&gt;
==Pixel vs. Vector==&lt;br /&gt;
There are two formats in which graphical assets can be provided for MeeGo: '''pixel''' and '''vector'''.&lt;br /&gt;
&lt;br /&gt;
'''Pixel''' (sometimes referred to as raster) assets specify the ARGB color values of each individual pixel.  The quality of what the user sees on their display is heavily dependent on the display density for which the graphical asset was designed.  When designed for a 300DPI screen, an icon intended to be one 1/2&amp;quot; x 1/2&amp;quot; will need to be 150x150 pixels.  When viewed on a 150DPI screen, in order to maintain the same physical size, the asset will need to be scaled down by 50%.  The MeeGo theming image provider will perform this scaling for applications, using a smooth scaling algorithm to reduce artifacts.  Designing for a high DPI and scaling down is the recommended technique for pixel based graphics.&lt;br /&gt;
&lt;br /&gt;
'''Vector''' (sometimes referred to as scalable) assets are specified by paths defined by mathematical equations and are effectively resolution independent which means they can be rasterized at varying densities and sizes without introducing scaling artifacts.&lt;br /&gt;
&lt;br /&gt;
===Virtual Pixel===&lt;br /&gt;
As vector graphics are density independent, there needs to be a way to map the units used within the vector graphic to physical pixels during rasterization.  MeeGo accomplishes this by using a default virtual density of 330 pixels per inch for vector graphics.  This allows the vector graphic to use any real world unit of measure desired while allowing  [[~jketreno/theme-assets#Border_Images|Border Images]] (which may be relative to the rasterized vector graphic) to be specified in a density independent manner.&lt;br /&gt;
&lt;br /&gt;
==Recommended usages for pixel and vector assets==&lt;br /&gt;
Icons, which are typically only scaled to maintain a consistent physical size on the display (for example a button icon which should always be 8mm x 8mm, regardless of the device DPI) should be provided as a pixel asset.  If the asset is designed for a high density display, there will be minimal artifacts when scaled down to lower density displays.  MeeGo will automatically scale pixel assets to new sizes as needed.  See the section on [[~jketreno/theme-assets#dynamic asset scaling|Dynamic Asset Scaling]] for details on how this is accomplished.&lt;br /&gt;
&lt;br /&gt;
Non-icon assets, which may be arbitrarily scaled in X and Y dimension, are best provided as a vector graphic.  This is to reduce banding and aliasing artifacts which would typically occur in gradients, drop shadows, and other effects.  &lt;br /&gt;
&lt;br /&gt;
MeeGo provides a caching mechanism to alleviate the cost of rasterizing a vector asset.&lt;br /&gt;
&lt;br /&gt;
===Downscaling Example===&lt;br /&gt;
The following example illustrates a possible pitfall if fine line details are used when drawing pixel graphics at higher DPI screens &lt;br /&gt;
&lt;br /&gt;
[[File:downscaling-example.png|border|center|148px|Downscaling from 330DPI to 165DPI]]&lt;br /&gt;
Above illustrates scaling of a pixel asset from 330DPI to various DPIs.&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-example.png|frame|center|446px|Downscaling a 9mm x 9mm asset from 330DPI to 110DPI]]&lt;br /&gt;
&lt;br /&gt;
===Upscaling Example===&lt;br /&gt;
The effect of upscaling a pixel vs. vector asset is shown here:&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-vs-pixel.png|border|center|512px|Pixel vs. Scalable]]&lt;br /&gt;
&lt;br /&gt;
In the above example the 32x32 red circle, with a one pixel border, was scaled to be four times larger.  Applying a cubic filter helps to reduce aliasing but muddies the result.  &lt;br /&gt;
&lt;br /&gt;
The vector asset is very clean at the new target size.&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why vector graphics are not used everywhere:&lt;br /&gt;
&lt;br /&gt;
# Time -- Some artistic techniques are difficult to express in terms of paths, fills, and filters.  Requiring all assets to always be provided in a scalable form places undo restrictions on the graphic designer.&lt;br /&gt;
# Compatibility -- some paths, fills, and filters do not produce the same results in the tools building them and the software used in MeeGo to rasterize the asset.&lt;br /&gt;
&lt;br /&gt;
===Dynamic Asset Scaling===&lt;br /&gt;
&lt;br /&gt;
'''todo''' Describe the logic flow for pixel asset priority, vector priority, scaling, interleaving, etc.&lt;br /&gt;
&lt;br /&gt;
==Icon Assets==&lt;br /&gt;
===Editing and naming conventions===&lt;br /&gt;
Icons for MeeGo have two states: &lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
Providing a separate for each state is error prone and inefficient.  For designers, it requires that multiple files be opened and managed visually which makes quick changes and uniformity more difficult.  For loading efficiency, the more files that have to be opened and read, the slower the system behaves.  &lt;br /&gt;
&lt;br /&gt;
To improve on this, MeeGo icons provide both states in a single graphical asset.  QML elements which use the Icons for button states rely on other means (background colors, alpha overlays, etc.) to provide additional state visualizations (mainly selected and disabled.)&lt;br /&gt;
&lt;br /&gt;
Eventually MeeGo will provide an icon tile management layer to preload all rasterized assets into a large texture set which can be loaded once and then sliced at run-time.&lt;br /&gt;
====Pixel based assets====&lt;br /&gt;
For pixel based icon assets the following naming convention is used:&lt;br /&gt;
 icon-NAME-multistate.EXTENSION&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;close&amp;quot;&lt;br /&gt;
* '''EXTENSION''' is one of the recognized image extensions.  While the system supports both PNG and JPG, it is recommended that only PNG be used.&lt;br /&gt;
&lt;br /&gt;
In terms of a regular expression, the above maps to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;icon-[[:alnum:]]+multistate.(png|jpg)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphical asset is laid out internally such that the pixel width of the individual icon is the width of the total asset divided by two..  For example:&lt;br /&gt;
&lt;br /&gt;
[[File:icon-close-multistate.png|border|120px|center|icon-close-multistate.png]]&lt;br /&gt;
&lt;br /&gt;
The above file ('''icon-close-multistate.png''') provides a 120x50 pixel icon asset.  Each icon is then 60x50 pixels. &lt;br /&gt;
&lt;br /&gt;
====Scalable assets====&lt;br /&gt;
For scalable icon assets, the naming convention is much simpler:&lt;br /&gt;
 icon-NAME-multistate.svg&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;back&amp;quot;&lt;br /&gt;
MeeGo will parse the SVG looking for three top level groups with the following names:&lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
&lt;br /&gt;
==Non-Icon Assets==&lt;br /&gt;
Non-Icon assets (such as button backgrounds, borders, drop shadows)&lt;br /&gt;
&lt;br /&gt;
===Border Images===&lt;br /&gt;
When a non-icon asset is used as an element background image, it is scaled to fill the entire element.  The scaling is applied uniformly across the entire asset.  For assets that contain a border, this uniform scaling is not what is typically desired.  MeeGo provides a mechanism for the asset designer to specify the region of the graphical element that should be stretched and the region which should not be scaled.  These types of graphic assets are referred to as a &amp;quot;Border Image&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:border-slicing.png|frame|center|Border Image]]&lt;br /&gt;
&lt;br /&gt;
In the above image, a 4 pixel border is provided on all sides.  When scaled to arbitrary sizes, scaling is only applied to non-border portions:&lt;br /&gt;
&lt;br /&gt;
[[File:border-streched.png|frame|center|Border Image -- Scaled to 200x32]]&lt;br /&gt;
&lt;br /&gt;
====Border Image Specification====&lt;br /&gt;
Two approaches:&lt;br /&gt;
* Per-asset .sci file provided which contains the border widths.  For example:&lt;br /&gt;
 $ cat background.sci&lt;br /&gt;
 border.left: 5&lt;br /&gt;
 border.right: 5&lt;br /&gt;
 border.top: 5&lt;br /&gt;
 border.bottom: 5&lt;br /&gt;
 source:background.png&lt;br /&gt;
* Per-directory .sci file.  For example:&lt;br /&gt;
 $ cat index.sci&lt;br /&gt;
 # Format:&lt;br /&gt;
 # image-source top right bottom left&lt;br /&gt;
 background.png 5 5 5 5&lt;br /&gt;
 foreground.png 10 2 10 2&lt;br /&gt;
&lt;br /&gt;
To refrence '''background.png''' with the border image properties, QML would refer to the virtual asset '''background.png.sci'''.&lt;br /&gt;
&lt;br /&gt;
If both an index.sci and a separate asset .sci file are provided, the separate file will override the index.sci.&lt;br /&gt;
&lt;br /&gt;
====Border Image: Pixel vs. Vector====&lt;br /&gt;
Image slicing for pixel assets are specified in pixels which means the border element is not scaled relative to the screen pixel density.  The measurable size of a border on a high density display will be smaller than a display with a lower density.&lt;br /&gt;
&lt;br /&gt;
With vector assets, the border size is specified in a virtual pixel representing 330 pixels per inch.  This allows MeeGo to scale the border region proportional with the display density, ensuring a uniform look across multiple display profiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming Specifics=&lt;br /&gt;
==Directory structure==&lt;br /&gt;
==Naming conventions==&lt;br /&gt;
==Installation process==&lt;br /&gt;
==Tile cache==&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming in Applications=&lt;br /&gt;
==MeeGo.Components==&lt;br /&gt;
==Density Independence==&lt;br /&gt;
==Fonts==&lt;br /&gt;
==MeeGo Image Providers==&lt;br /&gt;
'''todo''' describe how and where assets are placed into the distribution, how they are rasterized, where cached assets are stored, how tile caches are built, and how the image loaders tie it all together...&lt;br /&gt;
&lt;br /&gt;
=Tool compatibility=&lt;br /&gt;
Graphic designers use a variety of tools, depending on personal preference and the task at hand.  Not all features exposed by some tools are compatible with other tools, or with the infrastructure used on MeeGo for extracting and managing visual assets.  This section is intended to call out known compatibility issues and work arounds.&lt;br /&gt;
==Photoshop==&lt;br /&gt;
==Gimp==&lt;br /&gt;
==Illustrator==&lt;br /&gt;
==Inkscape==&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Meego-units-example-1to1.png</id>
		<title>File:Meego-units-example-1to1.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Meego-units-example-1to1.png"/>
				<updated>2011-04-22T21:58:33Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Meego-units-example.png</id>
		<title>File:Meego-units-example.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Meego-units-example.png"/>
				<updated>2011-04-22T21:57:25Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-04-22T21:53:30Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
 git clone '''todo -- where is the code repository???'''&lt;br /&gt;
 cd meego-units&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Units plug-in:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.units 1.0&lt;br /&gt;
This loads the libmeegounitsplugin adds a new QML type called 'MeeGoUnits'  Since plug-ins do not have direct access to the global object namespace, the plug-in can't automatically populate a top level namespace with a 'Units' element--so you must instantiate it within your top level widget:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''.  The properties exposed are '''mm''', '''inch''', '''vp''', and '''density'''.  All three are implemented as properties with notification signals, so if the underlying device PPI changes, all UI elements can be re-laid out.  This is useful when moving (at run-time) an application from a small handset screen to a larger display (for example via an attached HDMI)&lt;br /&gt;
&lt;br /&gt;
Extending the above example to set the rectangle size to be 10cm x 5cm:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
Using the conversion properties is pretty straight forward and works as you would expect.  The following instantiates a 1cm x 1cm rectangle, offset from the top left of its parent by 1cm:&lt;br /&gt;
    Rectangle {&lt;br /&gt;
        x: units.mm2px(10.0)&lt;br /&gt;
        y: units.mm2px(10.0)&lt;br /&gt;
        width: units.mm2px(10.0)&lt;br /&gt;
        height: units.mm2px(10.0)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==a note on rounding==&lt;br /&gt;
Since the value of the properties returned by MeeGoUnits are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() conversion method exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
     sourceSize.width: units.mm2px(9.5)&lt;br /&gt;
     sourceSize.height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
     /* Not done yet -- auto scaling and caching from an asset daemon with target size scaling:&lt;br /&gt;
     *&lt;br /&gt;
     * source: &amp;quot;image://mm/9.5x6.0/text-bg&amp;quot; &lt;br /&gt;
     *&lt;br /&gt;
     * So, instead, set the source width and height to the scaled dimensions : */&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/scaling</id>
		<title>User:Jketreno/scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/scaling"/>
				<updated>2011-04-22T21:52:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: Created page with &amp;quot;=Introduction= This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of wor...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This document provides an overview of how applications can be written to support the broadest range of physical screen characteristics with the least amount of work by the application authors and graphic designers.&lt;br /&gt;
&lt;br /&gt;
The intent is to provide a means of allowing applications to be written in a density independent manner, where the physical size of UI elements is consistent across a wide spectrum of devices.  As automatic software scaling and conversion can not know the internal meaning of a graphics element (which pixels are important), pixel based assets must be designed for the lowest targeted pixels-per-inch (PPI).  In this manner, system software can scale up to the actual device pixel density.&lt;br /&gt;
&lt;br /&gt;
By following the guidelines in this document, application creators can create a single application package which will work across all devices, varying both in pixel density and physical screen sizes.&lt;br /&gt;
&lt;br /&gt;
'''Lower priority:'''  In addition to the varying densities targeted by MeeGo, the system should support various &amp;quot;distance-from-eye&amp;quot; scenarios as well as varying &amp;quot;input device resolution&amp;quot;.  An example of the former is a status bar on a tablet that is held 6-8&amp;quot; farther from the eyes than a handset--this may require that the status bar and fonts are slightly larger to maintain legibility.  This may be achieved by providing a readability scaling factor used elements not intended to be manipulated via touch.   An example of the later (varying input device resolution) is a scaling factor applied to the specified physical size of an element to accommodate higher precision devices (mice and stylus) as well as lower precision devices (gyro/accelerometer remotes, thumb-stick remotes, etc.)&lt;br /&gt;
&lt;br /&gt;
==Target Resolutions and PPI==&lt;br /&gt;
The following image illustrates a small application running across the full range of screen sizes and densities currently supported by MeeGo.  These images have been scaled to provide consistent relative sizing in the image.  This was done by converting 1:1 pixel images to a virtual pixel density of 160ppi.  Click the image to go to the higher resolution version.&lt;br /&gt;
[[Image:meego-units-example.png|center|thumb|400px|Density Independent Rendered Sample]]&lt;br /&gt;
&lt;br /&gt;
A small 1:1 pixel crop from the highest density display (269ppi) and the lowest density (113ppi) can be seen here.  When placed on the actual devices, the toolbar, buttons, and fonts would be physically the same size.&lt;br /&gt;
[[Image:meego-units-example-1to1.png|center|thumb|400px|1:1 Pixel Comparison]]&lt;br /&gt;
&lt;br /&gt;
As can be seen in the table below, touch enabled MeeGo user experiences target two major physical screen size classifications; tablet (&amp;gt;7&amp;quot;) and handset (~4&amp;quot;).  In addition to the varying physical dimensions of the screens, the devices have various PPIs [dots-per-inch -- also referred to as PPI or pixels-per-inch].  Based on the expected frequency of deployment, we are focusing our &amp;quot;pixel perfect&amp;quot; UIs for only a select set of DPIs and screen resolutions.  &lt;br /&gt;
&lt;br /&gt;
==Current Device Resolutions==&lt;br /&gt;
The following provides examples of potential screen profiles which should be supported by MeeGo:&lt;br /&gt;
&amp;lt;table cellpadding=&amp;quot;5px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Handset&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;800x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;233&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4.3&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;960x540&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;3.67&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;864x480&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;269&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16.2:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tablet&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;font-style: italic;&amp;quot;&amp;gt;&amp;lt;td&amp;gt;Diagonal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Resolution&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;PPI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Aspect Ratio&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024x600&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;15.4:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11.6&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1360x768&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;135&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:9&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;10&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;151&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1280x800&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;216&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16:10&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density Industry list of display densities]&lt;br /&gt;
&lt;br /&gt;
=Implementation Details=&lt;br /&gt;
==Getting the code==&lt;br /&gt;
 git clone '''todo -- where is the code repository???'''&lt;br /&gt;
 cd meego-units&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
==accessing the units==&lt;br /&gt;
To start, you need to import the MeeGo Units plug-in:&lt;br /&gt;
 import Qt 4.7&lt;br /&gt;
 import MeeGo.units 1.0&lt;br /&gt;
This loads the libmeegounitsplugin adds a new QML type called 'MeeGoUnits'  Since plug-ins do not have direct access to the global object namespace, the plug-in can't automatically populate a top level namespace with a 'Units' element--so you must instantiate it within your top level widget:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
At this point, you can now reference the unit conversion properties via '''units'''.  The properties exposed are '''mm''', '''inch''', '''vp''', and '''density'''.  All three are implemented as properties with notification signals, so if the underlying device PPI changes, all UI elements can be re-laid out.  This is useful when moving (at run-time) an application from a small handset screen to a larger display (for example via an attached HDMI)&lt;br /&gt;
&lt;br /&gt;
Extending the above example to set the rectangle size to be 10cm x 5cm:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
     MeeGoUnits {&lt;br /&gt;
          id: units&lt;br /&gt;
     }&lt;br /&gt;
     width: units.mm2px(100.0)&lt;br /&gt;
     height: units.mm2px(50.0)&lt;br /&gt;
 }&lt;br /&gt;
Using the conversion properties is pretty straight forward and works as you would expect.  The following instantiates a 1cm x 1cm rectangle, offset from the top left of its parent by 1cm:&lt;br /&gt;
    Rectangle {&lt;br /&gt;
        x: units.mm2px(10.0)&lt;br /&gt;
        y: units.mm2px(10.0)&lt;br /&gt;
        width: units.mm2px(10.0)&lt;br /&gt;
        height: units.mm2px(10.0)&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==a note on rounding==&lt;br /&gt;
Since the value of the properties returned by MeeGoUnits are non-integer (for example, units.mm might be '3.66667'), the result of most operations with the units will result in non-integer numbers as well.  Due to the cast of real to int, you may encounter rounding problems which typically manifest themselves as QML Items not always lining up.  This can be remedied by using the mm2px() conversion method exposed by the units object vs. using units.mm directly.&lt;br /&gt;
&lt;br /&gt;
The following shows a simplified example which can lead to rounding problems:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: 20.0 * units.mm&lt;br /&gt;
    height: 10.0 * units.mm&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
Better code:&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: units.mm2px(20.0)&lt;br /&gt;
    height: units.mm2px(10.0)&lt;br /&gt;
    ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==text==&lt;br /&gt;
 Text {&lt;br /&gt;
    font.pixelSize: units.mm2px(2.5) // create text that is 2.5mm tall&lt;br /&gt;
    text: &amp;quot;2.5mm font&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==images==&lt;br /&gt;
 Image {&lt;br /&gt;
     source: &amp;quot;text-bg.jpg&amp;quot;&lt;br /&gt;
     width: units.mm2px(9.5)&lt;br /&gt;
     height: units.mm2px(6.0)&lt;br /&gt;
     sourceSize.width: units.mm2px(9.5)&lt;br /&gt;
     sourceSize.height: units.mm2px(6.0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
     /* Not done yet -- auto scaling and caching from an asset daemon with target size scaling:&lt;br /&gt;
     *&lt;br /&gt;
     * source: &amp;quot;image://mm/9.5x6.0/text-bg&amp;quot; &lt;br /&gt;
     *&lt;br /&gt;
     * So, instead, set the source width and height to the scaled dimensions : */&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==vector vs. raster==&lt;br /&gt;
==naming conventions==&lt;br /&gt;
==resource sharing==&lt;br /&gt;
==scaling==&lt;br /&gt;
&amp;lt;!--....&lt;br /&gt;
The software automatically adjusts and scales the UI elements and assets to account for varying physical sizes and PPIs.  A typical problem with automatic system rescaling of images and UI widgets is that the resulting scaled interface may not look ideal.  In the event there is a popular product category that an application creator wants to target, the system provides a mechanism for the creator to provide PPI specific assets which will override the system scaling and be used for those target PPIs.  The approach used is similar to mip-mapping of textures in 3D applications, where the application creator can provide a myriad of target resolutions and PPIs and the software will interpolate between the nearest PPI and size versions to create new sizes and versions as needed.&lt;br /&gt;
...--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/theme-assets</id>
		<title>User:Jketreno/theme-assets</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/theme-assets"/>
				<updated>2011-04-22T21:45:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: Created page with &amp;quot;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''  =Introduction= The assets used in the visual design of our applications can be broke...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''THIS PAGE IS A WORK IN PROGRESS AND DOES NOT NECESSARILY CORRESPOND TO CURRENT REALITY'''&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The assets used in the visual design of our applications can be broken down into categories:&lt;br /&gt;
&lt;br /&gt;
* Icons assets&lt;br /&gt;
* Non-Icon assets&lt;br /&gt;
&lt;br /&gt;
Icons are typically fixed size and connote a contextual meaning.   Non-icon assets are used as graphical filler; they provide the backgrounds, borders, and color but do not add any specific meaning.&lt;br /&gt;
&lt;br /&gt;
This document covers the methodology and work-flow used by MeeGo to order to provide the highest quality visual experience on a broad spectrum of devices while developing icons and non-icon assets.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the reader is familiar with Density Independence.  For a general overview of that topic, see [[~jketreno/scaling|Density Independence]].&lt;br /&gt;
&lt;br /&gt;
=Graphical Theme Assets Details=&lt;br /&gt;
==Pixel vs. Vector==&lt;br /&gt;
There are two formats in which graphical assets can be provided for MeeGo: '''pixel''' and '''vector'''.&lt;br /&gt;
&lt;br /&gt;
'''Pixel''' (sometimes referred to as raster) assets specify the ARGB color values of each individual pixel.  The quality of what the user sees on their display is heavily dependent on the display density for which the graphical asset was designed.  When designed for a 300DPI screen, an icon intended to be one 1/2&amp;quot; x 1/2&amp;quot; will need to be 150x150 pixels.  When viewed on a 150DPI screen, in order to maintain the same physical size, the asset will need to be scaled down by 50%.  The MeeGo theming image provider will perform this scaling for applications, using a smooth scaling algorithm to reduce artifacts.  Designing for a high DPI and scaling down is the recommended technique for pixel based graphics.&lt;br /&gt;
&lt;br /&gt;
'''Vector''' (sometimes referred to as scalable) assets are specified by paths defined by mathematical equations and are effectively resolution independent which means they can be rasterized at varying densities and sizes without introducing scaling artifacts.&lt;br /&gt;
&lt;br /&gt;
===Virtual Pixel===&lt;br /&gt;
As vector graphics are density independent, there needs to be a way to map the units used within the vector graphic to physical pixels during rasterization.  MeeGo accomplishes this by using a default virtual density of 330 pixels per inch for vector graphics.  This allows the vector graphic to use any real world unit of measure desired while allowing  [[~jketreno/theme#Border_Images|Border Images]] (which may be relative to the rasterized vector graphic) to be specified in a density independent manner.&lt;br /&gt;
&lt;br /&gt;
==Recommended usages for pixel and vector assets==&lt;br /&gt;
Icons, which are typically only scaled to maintain a consistent physical size on the display (for example a button icon which should always be 8mm x 8mm, regardless of the device DPI) should be provided as a pixel asset.  If the asset is designed for a high density display, there will be minimal artifacts when scaled down to lower density displays.  MeeGo will automatically scale pixel assets to new sizes as needed.  See the section on [[~jketreno/theme#dynamic asset scaling|Dynamic Asset Scaling]] for details on how this is accomplished.&lt;br /&gt;
&lt;br /&gt;
Non-icon assets, which may be arbitrarily scaled in X and Y dimension, are best provided as a vector graphic.  This is to reduce banding and aliasing artifacts which would typically occur in gradients, drop shadows, and other effects.  &lt;br /&gt;
&lt;br /&gt;
MeeGo provides a caching mechanism to alleviate the cost of rasterizing a vector asset.&lt;br /&gt;
&lt;br /&gt;
===Downscaling Example===&lt;br /&gt;
The following example illustrates a possible pitfall if fine line details are used when drawing pixel graphics at higher DPI screens &lt;br /&gt;
&lt;br /&gt;
[[File:downscaling-example.png|border|center|148px|Downscaling from 330DPI to 165DPI]]&lt;br /&gt;
Above illustrates scaling of a pixel asset from 330DPI to various DPIs.&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-example.png|frame|center|446px|Downscaling a 9mm x 9mm asset from 330DPI to 110DPI]]&lt;br /&gt;
&lt;br /&gt;
===Upscaling Example===&lt;br /&gt;
The effect of upscaling a pixel vs. vector asset is shown here:&lt;br /&gt;
&lt;br /&gt;
[[File:scalable-vs-pixel.png|border|center|512px|Pixel vs. Scalable]]&lt;br /&gt;
&lt;br /&gt;
In the above example the 32x32 red circle, with a one pixel border, was scaled to be four times larger.  Applying a cubic filter helps to reduce aliasing but muddies the result.  &lt;br /&gt;
&lt;br /&gt;
The vector asset is very clean at the new target size.&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why vector graphics are not used everywhere:&lt;br /&gt;
&lt;br /&gt;
# Time -- Some artistic techniques are difficult to express in terms of paths, fills, and filters.  Requiring all assets to always be provided in a scalable form places undo restrictions on the graphic designer.&lt;br /&gt;
# Compatibility -- some paths, fills, and filters do not produce the same results in the tools building them and the software used in MeeGo to rasterize the asset.&lt;br /&gt;
&lt;br /&gt;
===Dynamic Asset Scaling===&lt;br /&gt;
&lt;br /&gt;
'''todo''' Describe the logic flow for pixel asset priority, vector priority, scaling, interleaving, etc.&lt;br /&gt;
&lt;br /&gt;
==Icon Assets==&lt;br /&gt;
===Editing and naming conventions===&lt;br /&gt;
Icons for MeeGo have two states: &lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
Providing a separate for each state is error prone and inefficient.  For designers, it requires that multiple files be opened and managed visually which makes quick changes and uniformity more difficult.  For loading efficiency, the more files that have to be opened and read, the slower the system behaves.  &lt;br /&gt;
&lt;br /&gt;
To improve on this, MeeGo icons provide both states in a single graphical asset.  QML elements which use the Icons for button states rely on other means (background colors, alpha overlays, etc.) to provide additional state visualizations (mainly selected and disabled.)&lt;br /&gt;
&lt;br /&gt;
Eventually MeeGo will provide an icon tile management layer to preload all rasterized assets into a large texture set which can be loaded once and then sliced at run-time.&lt;br /&gt;
====Pixel based assets====&lt;br /&gt;
For pixel based icon assets the following naming convention is used:&lt;br /&gt;
 icon-NAME-multistate.EXTENSION&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;close&amp;quot;&lt;br /&gt;
* '''EXTENSION''' is one of the recognized image extensions.  While the system supports both PNG and JPG, it is recommended that only PNG be used.&lt;br /&gt;
&lt;br /&gt;
In terms of a regular expression, the above maps to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;icon-[[:alnum:]]+multistate.(png|jpg)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphical asset is laid out internally such that the pixel width of the individual icon is the width of the total asset divided by two..  For example:&lt;br /&gt;
&lt;br /&gt;
[[File:icon-close-multistate.png|border|120px|center|icon-close-multistate.png]]&lt;br /&gt;
&lt;br /&gt;
The above file ('''icon-close-multistate.png''') provides a 120x50 pixel icon asset.  Each icon is then 60x50 pixels. &lt;br /&gt;
&lt;br /&gt;
====Scalable assets====&lt;br /&gt;
For scalable icon assets, the naming convention is much simpler:&lt;br /&gt;
 icon-NAME-multistate.svg&lt;br /&gt;
Where:&lt;br /&gt;
* '''NAME''' is the icon name, for example &amp;quot;back&amp;quot;&lt;br /&gt;
MeeGo will parse the SVG looking for three top level groups with the following names:&lt;br /&gt;
* normal&lt;br /&gt;
* active&lt;br /&gt;
&lt;br /&gt;
==Non-Icon Assets==&lt;br /&gt;
Non-Icon assets (such as button backgrounds, borders, drop shadows)&lt;br /&gt;
&lt;br /&gt;
===Border Images===&lt;br /&gt;
When a non-icon asset is used as an element background image, it is scaled to fill the entire element.  The scaling is applied uniformly across the entire asset.  For assets that contain a border, this uniform scaling is not what is typically desired.  MeeGo provides a mechanism for the asset designer to specify the region of the graphical element that should be stretched and the region which should not be scaled.  These types of graphic assets are referred to as a &amp;quot;Border Image&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:border-slicing.png|frame|center|Border Image]]&lt;br /&gt;
&lt;br /&gt;
In the above image, a 4 pixel border is provided on all sides.  When scaled to arbitrary sizes, scaling is only applied to non-border portions:&lt;br /&gt;
&lt;br /&gt;
[[File:border-streched.png|frame|center|Border Image -- Scaled to 200x32]]&lt;br /&gt;
&lt;br /&gt;
====Border Image Specification====&lt;br /&gt;
Two approaches:&lt;br /&gt;
* Per-asset .sci file provided which contains the border widths.  For example:&lt;br /&gt;
 $ cat background.sci&lt;br /&gt;
 border.left: 5&lt;br /&gt;
 border.right: 5&lt;br /&gt;
 border.top: 5&lt;br /&gt;
 border.bottom: 5&lt;br /&gt;
 source:background.png&lt;br /&gt;
* Per-directory .sci file.  For example:&lt;br /&gt;
 $ cat index.sci&lt;br /&gt;
 # Format:&lt;br /&gt;
 # image-source top right bottom left&lt;br /&gt;
 background.png 5 5 5 5&lt;br /&gt;
 foreground.png 10 2 10 2&lt;br /&gt;
&lt;br /&gt;
To refrence '''background.png''' with the border image properties, QML would refer to the virtual asset '''background.png.sci'''.&lt;br /&gt;
&lt;br /&gt;
If both an index.sci and a separate asset .sci file are provided, the separate file will override the index.sci.&lt;br /&gt;
&lt;br /&gt;
====Border Image: Pixel vs. Vector====&lt;br /&gt;
Image slicing for pixel assets are specified in pixels which means the border element is not scaled relative to the screen pixel density.  The measurable size of a border on a high density display will be smaller than a display with a lower density.&lt;br /&gt;
&lt;br /&gt;
With vector assets, the border size is specified in a virtual pixel representing 330 pixels per inch.  This allows MeeGo to scale the border region proportional with the display density, ensuring a uniform look across multiple display profiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming Specifics=&lt;br /&gt;
==Directory structure==&lt;br /&gt;
==Naming conventions==&lt;br /&gt;
==Installation process==&lt;br /&gt;
==Tile cache==&lt;br /&gt;
&lt;br /&gt;
=MeeGo Theming in Applications=&lt;br /&gt;
==MeeGo.Components==&lt;br /&gt;
==Density Independence==&lt;br /&gt;
==Fonts==&lt;br /&gt;
==MeeGo Image Providers==&lt;br /&gt;
'''todo''' describe how and where assets are placed into the distribution, how they are rasterized, where cached assets are stored, how tile caches are built, and how the image loaders tie it all together...&lt;br /&gt;
&lt;br /&gt;
=Tool compatibility=&lt;br /&gt;
Graphic designers use a variety of tools, depending on personal preference and the task at hand.  Not all features exposed by some tools are compatible with other tools, or with the infrastructure used on MeeGo for extracting and managing visual assets.  This section is intended to call out known compatibility issues and work arounds.&lt;br /&gt;
==Photoshop==&lt;br /&gt;
==Gimp==&lt;br /&gt;
==Illustrator==&lt;br /&gt;
==Inkscape==&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno</id>
		<title>User:Jketreno</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno"/>
				<updated>2011-04-22T21:44:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
[http://wiki.meego.com/~jketreno/multi-point-touch Multi-Point-Touch on MeeGo]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/content Improving MeeGo Content Management]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/scaling A Density Independent UI on MeeGo]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/theme-assets Theme Assets]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/meego-image-resize MeeGo Image Resize script]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/meego-image-resize</id>
		<title>User:Jketreno/meego-image-resize</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/meego-image-resize"/>
				<updated>2011-04-04T19:42:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you download a MeeGo image and would like to run it from a USB stick or MicroSD, you may want to resize the image to use all of the space available on your removable media.  This script will resize the downloaded .bin image to whatever size you specify (in M).  You can then mount it locally, install packages, etc. before transferring it to your removable media.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 TARGET=$1&lt;br /&gt;
 [ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot;&lt;br /&gt;
 shift&lt;br /&gt;
 SIZE=$1&lt;br /&gt;
 [ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600&lt;br /&gt;
 &lt;br /&gt;
 function die {&lt;br /&gt;
 	echo $@&lt;br /&gt;
 	exit -1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function unhook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	[ -e &amp;quot;${path}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		mount | grep -q &amp;quot;${PWD}/${path}&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
 			sudo umount &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to unmount '${path}'&amp;quot;&lt;br /&gt;
 		}&lt;br /&gt;
 		rmdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to rmdir '${path}'&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function hook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	local image=$2&lt;br /&gt;
 	unhook &amp;quot;${path}&amp;quot;&lt;br /&gt;
 	mkdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to create directory '${path}'&amp;quot;&lt;br /&gt;
 	local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep primary))&lt;br /&gt;
 	local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 	sudo mount -o loop,offset=${OFFSET} &amp;quot;${image}&amp;quot; &amp;quot;${path}&amp;quot; ||&lt;br /&gt;
 		die &amp;quot;Unable to mount '${image}' to '${path}'&amp;quot;&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function resize {&lt;br /&gt;
 	local image=$1&lt;br /&gt;
 	local size=$2&lt;br /&gt;
 	local tmp=($(du --apparent-size -B $((1024*1024)) &amp;quot;${image}&amp;quot;))&lt;br /&gt;
 	local current=&amp;quot;${tmp[0]}&amp;quot;&lt;br /&gt;
 	[ &amp;quot;${current}&amp;quot; != &amp;quot;${size}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		echo -n &amp;quot;Settting '${image}' to ${size}M...&amp;quot;&lt;br /&gt;
 		dd if=/dev/zero of=${image} bs=1M seek=$((size - 1)) count=1 &amp;gt; /dev/null&lt;br /&gt;
 		local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep btrfs\$))&lt;br /&gt;
 		[ -z &amp;quot;${VALUE[0]}&amp;quot; ] &amp;amp;&amp;amp; die &amp;quot;$0 only supports BTRFS images&amp;quot;&lt;br /&gt;
 		local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 		echo -e &amp;quot;rm 1\nmkpart primary btrfs ${OFFSET}b -1\nq&amp;quot; | parted &amp;quot;${image}&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 		echo &amp;quot;done&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 resize &amp;quot;${TARGET}&amp;quot; 7600&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Finalizing image resize...&amp;quot;&lt;br /&gt;
 TMP=.tmp-resize&lt;br /&gt;
 hook ${TMP} &amp;quot;${TARGET}&amp;quot;&lt;br /&gt;
 sudo btrfs filesystem resize max &amp;quot;${TARGET}&amp;quot;.*${PWD}/${TMP}.*$,\1,p&amp;quot;)&lt;br /&gt;
 unhook ${TMP}&lt;br /&gt;
 echo &amp;quot;done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  To perform the above you need the btrfs utilities.&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/meego-image-resize</id>
		<title>User:Jketreno/meego-image-resize</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/meego-image-resize"/>
				<updated>2011-04-04T19:28:19Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you download a MeeGo image and would like to run it from a USB stick or MicroSD, you may want to resize the image to use all of the space available on your removable media.  This script will resize the downloaded .bin image to whatever size you specify (in M).  You can then mount it locally, install packages, etc. before transferring it to your removable media.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 TARGET=$1&lt;br /&gt;
 [ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot;&lt;br /&gt;
 shift&lt;br /&gt;
 SIZE=$1&lt;br /&gt;
 [ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600&lt;br /&gt;
 &lt;br /&gt;
 function die {&lt;br /&gt;
 	echo $@&lt;br /&gt;
 	exit -1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function unhook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	[ -e &amp;quot;${path}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		mount | grep -q &amp;quot;${PWD}/${path}&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
 			sudo umount &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to unmount '${path}'&amp;quot;&lt;br /&gt;
 		}&lt;br /&gt;
 		rmdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to rmdir '${path}'&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function hook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	local image=$2&lt;br /&gt;
 	unhook &amp;quot;${path}&amp;quot;&lt;br /&gt;
 	mkdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to create directory '${path}'&amp;quot;&lt;br /&gt;
 	local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep primary))&lt;br /&gt;
 	local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 	sudo mount -o loop,offset=${OFFSET} &amp;quot;${image}&amp;quot; &amp;quot;${path}&amp;quot; ||&lt;br /&gt;
 		die &amp;quot;Unable to mount '${image}' to '${path}'&amp;quot;&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function resize {&lt;br /&gt;
 	local image=$1&lt;br /&gt;
 	local size=$2&lt;br /&gt;
 	local tmp=($(du --apparent-size -B $((1024*1024)) &amp;quot;${image}&amp;quot;))&lt;br /&gt;
 	local current=&amp;quot;${tmp[0]}&amp;quot;&lt;br /&gt;
 	[ &amp;quot;${current}&amp;quot; != &amp;quot;${size}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		echo -n &amp;quot;Settting '${image}' to ${size}M...&amp;quot;&lt;br /&gt;
 		dd if=/dev/zero of=${image} bs=1M seek=$((size - 1)) count=1 &amp;gt; /dev/null&lt;br /&gt;
 		local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep btrfs\$))&lt;br /&gt;
 		[ -z &amp;quot;${VALUE[0]}&amp;quot; ] &amp;amp;&amp;amp; die &amp;quot;$0 only supports BTRFS images&amp;quot;&lt;br /&gt;
 		local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 		echo -e &amp;quot;rm 1\nmkpart primary btrfs ${OFFSET}b -1\nq&amp;quot; | parted &amp;quot;${image}&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 		echo &amp;quot;done&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 resize &amp;quot;${TARGET}&amp;quot; 7600&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Finalizing image resize...&amp;quot;&lt;br /&gt;
 TMP=.tmp-resize&lt;br /&gt;
 hook ${TMP} &amp;quot;${TARGET}&amp;quot;&lt;br /&gt;
 sudo btrfsctl -r ${SIZE}M -A $(mount | sed -ne &amp;quot;s,^\([^ ]*\) .*${PWD}/${TMP}.*$,\1,p&amp;quot;)&lt;br /&gt;
 unhook ${TMP}&lt;br /&gt;
 echo &amp;quot;done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  The above might not actually resize the file system within the disk image.  If you mount the drive and find that it is only 2G still, you can fix this by using meego-chroot-sdk to enter the image on your system.  Then perform the following:&lt;br /&gt;
 zypper install btrfs-progs&lt;br /&gt;
 btrfs filesystem resize max /&lt;br /&gt;
Your file system should now be resized to the full image size.&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/meego-image-resize</id>
		<title>User:Jketreno/meego-image-resize</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/meego-image-resize"/>
				<updated>2011-04-04T19:27:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you download a MeeGo image and would like to run it from a USB stick or MicroSD, you may want to resize the image to use all of the space available on your removable media.  This script will resize the downloaded .bin image to whatever size you specify (in M).  You can then mount it locally, install packages, etc. before transferring it to your removable media.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 TARGET=$1&lt;br /&gt;
 [ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot;&lt;br /&gt;
 shift&lt;br /&gt;
 SIZE=$1&lt;br /&gt;
 [ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600&lt;br /&gt;
 &lt;br /&gt;
 function die {&lt;br /&gt;
 	echo $@&lt;br /&gt;
 	exit -1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function unhook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	[ -e &amp;quot;${path}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		mount | grep -q &amp;quot;${PWD}/${path}&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
 			sudo umount &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to unmount '${path}'&amp;quot;&lt;br /&gt;
 		}&lt;br /&gt;
 		rmdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to rmdir '${path}'&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function hook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	local image=$2&lt;br /&gt;
 	unhook &amp;quot;${path}&amp;quot;&lt;br /&gt;
 	mkdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to create directory '${path}'&amp;quot;&lt;br /&gt;
 	local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep primary))&lt;br /&gt;
 	local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 	sudo mount -o loop,offset=${OFFSET} &amp;quot;${image}&amp;quot; &amp;quot;${path}&amp;quot; ||&lt;br /&gt;
 		die &amp;quot;Unable to mount '${image}' to '${path}'&amp;quot;&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function resize {&lt;br /&gt;
 	local image=$1&lt;br /&gt;
 	local size=$2&lt;br /&gt;
 	local tmp=($(du --apparent-size -B $((1024*1024)) &amp;quot;${image}&amp;quot;))&lt;br /&gt;
 	local current=&amp;quot;${tmp[0]}&amp;quot;&lt;br /&gt;
 	[ &amp;quot;${current}&amp;quot; != &amp;quot;${size}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		echo -n &amp;quot;Settting '${image}' to ${size}M...&amp;quot;&lt;br /&gt;
 		dd if=/dev/zero of=${image} bs=1M seek=$((size - 1)) count=1 &amp;gt; /dev/null&lt;br /&gt;
 		local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep btrfs\$))&lt;br /&gt;
 		[ -z &amp;quot;${VALUE[0]}&amp;quot; ] &amp;amp;&amp;amp; die &amp;quot;$0 only supports BTRFS images&amp;quot;&lt;br /&gt;
 		local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 		echo -e &amp;quot;rm 1\nmkpart primary btrfs ${OFFSET}b -1\nq&amp;quot; | parted &amp;quot;${image}&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 		echo &amp;quot;done&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 resize &amp;quot;${TARGET}&amp;quot; 7600&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Finalizing image resize...&amp;quot;&lt;br /&gt;
 TMP=.tmp-resize&lt;br /&gt;
 hook ${TMP} &amp;quot;${TARGET}&amp;quot;&lt;br /&gt;
 sudo btrfsctl -r ${SIZE}M -A $(mount | sed -ne &amp;quot;s,^\([^ ]*\) .*${PWD}/${TMP}.*$,\1,p&amp;quot;)&lt;br /&gt;
 unhook ${TMP}&lt;br /&gt;
 echo &amp;quot;done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  The above might not actually resize the file system within the disk image.  If you mount the drive and find that it is only 2G still, you can fix this by using meego-chroot-sdk to enter the image on your system.  Then perform the following:&lt;br /&gt;
 zypper install btrfs-progs&lt;br /&gt;
 btrfs filesystem resize max /&lt;br /&gt;
Your file system should now be resized to the full image size. &lt;br /&gt;
&lt;br /&gt;
 zypper install&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/meego-image-resize</id>
		<title>User:Jketreno/meego-image-resize</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/meego-image-resize"/>
				<updated>2011-04-01T16:28:08Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you download a MeeGo image and would like to run it from a USB stick or MicroSD, you may want to resize the image to use all of the space available on your removable media.  This script will resize the downloaded .bin image to whatever size you specify (in M).  You can then mount it locally, install packages, etc. before transferring it to your removable media.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 TARGET=$1&lt;br /&gt;
 [ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot;&lt;br /&gt;
 shift&lt;br /&gt;
 SIZE=$1&lt;br /&gt;
 [ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600&lt;br /&gt;
 &lt;br /&gt;
 function die {&lt;br /&gt;
 	echo $@&lt;br /&gt;
 	exit -1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function unhook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	[ -e &amp;quot;${path}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		mount | grep -q &amp;quot;${PWD}/${path}&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
 			sudo umount &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to unmount '${path}'&amp;quot;&lt;br /&gt;
 		}&lt;br /&gt;
 		rmdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to rmdir '${path}'&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function hook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	local image=$2&lt;br /&gt;
 	unhook &amp;quot;${path}&amp;quot;&lt;br /&gt;
 	mkdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to create directory '${path}'&amp;quot;&lt;br /&gt;
 	local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep primary))&lt;br /&gt;
 	local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 	sudo mount -o loop,offset=${OFFSET} &amp;quot;${image}&amp;quot; &amp;quot;${path}&amp;quot; ||&lt;br /&gt;
 		die &amp;quot;Unable to mount '${image}' to '${path}'&amp;quot;&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function resize {&lt;br /&gt;
 	local image=$1&lt;br /&gt;
 	local size=$2&lt;br /&gt;
 	local tmp=($(du --apparent-size -B $((1024*1024)) &amp;quot;${image}&amp;quot;))&lt;br /&gt;
 	local current=&amp;quot;${tmp[0]}&amp;quot;&lt;br /&gt;
 	[ &amp;quot;${current}&amp;quot; != &amp;quot;${size}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		echo -n &amp;quot;Settting '${image}' to ${size}M...&amp;quot;&lt;br /&gt;
 		dd if=/dev/zero of=${image} bs=1M seek=$((size - 1)) count=1 &amp;gt; /dev/null&lt;br /&gt;
 		local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep btrfs\$))&lt;br /&gt;
 		[ -z &amp;quot;${VALUE[0]}&amp;quot; ] &amp;amp;&amp;amp; die &amp;quot;$0 only supports BTRFS images&amp;quot;&lt;br /&gt;
 		local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 		echo -e &amp;quot;rm 1\nmkpart primary btrfs ${OFFSET}b -1\nq&amp;quot; | parted &amp;quot;${image}&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 		echo &amp;quot;done&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 resize &amp;quot;${TARGET}&amp;quot; 7600&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Finalizing image resize...&amp;quot;&lt;br /&gt;
 TMP=.tmp-resize&lt;br /&gt;
 hook ${TMP} &amp;quot;${TARGET}&amp;quot;&lt;br /&gt;
 sudo btrfsctl -r ${SIZE}M -A $(mount | sed -ne &amp;quot;s,^\([^ ]*\) .*${PWD}/${TMP}.*$,\1,p&amp;quot;)&lt;br /&gt;
 unhook ${TMP}&lt;br /&gt;
 echo &amp;quot;done&amp;quot;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/meego-image-resize</id>
		<title>User:Jketreno/meego-image-resize</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/meego-image-resize"/>
				<updated>2011-04-01T16:18:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; #!/bin/bash&lt;br /&gt;
 TARGET=$1&lt;br /&gt;
 [ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot;&lt;br /&gt;
 shift&lt;br /&gt;
 SIZE=$1&lt;br /&gt;
 [ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600&lt;br /&gt;
 &lt;br /&gt;
 function die {&lt;br /&gt;
 	echo $@&lt;br /&gt;
 	exit -1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function unhook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	[ -e &amp;quot;${path}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		mount | grep -q &amp;quot;${PWD}/${path}&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
 			sudo umount &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to unmount '${path}'&amp;quot;&lt;br /&gt;
 		}&lt;br /&gt;
 		rmdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to rmdir '${path}'&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function hook {&lt;br /&gt;
 	local path=$1&lt;br /&gt;
 	local image=$2&lt;br /&gt;
 	unhook &amp;quot;${path}&amp;quot;&lt;br /&gt;
 	mkdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to create directory '${path}'&amp;quot;&lt;br /&gt;
 	local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep primary))&lt;br /&gt;
 	local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 	sudo mount -o loop,offset=${OFFSET} &amp;quot;${image}&amp;quot; &amp;quot;${path}&amp;quot; ||&lt;br /&gt;
 		die &amp;quot;Unable to mount '${image}' to '${path}'&amp;quot;&lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function resize {&lt;br /&gt;
 	local image=$1&lt;br /&gt;
 	local size=$2&lt;br /&gt;
 	local tmp=($(du --apparent-size -B $((1024*1024)) &amp;quot;${image}&amp;quot;))&lt;br /&gt;
 	local current=&amp;quot;${tmp[0]}&amp;quot;&lt;br /&gt;
 	[ &amp;quot;${current}&amp;quot; != &amp;quot;${size}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
 		echo -n &amp;quot;Settting '${image}' to ${size}M...&amp;quot;&lt;br /&gt;
 		dd if=/dev/zero of=${image} bs=1M seek=$((size - 1)) count=1 &amp;gt; /dev/null&lt;br /&gt;
 		local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep btrfs\$))&lt;br /&gt;
 		[ -z &amp;quot;${VALUE[0]}&amp;quot; ] &amp;amp;&amp;amp; die &amp;quot;$0 only supports BTRFS images&amp;quot;&lt;br /&gt;
 		local OFFSET=${VALUE[1]/B}&lt;br /&gt;
 		echo -e &amp;quot;rm 1\nmkpart primary btrfs ${OFFSET}b -1\nq&amp;quot; | parted &amp;quot;${image}&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 		echo &amp;quot;done&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 resize &amp;quot;${TARGET}&amp;quot; 7600&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Finalizing image resize...&amp;quot;&lt;br /&gt;
 TMP=.tmp-resize&lt;br /&gt;
 hook ${TMP} &amp;quot;${TARGET}&amp;quot;&lt;br /&gt;
 sudo btrfsctl -r ${SIZE}M -A $(mount | sed -ne &amp;quot;s,^\([^ ]*\) .*${PWD}/${TMP}.*$,\1,p&amp;quot;)&lt;br /&gt;
 unhook ${TMP}&lt;br /&gt;
 echo &amp;quot;done&amp;quot;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/meego-image-resize</id>
		<title>User:Jketreno/meego-image-resize</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/meego-image-resize"/>
				<updated>2011-04-01T16:17:11Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: Created page with &amp;quot;#!/bin/bash TARGET=$1 [ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot; shift SIZE=$1 [ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600  function die { 	echo $@ 	exit -1 }   function unh…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#!/bin/bash&lt;br /&gt;
TARGET=$1&lt;br /&gt;
[ -z ${TARGET} ] &amp;amp;&amp;amp; die &amp;quot;Usage: $0 meego-image.bin [size in M]&amp;quot;&lt;br /&gt;
shift&lt;br /&gt;
SIZE=$1&lt;br /&gt;
[ -z ${SIZE} ] &amp;amp;&amp;amp; SIZE=7600&lt;br /&gt;
&lt;br /&gt;
function die {&lt;br /&gt;
	echo $@&lt;br /&gt;
	exit -1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function unhook {&lt;br /&gt;
	local path=$1&lt;br /&gt;
	[ -e &amp;quot;${path}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
		mount | grep -q &amp;quot;${PWD}/${path}&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
			sudo umount &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to unmount '${path}'&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		rmdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to rmdir '${path}'&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
	return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function hook {&lt;br /&gt;
	local path=$1&lt;br /&gt;
	local image=$2&lt;br /&gt;
	unhook &amp;quot;${path}&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;${path}&amp;quot; || die &amp;quot;Unable to create directory '${path}'&amp;quot;&lt;br /&gt;
	local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep primary))&lt;br /&gt;
	local OFFSET=${VALUE[1]/B}&lt;br /&gt;
	sudo mount -o loop,offset=${OFFSET} &amp;quot;${image}&amp;quot; &amp;quot;${path}&amp;quot; ||&lt;br /&gt;
		die &amp;quot;Unable to mount '${image}' to '${path}'&amp;quot;&lt;br /&gt;
	return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function resize {&lt;br /&gt;
	local image=$1&lt;br /&gt;
	local size=$2&lt;br /&gt;
	local tmp=($(du --apparent-size -B $((1024*1024)) &amp;quot;${image}&amp;quot;))&lt;br /&gt;
	local current=&amp;quot;${tmp[0]}&amp;quot;&lt;br /&gt;
	[ &amp;quot;${current}&amp;quot; != &amp;quot;${size}&amp;quot; ] &amp;amp;&amp;amp; {&lt;br /&gt;
		echo -n &amp;quot;Settting '${image}' to ${size}M...&amp;quot;&lt;br /&gt;
		dd if=/dev/zero of=${image} bs=1M seek=$((size - 1)) count=1 &amp;gt; /dev/null&lt;br /&gt;
		local VALUE=($(echo -ne &amp;quot;u b\np\nq\n&amp;quot; | parted &amp;quot;${image}&amp;quot; | grep btrfs\$))&lt;br /&gt;
		[ -z &amp;quot;${VALUE[0]}&amp;quot; ] &amp;amp;&amp;amp; die &amp;quot;$0 only supports BTRFS images&amp;quot;&lt;br /&gt;
		local OFFSET=${VALUE[1]/B}&lt;br /&gt;
		echo -e &amp;quot;rm 1\nmkpart primary btrfs ${OFFSET}b -1\nq&amp;quot; | parted &amp;quot;${image}&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
		echo &amp;quot;done&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
resize &amp;quot;${TARGET}&amp;quot; 7600&lt;br /&gt;
&lt;br /&gt;
echo -n &amp;quot;Finalizing image resize...&amp;quot;&lt;br /&gt;
TMP=.tmp-resize&lt;br /&gt;
hook ${TMP} &amp;quot;${TARGET}&amp;quot;&lt;br /&gt;
sudo btrfsctl -r ${SIZE}M -A $(mount | sed -ne &amp;quot;s,^\([^ ]*\) .*${PWD}/${TMP}.*$,\1,p&amp;quot;)&lt;br /&gt;
unhook ${TMP}&lt;br /&gt;
echo &amp;quot;done&amp;quot;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno</id>
		<title>User:Jketreno</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno"/>
				<updated>2011-04-01T16:15:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
[http://wiki.meego.com/~jketreno/multi-point-touch Multi-Point-Touch on MeeGo]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/content Improving MeeGo Content Management]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/scaling A Density Independent UI on MeeGo]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/meego-image-resize MeeGo Image Resize script]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_UX_Components</id>
		<title>MeeGo UX Components</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_UX_Components"/>
				<updated>2011-03-30T22:05:06Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
This page will walk you through the process of creating an application with the QML based MeeGo UX Components.  The MeeGo UX Components provide a set UI elements allowing you to quickly build applications which tightly integrate with the MeeGo user experience.&lt;br /&gt;
&lt;br /&gt;
=Install the MeeGo UX Components=&lt;br /&gt;
You can install the MeeGo UX components either from the zypper (recommended) or directly form the latest version of the source code.  This code assumes you are working either on a [http://link-to-download-meego-image.com MeeGo system], within the [http://link-to-sdk-qemu-info.com MeeGo SDK QEMU environment], or within a [http://link-to-meego-chroot-info.com MeeGo chroot configuration].&lt;br /&gt;
&lt;br /&gt;
==Zypper==&lt;br /&gt;
To install the MeeGo UX Components via zypper:&lt;br /&gt;
 zypper install meego-ux-components-devel&lt;br /&gt;
&lt;br /&gt;
==From Source==&lt;br /&gt;
We'll first clone the source from the upstream repository location on Gitorious:&lt;br /&gt;
 git clone git://meego.gitorious.org/meego-ux/meego-ux-components&lt;br /&gt;
 cd meego-ux-components&lt;br /&gt;
 qmake&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
NOTE:  If you haven't been doing active development from sources, you may need several development dependency packages.  The easiest way to get those dependencies installed is to use zypper to install the sources for meego-u-components first.  You can then pull from GIT for the tip of development.  This command tells zypper to install the source for meego-ux-components, which will install any build dependencies as well:&lt;br /&gt;
 zypper si meego-ux-components&lt;br /&gt;
&lt;br /&gt;
=Seeing the MeeGo UX Components=&lt;br /&gt;
&lt;br /&gt;
Next lets test the install and verify that the widgets are installed.  The default location for the sample applications using the components are:&lt;br /&gt;
 /usr/share/meego-ux-app-photos&lt;br /&gt;
 /usr/share/meego-ux-tutorial&lt;br /&gt;
 /usr/share/meego-ux-widgetgallery&lt;br /&gt;
&lt;br /&gt;
We will run the widget gallery using the qmlviewer:&lt;br /&gt;
 $ qmlviewer /usr/share/meego-ux-widgetgallery/main.qml&lt;br /&gt;
&lt;br /&gt;
=Building your first application=&lt;br /&gt;
Now that the MeeGo UX Components are installed on your system, you can begin developing a new application using the components.  &lt;br /&gt;
&lt;br /&gt;
# Launch Qt Creator.&lt;br /&gt;
# Select 'Create Project'&lt;br /&gt;
# Under Projects select 'Qt Quick Project'&lt;br /&gt;
# 'QML Application' will be selected for the template type.&lt;br /&gt;
# Click 'Choose...'&lt;br /&gt;
# Give the project a name, for example &amp;quot;thatwaseasy&amp;quot;.  Click 'Next'&lt;br /&gt;
# Click 'Finish'  Qt Creator will now create the project and provide an initial QML file&lt;br /&gt;
&lt;br /&gt;
Let's run it to see what it does.  Click the green arrow in the lower left corner of Qt Creator.  This will run the application.  After a few moments a new window will appear with the text 'Hello world'  Now let's add a MeeGo UX button and when it is pressed, we will change the text to say &amp;quot;That was easy!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Adding MeeGo UX Components=&lt;br /&gt;
Installed with the MeeGo UX Components are a set of QML files provided as a tutorial.  You can find the contents of the first file in:&lt;br /&gt;
 /usr/share/meego-ux-tutorial/step1/main.qml.&lt;br /&gt;
&lt;br /&gt;
Open that file in Qt Creator, copy its contents, and replace the contents of the QML file that Qt Creator generated for you.&lt;br /&gt;
&lt;br /&gt;
You can now run that first step by clicking on the green arrow (or pressing CTRL-R on the keyboard)  Save your changes when prompted.&lt;br /&gt;
&lt;br /&gt;
You can explore the other tutorial steps and see what they each do.  Experiment with the various components you see in the widgets gallery.&lt;br /&gt;
&lt;br /&gt;
=Screen Shots of the Meego UX Components=&lt;br /&gt;
&lt;br /&gt;
[[File:Meego-ux-widgetgallery-1.png|800px]]&lt;br /&gt;
::(Initial view - showing the list of widgets)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Meego-ux-widgetgallery-Buttons.png|800px]]&lt;br /&gt;
::(Showing Button Widgets)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Meego-ux-widgetgallery-ModalDialogs.png|800px]]&lt;br /&gt;
::(Showing Modal Dialog Widgets)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Meego-ux-widgetgallery-date-picker.png|800px]]&lt;br /&gt;
::(Showing Date Picker Widget in action)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Meego-ux-widgetgallery-messagebox.png|800px]]&lt;br /&gt;
::(Showing ModalMessageBox in action)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Meego-ux-widgetgallery-progressbar.png|800px]]&lt;br /&gt;
::(Showing ProgressBar widget in action after clicking the Start button)&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-03-12T16:24:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* enabling a QML application */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev users libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-154 PanArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-03-08T00:31:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* touch doesn't work on my system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev users libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the input driver your kernel is using.  If the kernel driver does not advertise to user space that it supports the left button (by setting the BTN_LEFT bit in the input_device's keybit field) then the X input driver will not map those button identifiers to the &amp;quot;Button Left&amp;quot; label.  Qt relies on correctly set button labels in order to map the incoming touch data to the appropriate touch device.&lt;br /&gt;
&lt;br /&gt;
You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
Fixing the driver for your system may be as easy as adding the following line to the driver's initialization sequence:&lt;br /&gt;
&lt;br /&gt;
 ts-&amp;gt;idev-&amp;gt;keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT);&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-03-07T16:39:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
The kernel's multi-touch-protocol is now supported in MeeGo.  Qt applications will receive Touch events and can use the Qt gesture infrastructure.  Non-Qt applications will need to write to XInput2.0 and extract contact data from the XEvent data.&lt;br /&gt;
&lt;br /&gt;
The general flow is:&lt;br /&gt;
 HW =&amp;gt; Kernel driver =&amp;gt; multi-touch-protocol =&amp;gt; xorg-x11-input-mtev =&amp;gt; XEvent =&amp;gt; Application&lt;br /&gt;
&lt;br /&gt;
xorg-x11-input-mtev users libmtdev in order to easily support both of the protocol A and B exposed by the kernel.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the X evtouch input driver incorrectly advertising that it provides button labels, but not actually setting them to valid X atoms.  You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-02-28T17:36:27Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* touch doesn't work on my system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([http://conference2010.meego.com/session/multi-touch-meego-hardware-user overview and video] [http://conference2010.meego.com/sites/all/files/sessions/meego-conference-2010-multi-point-touch.odp slides]).  As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.  &lt;br /&gt;
&lt;br /&gt;
The feature in MeeGo's bugzilla which is tracking the status of inclusion can be found [http://bugs.meego.com/show_bug.cgi?id=11625 here].&lt;br /&gt;
&lt;br /&gt;
As you will find in the comments on that bug, since the MeeGo Conference last year, work has continued to move forward.  The components that need to be changed in current (as of early January 2011) MeeGo systems are now all available in MeeGo Trunk.&lt;br /&gt;
&lt;br /&gt;
If you are running an older image, you need to update to the latest version of Qt in Trunk (build version stamp 4.7.1-4 or newer), xorg-x11-drv-mtev (remove xf86-input-mtev if you have it), and mtdev.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you had previously install the multipointtouchplugin, you need to remove it via one of these methods:&lt;br /&gt;
 zypper remove multipointtouchplugin&lt;br /&gt;
or&lt;br /&gt;
 rm /usr/lib/qt4/plugins/libmultipointtouchplugin.so&lt;br /&gt;
If you do not remove that plugin, touch will not work correctly with the XInput2.0 enabled version of Qt.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the X evtouch input driver incorrectly advertising that it provides button labels, but not actually setting them to valid X atoms.  You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors or &amp;quot;Button Unknown&amp;quot; labels.  A correct driver will report labels such as:  Button Left, Button Right, etc.&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.meego.com/show_bug.cgi?id=12777 BMC#12777] for additional details on this problem.&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno</id>
		<title>User:Jketreno</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno"/>
				<updated>2011-02-23T18:59:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: Replaced content with &amp;quot;Random tidbits of information about projects I'm hacking on...

[http://wiki.meego.com/~jketreno/multi-point-touch Multi-Point-Touch on MeeGo]&amp;lt;br&amp;gt;
[http://wiki.meego.com/~jke…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
[http://wiki.meego.com/~jketreno/multi-point-touch Multi-Point-Touch on MeeGo]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/content Improving MeeGo Content Management]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.meego.com/~jketreno/scaling A Density Independent UI on MeeGo]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/multi-point-touch</id>
		<title>User:Jketreno/multi-point-touch</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/multi-point-touch"/>
				<updated>2011-02-23T18:57:14Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: Created page with &amp;quot;Random tidbits of information about projects I'm hacking on...  ==multi-point-touch== During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([ht…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([http://conference2010.meego.com/session/multi-touch-meego-hardware-user overview and video] [http://conference2010.meego.com/sites/all/files/sessions/meego-conference-2010-multi-point-touch.odp slides]).  As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.  &lt;br /&gt;
&lt;br /&gt;
The feature in MeeGo's bugzilla which is tracking the status of inclusion can be found [http://bugs.meego.com/show_bug.cgi?id=11625 here].&lt;br /&gt;
&lt;br /&gt;
As you will find in the comments on that bug, since the MeeGo Conference last year, work has continued to move forward.  The components that need to be changed in current (as of early January 2011) MeeGo systems are now all available in MeeGo Trunk.&lt;br /&gt;
&lt;br /&gt;
If you are running an older image, you need to update to the latest version of Qt in Trunk (build version stamp 4.7.1-4 or newer), xorg-x11-drv-mtev (remove xf86-input-mtev if you have it), and mtdev.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you had previously install the multipointtouchplugin, you need to remove it via one of these methods:&lt;br /&gt;
 zypper remove multipointtouchplugin&lt;br /&gt;
or&lt;br /&gt;
 rm /usr/lib/qt4/plugins/libmultipointtouchplugin.so&lt;br /&gt;
If you do not remove that plugin, touch will not work correctly with the XInput2.0 enabled version of Qt.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the X evtouch input driver incorrectly advertising that it provides button labels, but not actually setting them to valid X atoms.  You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors.&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno</id>
		<title>User:Jketreno</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno"/>
				<updated>2011-02-23T00:21:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([http://conference2010.meego.com/session/multi-touch-meego-hardware-user overview and video] [http://conference2010.meego.com/sites/all/files/sessions/meego-conference-2010-multi-point-touch.odp slides]).  As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.  &lt;br /&gt;
&lt;br /&gt;
The feature in MeeGo's bugzilla which is tracking the status of inclusion can be found [http://bugs.meego.com/show_bug.cgi?id=11625 here].&lt;br /&gt;
&lt;br /&gt;
As you will find in the comments on that bug, since the MeeGo Conference last year, work has continued to move forward.  The components that need to be changed in current (as of early January 2011) MeeGo systems are now all available in MeeGo Trunk.&lt;br /&gt;
&lt;br /&gt;
If you are running an older image, you need to update to the latest version of Qt in Trunk (build version stamp 4.7.1-4 or newer), xorg-x11-drv-mtev (remove xf86-input-mtev if you have it), and mtdev.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you had previously install the multipointtouchplugin, you need to remove it via one of these methods:&lt;br /&gt;
 zypper remove multipointtouchplugin&lt;br /&gt;
or&lt;br /&gt;
 rm /usr/lib/qt4/plugins/libmultipointtouchplugin.so&lt;br /&gt;
If you do not remove that plugin, touch will not work correctly with the XInput2.0 enabled version of Qt.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the X evtouch input driver incorrectly advertising that it provides button labels, but not actually setting them to valid X atoms.  You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors.&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno</id>
		<title>User:Jketreno</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno"/>
				<updated>2011-02-23T00:21:19Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* enabling a QML application */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Random tidbits of information about projects I'm hacking on...&lt;br /&gt;
&lt;br /&gt;
==multi-point-touch==&lt;br /&gt;
During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([http://conference2010.meego.com/session/multi-touch-meego-hardware-user overview and video] [http://conference2010.meego.com/sites/all/files/sessions/meego-conference-2010-multi-point-touch.odp slides]).  As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.  &lt;br /&gt;
&lt;br /&gt;
The feature in MeeGo's bugzilla which is tracking the status of inclusion can be found [http://bugs.meego.com/show_bug.cgi?id=11625 here].&lt;br /&gt;
&lt;br /&gt;
As you will find in the comments on that bug, since the MeeGo Conference last year, work has continued to move forward.  The components that need to be changed in current (as of early January 2011) MeeGo systems are now all available in MeeGo Trunk.&lt;br /&gt;
&lt;br /&gt;
If you are running an older image, you need to update to the latest version of Qt in Trunk (build version stamp 4.7.1-4 or newer), xorg-x11-drv-mtev (remove xf86-input-mtev if you have it), and mtdev.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you had previously install the multipointtouchplugin, you need to remove it via one of these methods:&lt;br /&gt;
 zypper remove multipointtouchplugin&lt;br /&gt;
or&lt;br /&gt;
 rm /usr/lib/qt4/plugins/libmultipointtouchplugin.so&lt;br /&gt;
If you do not remove that plugin, touch will not work correctly with the XInput2.0 enabled version of Qt.&lt;br /&gt;
&lt;br /&gt;
===touch doesn't work on my system===&lt;br /&gt;
If you are using the evtouch driver on your system, you may experience problems due to the X evtouch input driver incorrectly advertising that it provides button labels, but not actually setting them to valid X atoms.  You can determine if this is the case on your system by running:&lt;br /&gt;
&lt;br /&gt;
 xinput list --long &amp;quot;Virtual core pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On a functional input driver, you will see various text names for the field 'Button labels:'   On a broken input driver, you will see a series of X BadAtom errors.&lt;br /&gt;
&lt;br /&gt;
===enabling a native application===&lt;br /&gt;
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.&lt;br /&gt;
&lt;br /&gt;
===enabling a QML application===&lt;br /&gt;
With Qt 4.7.0 through 4.7.2, you can use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.&lt;br /&gt;
&lt;br /&gt;
As of Qt 4.7.3, you should use the MouseArea, Flickable, [http://bugreports.qt.nokia.com/browse/QTBUG-15491 PinchArea], and [http://bugreports.qt.nokia.com/browse/QTBUG-11638 TouchArea].  The GIT tree for TouchArea is [http://qt.gitorious.org/qt-labs/qml-toucharea here].&lt;br /&gt;
&lt;br /&gt;
Additional information in JIRA can be found [http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-153 here].&lt;br /&gt;
&lt;br /&gt;
===qml-gesturearea===&lt;br /&gt;
As Frederik Gladhorn indicated during [http://conference2010.meego.com/session/gestures-qt his talk] at the MeeGo Conference in Dublin, the folks over at Qt have been working on an improved QML GestureArea component.  &lt;br /&gt;
&lt;br /&gt;
You can pull and play with what they're cooking as follows:&lt;br /&gt;
 git clone git://gitorious.org/qt-labs/qml-gesturearea.git&lt;br /&gt;
 git clone git://gitorious.org/qt-labs/qml-gestures-examples.git&lt;br /&gt;
If you are building qml-gesturearea with a version of Qt prior to 4.7.1, you may need to patch it to get it to build:&lt;br /&gt;
 cd qml-gesturearea&lt;br /&gt;
 sed -i -e 's,q-&amp;gt;timeout(),700,g' qdeclarativegesturerecognizers.cpp&lt;br /&gt;
 qmake&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
===multiple input device support===&lt;br /&gt;
Qt is configured to listen to pointer (mouse) events the first core pointer provided by X.  Additional core pointers are ignored.  Touch events are received from any touch device bound to the first core pointer, as well as any touch devices which are floating (not bound to any core pointer)&lt;br /&gt;
&lt;br /&gt;
===core pointer===&lt;br /&gt;
If you do nothing, X will default to binding an input device to the first Core Pointer.  This means that the touch screen will default to control the cursor --as you move your finger around, mouse events will be generated, the cursor will move, etc.  &lt;br /&gt;
&lt;br /&gt;
You can use the xinput utility to &amp;quot;float&amp;quot; the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:&lt;br /&gt;
&lt;br /&gt;
 ⎡ Virtual core pointer                          id=2    [master pointer  (3)]&lt;br /&gt;
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]&lt;br /&gt;
 ⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Looking at the above, you can see the touch device (Cando Corporation...) is device id 13.  To float that input device, run:&lt;br /&gt;
&lt;br /&gt;
 xinput float 13&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  If you don't have xinput, you can install it on MeeGo by running:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;br /&gt;
&lt;br /&gt;
Once you float the input device, it will no longer move the mouse pointer.  To reattach it, run:&lt;br /&gt;
 xinput reattach 13 2&lt;br /&gt;
'2' is the device ID for the 'Virtual core pointer' you are reattaching the device to.&lt;br /&gt;
&lt;br /&gt;
To keep X from connecting a device to the core pointer when starting the system, you can add:&lt;br /&gt;
 Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:&lt;br /&gt;
 Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
         Identifier &amp;quot;Cando Multi Touch Panel&amp;quot;&lt;br /&gt;
         MatchVendor &amp;quot;Cando&amp;quot;&lt;br /&gt;
         MatchDevicePath &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
         Driver &amp;quot;mtev&amp;quot;&lt;br /&gt;
         Option &amp;quot;SendCoreEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
===meego packages you may need===&lt;br /&gt;
To perform the above steps on this wiki, you may need to install the xinput utility:&lt;br /&gt;
 zypper install xorg-x11-utils-xinput&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/content</id>
		<title>User:Jketreno/content</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/content"/>
				<updated>2011-02-18T18:16:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* locations on disk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=content management for MeeGo=&lt;br /&gt;
This page captures the stream of thoughts related to ways to improve content management on MeeGo.&lt;br /&gt;
&lt;br /&gt;
The primary goal is to provide a responsive user experience for applications which are consuming content.  This means that content must be inspected and had meta data extracted from it (including thumbnails) prior to the application requesting the content.  A consequence of that requirement means that on-the-fly indexing is a dead end as you can not guarantee that indexing will be complete when the application is launched.&lt;br /&gt;
&lt;br /&gt;
The best time to perform the indexing and scanning of content is at the time of content acquisition; the user is already expecting to wait for content to copy/save to the system--a minor delay in an already anticipated delay is much better than a delay at a time when the user does not expect a delay.&lt;br /&gt;
&lt;br /&gt;
A side benefit of performing index-at-acquisition is that we no longer have to perform any background indexing or thumb nailing on the system -- which has frequently introduced sporadic responsiveness to the UI as the system can inadvertently lock system resources while an index is occurring.&lt;br /&gt;
&lt;br /&gt;
==index-at-acquisition==&lt;br /&gt;
Since MeeGo provides a posix interface to the file system, it would be problematic to enforce a requirement that all applications use a specific API for reading and writing to the content storage locations.  An alternative approach is to use a file system in user space (FUSE).  The FUSE file system would be mounted to the various locations in the user's home directory where content must be placed for it to be accessible from the content management applications.&lt;br /&gt;
&lt;br /&gt;
The FUSE implementation would block the final close of a file within the mounted file system until indexing, thumb nailing, and meta data extraction is complete.  A benefit to this approach is that the content being written to disk is (in most cases) present in RAM and more easily accessed for whatever processing is required.  This means that in addition to the benefits already mentioned, the cost of indexing and thumb nailing at index-at-acquisition time is less than the cost of on-demand/on-the-fly indexing.&lt;br /&gt;
&lt;br /&gt;
==Photos==&lt;br /&gt;
Thumb nailing of photos will occur at the time of acquisition, as outlined above.  The specific thumbnails generated by the FUSE are as follows:&lt;br /&gt;
* Thumbnail for view in photo viewer -- size is target display density dependent, based on intended physical size of thumbnail.  Two thumbnails are generated, one for each orientation.  Enhanced functionality to ensure that regions-of-interest (ROI) are placed into the thumbnail may be employed via manual or automatic detection (for example, auto-center of detected faces, 5:3 ratio split rules for high contrast/line detection, etc.)&lt;br /&gt;
* Target display resolution scaled image -- used for &amp;quot;full screen&amp;quot; mode&lt;br /&gt;
* Full resolution image -- asynchronously used for &amp;quot;zoom&amp;quot; mode and kept as the original image source, unmodified&lt;br /&gt;
&lt;br /&gt;
==locations on disk==&lt;br /&gt;
The following locations are subject to index-at-acquisition:&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Pictures&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Videos&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Music&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Downloads&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==database ontologies==&lt;br /&gt;
'''tbd'''&lt;br /&gt;
&lt;br /&gt;
==MeeGo APIs for accessing content and data==&lt;br /&gt;
'''tbd'''&lt;br /&gt;
&lt;br /&gt;
==FUSE implementation details==&lt;br /&gt;
'''tbd'''&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/content</id>
		<title>User:Jketreno/content</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/content"/>
				<updated>2011-02-18T18:15:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: /* locations on disk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=content management for MeeGo=&lt;br /&gt;
This page captures the stream of thoughts related to ways to improve content management on MeeGo.&lt;br /&gt;
&lt;br /&gt;
The primary goal is to provide a responsive user experience for applications which are consuming content.  This means that content must be inspected and had meta data extracted from it (including thumbnails) prior to the application requesting the content.  A consequence of that requirement means that on-the-fly indexing is a dead end as you can not guarantee that indexing will be complete when the application is launched.&lt;br /&gt;
&lt;br /&gt;
The best time to perform the indexing and scanning of content is at the time of content acquisition; the user is already expecting to wait for content to copy/save to the system--a minor delay in an already anticipated delay is much better than a delay at a time when the user does not expect a delay.&lt;br /&gt;
&lt;br /&gt;
A side benefit of performing index-at-acquisition is that we no longer have to perform any background indexing or thumb nailing on the system -- which has frequently introduced sporadic responsiveness to the UI as the system can inadvertently lock system resources while an index is occurring.&lt;br /&gt;
&lt;br /&gt;
==index-at-acquisition==&lt;br /&gt;
Since MeeGo provides a posix interface to the file system, it would be problematic to enforce a requirement that all applications use a specific API for reading and writing to the content storage locations.  An alternative approach is to use a file system in user space (FUSE).  The FUSE file system would be mounted to the various locations in the user's home directory where content must be placed for it to be accessible from the content management applications.&lt;br /&gt;
&lt;br /&gt;
The FUSE implementation would block the final close of a file within the mounted file system until indexing, thumb nailing, and meta data extraction is complete.  A benefit to this approach is that the content being written to disk is (in most cases) present in RAM and more easily accessed for whatever processing is required.  This means that in addition to the benefits already mentioned, the cost of indexing and thumb nailing at index-at-acquisition time is less than the cost of on-demand/on-the-fly indexing.&lt;br /&gt;
&lt;br /&gt;
==Photos==&lt;br /&gt;
Thumb nailing of photos will occur at the time of acquisition, as outlined above.  The specific thumbnails generated by the FUSE are as follows:&lt;br /&gt;
* Thumbnail for view in photo viewer -- size is target display density dependent, based on intended physical size of thumbnail.  Two thumbnails are generated, one for each orientation.  Enhanced functionality to ensure that regions-of-interest (ROI) are placed into the thumbnail may be employed via manual or automatic detection (for example, auto-center of detected faces, 5:3 ratio split rules for high contrast/line detection, etc.)&lt;br /&gt;
* Target display resolution scaled image -- used for &amp;quot;full screen&amp;quot; mode&lt;br /&gt;
* Full resolution image -- asynchronously used for &amp;quot;zoom&amp;quot; mode and kept as the original image source, unmodified&lt;br /&gt;
&lt;br /&gt;
==locations on disk==&lt;br /&gt;
The following locations are subject to index-on-acquisition:&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Pictures&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Videos&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Music&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Downloads&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==database ontologies==&lt;br /&gt;
'''tbd'''&lt;br /&gt;
&lt;br /&gt;
==MeeGo APIs for accessing content and data==&lt;br /&gt;
'''tbd'''&lt;br /&gt;
&lt;br /&gt;
==FUSE implementation details==&lt;br /&gt;
'''tbd'''&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Jketreno/content</id>
		<title>User:Jketreno/content</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Jketreno/content"/>
				<updated>2011-02-17T18:36:24Z</updated>
		
		<summary type="html">&lt;p&gt;Jketreno: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=content management for MeeGo=&lt;br /&gt;
This page captures the stream of thoughts related to ways to improve content management on MeeGo.&lt;br /&gt;
&lt;br /&gt;
The primary goal is to provide a responsive user experience for applications which are consuming content.  This means that content must be inspected and had meta data extracted from it (including thumbnails) prior to the application requesting the content.  A consequence of that requirement means that on-the-fly indexing is a dead end as you can not guarantee that indexing will be complete when the application is launched.&lt;br /&gt;
&lt;br /&gt;
The best time to perform the indexing and scanning of content is at the time of content acquisition; the user is already expecting to wait for content to copy/save to the system--a minor delay in an already anticipated delay is much better than a delay at a time when the user does not expect a delay.&lt;br /&gt;
&lt;br /&gt;
A side benefit of performing index-at-acquisition is that we no longer have to perform any background indexing or thumb nailing on the system -- which has frequently introduced sporadic responsiveness to the UI as the system can inadvertently lock system resources while an index is occurring.&lt;br /&gt;
&lt;br /&gt;
==index-at-acquisition==&lt;br /&gt;
Since MeeGo provides a posix interface to the file system, it would be problematic to enforce a requirement that all applications use a specific API for reading and writing to the content storage locations.  An alternative approach is to use a file system in user space (FUSE).  The FUSE file system would be mounted to the various locations in the user's home directory where content must be placed for it to be accessible from the content management applications.&lt;br /&gt;
&lt;br /&gt;
The FUSE implementation would block the final close of a file within the mounted file system until indexing, thumb nailing, and meta data extraction is complete.  A benefit to this approach is that the content being written to disk is (in most cases) present in RAM and more easily accessed for whatever processing is required.  This means that in addition to the benefits already mentioned, the cost of indexing and thumb nailing at index-at-acquisition time is less than the cost of on-demand/on-the-fly indexing.&lt;br /&gt;
&lt;br /&gt;
==Photos==&lt;br /&gt;
Thumb nailing of photos will occur at the time of acquisition, as outlined above.  The specific thumbnails generated by the FUSE are as follows:&lt;br /&gt;
* Thumbnail for view in photo viewer -- size is target display density dependent, based on intended physical size of thumbnail.  Two thumbnails are generated, one for each orientation.  Enhanced functionality to ensure that regions-of-interest (ROI) are placed into the thumbnail may be employed via manual or automatic detection (for example, auto-center of detected faces, 5:3 ratio split rules for high contrast/line detection, etc.)&lt;br /&gt;
* Target display resolution scaled image -- used for &amp;quot;full screen&amp;quot; mode&lt;br /&gt;
* Full resolution image -- asynchronously used for &amp;quot;zoom&amp;quot; mode and kept as the original image source, unmodified&lt;br /&gt;
&lt;br /&gt;
==locations on disk==&lt;br /&gt;
${HOME}/Pictures&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Videos&amp;lt;br&amp;gt;&lt;br /&gt;
${HOME}/Music&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==database ontologies==&lt;br /&gt;
'''tbd'''&lt;br /&gt;
&lt;br /&gt;
==MeeGo APIs for accessing content and data==&lt;br /&gt;
'''tbd'''&lt;br /&gt;
&lt;br /&gt;
==FUSE implementation details==&lt;br /&gt;
'''tbd'''&lt;/div&gt;</summary>
		<author><name>Jketreno</name></author>	</entry>

	</feed>