Permalink
Browse files

[ios] - add methods to XBMCController for allowing to attach an UIVie…

…w to the controller view (in our case this will be the native ios keyboard) - and for fetching the screenScale
  • Loading branch information...
1 parent 99f7407 commit af71c48b09a03aaf8750902cc9f7246fe3fe21a2 @Memphiz committed Jul 21, 2012
Showing with 19 additions and 0 deletions.
  1. +3 −0 xbmc/osx/ios/XBMCController.h
  2. +16 −0 xbmc/osx/ios/XBMCController.mm
@@ -71,8 +71,11 @@
- (void) setFramebuffer;
- (bool) presentFramebuffer;
- (CGSize) getScreenSize;
+- (CGFloat) getScreenScale:(UIScreen *)screen;
- (UIInterfaceOrientation) getOrientation;
- (void) createGestureRecognizers;
+- (void) activateKeyboard:(UIView *)view;
+- (void) deactivateKeyboard:(UIView *)view;
- (void) disableSystemSleep;
- (void) enableSystemSleep;
@@ -197,6 +197,16 @@ - (void)createGestureRecognizers
currentPinchScale = lastPinchScale;
}
//--------------------------------------------------------------
+- (void) activateKeyboard:(UIView *)view
+{
+ [self.view addSubview:view];
+}
+//--------------------------------------------------------------
+- (void) deactivateKeyboard:(UIView *)view
+{
+ [view removeFromSuperview];
+}
+//--------------------------------------------------------------
-(void)handlePinch:(UIPinchGestureRecognizer*)sender
{
if( [m_glView isXBMCAlive] )//NO GESTURES BEFORE WE ARE UP AND RUNNING
@@ -535,6 +545,12 @@ - (CGSize) getScreenSize
return screensize;
}
//--------------------------------------------------------------
+- (CGFloat) getScreenScale:(UIScreen *)screen;
+{
+ return [m_glView getScreenScale:screen];
+}
+//--------------------------------------------------------------
+//--------------------------------------------------------------
- (BOOL) recreateOnReselect
{
//NSLog(@"%s", __PRETTY_FUNCTION__);

0 comments on commit af71c48

Please sign in to comment.