Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 2085

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/kernel/qwindowsystem_qws.cpp:833 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QWSServer Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QWSServer Class Reference</h1>

<p>The QWSServer class provides server-specific functionality in Qt/Embedded.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qwindowsystem_qws-h.html">qwindowsystem_qws.h</a>&gt;</tt>
<p><a href="qwsserver-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QWSServer"><b>QWSServer</b></a> ( int&nbsp;flags = 0, QObject&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#~QWSServer"><b>~QWSServer</b></a> ()</div></li>
<li><div class=fn>enum <a href="#ServerFlags-enum"><b>ServerFlags</b></a> { DisableKeyboard = 0x01, DisableMouse = 0x02 }</div></li>
<li><div class=fn>enum <a href="#GUIMode-enum"><b>GUIMode</b></a> { NoGui = FALSE, NormalGUI = TRUE, Server }</div></li>
<li><div class=fn>class <a href="#KeyMap"><b>KeyMap</b></a> { }</div></li>
<li><div class=fn>class <a href="#KeyboardFilter"><b>KeyboardFilter</b></a> { }</div></li>
<li><div class=fn>QWSWindow * <a href="#windowAt"><b>windowAt</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos )</div></li>
<li><div class=fn>const QPtrList&lt;QWSWindow&gt; &amp; <a href="#clientWindows"><b>clientWindows</b></a> ()</div></li>
<li><div class=fn>void <a href="#openMouse"><b>openMouse</b></a> ()</div></li>
<li><div class=fn>void <a href="#closeMouse"><b>closeMouse</b></a> ()</div></li>
<li><div class=fn>void <a href="#openKeyboard"><b>openKeyboard</b></a> ()</div></li>
<li><div class=fn>void <a href="#closeKeyboard"><b>closeKeyboard</b></a> ()</div></li>
<li><div class=fn>void <a href="#refresh"><b>refresh</b></a> ()</div></li>
<li><div class=fn>void <a href="#refresh-2"><b>refresh</b></a> ( QRegion&nbsp;&amp;&nbsp;r )</div></li>
<li><div class=fn>void <a href="#enablePainting"><b>enablePainting</b></a> ( bool&nbsp;e )</div></li>
<li><div class=fn>QWSPropertyManager * <a href="#manager"><b>manager</b></a> ()</div></li>
<li><div class=fn>enum <a href="#WindowEvent-enum"><b>WindowEvent</b></a> { Create = 0x01, Destroy = 0x02, Hide = 0x04, Show = 0x08, Raise = 0x10, Lower = 0x20, Geometry = 0x40 }</div></li>
</ul>
<h2>Signals</h2>
<ul>
<li><div class=fn>void <a href="#windowEvent"><b>windowEvent</b></a> ( QWSWindow&nbsp;*&nbsp;w, QWSServer::WindowEvent&nbsp;e )</div></li>
<li><div class=fn>void <b>newChannel</b> ( const QString &amp; )</div></li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li><div class=fn>void <a href="#sendKeyEvent"><b>sendKeyEvent</b></a> ( int&nbsp;unicode, int&nbsp;keycode, int&nbsp;modifiers, bool&nbsp;isPress, bool&nbsp;autoRepeat )</div></li>
<li><div class=fn>const KeyMap * <a href="#keyMap"><b>keyMap</b></a> ()</div></li>
<li><div class=fn>void <a href="#setKeyboardFilter"><b>setKeyboardFilter</b></a> ( KeyboardFilter&nbsp;*&nbsp;f )</div></li>
<li><div class=fn>void <a href="#setDefaultMouse"><b>setDefaultMouse</b></a> ( const&nbsp;char&nbsp;*&nbsp;m )</div></li>
<li><div class=fn>void <a href="#setDefaultKeyboard"><b>setDefaultKeyboard</b></a> ( const&nbsp;char&nbsp;*&nbsp;k )</div></li>
<li><div class=fn>void <a href="#setMaxWindowRect"><b>setMaxWindowRect</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r )</div></li>
<li><div class=fn>void <b>sendMouseEvent</b> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos, int&nbsp;state )</div></li>
<li><div class=fn>void <a href="#setDesktopBackground"><b>setDesktopBackground</b></a> ( const&nbsp;QImage&nbsp;&amp;&nbsp;img )</div></li>
<li><div class=fn>void <a href="#setDesktopBackground-2"><b>setDesktopBackground</b></a> ( const&nbsp;QColor&nbsp;&amp;&nbsp;c )</div></li>
<li><div class=fn>QWSMouseHandler * <a href="#mouseHandler"><b>mouseHandler</b></a> ()</div></li>
<li><div class=fn>QWSKeyboardHandler * <a href="#keyboardHandler"><b>keyboardHandler</b></a> ()</div></li>
<li><div class=fn>void <a href="#setKeyboardHandler"><b>setKeyboardHandler</b></a> ( QWSKeyboardHandler&nbsp;*&nbsp;kh )</div></li>
<li><div class=fn>void <a href="#setScreenSaver"><b>setScreenSaver</b></a> ( QWSScreenSaver&nbsp;*&nbsp;ss )</div></li>
<li><div class=fn>void <a href="#setScreenSaverIntervals"><b>setScreenSaverIntervals</b></a> ( int&nbsp;*&nbsp;ms )</div></li>
<li><div class=fn>void <a href="#setScreenSaverInterval"><b>setScreenSaverInterval</b></a> ( int&nbsp;ms )</div></li>
<li><div class=fn>bool <a href="#screenSaverActive"><b>screenSaverActive</b></a> ()</div></li>
<li><div class=fn>void <a href="#screenSaverActivate"><b>screenSaverActivate</b></a> ( bool&nbsp;activate )</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>



The QWSServer class provides server-specific functionality in Qt/Embedded.
<p> When you run a Qt/Embedded application, it either runs as a server
or connects to an existing server. If it runs as a server, some additional
operations are provided via the QWSServer class.
<p> This class is instantiated by <a href="qapplication.html">QApplication</a> for Qt/Embedded server processes.
You should never construct this class yourself.
<p> A pointer to the QWSServer instance can be obtained via the global
qwsServer variable.
<p> The mouse and keyboard devices can be opened with <a href="#openMouse">openMouse</a>() and
<a href="#openKeyboard">openKeyboard</a>(). (Close them with <a href="#closeMouse">closeMouse</a>() and <a href="#closeKeyboard">closeKeyboard</a>().)
<p> The display is refreshed with <a href="#refresh">refresh</a>(), and painting can be enabled
or disabled with <a href="#enablePainting">enablePainting</a>().
<p> Obtain the list of client windows with <a href="#clientWindows">clientWindows</a>() and find out
which window is at a particular point with <a href="#windowAt">windowAt</a>().
<p> Many static functions are provided, for example,
<a href="#setKeyboardFilter">setKeyboardFilter</a>(), <a href="#setKeyboardHandler">setKeyboardHandler</a>(), <a href="#setDefaultKeyboard">setDefaultKeyboard</a>() and
<a href="#setDefaultMouse">setDefaultMouse</a>().
<p> The size of the window rectangle can be set with <a href="#setMaxWindowRect">setMaxWindowRect</a>(),
and the desktop's background can be set with <a href="#setDesktopBackground">setDesktopBackground</a>().
<p> The screen saver is controlled with <a href="#setScreenSaverInterval">setScreenSaverInterval</a>() and
<a href="#screenSaverActivate">screenSaverActivate</a>().
<p>See also <a href="qws.html">Qt/Embedded</a>.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="GUIMode-enum"></a>QWSServer::GUIMode</h3>

This determines what sort of QWS server to create:
<ul>
<li><tt>QWSServer::NoGui</tt> - This is used for non-graphical Qt applications.
<li><tt>QWSServer::NormalGUI</tt> - A normal Qt/Embedded application (not the server).
<li><tt>QWSServer::Server</tt> - A Qt/Embedded server (e.g. if -qws has been specified
on the command line.
</ul>
<h3 class=fn><a name="ServerFlags-enum"></a>QWSServer::ServerFlags</h3>

This enum is used to pass various options to the window system server.
Currently defined are:
<ul>
<li><tt>QWSServer::DisableKeyboard</tt> - Ignore all keyboard input.
<li><tt>QWSServer::DisableMouse</tt> - Ignore all mouse input.
</ul>
<h3 class=fn><a name="WindowEvent-enum"></a>QWSServer::WindowEvent</h3>

This specifies what sort of event has occurred to a top level window:
<ul>
<li><tt>QWSServer::Create</tt> - A new window has been created (<a href="qwidget.html">QWidget</a> constructor).
<li><tt>QWSServer::Destroy</tt> - The window has been closed and deleted (QWidget destructor).
<li><tt>QWSServer::Hide</tt> - The window has been hidden with <a href="qwidget.html#hide">QWidget::hide</a>().
<li><tt>QWSServer::Show</tt> - The window has been shown with <a href="qwidget.html#show">QWidget::show</a>() or similar.
<li><tt>QWSServer::Raise</tt> - The window has been raised to the top of the desktop.
<li><tt>QWSServer::Lower</tt> - The window has been lowered.
<li><tt>QWSServer::Geometry</tt> - The window has changed size or position.
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QWSServer"></a>QWSServer::QWSServer ( int&nbsp;flags = 0, <a href="qobject.html">QObject</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Construct a QWSServer class with parent <em>parent</em>, called <em>name</em>
and flags <em>flags</em>.
<p> <b>Warning:</b> This class is instantiated by <a href="qapplication.html">QApplication</a> for Qt/Embedded
server processes. You should never construct this class yourself.

<h3 class=fn><a name="~QWSServer"></a>QWSServer::~QWSServer ()
</h3>
Destruct QWSServer

<h3 class=fn>const&nbsp;<a href="qptrlist.html">QPtrList</a>&lt;QWSWindow&gt;&nbsp;&amp; <a name="clientWindows"></a>QWSServer::clientWindows ()
</h3>

<p> Returns the list of top-level windows.  This list will change as
applications add and remove wigdets so it should not be stored for future
use.  The windows are sorted in stacking order from top-most to
bottom-most.

<h3 class=fn>void <a name="closeKeyboard"></a>QWSServer::closeKeyboard ()
</h3>
Closes keyboard device(s).

<h3 class=fn>void <a name="closeMouse"></a>QWSServer::closeMouse ()
</h3>
Closes the pointer device(s).

<h3 class=fn>void <a name="enablePainting"></a>QWSServer::enablePainting ( bool&nbsp;e )
</h3>
If <em>e</em> is TRUE, painting on the display is enabled; if <em>e</em> is
FALSE, painting is disabled.

<h3 class=fn>const&nbsp;<a href="qwsserver::keymap.html">KeyMap</a>&nbsp;* <a name="keyMap"></a>QWSServer::keyMap ()<tt> [static]</tt>
</h3>

<p> Returns the keyboard mapping table used to convert keyboard
scancodes to Qt keycodes and unicode values. It's used by the keyboard
driver in qkeyboard_qws.cpp.

<h3 class=fn><a href="qwskeyboardhandler.html">QWSKeyboardHandler</a>&nbsp;* <a name="keyboardHandler"></a>QWSServer::keyboardHandler ()<tt> [static]</tt>
</h3>
Returns the primary keyboard handler.

<h3 class=fn>QWSPropertyManager * <a name="manager"></a>QWSServer::manager ()
</h3>

<p> Returns the QWSPropertyManager, which is used for implementing
X11-style window properties.

<h3 class=fn><a href="qwsmousehandler.html">QWSMouseHandler</a>&nbsp;* <a name="mouseHandler"></a>QWSServer::mouseHandler ()<tt> [static]</tt>
</h3>
Returns the primary mouse handler.

<h3 class=fn>void <a name="openKeyboard"></a>QWSServer::openKeyboard ()
</h3>
Opens the keyboard device(s).

<h3 class=fn>void <a name="openMouse"></a>QWSServer::openMouse ()
</h3>
Opens the mouse device(s).

<h3 class=fn>void <a name="refresh"></a>QWSServer::refresh ()
</h3>
Refreshes the entire display.

<h3 class=fn>void <a name="refresh-2"></a>QWSServer::refresh ( <a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Refreshes the region <em>r</em>.

<h3 class=fn>void <a name="screenSaverActivate"></a>QWSServer::screenSaverActivate ( bool&nbsp;activate )<tt> [static]</tt>
</h3>
If <em>activate</em> is TRUE the screensaver is activated immediately;
if <em>activate</em> is FALSE the screensaver is deactivated.

<h3 class=fn>bool <a name="screenSaverActive"></a>QWSServer::screenSaverActive ()<tt> [static]</tt>
</h3>
Returns TRUE if the screensaver is active (i.e. the screen is
blanked); otherwise returns FALSE.

<h3 class=fn>void <a name="sendKeyEvent"></a>QWSServer::sendKeyEvent ( int&nbsp;unicode, int&nbsp;keycode, int&nbsp;modifiers, bool&nbsp;isPress, bool&nbsp;autoRepeat )<tt> [static]</tt>
</h3>
Send a key event. You can use this to send key events generated by
"virtual keyboards". <em>unicode</em> is the unicode value of the key to
send, <em>keycode</em> the Qt keycode (e.g. Key_Left), <em>modifiers</em>
indicates whether, Shift/Alt/Ctrl keys are pressed, <em>isPress</em>
is TRUE if this is a key down event and FALSE if it's a key up event,
and <em>autoRepeat</em> is TRUE if this is an autorepeat event (i.e. the
user has held the key down and this is the second or subsequent
key event being sent).

<h3 class=fn>void <a name="setDefaultKeyboard"></a>QWSServer::setDefaultKeyboard ( const&nbsp;char&nbsp;*&nbsp;k )<tt> [static]</tt>
</h3>
Set the keyboard driver to <em>k</em>, e.g. if $QWS_KEYBOARD is not defined.
The default is platform-dependant.

<h3 class=fn>void <a name="setDefaultMouse"></a>QWSServer::setDefaultMouse ( const&nbsp;char&nbsp;*&nbsp;m )<tt> [static]</tt>
</h3>
Set the mouse driver <em>m</em> to use if $QWS_MOUSE_PROTO is not defined.
The default is platform-dependent.

<h3 class=fn>void <a name="setDesktopBackground"></a>QWSServer::setDesktopBackground ( const&nbsp;<a href="qimage.html">QImage</a>&nbsp;&amp;&nbsp;img )<tt> [static]</tt>
</h3>
Sets the image <em>img</em> to be used as the background in the absence of
obscuring windows.

<h3 class=fn>void <a name="setDesktopBackground-2"></a>QWSServer::setDesktopBackground ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp;&nbsp;c )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Sets the color <em>c</em> to be used as the background in the absence of obscuring
windows.

<h3 class=fn>void <a name="setKeyboardFilter"></a>QWSServer::setKeyboardFilter ( <a href="qwsserver::keyboardfilter.html">KeyboardFilter</a>&nbsp;*&nbsp;f )<tt> [static]</tt>
</h3>
Sets a filter <em>f</em> to be invoked for all key events from physical keyboard
drivers (events sent via processKeyEvent()).
The filter is not invoked for keys generated by virtual keyboard
drivers (events sent via <a href="#sendKeyEvent">sendKeyEvent</a>()).

<h3 class=fn>void <a name="setKeyboardHandler"></a>QWSServer::setKeyboardHandler ( <a href="qwskeyboardhandler.html">QWSKeyboardHandler</a>&nbsp;*&nbsp;kh )<tt> [static]</tt>
</h3>
Sets the primary keyboard handler to <em>kh</em>.

<h3 class=fn>void <a name="setMaxWindowRect"></a>QWSServer::setMaxWindowRect ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r )<tt> [static]</tt>
</h3>
Sets the area of the screen which Qt/Embedded applications
will consider to be the maximum area to use for windows to <em>r</em>.
<p> <p>See also <a href="qwidget.html#showMaximized">QWidget::showMaximized</a>().

<h3 class=fn>void <a name="setScreenSaver"></a>QWSServer::setScreenSaver ( QWSScreenSaver&nbsp;*&nbsp;ss )<tt> [static]</tt>
</h3>
Replaces the existing screensave with the screensaver specified in
<em>ss</em>.

<h3 class=fn>void <a name="setScreenSaverInterval"></a>QWSServer::setScreenSaverInterval ( int&nbsp;ms )<tt> [static]</tt>
</h3>
Sets the timeout for the screensaver to <em>ms</em> milliseconds. A setting
of zero turns off the screensaver.

<h3 class=fn>void <a name="setScreenSaverIntervals"></a>QWSServer::setScreenSaverIntervals ( int&nbsp;*&nbsp;ms )<tt> [static]</tt>
</h3>
Sets an array of timeouts for the screensaver to a list of
<em>ms</em> milliseconds. A setting of zero turns off the screensaver.
The array must be 0-terminated.

<h3 class=fn><a href="qwswindow.html">QWSWindow</a>&nbsp;* <a name="windowAt"></a>QWSServer::windowAt ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos )
</h3>
Returns the window containing the point <em>pos</em> or 0 if there is no window
under the point.

<h3 class=fn>void <a name="windowEvent"></a>QWSServer::windowEvent ( <a href="qwswindow.html">QWSWindow</a>&nbsp;*&nbsp;w, <a href="qwsserver.html#WindowEvent-enum">QWSServer::WindowEvent</a>&nbsp;e )<tt> [signal]</tt>
</h3>

<p> This signal is emitted whenever something happens to a top level
window (e.g. it's created or destroyed). <em>w</em> is the window
to which the event of type <em>e</em> has occurred.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>