GL Studio C++ Runtime API
embedded_display_frame.h
Go to the documentation of this file.
1/// \file embedded_display_frame.h
2/// \brief disti::EmbeddedDisplayFrame class. The class for creating standalone executables for EGL.
3///
4/// \par Copyright Information
5///
6/// Copyright (c) 2017 by The DiSTI Corporation.<br>
7/// 12249 Science Drive; Suite 300<br>
8/// Orlando, Florida 32826<br>
9/// USA<br>
10/// <br>
11/// All rights reserved.<br>
12///
13/// This Software contains proprietary trade secrets of DiSTI and may not be
14/// reproduced, in whole or part, in any form, or by any means of electronic,
15/// mechanical, or otherwise, without the written permission of DiSTI. Said
16/// permission may be derived through the purchase of applicable DiSTI product
17/// licenses which detail the distribution rights of this content and any
18/// Derivative Works based on this or other copyrighted DiSTI Software.
19///
20/// NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21/// AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22/// PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23/// AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24/// IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25/// PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26///
27/// LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28/// IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29/// INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30/// DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31/// INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32/// INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33/// OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34/// EXCEED FIVE DOLLARS (US$5.00).
35///
36/// The aforementioned terms and restrictions are governed by the laws of the
37/// State of Florida and the United States of America.
38
39#ifndef EMBEDDED_DISPLAY_H
40#define EMBEDDED_DISPLAY_H
41
42#include "events.h"
43#include "gls_include.h"
45
46namespace disti
47{
48///< Unused, remains for backward compatibility.
50{
51 FL_RGB,
52 FL_DOUBLE,
53 FL_DEPTH
54};
55
56/**
57 * Base class for all embedded (openGL ES) display frame classes
58 */
60{
61protected:
62 /// Unused in ES, remains for backward compatibility.
63 void WindowFlags( int ) {}
64
65 /** Builds a DisplayEvent for passing to the handle method
66 * \param x X device coordinate
67 * \param y Y device coordinate
68 * \param pressure Touchscreen pressure
69 * \param eventType Touch event type (e.g. MOUSE_UP,MOUSE_DOWN,MOUSE_DRAG
70 */
71 virtual GLS_EXPORT void BuildAndSendEvent( int x, int y, int pressure, unsigned int eventType );
72
74
75public:
76 ///< Unused, remains for backward compatibility.
78 {
79 ORIENTATION_UNKNOWN = 0,
80 ORIENTATION_PORTRAIT = 1,
81 ORIENTATION_PORTRAIT_UPSIDE_DOWN = 2,
82 ORIENTATION_LANDSCAPE_LEFT = 3,
83 ORIENTATION_LANDSCAPE_RIGHT = 4,
84 ORIENTATION_FACE_UP = 5,
85 ORIENTATION_FACE_DOWN = 6
86 };
87
88 /// Create a new EmbeddedDisplayFrame object
89 /// \param name name displayed on the title bar, if supported by the platform
90 /// \param width the width of the window in pixels
91 /// \param height the height of the window in pixels
92 GLS_EXPORT EmbeddedDisplayFrame( const char* name, int width, int height );
93
95
96 /** Used for event compression. Not for general use by users. */
98
99 /** Removes (hides) the spash screen
100 * Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub
101 */
102 virtual void RemoveSplash()
103 {
104 }
105
106 /** Creates the spash screen
107 * Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub
108 */
109 virtual void CreateSplash()
110 {
111 }
112
113 /// Sets up the default Orthographic projection (which supports things like pan and zoom).
114 /// \param projMatrix The returned projection matrix.
115 /// \param model The returned modelview matrix.
116 virtual GLS_EXPORT void SetProjection( GlsMatrixType& projMatrix, GlsMatrixType& model );
117
119
120 /** Set a flag that UpdateAnimate can test to see if the window needs redrawing.
121 * \deprecated Use Invalidate() from the GlsPainter interface to trigger a redraw. SetRedraw behaves differently on ES and Desktop platforms.
122 */
124
125 /** Redraw the window now.
126 * This actually calls the OpenGL Drawing routines.
127 */
128 virtual GLS_EXPORT void Redraw();
129};
130
131} // namespace disti
132
133#endif
Definition: embedded_display_frame.h:60
EventCompressor< DisplayFrame > * GetEventCompressor() override
Definition: embedded_display_frame.h:73
virtual void BuildAndSendEvent(int x, int y, int pressure, unsigned int eventType)
void WindowFlags(int)
Unused in ES, remains for backward compatibility.
Definition: embedded_display_frame.h:63
virtual void SetProjection(GlsMatrixType &projMatrix, GlsMatrixType &model)
iDeviceOrientation
< Unused, remains for backward compatibility.
Definition: embedded_display_frame.h:78
virtual void CreateSplash()
Definition: embedded_display_frame.h:109
EmbeddedDisplayFrame(const char *name, int width, int height)
virtual void RemoveSplash()
Definition: embedded_display_frame.h:102
EventCompressor< DisplayFrame > eventCompressor
Definition: embedded_display_frame.h:97
Definition: events.h:660
Definition: runtime_display_frame.h:54
The standard Mouse and keyboard events and event structures.
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
A file for all GL Studio files to include.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
Definition: bmpimage.h:46
FL_Flags
< Unused, remains for backward compatibility.
Definition: embedded_display_frame.h:50
The disti::RuntimeDisplayFrame class, parent class of all DisplayFrames used in runtime code.