1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: OS2 Input</TITLE>
<META NAME="description" CONTENT="Crystal Space: OS2 Input">
<META NAME="keywords" CONTENT="Crystal Space: OS2 Input">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC626"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_259.html#SEC625"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_261.html#SEC627"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_248.html#SEC612"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_257.html#SEC623"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_262.html#SEC628"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H4> 8.1.2.3 Mouse and Keyboard </H4>
<!--docid::SEC626::-->
<P>
I was too lazy to intercept system event queue, so code generates all Crystal
Space events from events that are passed to DIVE window. As a
consequence, there are some (minor) flaws:
</P><P>
<UL>
<LI>
If you press a mouse button inside Crystal Space window, then move the mouse
outside the window and release button, Crystal Space won't receive the
"mouse-up" event, since OS/2 passes mouse events to a window only if
mouse is over that window. Theoretically this can be fixed by capturing mouse
when any mouse button is pressed and releasing mouse when all mouse buttons
will be released. I didn't have time to do it, and anyway it is not so
important I think.
<P>
<LI>
If you press a key inside the window, then activate another window and release
it, the same happens as with mouse buttons. Keyboard events are passed by
OS/2 only to active windows. To avoid this, the default <EM>focus
changed</EM> handler in `<SAMP>csSystemDriver</SAMP>' class calls <CODE>Keyboard->Reset()</CODE>
and <CODE>Mouse->Reset()</CODE> if focus goes away. <CODE>Keyboard::Reset()</CODE> clears
all <EM>key pressed</EM> flags and emmits corresponding `<SAMP>csevKeyUp</SAMP>' events.
<CODE>Mouse::Reset()</CODE> clears all <EM>button down</EM> flags and emmits
corresponding events too.
</UL>
<P>
By default Crystal Space Windowing System will use builtin OS/2 mouse
pointers whenever possible (there are three cursors that do not have their
counterparts in OS/2 and will be emulated in software). This behaviour
can be controlled by the `<SAMP>SYS_MOUSE_CURSOR = {<VAR>yes</VAR>|<VAR>no</VAR>}</SAMP>'
parameter in configuration file. If set to `<SAMP>yes</SAMP>', system mouse pointers
will be used when available; if set to `<SAMP>no</SAMP>', mouse pointers will be drawn
by Crystal Space as 2D sprites. This is slower but more precise.
Theoretically <CODE>csGraphics2D::SetMousePointer()</CODE> can be implemented to
construct a OS/2 pointer from `<SAMP>native</SAMP>' Crystal Space textures, but I
was too lazy for this.
</P><P>
<A NAME="OS2 Crashes"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_259.html#SEC625"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_261.html#SEC627"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_248.html#SEC612"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_257.html#SEC623"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_262.html#SEC628"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>
|