QWSServer(3qt)
π QWSServer β the QWSServer(3qt) page, but make it make sense π
okay bestie, so this is QWSServer(3qt) and it's a lot, but we're gonna get through it together. grab a snack. π
β¨ NAME β¨
QWSServer β server-specific functionality in Qt/Embedded
πΈ SYNOPSIS πΈ
#include <qwindowsystem_qws.h>
π Public Members
QWSServer ( int flags = 0, QObject * parent = 0, const char * name = 0 )
~QWSServer ()
enum ServerFlags { DisableKeyboard = 0x01, DisableMouse = 0x02 }
enum GUIMode { NoGui = FALSE, NormalGUI = TRUE, Server }
void sendIMEvent ( IMState state, const QString & txt, int cpos, int
selLen )
class KeyMap { }
class KeyOverride { }
class KeyboardFilter { }
QWSWindow * windowAt ( const QPoint & pos )
const QPtrList<QWSWindow> & clientWindows ()
void openMouse ()
void closeMouse ()
void openKeyboard ()
void closeKeyboard ()
void refresh ()
void refresh ( QRegion & r )
void enablePainting ( bool e )
QWSPropertyManager * manager ()
enum WindowEvent { Create = 0x0001, Destroy = 0x0002, Hide = 0x0004,
Show = 0x0008, Raise = 0x0010, Lower = 0x0020, Geometry = 0x0040,
Active = 0x0080, Name = 0x0100 }
π« Signals
void windowEvent ( QWSWindow * w, QWSServer::WindowEvent e )
void newChannel ( const QString & channel )
void removedChannel ( const QString & channel )
π¦ Static Public Members
void sendKeyEvent ( int unicode, int keycode, int modifiers, bool
isPress, bool autoRepeat )
const KeyMap * keyMap ()
void setOverrideKeys ( const KeyOverride * )
void setKeyboardFilter ( KeyboardFilter * f )
void setDefaultMouse ( const char * m )
void setDefaultKeyboard ( const char * k )
void setMaxWindowRect ( const QRect & r )
void setDesktopBackground ( const QImage & img )
void setDesktopBackground ( const QColor & c )
QWSMouseHandler * mouseHandler ()
QWSKeyboardHandler * keyboardHandler ()
void setKeyboardHandler ( QWSKeyboardHandler * kh )
void setScreenSaverIntervals ( int * ms )
void setScreenSaverInterval ( int ms )
bool screenSaverActive ()
void screenSaverActivate ( bool activate )
void setCursorVisible ( bool vis )
bool isCursorVisible ()
π DESCRIPTION π
The QWSServer class provides server-specific functionality in Qt/Embedded. like, it's the whole backstage pass for the window system, bestie. ποΈ
So here's the vibe: 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 by this class.
π¨ This class is instantiated by QApplication for Qt/Embedded server processes. You should never construct this class yourself. hands off. let it do its thing. π
A pointer to the QWSServer instance can be obtained via the global qwsServer variable. that's your in. π«Ά
The mouse and keyboard devices can be opened with openMouse() and openKeyboard(). (Close them with closeMouse() and closeKeyboard().) π
The display is refreshed with refresh(), and painting can be enabled or disabled with enablePainting(). β¨
Obtain the list of client windows with clientWindows() and find out which window is at a particular point with windowAt(). π
Many static functions are provided, for example, setKeyboardFilter(), setKeyboardHandler(), setDefaultKeyboard() and setDefaultMouse().
The size of the window rectangle can be set with setMaxWindowRect(), and the desktop's background can be set with setDesktopBackground(). π
The screen saver is controlled with setScreenSaverInterval() and screenSaverActivate(). π΄
See also Qt/Embedded.
π§ Member Type Documentation π§
π QWSServer::GUIMode
This determines what sort of QWS server to create:
QWSServer::NoGuiβ This is used for non-graphical Qt applications.QWSServer::NormalGUIβ A normal Qt/Embedded application (not the server).QWSServer::Serverβ A Qt/Embedded server (e.g. if-qwshas been specified on the command line.
π QWSServer::ServerFlags
This enum is used to pass various options to the window system server.
QWSServer::DisableKeyboardβ Ignore all keyboard input.QWSServer::DisableMouseβ Ignore all mouse input.
π QWSServer::WindowEvent
This specifies what sort of event has occurred to a top-level window:
QWSServer::Createβ A new window has been created (QWidgetconstructor).QWSServer::Destroyβ The window has been closed and deleted (QWidgetdestructor).QWSServer::Hideβ The window has been hidden withQWidget::hide().QWSServer::Showβ The window has been shown withQWidget::show()or similar.QWSServer::Raiseβ The window has been raised to the top of the desktop.QWSServer::Lowerβ The window has been lowered.QWSServer::Geometryβ The window has changed size or position.QWSServer::Activeβ The window has become the active window (has keyboard focus).QWSServer::Nameβ The window has been named.
π₯ MEMBER FUNCTION DOCUMENTATION π₯
π QWSServer::QWSServer ( int flags = 0, QObject * parent = 0, const char * name = 0 )
Construct a QWSServer object.
β οΈ Warning: This class is instantiated by QApplication for Qt/Embedded server processes. You should never construct this class yourself. fr fr, don't do it. π
The flags are used for keyboard and mouse setting. The server's parent is parent and it is called name.
π QWSServer::~QWSServer ()
Destruct QWSServer
π const QPtrList<QWSWindow> & QWSServer::clientWindows ()
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.
π«Ά psst β yes it says "wigdets", that's the original's typo, we don't gatekeep, we just report. and no, don't store this list, it's giving "live feed", not "screenshot". π
π void QWSServer::closeKeyboard ()
Closes keyboard device(s).
π void QWSServer::closeMouse ()
Closes the pointer device(s).
π void QWSServer::enablePainting ( bool e )
If e is TRUE, painting on the display is enabled; if e is FALSE, painting is disabled. ποΈ
π bool QWSServer::isCursorVisible () [static]
Returns TRUE if the cursor is visible; otherwise returns FALSE.
See also setCursorVisible().
π const KeyMap * QWSServer::keyMap () [static]
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.
π QWSKeyboardHandler * QWSServer::keyboardHandler () [static]
Returns the primary keyboard handler.
π QWSPropertyManager * QWSServer::manager ()
Returns the QWSPropertyManager, which is used for implementing X11-style window properties. π
π QWSMouseHandler * QWSServer::mouseHandler () [static]
Returns the primary mouse handler.
π void QWSServer::newChannel ( const QString & channel ) [signal]
This signal is emitted when the QCopChannel channel is created.
π void QWSServer::openKeyboard ()
Opens the keyboard device(s).
π void QWSServer::openMouse ()
Opens the mouse device(s).
π void QWSServer::refresh ()
Refreshes the entire display. β¨
π void QWSServer::refresh ( QRegion & r )
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Refreshes the region r.
π void QWSServer::removedChannel ( const QString & channel ) [signal]
This signal is emitted immediately after the QCopChannel channel is destroyed. Note that a channel is not destroyed until all its listeners have unregistered.
π important detail: "immediately after ... destroyed" and "not destroyed until all its listeners have unregistered". both of those. don't skip. π
π void QWSServer::screenSaverActivate ( bool activate ) [static]
If activate is TRUE the screensaver is activated immediately; if activate is FALSE the screensaver is deactivated.
π bool QWSServer::screenSaverActive () [static]
Returns TRUE if the screensaver is active (i.e. the screen is blanked); otherwise returns FALSE.
π void QWSServer::sendIMEvent ( IMState state, const QString & txt, int cpos, int selLen )
This function sends an input method event to the server. The current state is passed in state and the current text in txt. The cursor's position in the text is given by cpos, and the selection length (which could be 0) is given in selLen.
π void QWSServer::sendKeyEvent ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [static]
Send a key event. You can use this to send key events generated by" virtual keyboards". unicode is the Unicode value of the key to send, keycode the Qt keycode (e.g. Key_Left), modifiers indicates whether, Shift/Alt/Ctrl keys are pressed, isPress is TRUE if this is a key down event and FALSE if it's a key up event, and autoRepeat 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).
π void QWSServer::setCursorVisible ( bool vis ) [static]
If vis is TRUE, makes the cursor visible; if vis is FALSE, makes the cursor invisible.
See also isCursorVisible().
π void QWSServer::setDefaultKeyboard ( const char * k ) [static]
Set the keyboard driver to k, e.g. if $QWS_KEYBOARD is not defined. The default is platform-dependent.
π void QWSServer::setDefaultMouse ( const char * m ) [static]
Set the mouse driver m to use if $QWS_MOUSE_PROTO is not defined. The default is platform-dependent.
π void QWSServer::setDesktopBackground ( const QImage & img ) [static]
Sets the image img to be used as the background in the absence of obscuring windows. πΌοΈ
π void QWSServer::setDesktopBackground ( const QColor & c ) [static]
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Sets the color c to be used as the background in the absence of obscuring windows. π
π void QWSServer::setKeyboardFilter ( KeyboardFilter * f ) [static]
Adds a filter f 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 sendKeyEvent()).
If f is 0, the most-recently added filter is removed and deleted. The caller is responsible for matching each addition with a corresponding removal.
π the pairing thing is real: one add, one remove, you hold that accountability. no cap.
π void QWSServer::setKeyboardHandler ( QWSKeyboardHandler * kh ) [static]
Sets the primary keyboard handler to kh.
π void QWSServer::setMaxWindowRect ( const QRect & r ) [static]
Sets the area of the screen which Qt/Embedded applications will consider to be the maximum area to use for windows to r.
See also QWidget::showMaximized().
π void QWSServer::setScreenSaverInterval ( int ms ) [static]
Sets the timeout for the screensaver to ms milliseconds. A setting of zero turns off the screensaver.
π void QWSServer::setScreenSaverIntervals ( int * ms ) [static]
Sets an array of timeouts for the screensaver to a list of ms milliseconds. A setting of zero turns off the screensaver. The array must be 0-terminated.
π QWSWindow * QWSServer::windowAt ( const QPoint & pos )
Returns the window containing the point pos or 0 if there is no window under the point.
π void QWSServer::windowEvent ( QWSWindow * w, QWSServer::WindowEvent e ) [signal]
This signal is emitted whenever something happens to a top-level window (e.g. it's created or destroyed). w is the window to which the event of type e has occurred.
π SEE ALSO π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.
okay bestie, the full legal tea is in the license file that ships with the distribution β go read that for the complete license statement. no cap, it's all there. π
β¨ AUTHOR β¨
Generated automatically from the source code.
like... the manpage wrote itself? iconic behavior honestly. it was never a human, it just vibed out of the source. π
π BUGS π
found a bug in Qt? not me gatekeeping that β please report it exactly how they describe it at http://doc.trolltech.com/bughowto.html. good bug reports literally help them help you. thank you!! π«Ά
the definitive Qt documentation lives in HTML format at $QTDIR/doc/html, and you can read it with Qt Assistant or just, y'know, a web browser. this man page? it's a convenience for the girlies who prefer man pages, although this format is not officially supported by Trolltech. so like, it's giving β¨bonus contentβ¨, not the canon text. π
and if you spot errors in this manual page, report them to qt-bugs@trolltech.com β and please include:
- the name of the manual page:
qwsserver.3qt - the Qt version:
3.3.8
that's it, that's the whole ask. drop those two facts and you're doing the lord's work. π
lowkey the most important part: bugs and manpage typos are a whole separate address from each other, bestie. don't mix them up. π
Trolltech AS Β· 2 February 2007 Β· QWSServer(3qt)
and that's the page, bestie!! π¦π thanks for reading all the way to the bottom, that's main character energy fr fr. go report those bugs, keep your man pages close, and remember: the vibe changes, the facts never do. periodt. π β¨πΈ
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms