[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / osx / ios / XBMCController.h
1 /*
2  *      Copyright (C) 2010-2013 Team XBMC
3  *      http://www.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 #import <UIKit/UIKit.h>
22 #import <OpenGLES/EAGL.h>
23 #import <OpenGLES/ES2/gl.h>
24 #import <AudioToolbox/AudioToolbox.h>
25
26 #import "XBMC_events.h"
27 #include "XBMC_keysym.h"
28
29 @class IOSEAGLView;
30
31 @interface XBMCController : UIViewController <UIGestureRecognizerDelegate>
32 {
33   UIWindow *m_window;
34   IOSEAGLView  *m_glView;
35   int m_screensaverTimeout;
36         
37   /* Touch handling */
38   CGSize screensize;
39   CGPoint lastGesturePoint;
40   CGFloat screenScale;
41   bool touchBeginSignaled;
42   int  m_screenIdx;
43
44   UIInterfaceOrientation orientation;
45
46   XBMC_Event lastEvent;
47 }
48 @property (readonly, nonatomic, getter=isAnimating) BOOL animating;
49 @property CGPoint lastGesturePoint;
50 @property CGFloat screenScale;
51 @property bool touchBeginSignaled;
52 @property int  m_screenIdx;
53 @property CGSize screensize;
54 @property XBMC_Event lastEvent;
55
56 // message from which our instance is obtained
57 - (void) pauseAnimation;
58 - (void) resumeAnimation;
59 - (void) startAnimation;
60 - (void) stopAnimation;
61 - (void) sendKey: (XBMCKey) key;
62 - (void) observeDefaultCenterStuff: (NSNotification *) notification;
63 - (void) initDisplayLink;
64 - (void) deinitDisplayLink;
65 - (double) getDisplayLinkFPS;
66 - (void) setFramebuffer;
67 - (bool) presentFramebuffer;
68 - (CGSize) getScreenSize;
69 - (CGFloat) getScreenScale:(UIScreen *)screen;
70 - (UIInterfaceOrientation) getOrientation;
71 - (void) createGestureRecognizers;
72 - (void) activateKeyboard:(UIView *)view;
73 - (void) deactivateKeyboard:(UIView *)view;
74
75 - (void) disableSystemSleep;
76 - (void) enableSystemSleep;
77 - (void) disableScreenSaver;
78 - (void) enableScreenSaver;
79 - (bool) changeScreen: (unsigned int)screenIdx withMode:(UIScreenMode *)mode;
80 - (void) activateScreen: (UIScreen *)screen;
81 - (id)   initWithFrame:(CGRect)frame withScreen:(UIScreen *)screen;
82 @end
83
84 extern XBMCController *g_xbmcController;