A basic graphics package for the LPC4088 Display Module.

Dependents:   lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more

Fork of DMBasicGUI by EmbeddedArtists AB

Committer:
embeddedartists
Date:
Mon Nov 04 14:31:50 2019 +0000
Revision:
22:f0d00f29bfeb
Parent:
17:6e2abf107800
More updates related to mbed OS 5

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 5:f4de114c31c3 1 /*
embeddedartists 5:f4de114c31c3 2 * Copyright 2014 Embedded Artists AB
embeddedartists 5:f4de114c31c3 3 *
embeddedartists 5:f4de114c31c3 4 * Licensed under the Apache License, Version 2.0 (the "License");
embeddedartists 5:f4de114c31c3 5 * you may not use this file except in compliance with the License.
embeddedartists 5:f4de114c31c3 6 * You may obtain a copy of the License at
embeddedartists 5:f4de114c31c3 7 *
embeddedartists 5:f4de114c31c3 8 * http://www.apache.org/licenses/LICENSE-2.0
embeddedartists 5:f4de114c31c3 9 *
embeddedartists 5:f4de114c31c3 10 * Unless required by applicable law or agreed to in writing, software
embeddedartists 5:f4de114c31c3 11 * distributed under the License is distributed on an "AS IS" BASIS,
embeddedartists 5:f4de114c31c3 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
embeddedartists 5:f4de114c31c3 13 * See the License for the specific language governing permissions and
embeddedartists 5:f4de114c31c3 14 * limitations under the License.
embeddedartists 5:f4de114c31c3 15 */
embeddedartists 5:f4de114c31c3 16
embeddedartists 5:f4de114c31c3 17 #ifndef APP_SLIDESHOW_H
embeddedartists 5:f4de114c31c3 18 #define APP_SLIDESHOW_H
embeddedartists 5:f4de114c31c3 19
embeddedartists 5:f4de114c31c3 20 #include "App.h"
embeddedartists 5:f4de114c31c3 21 #include "DMBoard.h"
embeddedartists 5:f4de114c31c3 22 #include "SlideShow.h"
embeddedartists 5:f4de114c31c3 23 #include "rtos.h"
embeddedartists 11:265884fa7fdd 24 #include "ImageButton.h"
embeddedartists 17:6e2abf107800 25 #include "Resource.h"
embeddedartists 5:f4de114c31c3 26
embeddedartists 5:f4de114c31c3 27 /**
embeddedartists 14:647b1896ed84 28 * An App example showing how to use the SlideShow engine.
embeddedartists 5:f4de114c31c3 29 *
embeddedartists 5:f4de114c31c3 30 * The purpose of this example is to show how the SlideShow class can be used.
embeddedartists 5:f4de114c31c3 31 */
embeddedartists 5:f4de114c31c3 32 class AppSlideShow : public App {
embeddedartists 5:f4de114c31c3 33 public:
embeddedartists 5:f4de114c31c3 34
embeddedartists 13:bff2288c2c61 35 /** Create a new App based on the specified slideshow
embeddedartists 13:bff2288c2c61 36 *
embeddedartists 13:bff2288c2c61 37 * @param scriptFile path and filename of the script to run
embeddedartists 13:bff2288c2c61 38 * @param pathPrefix optional path to prepend to all paths in the script file
embeddedartists 13:bff2288c2c61 39 * @param x optional x coordinate to draw the slideshow at, default is 0
embeddedartists 13:bff2288c2c61 40 * @param y optional y coordinate to draw the slideshow at, default is 0
embeddedartists 13:bff2288c2c61 41 */
embeddedartists 11:265884fa7fdd 42 AppSlideShow(const char* scriptFile, const char* pathPrefix=NULL, int xoff=0, int yoff=0);
embeddedartists 10:651861441108 43 virtual ~AppSlideShow();
embeddedartists 5:f4de114c31c3 44
embeddedartists 5:f4de114c31c3 45 virtual bool setup();
embeddedartists 5:f4de114c31c3 46 virtual void runToCompletion();
embeddedartists 5:f4de114c31c3 47 virtual bool teardown();
embeddedartists 5:f4de114c31c3 48
embeddedartists 17:6e2abf107800 49 enum Resources {
embeddedartists 17:6e2abf107800 50 Resource_Ok_button,
embeddedartists 17:6e2abf107800 51 Resource_Repeat_button,
embeddedartists 17:6e2abf107800 52 };
embeddedartists 17:6e2abf107800 53
embeddedartists 17:6e2abf107800 54 /** Specifies the resource to use
embeddedartists 17:6e2abf107800 55 *
embeddedartists 17:6e2abf107800 56 * Adds a resource for a specific id. This allows the
embeddedartists 17:6e2abf107800 57 * user program to select e.g. which image to use and
embeddedartists 17:6e2abf107800 58 * if it should be loaded from a file or an array.
embeddedartists 17:6e2abf107800 59 *
embeddedartists 17:6e2abf107800 60 * @param id the identifier
embeddedartists 17:6e2abf107800 61 * @param res the resource
embeddedartists 17:6e2abf107800 62 */
embeddedartists 17:6e2abf107800 63 void addResource(Resources id, Resource* res);
embeddedartists 17:6e2abf107800 64
embeddedartists 5:f4de114c31c3 65 private:
embeddedartists 5:f4de114c31c3 66 void* _fb;
embeddedartists 5:f4de114c31c3 67 Display* _disp;
embeddedartists 5:f4de114c31c3 68 SlideShow* _show;
embeddedartists 5:f4de114c31c3 69 Renderer* _rend;
embeddedartists 5:f4de114c31c3 70 Mutex _fileMutex;
embeddedartists 11:265884fa7fdd 71 ImageButton* _btnDone;
embeddedartists 11:265884fa7fdd 72 ImageButton* _btnRepeat;
embeddedartists 11:265884fa7fdd 73 char* _script;
embeddedartists 11:265884fa7fdd 74 char* _path;
embeddedartists 11:265884fa7fdd 75 int _xoff;
embeddedartists 11:265884fa7fdd 76 int _yoff;
embeddedartists 17:6e2abf107800 77 Resource* _resOk;
embeddedartists 17:6e2abf107800 78 Resource* _resRepeat;
embeddedartists 5:f4de114c31c3 79 };
embeddedartists 5:f4de114c31c3 80
embeddedartists 5:f4de114c31c3 81 #endif