kodi
XBMCController.h
1 /*
2  * Copyright (C) 2010-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #include "input/keyboard/XBMC_keysym.h"
10 #include "windowing/XBMC_events.h"
11 
12 #import "platform/darwin/ios-common/DarwinEmbedNowPlayingInfoManager.h"
13 
14 #import <AudioToolbox/AudioToolbox.h>
15 #import <OpenGLES/EAGL.h>
16 #import <OpenGLES/ES2/gl.h>
17 #import <UIKit/UIKit.h>
18 
19 @class IOSEAGLView;
20 
21 @interface XBMCController : UIViewController <UIGestureRecognizerDelegate, UIKeyInput>
22 {
23  UIWindow *m_window;
24  IOSEAGLView *m_glView;
25  int m_screensaverTimeout;
26 
27  /* Touch handling */
28  CGSize screensize;
29  CGPoint lastGesturePoint;
30  CGFloat screenScale;
31  bool touchBeginSignaled;
32  int m_screenIdx;
33 
34  UIInterfaceOrientation orientation;
35 
36  bool m_isPlayingBeforeInactive;
37  UIBackgroundTaskIdentifier m_bgTask;
38  NSTimer *m_networkAutoSuspendTimer;
39  bool nativeKeyboardActive;
40 }
41 @property (readonly, nonatomic, getter=isAnimating) BOOL animating;
42 @property CGPoint lastGesturePoint;
43 @property CGFloat screenScale;
44 @property bool touchBeginSignaled;
45 @property int m_screenIdx;
46 @property CGSize screensize;
47 @property(nonatomic, strong) NSTimer* m_networkAutoSuspendTimer;
48 @property(nonatomic, strong) DarwinEmbedNowPlayingInfoManager* MPNPInfoManager;
49 @property bool nativeKeyboardActive;
50 
51 // message from which our instance is obtained
52 - (void) pauseAnimation;
53 - (void) resumeAnimation;
54 - (void) startAnimation;
55 - (void) stopAnimation;
56 - (void) enterBackground;
57 - (void) enterForeground;
58 - (void) becomeInactive;
59 - (void) sendKey: (XBMCKey) key;
60 - (void) observeDefaultCenterStuff: (NSNotification *) notification;
61 - (CGRect)fullscreenSubviewFrame;
62 - (void)onXbmcAlive;
63 - (void)setGUIInsetsFromMainThread:(BOOL)isMainThread;
64 - (void) setFramebuffer;
65 - (bool) presentFramebuffer;
66 - (CGSize) getScreenSize;
67 - (UIInterfaceOrientation) getOrientation;
68 - (void) createGestureRecognizers;
69 - (void) activateKeyboard:(UIView *)view;
70 - (void) deactivateKeyboard:(UIView *)view;
71 - (void) nativeKeyboardActive: (bool)active;
72 
73 - (void) disableNetworkAutoSuspend;
74 - (void) enableNetworkAutoSuspend:(id)obj;
75 - (void)rescheduleNetworkAutoSuspend;
76 - (void) disableSystemSleep;
77 - (void) enableSystemSleep;
78 - (void) disableScreenSaver;
79 - (void) enableScreenSaver;
80 - (bool) changeScreen: (unsigned int)screenIdx withMode:(UIScreenMode *)mode;
81 - (void) activateScreen: (UIScreen *)screen withOrientation:(UIInterfaceOrientation)newOrientation;
82 - (id) initWithFrame:(CGRect)frame withScreen:(UIScreen *)screen;
83 - (CVEAGLContext)getEAGLContextObj;
84 @end
85 
86 extern XBMCController *g_xbmcController;
Definition: DarwinEmbedNowPlayingInfoManager.h:17
Definition: XBMCController.h:21
Definition: IOSEAGLView.h:16