1QWSServer(3qt)                                                  QWSServer(3qt)
2
3
4

NAME

6       QWSServer - Server-specific functionality in Qt/Embedded
7

SYNOPSIS

9       #include <qwindowsystem_qws.h>
10
11   Public Members
12       QWSServer ( int flags = 0, QObject * parent = 0, const char * name = 0
13           )
14       ~QWSServer ()
15       enum ServerFlags { DisableKeyboard = 0x01, DisableMouse = 0x02 }
16       enum GUIMode { NoGui = FALSE, NormalGUI = TRUE, Server }
17       void sendIMEvent ( IMState state, const QString & txt, int cpos, int
18           selLen )
19       class KeyMap { }
20       class KeyOverride { }
21       class KeyboardFilter { }
22       QWSWindow * windowAt ( const QPoint & pos )
23       const QPtrList<QWSWindow> & clientWindows ()
24       void openMouse ()
25       void closeMouse ()
26       void openKeyboard ()
27       void closeKeyboard ()
28       void refresh ()
29       void refresh ( QRegion & r )
30       void enablePainting ( bool e )
31       QWSPropertyManager * manager ()
32       enum WindowEvent { Create = 0x0001, Destroy = 0x0002, Hide = 0x0004,
33           Show = 0x0008, Raise = 0x0010, Lower = 0x0020, Geometry = 0x0040,
34           Active = 0x0080, Name = 0x0100 }
35
36   Signals
37       void windowEvent ( QWSWindow * w, QWSServer::WindowEvent e )
38       void newChannel ( const QString & channel )
39       void removedChannel ( const QString & channel )
40
41   Static Public Members
42       void sendKeyEvent ( int unicode, int keycode, int modifiers, bool
43           isPress, bool autoRepeat )
44       const KeyMap * keyMap ()
45       void setOverrideKeys ( const KeyOverride * )
46       void setKeyboardFilter ( KeyboardFilter * f )
47       void setDefaultMouse ( const char * m )
48       void setDefaultKeyboard ( const char * k )
49       void setMaxWindowRect ( const QRect & r )
50       void setDesktopBackground ( const QImage & img )
51       void setDesktopBackground ( const QColor & c )
52       QWSMouseHandler * mouseHandler ()
53       QWSKeyboardHandler * keyboardHandler ()
54       void setKeyboardHandler ( QWSKeyboardHandler * kh )
55       void setScreenSaverIntervals ( int * ms )
56       void setScreenSaverInterval ( int ms )
57       bool screenSaverActive ()
58       void screenSaverActivate ( bool activate )
59       void setCursorVisible ( bool vis )
60       bool isCursorVisible ()
61

DESCRIPTION

63       The QWSServer class provides server-specific functionality in
64       Qt/Embedded.
65
66       When you run a Qt/Embedded application, it either runs as a server or
67       connects to an existing server. If it runs as a server, some additional
68       operations are provided by this class.
69
70       This class is instantiated by QApplication for Qt/Embedded server
71       processes. You should never construct this class yourself.
72
73       A pointer to the QWSServer instance can be obtained via the global
74       qwsServer variable.
75
76       The mouse and keyboard devices can be opened with openMouse() and
77       openKeyboard(). (Close them with closeMouse() and closeKeyboard().)
78
79       The display is refreshed with refresh(), and painting can be enabled or
80       disabled with enablePainting().
81
82       Obtain the list of client windows with clientWindows() and find out
83       which window is at a particular point with windowAt().
84
85       Many static functions are provided, for example, setKeyboardFilter(),
86       setKeyboardHandler(), setDefaultKeyboard() and setDefaultMouse().
87
88       The size of the window rectangle can be set with setMaxWindowRect(),
89       and the desktop's background can be set with setDesktopBackground().
90
91       The screen saver is controlled with setScreenSaverInterval() and
92       screenSaverActivate().
93
94       See also Qt/Embedded.
95
96   Member Type Documentation

QWSServer::GUIMode

98       This determines what sort of QWS server to create:
99
100       QWSServer::NoGui - This is used for non-graphical Qt applications.
101
102       QWSServer::NormalGUI - A normal Qt/Embedded application (not the
103       server).
104
105       QWSServer::Server - A Qt/Embedded server (e.g. if -qws has been
106       specified on the command line.
107

QWSServer::ServerFlags

109       This enum is used to pass various options to the window system server.
110
111       QWSServer::DisableKeyboard - Ignore all keyboard input.
112
113       QWSServer::DisableMouse - Ignore all mouse input.
114

QWSServer::WindowEvent

116       This specifies what sort of event has occurred to a top-level window:
117
118       QWSServer::Create - A new window has been created (QWidget
119       constructor).
120
121       QWSServer::Destroy - The window has been closed and deleted (QWidget
122       destructor).
123
124       QWSServer::Hide - The window has been hidden with QWidget::hide().
125
126       QWSServer::Show - The window has been shown with QWidget::show() or
127       similar.
128
129       QWSServer::Raise - The window has been raised to the top of the
130       desktop.
131
132       QWSServer::Lower - The window has been lowered.
133
134       QWSServer::Geometry - The window has changed size or position.
135
136       QWSServer::Active - The window has become the active window (has
137       keyboard focus).
138
139       QWSServer::Name - The window has been named.
140

MEMBER FUNCTION DOCUMENTATION

QWSServer::QWSServer ( int flags = 0, QObject * parent = 0, const char * name

143       = 0 )
144       Construct a QWSServer object.
145
146       Warning: This class is instantiated by QApplication for Qt/Embedded
147       server processes. You should never construct this class yourself.
148
149       The flags are used for keyboard and mouse setting. The server's parent
150       is parent and it is called name.
151

QWSServer::~QWSServer ()

153       Destruct QWSServer
154

const QPtrList<QWSWindow> & QWSServer::clientWindows ()

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

void QWSServer::closeKeyboard ()

162       Closes keyboard device(s).
163

void QWSServer::closeMouse ()

165       Closes the pointer device(s).
166

void QWSServer::enablePainting ( bool e )

168       If e is TRUE, painting on the display is enabled; if e is FALSE,
169       painting is disabled.
170

bool QWSServer::isCursorVisible () [static]

172       Returns TRUE if the cursor is visible; otherwise returns FALSE.
173
174       See also setCursorVisible().
175

const KeyMap * QWSServer::keyMap () [static]

177       Returns the keyboard mapping table used to convert keyboard scancodes
178       to Qt keycodes and Unicode values. It's used by the keyboard driver in
179       qkeyboard_qws.cpp.
180

QWSKeyboardHandler * QWSServer::keyboardHandler () [static]

182       Returns the primary keyboard handler.
183

QWSPropertyManager * QWSServer::manager ()

185       Returns the QWSPropertyManager, which is used for implementing
186       X11-style window properties.
187

QWSMouseHandler * QWSServer::mouseHandler () [static]

189       Returns the primary mouse handler.
190

void QWSServer::newChannel ( const QString & channel ) [signal]

192       This signal is emitted when the QCopChannel channel is created.
193

void QWSServer::openKeyboard ()

195       Opens the keyboard device(s).
196

void QWSServer::openMouse ()

198       Opens the mouse device(s).
199

void QWSServer::refresh ()

201       Refreshes the entire display.
202

void QWSServer::refresh ( QRegion & r )

204       This is an overloaded member function, provided for convenience. It
205       behaves essentially like the above function.
206
207       Refreshes the region r.
208

void QWSServer::removedChannel ( const QString & channel ) [signal]

210       This signal is emitted immediately after the QCopChannel channel is
211       destroyed. Note that a channel is not destroyed until all its listeners
212       have unregistered.
213

void QWSServer::screenSaverActivate ( bool activate ) [static]

215       If activate is TRUE the screensaver is activated immediately; if
216       activate is FALSE the screensaver is deactivated.
217

bool QWSServer::screenSaverActive () [static]

219       Returns TRUE if the screensaver is active (i.e. the screen is blanked);
220       otherwise returns FALSE.
221

void QWSServer::sendIMEvent ( IMState state, const QString & txt, int cpos,

223       int selLen )
224       This function sends an input method event to the server. The current
225       state is passed in state and the current text in txt. The cursor's
226       position in the text is given by cpos, and the selection length (which
227       could be 0) is given in selLen.
228

void QWSServer::sendKeyEvent ( int unicode, int keycode, int modifiers, bool

230       isPress, bool autoRepeat ) [static]
231       Send a key event. You can use this to send key events generated by"
232       virtual keyboards". unicode is the Unicode value of the key to send,
233       keycode the Qt keycode (e.g. Key_Left), modifiers indicates whether,
234       Shift/Alt/Ctrl keys are pressed, isPress is TRUE if this is a key down
235       event and FALSE if it's a key up event, and autoRepeat is TRUE if this
236       is an autorepeat event (i.e. the user has held the key down and this is
237       the second or subsequent key event being sent).
238

void QWSServer::setCursorVisible ( bool vis ) [static]

240       If vis is TRUE, makes the cursor visible; if vis is FALSE, makes the
241       cursor invisible.
242
243       See also isCursorVisible().
244

void QWSServer::setDefaultKeyboard ( const char * k ) [static]

246       Set the keyboard driver to k, e.g. if $QWS_KEYBOARD is not defined. The
247       default is platform-dependent.
248

void QWSServer::setDefaultMouse ( const char * m ) [static]

250       Set the mouse driver m to use if $QWS_MOUSE_PROTO is not defined. The
251       default is platform-dependent.
252

void QWSServer::setDesktopBackground ( const QImage & img ) [static]

254       Sets the image img to be used as the background in the absence of
255       obscuring windows.
256

void QWSServer::setDesktopBackground ( const QColor & c ) [static]

258       This is an overloaded member function, provided for convenience. It
259       behaves essentially like the above function.
260
261       Sets the color c to be used as the background in the absence of
262       obscuring windows.
263

void QWSServer::setKeyboardFilter ( KeyboardFilter * f ) [static]

265       Adds a filter f to be invoked for all key events from physical keyboard
266       drivers (events sent via processKeyEvent()).
267
268       The filter is not invoked for keys generated by virtual keyboard
269       drivers (events sent via sendKeyEvent()).
270
271       If f is 0, the most-recently added filter is removed and deleted. The
272       caller is responsible for matching each addition with a corresponding
273       removal.
274

void QWSServer::setKeyboardHandler ( QWSKeyboardHandler * kh ) [static]

276       Sets the primary keyboard handler to kh.
277

void QWSServer::setMaxWindowRect ( const QRect & r ) [static]

279       Sets the area of the screen which Qt/Embedded applications will
280       consider to be the maximum area to use for windows to r.
281
282       See also QWidget::showMaximized().
283

void QWSServer::setScreenSaverInterval ( int ms ) [static]

285       Sets the timeout for the screensaver to ms milliseconds. A setting of
286       zero turns off the screensaver.
287

void QWSServer::setScreenSaverIntervals ( int * ms ) [static]

289       Sets an array of timeouts for the screensaver to a list of ms
290       milliseconds. A setting of zero turns off the screensaver. The array
291       must be 0-terminated.
292

QWSWindow * QWSServer::windowAt ( const QPoint & pos )

294       Returns the window containing the point pos or 0 if there is no window
295       under the point.
296

void QWSServer::windowEvent ( QWSWindow * w, QWSServer::WindowEvent e )

298       [signal]
299       This signal is emitted whenever something happens to a top-level window
300       (e.g. it's created or destroyed). w is the window to which the event of
301       type e has occurred.
302
303

SEE ALSO

305       http://doc.trolltech.com/qwsserver.html
306       http://www.trolltech.com/faq/tech.html
307
309       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
310       license file included in the distribution for a complete license
311       statement.
312

AUTHOR

314       Generated automatically from the source code.
315

BUGS

317       If you find a bug in Qt, please report it as described in
318       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
319       help you. Thank you.
320
321       The definitive Qt documentation is provided in HTML format; it is
322       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
323       web browser. This man page is provided as a convenience for those users
324       who prefer man pages, although this format is not officially supported
325       by Trolltech.
326
327       If you find errors in this manual page, please report them to qt-
328       bugs@trolltech.com.  Please include the name of the manual page
329       (qwsserver.3qt) and the Qt version (3.3.8).
330
331
332
333Trolltech AS                    2 February 2007                 QWSServer(3qt)
Impressum