summaryrefslogtreecommitdiffstats
path: root/uisimulator/x11/screenhack.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-14 08:09:29 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-14 08:09:29 +0000
commit5fcce4da583b2524c93febefb0e2962a889c9ae1 (patch)
tree7dfd35da4ac481bc71f4dd8c3c20c6f716504942 /uisimulator/x11/screenhack.h
parentea60436cd8b26dc375993eede6b98653f00e2548 (diff)
downloadrockbox-5fcce4da583b2524c93febefb0e2962a889c9ae1.tar.gz
rockbox-5fcce4da583b2524c93febefb0e2962a889c9ae1.zip
Now the X11 simulator sets the BUTTON_REL bit properly and thus generates
button release events, much in the same way the actual target behaves. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2606 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11/screenhack.h')
-rw-r--r--uisimulator/x11/screenhack.h55
1 files changed, 3 insertions, 52 deletions
diff --git a/uisimulator/x11/screenhack.h b/uisimulator/x11/screenhack.h
index 12cd873e22..ac9b01bf75 100644
--- a/uisimulator/x11/screenhack.h
+++ b/uisimulator/x11/screenhack.h
@@ -9,51 +9,11 @@
* implied warranty.
*/
-/* Found in Don Hopkins' .plan file:
- *
- * The color situation is a total flying circus. The X approach to
- * device independence is to treat everything like a MicroVax framebuffer
- * on acid. A truely portable X application is required to act like the
- * persistent customer in the Monty Python ``Cheese Shop'' sketch. Even
- * the simplest applications must answer many difficult questions, like:
- *
- * WHAT IS YOUR DISPLAY?
- * display = XOpenDisplay("unix:0");
- * WHAT IS YOUR ROOT?
- * root = RootWindow(display, DefaultScreen(display));
- * AND WHAT IS YOUR WINDOW?
- * win = XCreateSimpleWindow(display, root, 0, 0, 256, 256, 1,
- * BlackPixel(display, DefaultScreen(display)),
- * WhitePixel(display, DefaultScreen(display)))
- * OH ALL RIGHT, YOU CAN GO ON.
- *
- * WHAT IS YOUR DISPLAY?
- * display = XOpenDisplay("unix:0");
- * WHAT IS YOUR COLORMAP?
- * cmap = DefaultColormap(display, DefaultScreen(display));
- * AND WHAT IS YOUR FAVORITE COLOR?
- * favorite_color = 0; / * Black. * /
- * / * Whoops! No, I mean: * /
- * favorite_color = BlackPixel(display, DefaultScreen(display));
- * / * AAAYYYYEEEEE!! (client dumps core & falls into the chasm) * /
- *
- * WHAT IS YOUR DISPLAY?
- * display = XOpenDisplay("unix:0");
- * WHAT IS YOUR VISUAL?
- * struct XVisualInfo vinfo;
- * if (XMatchVisualInfo(display, DefaultScreen(display),
- * 8, PseudoColor, &vinfo) != 0)
- * visual = vinfo.visual;
- * AND WHAT IS THE NET SPEED VELOCITY OF AN XConfigureWindow REQUEST?
- * / * Is that a SubStructureRedirectMask or a ResizeRedirectMask? * /
- * WHAT?! HOW AM I SUPPOSED TO KNOW THAT?
- * AAAAUUUGGGHHH!!!! (server dumps core & falls into the chasm)
- */
-
#ifndef __SCREENHACK_H__
#define __SCREENHACK_H__
#include <stdlib.h>
+#include <stdbool.h>
#include "config.h"
@@ -69,15 +29,6 @@
#include <X11/Xresource.h>
#include <X11/Xos.h>
-/* M_PI ought to have been defined in math.h, but... */
-#ifndef M_PI
-# define M_PI 3.1415926535
-#endif
-
-#ifndef M_PI_2
-# define M_PI_2 1.5707963267
-#endif
-
#include "resources.h"
#include "visual.h"
@@ -89,8 +40,8 @@ extern XrmOptionDescRec options [];
extern char *defaults [];
extern void screenhack (Display*,Window);
-extern int screenhack_handle_event (Display*, XEvent*);
-extern int screenhack_handle_events (void);
+extern int screenhack_handle_event(Display*, XEvent*, bool *);
+extern int screenhack_handle_events(bool *);
extern void screen_redraw();
extern void screen_resized();