Cleanup out trailing whitespace in src/video/uikit
authorKees Bakker <kees@ijzerbout.nl>
Tue, 27 Sep 2011 21:02:26 +0200
changeset 60013ae3d1e58d59
parent 5965 dd0c84d3d846
child 6002 0c0aaaa1e5ed
Cleanup out trailing whitespace in src/video/uikit
src/video/uikit/SDL_uikitappdelegate.m
src/video/uikit/SDL_uikitevents.m
src/video/uikit/SDL_uikitopengles.m
src/video/uikit/SDL_uikitopenglview.h
src/video/uikit/SDL_uikitopenglview.m
src/video/uikit/SDL_uikitvideo.m
src/video/uikit/SDL_uikitview.h
src/video/uikit/SDL_uikitview.m
src/video/uikit/SDL_uikitviewcontroller.h
src/video/uikit/SDL_uikitviewcontroller.m
src/video/uikit/SDL_uikitwindow.m
src/video/uikit/keyinfotable.h
     1.1 --- a/src/video/uikit/SDL_uikitappdelegate.m	Wed Sep 21 03:08:00 2011 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitappdelegate.m	Tue Sep 27 21:02:26 2011 +0200
     1.3 @@ -41,7 +41,7 @@
     1.4  
     1.5      int i;
     1.6      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     1.7 -    
     1.8 +
     1.9      /* store arguments */
    1.10      forward_argc = argc;
    1.11      forward_argv = (char **)malloc((argc+1) * sizeof(char *));
    1.12 @@ -53,14 +53,14 @@
    1.13  
    1.14      /* Give over control to run loop, SDLUIKitDelegate will handle most things from here */
    1.15      UIApplicationMain(argc, argv, NULL, [SDLUIKitDelegate getAppDelegateClassName]);
    1.16 -    
    1.17 +
    1.18      [pool release];
    1.19      return 0;
    1.20  }
    1.21  
    1.22  static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, const char *newValue) {
    1.23      SDL_assert(SDL_strcmp(name, SDL_HINT_IDLE_TIMER_DISABLED) == 0);
    1.24 -    
    1.25 +
    1.26      BOOL disable = (*newValue != '0');
    1.27      [UIApplication sharedApplication].idleTimerDisabled = disable;
    1.28  }
    1.29 @@ -85,37 +85,37 @@
    1.30  }
    1.31  
    1.32  - (void)postFinishLaunch {
    1.33 -    
    1.34 +
    1.35      /* register a callback for the idletimer hint */
    1.36      SDL_SetHint(SDL_HINT_IDLE_TIMER_DISABLED, "0");
    1.37      SDL_RegisterHintChangedCb(SDL_HINT_IDLE_TIMER_DISABLED, &SDL_IdleTimerDisabledChanged);
    1.38  
    1.39      /* run the user's application, passing argc and argv */
    1.40      int exit_status = SDL_main(forward_argc, forward_argv);
    1.41 -    
    1.42 +
    1.43      /* free the memory we used to hold copies of argc and argv */
    1.44      int i;
    1.45      for (i=0; i<forward_argc; i++) {
    1.46          free(forward_argv[i]);
    1.47      }
    1.48 -    free(forward_argv);    
    1.49 -        
    1.50 +    free(forward_argv);
    1.51 +
    1.52      /* exit, passing the return status from the user's application */
    1.53      exit(exit_status);
    1.54  }
    1.55  
    1.56  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    1.57 -            
    1.58 +
    1.59      /* Set working directory to resource path */
    1.60      [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
    1.61 -    
    1.62 +
    1.63      [self performSelector:@selector(postFinishLaunch) withObject:nil afterDelay:0.0];
    1.64  
    1.65      return YES;
    1.66  }
    1.67  
    1.68  - (void)applicationWillTerminate:(UIApplication *)application {
    1.69 -    
    1.70 +
    1.71      SDL_SendQuit();
    1.72       /* hack to prevent automatic termination.  See SDL_uikitevents.m for details */
    1.73      longjmp(*(jump_env()), 1);
    1.74 @@ -130,7 +130,7 @@
    1.75      if (!_this) {
    1.76          return;
    1.77      }
    1.78 -    
    1.79 +
    1.80      SDL_Window *window;
    1.81      for (window = _this->windows; window != nil; window = window->next) {
    1.82          SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
    1.83 @@ -146,7 +146,7 @@
    1.84      if (!_this) {
    1.85          return;
    1.86      }
    1.87 -    
    1.88 +
    1.89      SDL_Window *window;
    1.90      for (window = _this->windows; window != nil; window = window->next) {
    1.91          SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
     2.1 --- a/src/video/uikit/SDL_uikitevents.m	Wed Sep 21 03:08:00 2011 -0400
     2.2 +++ b/src/video/uikit/SDL_uikitevents.m	Tue Sep 27 21:02:26 2011 +0200
     2.3 @@ -31,17 +31,17 @@
     2.4  void
     2.5  UIKit_PumpEvents(_THIS)
     2.6  {
     2.7 -    /* 
     2.8 +    /*
     2.9          When the user presses the 'home' button on the iPod
    2.10          the application exits -- immediatly.
    2.11 -     
    2.12 +
    2.13          Unlike in Mac OS X, it appears there is no way to cancel the termination.
    2.14 -     
    2.15 +
    2.16          This doesn't give the SDL user's application time to respond to an SDL_Quit event.
    2.17          So what we do is that in the UIApplicationDelegate class (SDLUIApplicationDelegate),
    2.18          when the delegate receives the ApplicationWillTerminate message, we execute
    2.19          a longjmp statement to get back here, preventing an immediate exit.
    2.20 -     */    
    2.21 +     */
    2.22      if (setjmp(*jump_env()) == 0) {
    2.23          /* if we're setting the jump, rather than jumping back */
    2.24          SInt32 result;
     3.1 --- a/src/video/uikit/SDL_uikitopengles.m	Wed Sep 21 03:08:00 2011 -0400
     3.2 +++ b/src/video/uikit/SDL_uikitopengles.m	Tue Sep 27 21:02:26 2011 +0200
     3.3 @@ -34,7 +34,7 @@
     3.4  
     3.5  void *
     3.6  UIKit_GL_GetProcAddress(_THIS, const char *proc)
     3.7 -{    
     3.8 +{
     3.9      /* Look through all SO's for the proc symbol.  Here's why:
    3.10         -Looking for the path to the OpenGL Library seems not to work in the iPhone Simulator.
    3.11         -We don't know that the path won't change in the future.
    3.12 @@ -47,7 +47,7 @@
    3.13  */
    3.14  int UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
    3.15  {
    3.16 -    
    3.17 +
    3.18      if (context) {
    3.19          SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    3.20          [data->view setCurrentContext];
    3.21 @@ -55,15 +55,15 @@
    3.22      else {
    3.23          [EAGLContext setCurrentContext: nil];
    3.24      }
    3.25 -        
    3.26 +
    3.27      return 0;
    3.28  }
    3.29  
    3.30  int
    3.31  UIKit_GL_LoadLibrary(_THIS, const char *path)
    3.32  {
    3.33 -    /* 
    3.34 -        shouldn't be passing a path into this function 
    3.35 +    /*
    3.36 +        shouldn't be passing a path into this function
    3.37          why?  Because we've already loaded the library
    3.38          and because the SDK forbids loading an external SO
    3.39      */
    3.40 @@ -84,7 +84,7 @@
    3.41      #endif
    3.42  
    3.43      SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    3.44 -    
    3.45 +
    3.46      if (nil == data->view) {
    3.47          return;
    3.48      }
    3.49 @@ -95,7 +95,7 @@
    3.50  
    3.51      /* we need to let the event cycle run, or the OS won't update the OpenGL view! */
    3.52      SDL_PumpEvents();
    3.53 -    
    3.54 +
    3.55  }
    3.56  
    3.57  SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
    3.58 @@ -114,7 +114,7 @@
    3.59                                      aBits: _this->gl_config.alpha_size \
    3.60                                      depthBits: _this->gl_config.depth_size \
    3.61                                      majorVersion: _this->gl_config.major_version];
    3.62 -    
    3.63 +
    3.64      data->view = view;
    3.65      view->viewcontroller = data->viewcontroller;
    3.66      if (view->viewcontroller != nil) {
     4.1 --- a/src/video/uikit/SDL_uikitopenglview.h	Wed Sep 21 03:08:00 2011 -0400
     4.2 +++ b/src/video/uikit/SDL_uikitopenglview.h	Tue Sep 27 21:02:26 2011 +0200
     4.3 @@ -31,17 +31,17 @@
     4.4   */
     4.5  /* *INDENT-OFF* */
     4.6  @interface SDL_uikitopenglview : SDL_uikitview {
     4.7 -    
     4.8 +
     4.9  @private
    4.10      /* The pixel dimensions of the backbuffer */
    4.11      GLint backingWidth;
    4.12      GLint backingHeight;
    4.13 -    
    4.14 +
    4.15      EAGLContext *context;
    4.16 -    
    4.17 +
    4.18      /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
    4.19      GLuint viewRenderbuffer, viewFramebuffer;
    4.20 -    
    4.21 +
    4.22      /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
    4.23      GLuint depthRenderbuffer;
    4.24  
     5.1 --- a/src/video/uikit/SDL_uikitopenglview.m	Wed Sep 21 03:08:00 2011 -0400
     5.2 +++ b/src/video/uikit/SDL_uikitopenglview.m	Tue Sep 27 21:02:26 2011 +0200
     5.3 @@ -50,7 +50,7 @@
     5.4  {
     5.5      NSString *colorFormat=nil;
     5.6      BOOL useDepthBuffer;
     5.7 -    
     5.8 +
     5.9      if (rBits == 8 && gBits == 8 && bBits == 8) {
    5.10          /* if user specifically requests rbg888 or some color format higher than 16bpp */
    5.11          colorFormat = kEAGLColorFormatRGBA8;
    5.12 @@ -59,7 +59,7 @@
    5.13          /* default case (faster) */
    5.14          colorFormat = kEAGLColorFormatRGB565;
    5.15      }
    5.16 -    
    5.17 +
    5.18      depthBufferFormat = 0;
    5.19  
    5.20      if (depthBits == 24) {
    5.21 @@ -71,22 +71,22 @@
    5.22      }
    5.23      else {
    5.24          /* default case when depth buffer is not disabled */
    5.25 -        /* 
    5.26 +        /*
    5.27             strange, even when we use this, we seem to get a 24 bit depth buffer on iPhone.
    5.28             perhaps that's the only depth format iPhone actually supports
    5.29          */
    5.30          useDepthBuffer = YES;
    5.31          depthBufferFormat = GL_DEPTH_COMPONENT16_OES;
    5.32      }
    5.33 -    
    5.34 +
    5.35      if ((self = [super initWithFrame:frame])) {
    5.36          // Get the layer
    5.37          CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
    5.38 -        
    5.39 +
    5.40          eaglLayer.opaque = YES;
    5.41          eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
    5.42                                          [NSNumber numberWithBool: retained], kEAGLDrawablePropertyRetainedBacking, colorFormat, kEAGLDrawablePropertyColorFormat, nil];
    5.43 -        
    5.44 +
    5.45          if (majorVersion > 1) {
    5.46              context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2];
    5.47          } else {
    5.48 @@ -96,16 +96,16 @@
    5.49              [self release];
    5.50              return nil;
    5.51          }
    5.52 -        
    5.53 +
    5.54          /* create the buffers */
    5.55          glGenFramebuffersOES(1, &viewFramebuffer);
    5.56          glGenRenderbuffersOES(1, &viewRenderbuffer);
    5.57 -        
    5.58 +
    5.59          glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
    5.60          glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
    5.61          [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
    5.62          glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);
    5.63 -        
    5.64 +
    5.65          glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
    5.66          glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
    5.67  
    5.68 @@ -115,7 +115,7 @@
    5.69              glRenderbufferStorageOES(GL_RENDERBUFFER_OES, depthBufferFormat, backingWidth, backingHeight);
    5.70              glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer);
    5.71          }
    5.72 -            
    5.73 +
    5.74          if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
    5.75              return NO;
    5.76          }
    5.77 @@ -140,7 +140,7 @@
    5.78      glGenRenderbuffersOES(1, &viewRenderbuffer);
    5.79      glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
    5.80      [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
    5.81 -    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);  
    5.82 +    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);
    5.83  
    5.84      glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
    5.85      glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
    5.86 @@ -149,7 +149,7 @@
    5.87          glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
    5.88          glRenderbufferStorageOES(GL_RENDERBUFFER_OES, depthBufferFormat, backingWidth, backingHeight);
    5.89      }
    5.90 -    
    5.91 +
    5.92      // !!! FIXME: use the screen this is on!
    5.93      /* Use the main screen scale (for retina display support) */
    5.94      if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
    5.95 @@ -176,7 +176,7 @@
    5.96      viewFramebuffer = 0;
    5.97      glDeleteRenderbuffersOES(1, &viewRenderbuffer);
    5.98      viewRenderbuffer = 0;
    5.99 -    
   5.100 +
   5.101      if (depthRenderbuffer) {
   5.102          glDeleteRenderbuffersOES(1, &depthRenderbuffer);
   5.103          depthRenderbuffer = 0;
   5.104 @@ -189,7 +189,7 @@
   5.105      if ([EAGLContext currentContext] == context) {
   5.106          [EAGLContext setCurrentContext:nil];
   5.107      }
   5.108 -    [context release];    
   5.109 +    [context release];
   5.110      [super dealloc];
   5.111  }
   5.112  
     6.1 --- a/src/video/uikit/SDL_uikitvideo.m	Wed Sep 21 03:08:00 2011 -0400
     6.2 +++ b/src/video/uikit/SDL_uikitvideo.m	Tue Sep 27 21:02:26 2011 +0200
     6.3 @@ -84,8 +84,8 @@
     6.4      device->CreateWindow = UIKit_CreateWindow;
     6.5      device->DestroyWindow = UIKit_DestroyWindow;
     6.6      device->GetWindowWMInfo = UIKit_GetWindowWMInfo;
     6.7 -    
     6.8 -    
     6.9 +
    6.10 +
    6.11      /* OpenGL (ES) functions */
    6.12      device->GL_MakeCurrent        = UIKit_GL_MakeCurrent;
    6.13      device->GL_SwapWindow        = UIKit_GL_SwapWindow;
    6.14 @@ -211,7 +211,7 @@
    6.15      mode.w = w;
    6.16      mode.h = h;
    6.17      mode.refresh_rate = 0;
    6.18 -    
    6.19 +
    6.20      [uimode retain];
    6.21      mode.driverdata = uimode;
    6.22  
     7.1 --- a/src/video/uikit/SDL_uikitview.h	Wed Sep 21 03:08:00 2011 -0400
     7.2 +++ b/src/video/uikit/SDL_uikitview.h	Tue Sep 27 21:02:26 2011 +0200
     7.3 @@ -48,7 +48,7 @@
     7.4  #if SDL_IPHONE_KEYBOARD
     7.5      UITextField *textField;
     7.6      BOOL keyboardVisible;
     7.7 -#endif    
     7.8 +#endif
     7.9  
    7.10  @public
    7.11      SDL_uikitviewcontroller *viewcontroller;
    7.12 @@ -62,7 +62,7 @@
    7.13  - (void)hideKeyboard;
    7.14  - (void)initializeKeyboard;
    7.15  @property (readonly) BOOL keyboardVisible;
    7.16 -#endif 
    7.17 +#endif
    7.18  
    7.19  @end
    7.20  /* *INDENT-ON* */
     8.1 --- a/src/video/uikit/SDL_uikitview.m	Wed Sep 21 03:08:00 2011 -0400
     8.2 +++ b/src/video/uikit/SDL_uikitview.m	Tue Sep 27 21:02:26 2011 +0200
     8.3 @@ -40,10 +40,10 @@
     8.4  - (id)initWithFrame:(CGRect)frame {
     8.5  
     8.6      self = [super initWithFrame: frame];
     8.7 -    
     8.8 +
     8.9  #if SDL_IPHONE_KEYBOARD
    8.10      [self initializeKeyboard];
    8.11 -#endif    
    8.12 +#endif
    8.13  
    8.14  #ifdef FIXED_MULTITOUCH
    8.15      self.multipleTouchEnabled = YES;
    8.16 @@ -53,7 +53,7 @@
    8.17  
    8.18      //touch.driverdata = SDL_malloc(sizeof(EventTouchData));
    8.19      //EventTouchData* data = (EventTouchData*)(touch.driverdata);
    8.20 -    
    8.21 +
    8.22      touch.x_min = 0;
    8.23      touch.x_max = frame.size.width;
    8.24      touch.native_xres = touch.x_max - touch.x_min;
    8.25 @@ -79,7 +79,7 @@
    8.26  
    8.27      if (touch) {
    8.28          CGPoint locationInView = [touch locationInView: self];
    8.29 -            
    8.30 +
    8.31          /* send moved event */
    8.32          SDL_SendMouseMotion(NULL, 0, locationInView.x, locationInView.y);
    8.33  
    8.34 @@ -112,16 +112,16 @@
    8.35        }
    8.36  #endif
    8.37  
    8.38 -      touch = (UITouch*)[enumerator nextObject]; 
    8.39 +      touch = (UITouch*)[enumerator nextObject];
    8.40      }
    8.41  #endif
    8.42  }
    8.43  
    8.44  - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    8.45 -    
    8.46 +
    8.47      NSEnumerator *enumerator = [touches objectEnumerator];
    8.48      UITouch *touch = (UITouch*)[enumerator nextObject];
    8.49 -    
    8.50 +
    8.51      if (touch) {
    8.52          /* send mouse up */
    8.53          SDL_SendMouseButton(NULL, SDL_RELEASED, SDL_BUTTON_LEFT);
    8.54 @@ -130,7 +130,7 @@
    8.55  #ifdef FIXED_MULTITOUCH
    8.56      while(touch) {
    8.57        CGPoint locationInView = [touch locationInView: self];
    8.58 -      
    8.59 +
    8.60  
    8.61  #ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    8.62        SDL_SendFingerDown(touchId,(long)touch,
    8.63 @@ -149,7 +149,7 @@
    8.64        }
    8.65  #endif
    8.66  
    8.67 -      touch = (UITouch*)[enumerator nextObject]; 
    8.68 +      touch = (UITouch*)[enumerator nextObject];
    8.69      }
    8.70  #endif
    8.71  }
    8.72 @@ -164,10 +164,10 @@
    8.73  }
    8.74  
    8.75  - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    8.76 -    
    8.77 +
    8.78      NSEnumerator *enumerator = [touches objectEnumerator];
    8.79      UITouch *touch = (UITouch*)[enumerator nextObject];
    8.80 -    
    8.81 +
    8.82      if (touch) {
    8.83          CGPoint locationInView = [touch locationInView: self];
    8.84  
    8.85 @@ -178,7 +178,7 @@
    8.86  #ifdef FIXED_MULTITOUCH
    8.87      while(touch) {
    8.88        CGPoint locationInView = [touch locationInView: self];
    8.89 -      
    8.90 +
    8.91  
    8.92  #ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    8.93        SDL_SendTouchMotion(touchId,(long)touch,
    8.94 @@ -196,7 +196,7 @@
    8.95        }
    8.96  #endif
    8.97  
    8.98 -      touch = (UITouch*)[enumerator nextObject]; 
    8.99 +      touch = (UITouch*)[enumerator nextObject];
   8.100      }
   8.101  #endif
   8.102  }
   8.103 @@ -213,12 +213,12 @@
   8.104  
   8.105  /* Set ourselves up as a UITextFieldDelegate */
   8.106  - (void)initializeKeyboard {
   8.107 -        
   8.108 +
   8.109      textField = [[UITextField alloc] initWithFrame: CGRectZero];
   8.110      textField.delegate = self;
   8.111      /* placeholder so there is something to delete! */
   8.112 -    textField.text = @" ";    
   8.113 -    
   8.114 +    textField.text = @" ";
   8.115 +
   8.116      /* set UITextInputTrait properties, mostly to defaults */
   8.117      textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
   8.118      textField.autocorrectionType = UITextAutocorrectionTypeNo;
   8.119 @@ -226,8 +226,8 @@
   8.120      textField.keyboardAppearance = UIKeyboardAppearanceDefault;
   8.121      textField.keyboardType = UIKeyboardTypeDefault;
   8.122      textField.returnKeyType = UIReturnKeyDefault;
   8.123 -    textField.secureTextEntry = NO;    
   8.124 -    
   8.125 +    textField.secureTextEntry = NO;
   8.126 +
   8.127      textField.hidden = YES;
   8.128      keyboardVisible = NO;
   8.129      /* add the UITextField (hidden) to our view */
   8.130 @@ -249,7 +249,7 @@
   8.131  
   8.132  /* UITextFieldDelegate method.  Invoked when user types something. */
   8.133  - (BOOL)textField:(UITextField *)_textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
   8.134 -    
   8.135 +
   8.136      if ([string length] == 0) {
   8.137          /* it wants to replace text with nothing, ie a delete */
   8.138          SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_DELETE);
   8.139 @@ -260,12 +260,12 @@
   8.140             and convert them to key presses */
   8.141          int i;
   8.142          for (i=0; i<[string length]; i++) {
   8.143 -            
   8.144 +
   8.145              unichar c = [string characterAtIndex: i];
   8.146 -            
   8.147 +
   8.148              Uint16 mod = 0;
   8.149              SDL_Scancode code;
   8.150 -            
   8.151 +
   8.152              if (c < 127) {
   8.153                  /* figure out the SDL_Scancode and SDL_keymod for this unichar */
   8.154                  code = unicharToUIKeyInfoTable[c].code;
   8.155 @@ -276,7 +276,7 @@
   8.156                  code = SDL_SCANCODE_UNKNOWN;
   8.157                  mod = 0;
   8.158              }
   8.159 -            
   8.160 +
   8.161              if (mod & KMOD_SHIFT) {
   8.162                  /* If character uses shift, press shift down */
   8.163                  SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LSHIFT);
   8.164 @@ -287,7 +287,7 @@
   8.165              if (mod & KMOD_SHIFT) {
   8.166                  /* If character uses shift, press shift back up */
   8.167                  SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT);
   8.168 -            }            
   8.169 +            }
   8.170          }
   8.171          SDL_SendKeyboardText([string UTF8String]);
   8.172      }
   8.173 @@ -309,18 +309,18 @@
   8.174  #if SDL_IPHONE_KEYBOARD
   8.175  
   8.176  int SDL_iPhoneKeyboardShow(SDL_Window * window) {
   8.177 -    
   8.178 +
   8.179      SDL_WindowData *data;
   8.180      SDL_uikitview *view;
   8.181 -    
   8.182 +
   8.183      if (NULL == window) {
   8.184          SDL_SetError("Window does not exist");
   8.185          return -1;
   8.186      }
   8.187 -    
   8.188 +
   8.189      data = (SDL_WindowData *)window->driverdata;
   8.190      view = data->view;
   8.191 -    
   8.192 +
   8.193      if (nil == view) {
   8.194          SDL_SetError("Window has no view");
   8.195          return -1;
   8.196 @@ -332,18 +332,18 @@
   8.197  }
   8.198  
   8.199  int SDL_iPhoneKeyboardHide(SDL_Window * window) {
   8.200 -    
   8.201 +
   8.202      SDL_WindowData *data;
   8.203      SDL_uikitview *view;
   8.204 -    
   8.205 +
   8.206      if (NULL == window) {
   8.207          SDL_SetError("Window does not exist");
   8.208          return -1;
   8.209 -    }    
   8.210 -    
   8.211 +    }
   8.212 +
   8.213      data = (SDL_WindowData *)window->driverdata;
   8.214      view = data->view;
   8.215 -    
   8.216 +
   8.217      if (NULL == view) {
   8.218          SDL_SetError("Window has no view");
   8.219          return -1;
   8.220 @@ -355,18 +355,18 @@
   8.221  }
   8.222  
   8.223  SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) {
   8.224 -    
   8.225 +
   8.226      SDL_WindowData *data;
   8.227      SDL_uikitview *view;
   8.228 -    
   8.229 +
   8.230      if (NULL == window) {
   8.231          SDL_SetError("Window does not exist");
   8.232          return -1;
   8.233 -    }    
   8.234 -    
   8.235 +    }
   8.236 +
   8.237      data = (SDL_WindowData *)window->driverdata;
   8.238      view = data->view;
   8.239 -    
   8.240 +
   8.241      if (NULL == view) {
   8.242          SDL_SetError("Window has no view");
   8.243          return 0;
   8.244 @@ -377,18 +377,18 @@
   8.245  }
   8.246  
   8.247  int SDL_iPhoneKeyboardToggle(SDL_Window * window) {
   8.248 -    
   8.249 +
   8.250      SDL_WindowData *data;
   8.251      SDL_uikitview *view;
   8.252 -    
   8.253 +
   8.254      if (NULL == window) {
   8.255          SDL_SetError("Window does not exist");
   8.256          return -1;
   8.257 -    }    
   8.258 -    
   8.259 +    }
   8.260 +
   8.261      data = (SDL_WindowData *)window->driverdata;
   8.262      view = data->view;
   8.263 -    
   8.264 +
   8.265      if (NULL == view) {
   8.266          SDL_SetError("Window has no view");
   8.267          return -1;
     9.1 --- a/src/video/uikit/SDL_uikitviewcontroller.h	Wed Sep 21 03:08:00 2011 -0400
     9.2 +++ b/src/video/uikit/SDL_uikitviewcontroller.h	Tue Sep 27 21:02:26 2011 +0200
     9.3 @@ -1,15 +1,15 @@
     9.4  /*
     9.5   Simple DirectMedia Layer
     9.6   Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
     9.7 - 
     9.8 +
     9.9   This software is provided 'as-is', without any express or implied
    9.10   warranty.  In no event will the authors be held liable for any damages
    9.11   arising from the use of this software.
    9.12 - 
    9.13 +
    9.14   Permission is granted to anyone to use this software for any purpose,
    9.15   including commercial applications, and to alter it and redistribute it
    9.16   freely, subject to the following restrictions:
    9.17 - 
    9.18 +
    9.19   1. The origin of this software must not be misrepresented; you must not
    9.20   claim that you wrote the original software. If you use this software
    9.21   in a product, an acknowledgment in the product documentation would be
    10.1 --- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Sep 21 03:08:00 2011 -0400
    10.2 +++ b/src/video/uikit/SDL_uikitviewcontroller.m	Tue Sep 27 21:02:26 2011 +0200
    10.3 @@ -1,15 +1,15 @@
    10.4  /*
    10.5   Simple DirectMedia Layer
    10.6   Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
    10.7 - 
    10.8 +
    10.9   This software is provided 'as-is', without any express or implied
   10.10   warranty.  In no event will the authors be held liable for any damages
   10.11   arising from the use of this software.
   10.12 - 
   10.13 +
   10.14   Permission is granted to anyone to use this software for any purpose,
   10.15   including commercial applications, and to alter it and redistribute it
   10.16   freely, subject to the following restrictions:
   10.17 - 
   10.18 +
   10.19   1. The origin of this software must not be misrepresented; you must not
   10.20   claim that you wrote the original software. If you use this software
   10.21   in a product, an acknowledgment in the product documentation would be
   10.22 @@ -49,34 +49,34 @@
   10.23                                                              encoding:NSUTF8StringEncoding];
   10.24          NSArray *orientations = [orientationsNSString componentsSeparatedByCharactersInSet:
   10.25                                   [NSCharacterSet characterSetWithCharactersInString:@" "]];
   10.26 -        
   10.27 +
   10.28          switch (orient) {
   10.29              case UIInterfaceOrientationLandscapeLeft:
   10.30                  rotate = [orientations containsObject:@"LandscapeLeft"];
   10.31                  break;
   10.32 -                
   10.33 +
   10.34              case UIInterfaceOrientationLandscapeRight:
   10.35                  rotate = [orientations containsObject:@"LandscapeRight"];
   10.36                  break;
   10.37 -                
   10.38 +
   10.39              case UIInterfaceOrientationPortrait:
   10.40                  rotate = [orientations containsObject:@"Portrait"];
   10.41                  break;
   10.42 -                
   10.43 +
   10.44              case UIInterfaceOrientationPortraitUpsideDown:
   10.45                  rotate = [orientations containsObject:@"PortraitUpsideDown"];
   10.46                  break;
   10.47 -                
   10.48 +
   10.49              default: break;
   10.50          }
   10.51 -        
   10.52 +
   10.53          return rotate;
   10.54      }
   10.55 -    
   10.56 +
   10.57      if (self->window->flags & SDL_WINDOW_RESIZABLE) {
   10.58          return YES;  // any orientation is okay.
   10.59      }
   10.60 -    
   10.61 +
   10.62      // If not resizable, allow device to orient to other matching sizes
   10.63      //  (that is, let the user turn the device upside down...same screen
   10.64      //   dimensions, but it lets the user place the device where it's most
   10.65 @@ -85,14 +85,14 @@
   10.66          case UIInterfaceOrientationLandscapeLeft:
   10.67          case UIInterfaceOrientationLandscapeRight:
   10.68              return (self->window->w >= self->window->h);
   10.69 -            
   10.70 +
   10.71          case UIInterfaceOrientationPortrait:
   10.72          case UIInterfaceOrientationPortraitUpsideDown:
   10.73              return (self->window->h >= self->window->w);
   10.74 -            
   10.75 +
   10.76          default: break;
   10.77      }
   10.78 -    
   10.79 +
   10.80      return NO;  // Nothing else is acceptable.
   10.81  }
   10.82  
   10.83 @@ -105,7 +105,7 @@
   10.84      if ((self->window->flags & SDL_WINDOW_RESIZABLE) == 0) {
   10.85          return;   // don't care, we're just flipping over in this case.
   10.86      }
   10.87 -    
   10.88 +
   10.89      const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
   10.90      SDL_WindowData *data = self->window->driverdata;
   10.91      UIWindow *uiwindow = data->uiwindow;
   10.92 @@ -114,30 +114,30 @@
   10.93      CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame];
   10.94      const CGSize size = frame.size;
   10.95      int w, h;
   10.96 -    
   10.97 +
   10.98      switch (toInterfaceOrientation) {
   10.99          case UIInterfaceOrientationPortrait:
  10.100          case UIInterfaceOrientationPortraitUpsideDown:
  10.101              w = (size.width < size.height) ? size.width : size.height;
  10.102              h = (size.width > size.height) ? size.width : size.height;
  10.103              break;
  10.104 -            
  10.105 +
  10.106          case UIInterfaceOrientationLandscapeLeft:
  10.107          case UIInterfaceOrientationLandscapeRight:
  10.108              w = (size.width > size.height) ? size.width : size.height;
  10.109              h = (size.width < size.height) ? size.width : size.height;
  10.110              break;
  10.111 -            
  10.112 +
  10.113          default:
  10.114              SDL_assert(0 && "Unexpected interface orientation!");
  10.115              return;
  10.116      }
  10.117 -    
  10.118 +
  10.119      frame.size.width = w;
  10.120      frame.size.height = h;
  10.121      frame.origin.x = 0;
  10.122      frame.origin.y = 0;
  10.123 -    
  10.124 +
  10.125      [uiwindow setFrame:frame];
  10.126      [data->view updateFrame];
  10.127      SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
    11.1 --- a/src/video/uikit/SDL_uikitwindow.m	Wed Sep 21 03:08:00 2011 -0400
    11.2 +++ b/src/video/uikit/SDL_uikitwindow.m	Tue Sep 27 21:02:26 2011 +0200
    11.3 @@ -46,7 +46,7 @@
    11.4      SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
    11.5      UIScreen *uiscreen = (UIScreen *) display->driverdata;
    11.6      SDL_WindowData *data;
    11.7 -        
    11.8 +
    11.9      /* Allocate the window data */
   11.10      data = (SDL_WindowData *)SDL_malloc(sizeof(*data));
   11.11      if (!data) {
   11.12 @@ -64,7 +64,7 @@
   11.13          window->w = (int)uiwindow.frame.size.width;
   11.14          window->h = (int)uiwindow.frame.size.height;
   11.15      }
   11.16 -    
   11.17 +
   11.18      window->driverdata = data;
   11.19  
   11.20      // !!! FIXME: should we force this? Shouldn't specifying FULLSCREEN
   11.21 @@ -164,7 +164,7 @@
   11.22          uiwindow = [uiwindow initWithFrame:[uiscreen bounds]];
   11.23      else
   11.24          uiwindow = [uiwindow initWithFrame:[uiscreen applicationFrame]];
   11.25 -    
   11.26 +
   11.27      // put the window on an external display if appropriate. This implicitly
   11.28      //  does [uiwindow setframe:[uiscreen bounds]], so don't do it on the
   11.29      //  main display, where we land by default, as that would eat the
   11.30 @@ -176,10 +176,10 @@
   11.31      if (SetupWindowData(_this, window, uiwindow, SDL_TRUE) < 0) {
   11.32          [uiwindow release];
   11.33          return -1;
   11.34 -    }    
   11.35 -    
   11.36 +    }
   11.37 +
   11.38      return 1;
   11.39 -    
   11.40 +
   11.41  }
   11.42  
   11.43  void
    12.1 --- a/src/video/uikit/keyinfotable.h	Wed Sep 21 03:08:00 2011 -0400
    12.2 +++ b/src/video/uikit/keyinfotable.h	Tue Sep 27 21:02:26 2011 +0200
    12.3 @@ -88,7 +88,7 @@
    12.4  /*  45 */ {   SDL_SCANCODE_MINUS, 0 },        /* '-'                       */
    12.5  /*  46 */ {   SDL_SCANCODE_PERIOD, 0 },        /* '.'                       */
    12.6  /*  47 */ {   SDL_SCANCODE_SLASH, 0 },        /* '/'                       */
    12.7 -/*  48 */ {   SDL_SCANCODE_0, 0    },        
    12.8 +/*  48 */ {   SDL_SCANCODE_0, 0    },
    12.9  /*  49 */ {   SDL_SCANCODE_1, 0 },
   12.10  /*  50 */ {   SDL_SCANCODE_2, 0 },
   12.11  /*  51 */ {   SDL_SCANCODE_3, 0 },
   12.12 @@ -137,7 +137,7 @@
   12.13  /*  94 */ {   SDL_SCANCODE_6,  KMOD_SHIFT },            /* plus shift modifier '^' */
   12.14  /*  95 */ {   SDL_SCANCODE_MINUS,  KMOD_SHIFT },        /* plus shift modifier '_' */
   12.15  /*  96 */ {   SDL_SCANCODE_GRAVE,  KMOD_SHIFT },        /* '`' */
   12.16 -/*  97 */ {   SDL_SCANCODE_A, 0    },    
   12.17 +/*  97 */ {   SDL_SCANCODE_A, 0    },
   12.18  /*  98 */ {   SDL_SCANCODE_B, 0 },
   12.19  /*  99 */ {   SDL_SCANCODE_C, 0 },
   12.20  /*  100 */{    SDL_SCANCODE_D, 0 },