Skip to content

Commit

Permalink
[ios] - add methods to XBMCController for allowing to attach an UIVie…
Browse files Browse the repository at this point in the history
…w to the controller view (in our case this will be the native ios keyboard) - and for fetching the screenScale
  • Loading branch information
Memphiz committed Aug 1, 2012
1 parent 99f7407 commit af71c48
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbmc/osx/ios/XBMCController.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@
- (void) setFramebuffer; - (void) setFramebuffer;
- (bool) presentFramebuffer; - (bool) presentFramebuffer;
- (CGSize) getScreenSize; - (CGSize) getScreenSize;
- (CGFloat) getScreenScale:(UIScreen *)screen;
- (UIInterfaceOrientation) getOrientation; - (UIInterfaceOrientation) getOrientation;
- (void) createGestureRecognizers; - (void) createGestureRecognizers;
- (void) activateKeyboard:(UIView *)view;
- (void) deactivateKeyboard:(UIView *)view;


- (void) disableSystemSleep; - (void) disableSystemSleep;
- (void) enableSystemSleep; - (void) enableSystemSleep;
Expand Down
16 changes: 16 additions & 0 deletions xbmc/osx/ios/XBMCController.mm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ - (void)createGestureRecognizers
currentPinchScale = lastPinchScale; currentPinchScale = lastPinchScale;
} }
//-------------------------------------------------------------- //--------------------------------------------------------------
- (void) activateKeyboard:(UIView *)view
{
[self.view addSubview:view];
}
//--------------------------------------------------------------
- (void) deactivateKeyboard:(UIView *)view
{
[view removeFromSuperview];
}
//--------------------------------------------------------------
-(void)handlePinch:(UIPinchGestureRecognizer*)sender -(void)handlePinch:(UIPinchGestureRecognizer*)sender
{ {
if( [m_glView isXBMCAlive] )//NO GESTURES BEFORE WE ARE UP AND RUNNING if( [m_glView isXBMCAlive] )//NO GESTURES BEFORE WE ARE UP AND RUNNING
Expand Down Expand Up @@ -535,6 +545,12 @@ - (CGSize) getScreenSize
return screensize; return screensize;
} }
//-------------------------------------------------------------- //--------------------------------------------------------------
- (CGFloat) getScreenScale:(UIScreen *)screen;
{
return [m_glView getScreenScale:screen];
}
//--------------------------------------------------------------
//--------------------------------------------------------------
- (BOOL) recreateOnReselect - (BOOL) recreateOnReselect
{ {
//NSLog(@"%s", __PRETTY_FUNCTION__); //NSLog(@"%s", __PRETTY_FUNCTION__);
Expand Down

0 comments on commit af71c48

Please sign in to comment.