Oolite
Loading...
Searching...
No Matches
OOFullScreenController.h
Go to the documentation of this file.
1/*
2
3OOFullScreenController.h
4
5Abstract base class for full screen mode controllers. Concrete implementations
6exist for different target platforms.
7
8
9Oolite
10Copyright (C) 2004-2013 Giles C Williams and contributors
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20GNU General Public License for more details.
21
22You should have received a copy of the GNU General Public License
23along with this program; if not, write to the Free Software
24Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25MA 02110-1301, USA.
26
27*/
28
29#import "OOFoundation.h"
31
32@class MyOpenGLView;
33
34#if OOLITE_MAC_COCOA_UI
35#define kOODisplayWidth ((NSString*)kCGDisplayWidth)
36#define kOODisplayHeight ((NSString*)kCGDisplayHeight)
37#define kOODisplayRefreshRate ((NSString*)kCGDisplayRefreshRate)
38#define kOODisplayBitsPerPixel ((NSString*)kCGDisplayBitsPerPixel)
39#define kOODisplayIOFlags ((NSString*)kCGDisplayIOFlags)
40#else
41#define kOODisplayWidth (@"Width")
42#define kOODisplayHeight (@"Height")
43#define kOODisplayRefreshRate (@"RefreshRate")
44#endif
45
46#define DISPLAY_MIN_COLOURS 32
47#define DISPLAY_MIN_WIDTH 640
48#define DISPLAY_MIN_HEIGHT 480
49#define DISPLAY_MAX_WIDTH 7680 // 8K gaming, yay!!
50#define DISPLAY_MAX_HEIGHT 4320
51
52@interface OOFullScreenController : NSObject {
53@private
55}
56
57- (id)initWithGameView:(MyOpenGLView*)view;
58
59#if OOLITE_PROPERTY_SYNTAX
60
61@property (nonatomic, readonly) MyOpenGLView* gameView;
62@property (nonatomic, getter=inFullScreenMode) BOOL fullScreenMode;
63@property (nonatomic, readonly) NSArray* displayModes;
64@property (nonatomic, readonly) NSDictionary* currentDisplayMode;
65@property (nonatomic, readonly) NSUInteger indexOfCurrentDisplayMode;
66
67#else
68
70
71- (BOOL)inFullScreenMode;
72- (void)setFullScreenMode:(BOOL)value;
73
74- (NSArray*)displayModes;
75- (NSDictionary*)currentDisplayMode;
76- (NSUInteger)indexOfCurrentDisplayMode;
77
78#endif
79
80- (BOOL)setDisplayWidth:(NSUInteger)width height:(NSUInteger)height refreshRate:(NSUInteger)refresh;
81- (NSDictionary*)findDisplayModeForWidth:(NSUInteger)width height:(NSUInteger)height refreshRate:(NSUInteger)d_refresh;
82
83- (void)noteMouseInteractionModeChangedFrom:(OOMouseInteractionMode)oldMode to:(OOMouseInteractionMode)newMode;
84
85@end
OOMouseInteractionMode