[release] version bump to 13.0 beta1
[vuplus_xbmc] / xbmc / osx / IOSScreenManager.h
1 /*
2  *      Copyright (C) 2012-2013 Team XBMC
3  *      http://xbmc.org
4  *
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)
8  *  any later version.
9  *
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.
14  *
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/>.
18  *
19  */
20
21 /*Class for managing the UIScreens/resolutions of an iOS device*/
22
23 #ifdef TARGET_DARWIN_IOS_ATV2
24 #import <BackRow/BackRow.h>
25 #else
26 #endif
27 #import <UIKit/UIKit.h>
28
29 @class IOSEAGLView;
30 @class XBMCController;
31 @class IOSExternalTouchController;
32
33 @interface IOSScreenManager : NSObject {
34
35   unsigned int  _screenIdx;
36   bool _externalScreen;
37   IOSEAGLView *_glView;
38   IOSExternalTouchController *_externalTouchController;
39 }
40 @property unsigned int  _screenIdx;
41 @property (readonly, getter=isExternalScreen)bool _externalScreen;
42 @property (assign, setter=setView:) IOSEAGLView *_glView;
43
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;
60 // singleton access
61 + (id)      sharedInstance;
62 @end