13.07.2015 Views

Mali GPU User Interface Engine Application Development Guide

Mali GPU User Interface Engine Application Development Guide

Mali GPU User Interface Engine Application Development Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tutorial on the Lotion <strong>User</strong> <strong>Interface</strong> Classes}// We need an input device, assume a mouse on the default device.printf("No input device specified, using default mouse device\n");input_descriptor d = { INPUT_MODE_MOUSE, "" };configInputs.add(d);for (int i = 0; i < configInputs.getSize(); i++) {if (configInputs[i].mode == INPUT_MODE_MOUSE) {app->addMultiTouchDevice(Lotion::MultiTouch::createMouseDevice(app->getSystem(), app->getContext()));} else if (configInputs[i].mode == INPUT_MODE_TOUCH) {#ifdef MDE_OS_WIN32// ...#elseapp->addMultiTouchDevice(Lotion::MultiTouch::createLinuxInputDevice(app->getContext(), configInputs[i].arg));#endif}}...NoteTouch screens are not supported on Windows.3. Instantiate the applets and add the associated icons to the theme. See Example 5-11:Example 5-11 Instantiate the applets......// create instances of the individual appletsLotion::Applet* photo = new Lotion::Applets::Photo();Lotion::Applet* presentation = new Lotion::Applets::Presentation();Lotion::Applet* slideshow_presentation =new Lotion::Applets::SlideshowPresentation();Lotion::Applet* buzzword = new Lotion::Applets::Buzzword();Lotion::Applet* planet = new Lotion::Applets::Planet();Lotion::Applet* lightshow = new Lotion::Applets::LightShow();Lotion::Applet* browser = new Lotion::Applets::Browser();// add icons for the appletstheme->addAppletIcon(photo->getIconThumbDesc(),Lotion::AppletCategoryPhotos);theme->addAppletIcon(presentation->getIconThumbDesc(),Lotion::AppletCategoryPresentations);theme->addAppletIcon(slideshow_presentation->getIconThumbDesc(),Lotion::AppletCategoryPresentations);theme->addAppletIcon(buzzword->getIconThumbDesc(),Lotion::AppletCategoryTechdemos);theme->addAppletIcon(planet->getIconThumbDesc(),Lotion::AppletCategoryTechdemos);theme->addAppletIcon(lightshow->getIconThumbDesc(),Lotion::AppletCategoryTechdemos);theme->addAppletIcon(browser->getIconThumbDesc(),Lotion::AppletCategoryTechdemos);4. Create the applet and add it to the theme. See Example 5-12 on page 5-17:ARM DUI 0527A-02a Copyright © 2010 ARM. All rights reserved. 5-16ID070710Non-Confidential - Draft - Beta

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!