ScummVM API documentation
ios7_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_IOS7_IOS7_VIDEO_H
23 #define BACKENDS_PLATFORM_IOS7_IOS7_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/ES2/gl.h>
31 #include <OpenGLES/ES2/glext.h>
32 
33 #include "backends/platform/ios7/ios7_keyboard.h"
34 #include "backends/platform/ios7/ios7_common.h"
35 #include "backends/platform/ios7/ios7_game_controller.h"
36 
37 #include "common/list.h"
38 
39 typedef struct {
40  GLfloat x, y;
41  GLfloat u,v;
42 } GLVertex;
43 
44 uint getSizeNextPOT(uint size);
45 
46 @interface iPhoneView : UIView {
48  NSLock *_eventLock;
49  SoftKeyboard *_keyboardView;
50  Common::List<GameController*> _controllers;
51 #if TARGET_OS_IOS
52  UIInterfaceOrientation _currentOrientation;
53 #endif
54  UIBackgroundTaskIdentifier _backgroundSaveStateTask;
55 
56  EAGLContext *_mainContext;
57  EAGLContext *_openGLContext;
58  GLuint _viewRenderbuffer;
59 
60  GLint _renderBufferWidth;
61  GLint _renderBufferHeight;
62 }
63 
64 @property (nonatomic, assign) BOOL isInGame;
65 @property (nonatomic, assign) UIInterfaceOrientationMask supportedScreenOrientations;
66 
67 - (id)initWithFrame:(struct CGRect)frame;
68 
69 - (uint)createOpenGLContext;
70 - (void)destroyOpenGLContext;
71 - (void)refreshScreen;
72 - (int)getScreenWidth;
73 - (int)getScreenHeight;
74 
75 - (void)initSurface;
76 
77 #if TARGET_OS_IOS
78 - (void)interfaceOrientationChanged:(UIInterfaceOrientation)orientation;
79 - (void)updateTouchMode;
80 - (BOOL)isiOSAppOnMac;
81 #endif
82 
83 - (void)showKeyboard;
84 - (void)hideKeyboard;
85 - (BOOL)isKeyboardShown;
86 
87 - (void)handleMainMenuKey;
88 
89 - (void)applicationSuspend;
90 - (void)applicationResume;
91 
92 - (void)saveApplicationState;
93 - (void)clearApplicationState;
94 - (void)restoreApplicationState;
95 
96 - (void) beginBackgroundSaveStateTask;
97 - (void) endBackgroundSaveStateTask;
98 
99 - (void)addEvent:(InternalEvent)event;
100 - (bool)fetchEvent:(InternalEvent *)event;
101 
102 - (bool)isGamepadControllerSupported;
103 - (void)virtualController:(bool)connect;
104 @end
105 
106 #endif
Definition: softkbd.h:31
Definition: ios7_common.h:89
Definition: ios7_video.h:46
Definition: ios7_video.h:39