2 * Copyright (C) 2010-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 #import <UIKit/UIKit.h>
22 #import <OpenGLES/EAGL.h>
23 #import <OpenGLES/ES2/gl.h>
24 #import <AudioToolbox/AudioToolbox.h>
26 #import "XBMC_events.h"
27 #include "XBMC_keysym.h"
31 @interface XBMCController : UIViewController <UIGestureRecognizerDelegate>
34 IOSEAGLView *m_glView;
35 int m_screensaverTimeout;
39 CGPoint lastGesturePoint;
41 bool touchBeginSignaled;
44 UIInterfaceOrientation orientation;
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;
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;
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;
84 extern XBMCController *g_xbmcController;