Oolite 1.91.0.7645-241119-222d325
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 "OOCocoa.h"
31
32@class MyOpenGLView;
33
34
35#if OOLITE_MAC_OS_X
36#define kOODisplayWidth ((NSString *)kCGDisplayWidth)
37#define kOODisplayHeight ((NSString *)kCGDisplayHeight)
38#define kOODisplayRefreshRate ((NSString *)kCGDisplayRefreshRate)
39#define kOODisplayBitsPerPixel ((NSString *)kCGDisplayBitsPerPixel)
40#define kOODisplayIOFlags ((NSString *)kCGDisplayIOFlags)
41#else
42#define kOODisplayWidth (@"Width")
43#define kOODisplayHeight (@"Height")
44#define kOODisplayRefreshRate (@"RefreshRate")
45#endif
46
47
48#define DISPLAY_MIN_COLOURS 32
49#define DISPLAY_MIN_WIDTH 640
50#define DISPLAY_MIN_HEIGHT 480
51#define DISPLAY_MAX_WIDTH 7680 // 8K gaming, yay!!
52#define DISPLAY_MAX_HEIGHT 4320
53
54
55@interface OOFullScreenController: NSObject
56{
57@private
59}
60
61- (id) initWithGameView:(MyOpenGLView *)view;
62
63#if OOLITE_PROPERTY_SYNTAX
64
65@property (nonatomic, readonly) MyOpenGLView *gameView;
66@property (nonatomic, getter=inFullScreenMode) BOOL fullScreenMode;
67@property (nonatomic, readonly) NSArray *displayModes;
68@property (nonatomic, readonly) NSDictionary *currentDisplayMode;
69@property (nonatomic, readonly) NSUInteger indexOfCurrentDisplayMode;
70
71#else
72
73- (MyOpenGLView *) gameView;
74
75- (BOOL) inFullScreenMode;
76- (void) setFullScreenMode:(BOOL)value;
77
78- (NSArray *) displayModes;
79- (NSDictionary *) currentDisplayMode;
80- (NSUInteger) indexOfCurrentDisplayMode;
81
82#endif
83
84- (BOOL) setDisplayWidth:(NSUInteger)width height:(NSUInteger)height refreshRate:(NSUInteger)refresh;
85- (NSDictionary *) findDisplayModeForWidth:(NSUInteger)width height:(NSUInteger)height refreshRate:(NSUInteger)d_refresh;
86
87- (void) noteMouseInteractionModeChangedFrom:(OOMouseInteractionMode)oldMode to:(OOMouseInteractionMode)newMode;
88
89@end
OOMouseInteractionMode