2 * Copyright (C) 2012-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
21 /*Class for managing the UIScreens/resolutions of an iOS device*/
23 #ifdef TARGET_DARWIN_IOS_ATV2
24 #import <BackRow/BackRow.h>
27 #import <UIKit/UIKit.h>
30 @class XBMCController;
31 @class IOSExternalTouchController;
33 @interface IOSScreenManager : NSObject {
35 unsigned int _screenIdx;
38 IOSExternalTouchController *_externalTouchController;
40 @property unsigned int _screenIdx;
41 @property (readonly, getter=isExternalScreen)bool _externalScreen;
42 @property (assign, setter=setView:) IOSEAGLView *_glView;
44 // init the screenmanager with our eaglview
45 //- (id) initWithView:(IOSEAGLView *)view;
46 // change to screen with the given mode (might also change only the mode on the same screen)
47 - (bool) changeScreen: (unsigned int)screenIdx withMode:(UIScreenMode *)mode;
48 // called when app detects disconnection of external screen - will move xbmc to the internal screen then
49 - (void) screenDisconnect;
50 // wrapper for g_Windowing.UpdateResolutions();
51 + (void) updateResolutions;
52 // returns the landscape resolution for the given screen
53 + (CGRect) getLandscapeResolution:(UIScreen *)screen;
54 // fades the screen from black back to full alpha after delaySecs seconds
55 - (void) fadeFromBlack:(CGFloat) delaySecs;
56 // returns true if switching to screenIdx will change from internal to external screen
57 - (bool) willSwitchToExternal:(unsigned int) screenIdx;
58 // returns true if switching to screenIdx will change from external to internal screen
59 - (bool) willSwitchToInternal:(unsigned int) screenIdx;
61 + (id) sharedInstance;