|
|
| (44 intermediate revisions not shown) |
| Line 1: |
Line 1: |
| | Random tidbits of information about projects I'm hacking on... | | Random tidbits of information about projects I'm hacking on... |
| | | | |
| - | ==multi-point-touch==
| + | * [[User:Jketreno/multi-point-touch|Multi-Point-Touch on MeeGo]] |
| - | 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.
| + | * [[User:Jketreno/content|Improving MeeGo Content Management]] |
| - | | + | * [[User:Jketreno/scaling|A Density Independent UI on MeeGo]] |
| - | The components that need to be changed are:
| + | * [[User:Jketreno/theme-assets|Theme Assets]] |
| - | * Kernel -- You need kernel touch drivers that are in sync with upstream | + | * [[User:Jketreno/meego-image-resize|MeeGo Image Resize script]] |
| - | * Qt -- You need a version of Qt that does not have the RX71 code path enabled
| + | |
| - | | + | |
| - | New components:
| + | |
| - | * mtdev -- Library to translate kernel protocol A and B to protocol B, adding tracking information
| + | |
| - | * xf86-input-mtev -- X input driver that communicates with mtdev to obtain multi-point data from the kernel | + | |
| - | * multipointtouchplugin -- in-application plugin which hooks to the Qt input event filter to process XInput events sent from xf86-input-mtev and injects QTouchEvent's into the Qt event queue
| + | |
| - | | + | |
| - | To get the above, you can add my home project:
| + | |
| - | cd /etc/zypp/repos.d
| + | |
| - | sudo wget http://download.meego.com/live/home:/jketreno/Trunk/home:jketreno.repo
| + | |
| - | sudo sed -i -e 's,^gpg,#gpg,g' home:jketreno.repo
| + | |
| - | zypper refresh
| + | |
| - | | + | |
| - | Next, force a re-installation of the packages provided from my home project:
| + | |
| - | zypper install -f --from=home_jketreno kernel_netbook libqt* qt-qmlviewer mtdev \
| + | |
| - | xf86-input-mtev multipointtouchplugin
| + | |
| - | | + | |
| - | It will prompt you to switch to the versions of the various packages provided from the above repository. Accept the changes, and reboot.
| + | |
| - | | + | |
| - | ==enabling a native application==
| + | |
| - | The mechanism to talk to the xf86-input-mtev driver is not merged into the Qt package itself. Until that occurs, applications interested in working with touch events need to add the following to the beginning of their application, within the '''main()''' function:
| + | |
| - | foreach (QString path, QCoreApplication::libraryPaths()) {
| + | |
| - | QPluginLoader loader(path + "/libmultipointtouchplugin.so");
| + | |
| - | loader.load();
| + | |
| - | if (loader.isLoaded()) {
| + | |
| - | loader.instance();
| + | |
| - | break;
| + | |
| - | }
| + | |
| - | }
| + | |
| - | At the beginning of the file, you also need to include QPluginLoader:
| + | |
| - | #include <QPluginLoader>
| + | |
| - | And that's it.
| + | |
| - | ==enabling a QML application==
| + | |
| - | The version of qmlviewer built and installed with the Qt package in my home project has the above code enabled, providing Touch events into qml applications run within qmlviewer. If you are loading your QML application using your own native loader, you will need to follow the steps above for '''enabling a native applications'''.
| + | |
Random tidbits of information about projects I'm hacking on...