diff src/video/qtopia/SDL_QWin.h @ 567:969fbd4dcd4e

From: David Hedbor Subject: Qtopia patches (input grabbing and iconify) Ok, here's a patch that adds support for SDL_WM_GrabInput (default state is "ungrabbed") and SDL_WM_IconifyWindow. Also has some other tweaks such as taking additional steps to clean up when exiting (bypassing certain bugs in some versions of Qtopia and/or OPIE) and it also maps Key_F33 to Key_Return (this is the Zaurus 'ok' key).
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Jan 2003 01:08:20 +0000
parents c96e2137f9eb
children b8d311d90021
line wrap: on
line diff
--- a/src/video/qtopia/SDL_QWin.h	Mon Jan 20 00:25:28 2003 +0000
+++ b/src/video/qtopia/SDL_QWin.h	Mon Jan 20 01:08:20 2003 +0000
@@ -70,14 +70,7 @@
     x = my_offset.x();
     y = my_offset.y();
   }
-  bool beginDraw(void) {
-    return true;
-  }
-  void endDraw(void) {
-  }
-  QImage *image(void) {
-    return my_image;
-  }
+  QImage *image(void) { return my_image; }
   
   void setWFlags(WFlags flags) {
     QWidget::setWFlags(flags);
@@ -87,22 +80,8 @@
   void setMousePos(const QPoint& newpos);
   void setFullscreen(bool);
 
-  void lockScreen() {
-    if(!my_painter) {
-      my_painter = new QDirectPainter(this);
-    }
-    my_locked++; // Increate lock refcount
-  }
-  void unlockScreen() {
-    if(my_locked > 0) {
-      my_locked--; // decrease lock refcount;
-    }
-    if(!my_locked && my_painter) {
-      my_painter->end();
-      delete my_painter;
-      my_painter = 0;
-    }
-  }
+  bool lockScreen(bool force=false);
+  void unlockScreen();
   void repaintRect(const QRect& rect);
  protected:
   /* Handle resizing of the window */
@@ -114,13 +93,12 @@
   void mousePressEvent(QMouseEvent *e);
   void mouseReleaseEvent(QMouseEvent *e);
   void paintEvent(QPaintEvent *ev);
-  void keyPressEvent(QKeyEvent *e) {
-    QueueKey(e, 1);
-  }
-  void keyReleaseEvent(QKeyEvent *e) {
-    QueueKey(e, 0);
-  }
+  void keyPressEvent(QKeyEvent *e)   { QueueKey(e, 1); }
+  void keyReleaseEvent(QKeyEvent *e) { QueueKey(e, 0); }
  private:
+  bool repaintRotation0(const QRect& rect);
+  bool repaintRotation1(const QRect& rect);
+  bool repaintRotation3(const QRect& rect);
   void enableFullscreen();
   QDirectPainter *my_painter;
   QImage *my_image;