ScummVM API documentation
iphone_video.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BACKENDS_PLATFORM_IPHONE_IPHONE_VIDEO_H
23 #define BACKENDS_PLATFORM_IPHONE_IPHONE_VIDEO_H
24 
25 #include <UIKit/UIKit.h>
26 #include <Foundation/Foundation.h>
27 #include <QuartzCore/QuartzCore.h>
28 
29 #include <OpenGLES/EAGL.h>
30 #include <OpenGLES/ES1/gl.h>
31 #include <OpenGLES/ES1/glext.h>
32 
33 #include "backends/platform/iphone/iphone_keyboard.h"
34 #include "backends/platform/iphone/iphone_common.h"
35 
36 #include "common/list.h"
37 
38 @interface iPhoneView : UIView {
39  VideoContext _videoContext;
40 
42  NSLock *_eventLock;
43  SoftKeyboard *_keyboardView;
44 
45  EAGLContext *_context;
46  GLuint _viewRenderbuffer;
47  GLuint _viewFramebuffer;
48  GLuint _screenTexture;
49  GLuint _overlayTexture;
50  GLuint _mouseCursorTexture;
51 
52  UIDeviceOrientation _orientation;
53 
54  GLint _renderBufferWidth;
55  GLint _renderBufferHeight;
56 
57  GLfloat _gameScreenVertCoords[4 * 2];
58  GLfloat _gameScreenTexCoords[4 * 2];
59  CGRect _gameScreenRect;
60 
61  GLfloat _overlayVertCoords[4 * 2];
62  GLfloat _overlayTexCoords[4 * 2];
63  CGRect _overlayRect;
64 
65  GLfloat _mouseVertCoords[4 * 2];
66  GLfloat _mouseTexCoords[4 * 2];
67  GLint _mouseHotspotX, _mouseHotspotY;
68  GLint _mouseWidth, _mouseHeight;
69  GLfloat _mouseScaleX, _mouseScaleY;
70 
71  int _scaledShakeXOffset;
72  int _scaledShakeYOffset;
73  CGFloat _contentScaleFactor;
74 
75  UITouch *_firstTouch;
76  UITouch *_secondTouch;
77 }
78 
79 - (id)initWithFrame:(struct CGRect)frame;
80 
81 - (VideoContext *)getVideoContext;
82 
83 - (void)drawRect:(CGRect)frame;
84 
85 - (void)createScreenTexture;
86 - (void)initSurface;
87 - (void)setViewTransformation;
88 
89 - (void)setGraphicsMode;
90 
91 - (void)updateSurface;
92 - (void)updateMainSurface;
93 - (void)updateOverlaySurface;
94 - (void)updateMouseSurface;
95 - (void)clearColorBuffer;
96 
97 - (void)notifyMouseMove;
98 - (void)updateMouseCursorScaling;
99 - (void)updateMouseCursor;
100 
101 - (void)deviceOrientationChanged:(UIDeviceOrientation)orientation;
102 
103 - (void)disableIdleTimer;
104 - (void)enableIdleTimer;
105 
106 - (void)applicationSuspend;
107 
108 - (void)applicationResume;
109 
110 - (bool)fetchEvent:(InternalEvent *)event;
111 
112 @end
113 
114 extern iPhoneView *g_iPhoneViewInstance;
115 
116 #endif
Definition: softkbd.h:31
Definition: ios7_common.h:100
Definition: ios7_video.h:44
Definition: ios7_common.h:70