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> ClassesmainappthemelightshowwgProcess start-upargumentsCreate new applicationCreate blue themenewnewSetup themesetup(theme)addMultiTouchDeviceInstatiate appletsnewAdd applet iconsaddAppletIconCall lightshow->create()Add applet to applicationcreateaddAppletonCreatePrepare the theme to useStart the applicationRespond to events sent tofront-end applicationpreparerunupdatedrawFigure 5-3 Startup and creation of appletsIn Figure 5-3;• main is the main.cpp code in the lotion directory• app is an application created at startup by main()• theme is a Theme object that uses code from the themes directory. The Blue theme is thedefault theme. It also creates a widget group, but that is not shown in Figure 5-3.• lightshow is the reference to the lightshow applet. Only the lightshow applet is shown, buta similar instantiation sequence applies to all of applets.• wg is a widget group created by the lightshow applet. This code calls the code in a Layerobject to render its image to the display.• If the exit control is clicked in the theme, run() exits and the lotion application ends.Figure 5-4 on page 5-9 shows the control flow related to selecting and running the lightshowapplet. The theme passes user events to the lightshow widget which then calls the lighshowapplication to process the user action.ARM DUI 0527A-02a Copyright © 2010 ARM. All rights reserved. 5-8ID070710Non-Confidential - Draft - Beta

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

Saved successfully!

Ooh no, something went wrong!