GL Studio C++ Runtime API
embedded_display_frame.h
Go to the documentation of this file.
1/*! \file
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 11301 Corporate Blvd., Suite 100<br>
8 Orlando, Florida 32817<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 */
40#ifndef EMBEDDED_DISPLAY_H
41#define EMBEDDED_DISPLAY_H
42
43#include "events.h"
44#include "gls_include.h"
46
47namespace disti
48{
49///< Unused, remains for backward compatibility.
51{
52 FL_RGB,
53 FL_DOUBLE,
54 FL_DEPTH
55};
56
57/**
58 * Base class for all embedded (openGL ES) display frame classes
59 */
61{
62protected:
63 /// Unused in ES, remains for backward compatibility.
64 void WindowFlags( int ) {}
65
66 /** Builds a DisplayEvent for passing to the handle method
67 * \param x X device coordinate
68 * \param y Y device coordinate
69 * \param pressure Touchscreen pressure
70 * \param eventType Touch event type (e.g. MOUSE_UP,MOUSE_DOWN,MOUSE_DRAG
71 */
72 virtual GLS_EXPORT void BuildAndSendEvent( int x, int y, int pressure, unsigned int eventType );
73
75
76public:
77 ///< Unused, remains for backward compatibility.
79 {
80 ORIENTATION_UNKNOWN = 0,
81 ORIENTATION_PORTRAIT = 1,
82 ORIENTATION_PORTRAIT_UPSIDE_DOWN = 2,
83 ORIENTATION_LANDSCAPE_LEFT = 3,
84 ORIENTATION_LANDSCAPE_RIGHT = 4,
85 ORIENTATION_FACE_UP = 5,
86 ORIENTATION_FACE_DOWN = 6
87 };
88
89 /// Create a new EmbeddedDisplayFrame object
90 /// \param name name displayed on the title bar, if supported by the platform
91 /// \param width the width of the window in pixels
92 /// \param height the height of the window in pixels
93 GLS_EXPORT EmbeddedDisplayFrame( const char* name, int width, int height );
94
96
97 /** Used for event compression. Not for general use by users. */
99
100 /** Removes (hides) the spash screen
101 * Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub
102 */
104 {
105 }
106
107 /** Creates the spash screen
108 * Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub
109 */
111 {
112 }
113
114 /// Sets up the default Orthographic projection (which supports things like pan and zoom).
115 /// \param projMatrix The returned projection matrix.
116 /// \param model The returned modelview matrix.
117 virtual GLS_EXPORT void SetProjection( GlsMatrixType& projMatrix, GlsMatrixType& model );
118
120
121 /** Set a flag that UpdateAnimate can test to see if the window needs redrawing.
122 * \deprecated Use Invalidate() from the GlsPainter interface to trigger a redraw. SetRedraw behaves differently on ES and Desktop platforms.
123 */
125
126 /** Redraw the window now.
127 * This actually calls the OpenGL Drawing routines.
128 */
129 virtual GLS_EXPORT void Redraw();
130};
131
132} // namespace disti
133
134#endif
Definition: embedded_display_frame.h:61
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:64
virtual void SetProjection(GlsMatrixType &projMatrix, GlsMatrixType &model)
iDeviceOrientation
< Unused, remains for backward compatibility.
Definition: embedded_display_frame.h:79
virtual void CreateSplash()
Definition: embedded_display_frame.h:110
EmbeddedDisplayFrame(const char *name, int width, int height)
virtual EventCompressor< DisplayFrame > * GetEventCompressor() override
Definition: embedded_display_frame.h:74
virtual void RemoveSplash()
Definition: embedded_display_frame.h:103
EventCompressor< DisplayFrame > eventCompressor
Definition: embedded_display_frame.h:98
Definition: events.h:662
Definition: runtime_display_frame.h:55
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:214
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:52
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
FL_Flags
< Unused, remains for backward compatibility.
Definition: embedded_display_frame.h:51
The disti::RuntimeDisplayFrame class, parent class of all DisplayFrames used in runtime code.