Qt 4.8
|
The QWSServer class encapsulates a server process in Qt for Embedded Linux. More...
#include <qwindowsystem_qws.h>
Classes | |
class | KeyboardFilter |
The KeyboardFilter class is a base class for global keyboard event filters in Qt for Embedded Linux. More... | |
Public Types | |
enum | IMMouse { MousePress, MouseRelease, MouseMove, MouseOutside } |
This enum describes the various types of mouse events recognized by the QWSInputMethod::mouseHandler() function. More... | |
enum | ServerFlags { DisableKeyboard = 0x01, DisableMouse = 0x02 } |
This enum is used to pass various options to the window system server. More... | |
enum | WindowEvent { Create =0x0001, Destroy =0x0002, Hide =0x0004, Show =0x0008, Raise =0x0010, Lower =0x0020, Geometry =0x0040, Active = 0x0080, Name =0x0100 } |
This enum specifies the various events that can occur in a top-level window. More... | |
Signals | |
void | markedText (const QString &) |
This signal is emitted whenever some text is selected in any of the running applications, passing the selected text in the selection parameter. More... | |
void | newChannel (const QString &channel) |
This signal is emitted whenever a new QCopChannel object is created, passing the channel's name in the channel parameter. More... | |
void | removedChannel (const QString &channel) |
This signal is emitted immediately after the given the QCopChannel object specified by channel, is destroyed. More... | |
void | windowEvent (QWSWindow *w, QWSServer::WindowEvent e) |
This signal is emitted whenever something happens to a top-level window (e.g., it's created or destroyed), passing a pointer to the window and the event's type in the window and eventType parameters, respectively. More... | |
Signals inherited from QObject | |
void | destroyed (QObject *=0) |
This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More... | |
Public Functions | |
const QBrush & | backgroundBrush () const |
Returns the brush used as background in the absence of obscuring windows. More... | |
const QList< QWSWindow * > & | clientWindows () |
Returns the list of current top-level windows. More... | |
void | closeKeyboard () |
Closes all the keyboard devices (specified by the QWS_KEYBOARD environment variable) by deleting the associated keyboard drivers. More... | |
void | closeMouse () |
Closes all pointer devices (specified by the QWS_MOUSE_PROTO environment variable) by deleting the associated mouse drivers. More... | |
void | enablePainting (bool) |
Enables painting onto the screen if enable is true; otherwise painting is disabled. More... | |
void | openKeyboard () |
Opens the keyboard devices specified by the QWS_KEYBOARD environment variable. More... | |
void | openMouse () |
Opens the mouse devices specified by the QWS_MOUSE_PROTO environment variable. More... | |
QWSServer (int flags=0, QObject *parent=0) | |
void | refresh () |
Refreshes the display by making the screen driver update the entire display. More... | |
void | refresh (QRegion &) |
Refreshes the given region of the display. More... | |
void | resumeMouse () |
Resumes pointer handling by reactivating all the mouse drivers registered by the QWS_MOUSE_PROTO environment variable. More... | |
void | sendIMEvent (const QInputMethodEvent *) |
Sends the given input method event. More... | |
void | sendIMQuery (int property) |
Sends an input method query for the given property. More... | |
void | sendPropertyNotifyEvent (int property, int state) |
void | suspendMouse () |
Suspends pointer handling by deactivating all the mouse drivers registered by the QWS_MOUSE_PROTO environment variable. More... | |
QWSWindow * | windowAt (const QPoint &pos) |
Returns the window containing the given position. More... | |
~QWSServer () | |
Destructs this server. More... | |
Public Functions inherited from QObject | |
bool | blockSignals (bool b) |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More... | |
const QObjectList & | children () const |
Returns a list of child objects. More... | |
bool | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0) |
bool | disconnect (const QObject *receiver, const char *member=0) |
void | dumpObjectInfo () |
Dumps information about signal connections, etc. More... | |
void | dumpObjectTree () |
Dumps a tree of children to the debug output. More... | |
QList< QByteArray > | dynamicPropertyNames () const |
Returns the names of all properties that were dynamically added to the object using setProperty(). More... | |
virtual bool | event (QEvent *) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. More... | |
virtual bool | eventFilter (QObject *, QEvent *) |
Filters events if this object has been installed as an event filter for the watched object. More... | |
template<typename T > | |
T | findChild (const QString &aName=QString()) const |
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More... | |
template<typename T > | |
QList< T > | findChildren (const QString &aName=QString()) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More... | |
template<typename T > | |
QList< T > | findChildren (const QRegExp &re) const |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More... | |
void | installEventFilter (QObject *) |
Installs an event filter filterObj on this object. More... | |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false. More... | |
void | killTimer (int id) |
Kills the timer with timer identifier, id. More... | |
virtual const QMetaObject * | metaObject () const |
Returns a pointer to the meta-object of this object. More... | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. More... | |
QString | objectName () const |
QObject * | parent () const |
Returns a pointer to the parent object. More... | |
QVariant | property (const char *name) const |
Returns the value of the object's name property. More... | |
Q_INVOKABLE | QObject (QObject *parent=0) |
Constructs an object with parent object parent. More... | |
void | removeEventFilter (QObject *) |
Removes an event filter object obj from this object. More... | |
void | setObjectName (const QString &name) |
void | setParent (QObject *) |
Makes the object a child of parent. More... | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. More... | |
void | setUserData (uint id, QObjectUserData *data) |
bool | signalsBlocked () const |
Returns true if signals are blocked; otherwise returns false. More... | |
int | startTimer (int interval) |
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More... | |
QThread * | thread () const |
Returns the thread in which the object lives. More... | |
QObjectUserData * | userData (uint id) const |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. More... | |
Static Public Functions | |
static void | addKeyboardFilter (KeyboardFilter *f) |
Activates the given keyboard filter all key events generated by physical keyboard drivers (i.e., events sent using the processKeyEvent() function). More... | |
static void | beginDisplayReconfigure () |
static void | closedown () |
static void | endDisplayReconfigure () |
static QWSServer * | instance () |
static bool | isCursorVisible () |
Returns true if the cursor is visible; otherwise returns false. More... | |
static QWSKeyboardHandler * | keyboardHandler () |
Returns the primary keyboard driver. More... | |
static QWSMouseHandler * | mouseHandler () |
Returns the primary mouse driver. More... | |
static const QList< QWSMouseHandler * > & | mouseHandlers () |
Returns list of all mouse handlers. More... | |
static void | processEventQueue () |
static void | processKeyEvent (int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat) |
Processes the given key event. More... | |
static void | removeKeyboardFilter () |
Removes and deletes the most recently added filter. More... | |
static void | resetInputMethod () |
static void | screenSaverActivate (bool) |
Activates the screen saver if activate is true; otherwise it is deactivated. More... | |
static bool | screenSaverActive () |
Returns true if the screen saver is active; otherwise returns false. More... | |
static void | sendKeyEvent (int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat) |
Sends the given key event. More... | |
static void | sendMouseEvent (const QPoint &pos, int state, int wheel=0) |
Send a mouse event. More... | |
static void | setBackground (const QBrush &) |
Sets the brush used as background in the absence of obscuring windows, to be the given brush. More... | |
static void | setCurrentInputMethod (QWSInputMethod *im) |
Sets the current input method to be the given method. More... | |
static void | setCursorVisible (bool) |
Shows the cursor if visible is true: otherwise the cursor is hidden. More... | |
static void | setDefaultKeyboard (const char *) |
Sets the keyboard driver that will be used if the QWS_KEYBOARD environment variable is not defined, to be the given keyboardDriver. More... | |
static void | setDefaultMouse (const char *) |
Sets the mouse driver that will be used if the QWS_MOUSE_PROTO environment variable is not defined, to be the given mouseDriver. More... | |
static void | setKeyboardHandler (QWSKeyboardHandler *kh) |
Sets the primary keyboard driver to be the given driver. More... | |
static void | setMaxWindowRect (const QRect &) |
Sets the maximum area of the screen that Qt for Embedded Linux applications can use, to be the given rectangle. More... | |
static void | setMouseHandler (QWSMouseHandler *) |
Sets the primary mouse driver to be the given driver. More... | |
static void | setScreenSaver (QWSScreenSaver *) |
Installs the given screenSaver, deleting the current screen saver. More... | |
static void | setScreenSaverBlockLevel (int) |
Block the key or mouse event that wakes the system from level eventBlockLevel or higher. More... | |
static void | setScreenSaverInterval (int) |
Sets the timeout interval for the screensaver to the specified milliseconds. More... | |
static void | setScreenSaverIntervals (int *ms) |
Specifies the time intervals (in milliseconds) between the different levels of screen responsiveness. More... | |
static void | startup (int flags) |
static QList< QWSInternalWindowInfo * > * | windowList () |
Static Public Functions inherited from QObject | |
static bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More... | |
static bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
Disconnects signal in object sender from method in object receiver. More... | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static uint | registerUserData () |
static QString | tr (const char *sourceText, const char *comment=0, int n=-1) |
static QString | trUtf8 (const char *sourceText, const char *comment=0, int n=-1) |
Static Public Variables | |
static QPoint | mousePosition |
Static Public Variables inherited from QObject | |
static const QMetaObject | staticMetaObject |
This variable stores the meta-object for the class. More... | |
Protected Functions | |
void | timerEvent (QTimerEvent *e) |
Protected Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *) |
This event handler can be reimplemented in a subclass to receive child events. More... | |
virtual void | connectNotify (const char *signal) |
This virtual function is called when something has been connected to signal in this object. More... | |
virtual void | customEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive custom events. More... | |
virtual void | disconnectNotify (const char *signal) |
This virtual function is called when something has been disconnected from signal in this object. More... | |
QObject (QObjectPrivate &dd, QObject *parent=0) | |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. More... | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More... | |
int | senderSignalIndex () const |
Private Functions | |
void | updateWindowRegions () const |
Friends | |
class | QApplicationPrivate |
class | QCopChannel |
class | QWSDisplay |
class | QWSInputMethod |
class | QWSMouseHandler |
class | QWSWindow |
Additional Inherited Members | |
Public Slots inherited from QObject | |
void | deleteLater () |
Schedules this object for deletion. More... | |
Protected Variables inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Static Protected Variables inherited from QObject | |
static const QMetaObject | staticQtMetaObject |
Related Functions inherited from QObject | |
T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QRegExp ®Exp)() |
T * | qobject_cast (QObject *object) |
QObjectList | |
void * | qt_find_obj_child (QObject *parent, const char *type, const QString &name) |
Returns a pointer to the object named name that inherits type and with a given parent. More... | |
The QWSServer class encapsulates a server process in Qt for Embedded Linux.
When you run a Qt for Embedded Linux application, it either runs as a server or connects to an existing server. The server and client processes have different responsibilities: The client process performs all application specific operations. The server process is responsible for managing the clients as well as taking care of the pointer handling, character input, and screen output. In addition, the server provides functionality to handle input methods.
In Qt for Embedded Linux, all system generated events are passed to the server application which then propagates the event to the appropriate client. See the Qt for Embedded Linux Architecture documentation for details.
Note that this class is instantiated by QApplication for Qt for Embedded Linux server processes; you should never construct this class yourself. Use the instance() function to retrieve a pointer to the server object.
Note that the static functions of the QWSServer class can only be used in the server process.
As applications add and remove windows, the server process maintains information about each window. In Qt for Embedded Linux, top-level windows are encapsulated as QWSWindow objects. Each window can tell which client that owns it through its QWSWindow::client() function. Use the clientWindows() function to retrieve a list of the current top-level windows. Given a particular position on the display, the window containing it can be retrieved using the windowAt() function.
QWSServer also provides the windowEvent() signal which is emitted whenever something happens to a top level window; the WindowEvent enum describes the various types of events that the signal recognizes. In addition, the server class provides the markedText() signal which is emitted whenever some text has been selected in any of the windows, passing the selection as parameter.
The QCopChannel class and the QCOP communication protocol enable transfer of messages between clients. QWSServer provides the newChannel() and removedChannel() signals that is emitted whenever a new QCopChannel object is created or destroyed, respectively.
See also: QWSWindow, QWSClient and QCopChannel.
The mouse driver (represented by an instance of the QWSMouseHandler class) is loaded by the server application when it starts running, using Qt's How to Create Qt Plugins. A mouse driver receives mouse events from the device and encapsulates each event with an instance of the QWSEvent class which it then passes to the server.
The openMouse() function opens the mouse devices specified by the QWS_MOUSE_PROTO environment variable, and the setMouseHandler() functions sets the primary mouse driver. Alternatively, the static setDefaultMouse() function provides means of specifying the mouse driver to use if the QWS_MOUSE_PROTO variable is not defined (note that the default is otherwise platform dependent). The primary mouse driver can be retrieved using the static mouseHandler() function. Use the closeMouse() function to delete the mouse drivers.
In addition, the QWSServer class can control the flow of mouse input using the suspendMouse() and resumeMouse() functions.
See also: QWSMouseHandler and Qt for Embedded Linux Pointer Handling.
The keyboard driver (represented by an instance of the QWSKeyboardHandler class) is loaded by the server application when it starts running, using Qt's How to Create Qt Plugins. A keyboard driver receives keyboard events from the device and encapsulates each event with an instance of the QWSEvent class which it then passes to the server.
The openKeyboard() function opens the keyboard devices specified by the QWS_KEYBOARD environment variable, and the setKeyboardHandler() functions sets the primary keyboard driver. Alternatively, the static setDefaultKeyboard() function provides means of specifying the keyboard driver to use if the QWS_KEYBOARD variable is not defined (note again that the default is otherwise platform dependent). The primary keyboard driver can be retrieved using the static keyboardHandler() function. Use the closeKeyboard() function to delete the keyboard drivers.
In addition, the QWSServer class can handle key events from both physical and virtual keyboards using the processKeyEvent() and sendKeyEvent() functions, respectively. Use the addKeyboardFilter() function to filter the key events from physical keyboard drivers, the most recently added filter can be removed and deleted using the removeKeyboardFilter() function.
See also: QWSKeyboardHandler and Qt for Embedded Linux Character Input.
When a screen update is required, the server runs through all the top-level windows that intersect with the region that is about to be updated, and ensures that the associated clients have updated their memory buffer. Then the server uses the screen driver (represented by an instance of the QScreen class) to copy the content of the memory to the screen.
In addition, the QWSServer class provides some means of managing the screen output: Use the refresh() function to refresh the entire display, or alternatively a specified region of it. The enablePainting() function can be used to disable (and enable) painting onto the screen. QWSServer also provide the setMaxWindowRect() function restricting the area of the screen which Qt for Embedded Linux applications will consider to be the maximum area to use for windows. To set the brush used as the background in the absence of obscuring windows, QWSServer provides the static setBackground() function. The corresponding backgroundBrush() function returns the currently set brush.
QWSServer also controls the screen saver: Use the setScreenSaver() to install a custom screen saver derived from the QWSScreenSaver class. Once installed, the screensaver can be activated using the screenSaverActivate() function, and the screenSaverActive() function returns its current status. Use the setScreenSaverInterval() function to specify the timeout interval. Qt for Embedded Linux also supports multilevel screen saving, use the setScreenSaverIntervals() function to specify the various levels and their timeout intervals.
Finally, the QWSServer class controls the cursor's appearance, i.e., use the setCursorVisible() function to hide or show the cursor, and the isCursorVisible() function to determine whether the cursor is visible on the display or not.
See also: QScreen and Qt for Embedded Linux Display Management.
Whenever the server receives an event, it queries its stack of top-level windows to find the window containing the event's position (each window can identify the client application that created it). Then the server forwards the event to the appropriate client. If an input method is installed, it is used as a filter between the server and the client application.
Derive from the QWSInputMethod class to create custom input methods, and use the server's setCurrentInputMethod() function to install it. Use the sendIMEvent() and sendIMQuery() functions to send input method events and queries.
QWSServer provides the IMMouse enum describing the various mouse events recognized by the QWSInputMethod::mouseHandler() function. The latter function allows subclasses of QWSInputMethod to handle mouse events within the preedit text.
Definition at line 209 of file qwindowsystem_qws.h.
enum QWSServer::IMMouse |
This enum describes the various types of mouse events recognized by the QWSInputMethod::mouseHandler() function.
Enumerator | |
---|---|
MousePress | |
MouseRelease | |
MouseMove | |
MouseOutside |
Definition at line 240 of file qwindowsystem_qws.h.
This enum is used to pass various options to the window system server.
Enumerator | |
---|---|
DisableKeyboard | |
DisableMouse |
Definition at line 224 of file qwindowsystem_qws.h.
This enum specifies the various events that can occur in a top-level window.
Enumerator | |
---|---|
Create | |
Destroy | |
Hide | |
Show | |
Raise | |
Lower | |
Geometry | |
Active | |
Name |
Definition at line 324 of file qwindowsystem_qws.h.
|
explicit |
Construct a QWSServer object with the given parent. The flags are used for keyboard and mouse settings.
Definition at line 1399 of file qwindowsystem_qws.cpp.
QWSServer::~QWSServer | ( | ) |
Destructs this server.
Definition at line 1563 of file qwindowsystem_qws.cpp.
|
static |
Activates the given keyboard filter all key events generated by physical keyboard drivers (i.e., events sent using the processKeyEvent() function).
Note that the filter is not invoked for keys generated by virtual keyboard drivers (i.e., events sent using the sendKeyEvent() function).
Note that this function can only be used in the server process.
Definition at line 4294 of file qwindowsystem_qws.cpp.
const QBrush & QWSServer::backgroundBrush | ( | ) | const |
Returns the brush used as background in the absence of obscuring windows.
Definition at line 4113 of file qwindowsystem_qws.cpp.
Referenced by QScreen::compose(), and QScreen::paintBackground().
|
static |
Definition at line 2700 of file qwindowsystem_qws.cpp.
Returns the list of current top-level windows.
Note that the collection of top-level windows changes as applications add and remove widgets so it should not be stored for future use. The windows are sorted in stacking order from top-most to bottom-most.
Use the QWSWindow::client() function to retrieve the client application that owns a given window.
Definition at line 1586 of file qwindowsystem_qws.cpp.
Referenced by QScreen::compose(), QDirectFBScreen::exposeRegion(), QScreen::exposeRegion(), and QWSTtyKbPrivate::handleConsoleSwitch().
|
static |
Definition at line 4207 of file qwindowsystem_qws.cpp.
Referenced by qt_cleanup(), and QWSServerCleaner::~QWSServerCleaner().
void QWSServer::closeKeyboard | ( | ) |
Closes all the keyboard devices (specified by the QWS_KEYBOARD environment variable) by deleting the associated keyboard drivers.
Definition at line 3841 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::emergency_cleanup(), openKeyboard(), and ~QWSServer().
void QWSServer::closeMouse | ( | ) |
Closes all pointer devices (specified by the QWS_MOUSE_PROTO environment variable) by deleting the associated mouse drivers.
Definition at line 3725 of file qwindowsystem_qws.cpp.
Referenced by openMouse(), and ~QWSServer().
void QWSServer::enablePainting | ( | bool | enable | ) |
Enables painting onto the screen if enable is true; otherwise painting is disabled.
Definition at line 2169 of file qwindowsystem_qws.cpp.
Referenced by beginDisplayReconfigure(), QVNCServer::discardClient(), endDisplayReconfigure(), QWSTtyKbPrivate::handleConsoleSwitch(), QVNCScreen::initDevice(), and QVNCServer::newConnection().
|
static |
Definition at line 2714 of file qwindowsystem_qws.cpp.
|
inlinestatic |
Returns a pointer to the server instance.
Note that the pointer will be 0 if the application is not the server, i.e., if the QApplication::type() function doesn't return QApplication::GuiServer.
Definition at line 234 of file qwindowsystem_qws.h.
Referenced by QVNCServer::discardClient(), QDirectFBScreen::exposeRegion(), QWSTtyKbPrivate::handleConsoleSwitch(), QVNCScreen::initDevice(), QDirectFBScreen::initDevice(), QFontDatabasePrivate::loadFromCache(), QVNCServer::newConnection(), QDirectFBScreenPrivate::QDirectFBScreenPrivate(), and QApplicationPrivate::setScreenTransformation().
|
static |
Returns true if the cursor is visible; otherwise returns false.
Note that this function can only be used in the server process.
Definition at line 2778 of file qwindowsystem_qws.cpp.
|
static |
Returns the primary keyboard driver.
Note that this function can only be used in the server process.
Definition at line 3855 of file qwindowsystem_qws.cpp.
|
signal |
This signal is emitted whenever some text is selected in any of the running applications, passing the selected text in the selection parameter.
|
static |
Returns the primary mouse driver.
Note that this function can only be used in the server process.
Definition at line 2494 of file qwindowsystem_qws.cpp.
|
static |
Returns list of all mouse handlers.
Note that this function can only be used in the server process.
Definition at line 2513 of file qwindowsystem_qws.cpp.
|
signal |
This signal is emitted whenever a new QCopChannel object is created, passing the channel's name in the channel parameter.
void QWSServer::openKeyboard | ( | ) |
Opens the keyboard devices specified by the QWS_KEYBOARD environment variable.
Definition at line 3888 of file qwindowsystem_qws.cpp.
void QWSServer::openMouse | ( | ) |
Opens the mouse devices specified by the QWS_MOUSE_PROTO environment variable.
Be advised that closeMouse() is called first to delete all the existing mouse handlers. This behaviour could be the cause of problems if you were not expecting it.
Definition at line 3740 of file qwindowsystem_qws.cpp.
|
static |
Definition at line 1963 of file qwindowsystem_qws.cpp.
Referenced by QWSDisplay::Data::fillQueue(), and QEventDispatcherQWS::processEvents().
|
static |
Processes the given key event.
The key is identified by its unicode value and the given keycode, modifiers, isPress and autoRepeat parameters.
The keycode parameter is the Qt keycode value as defined by the Qt::Key enum. The modifiers is an OR combination of Qt::KeyboardModifier values, indicating whether Shift/Alt/Ctrl keys are pressed. The isPress parameter is true if the event is a key press event and autoRepeat is true if the event is caused by an auto-repeat mechanism and not an actual key press.
This function is typically called internally by keyboard drivers. Note that this function can only be used in the server process.
Definition at line 4248 of file qwindowsystem_qws.cpp.
Referenced by QWSKeyboardHandler::processKeyEvent(), QVFbKeyboardHandler::readKeyboardData(), and QWSUmKeyboardHandlerPrivate::readKeyboardData().
void QWSServer::refresh | ( | ) |
Refreshes the display by making the screen driver update the entire display.
Definition at line 2213 of file qwindowsystem_qws.cpp.
Referenced by endDisplayReconfigure(), QWSTtyKbPrivate::handleConsoleSwitch(), and QApplicationPrivate::setScreenTransformation().
void QWSServer::refresh | ( | QRegion & | region | ) |
Refreshes the given region of the display.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2229 of file qwindowsystem_qws.cpp.
|
signal |
This signal is emitted immediately after the given the QCopChannel object specified by channel, is destroyed.
Note that a channel is not destroyed until all its listeners have been unregistered.
|
static |
Removes and deletes the most recently added filter.
Note that the programmer is responsible for removing each added keyboard filter.
Note that this function can only be used in the server process.
Definition at line 4323 of file qwindowsystem_qws.cpp.
|
static |
Definition at line 3350 of file qwindowsystem_qws.cpp.
void QWSServer::resumeMouse | ( | ) |
Resumes pointer handling by reactivating all the mouse drivers registered by the QWS_MOUSE_PROTO environment variable.
Definition at line 3790 of file qwindowsystem_qws.cpp.
Referenced by QWSTtyKbPrivate::handleConsoleSwitch().
|
static |
Activates the screen saver if activate is true; otherwise it is deactivated.
Note that this function can only be used in the server process.
Definition at line 4565 of file qwindowsystem_qws.cpp.
|
static |
Returns true if the screen saver is active; otherwise returns false.
Note that this function can only be used in the server process.
Definition at line 4543 of file qwindowsystem_qws.cpp.
void QWSServer::sendIMEvent | ( | const QInputMethodEvent * | event | ) |
Sends the given input method event.
The QInputMethodEvent
class is derived from QWSEvent, i.e., it is a QWSEvent object of the QWSEvent::IMEvent type.
If there is a window actively composing the preedit string, the event is sent to that window. Otherwise, the event is sent to the window currently in focus.
Definition at line 2801 of file qwindowsystem_qws.cpp.
Referenced by QWSInputMethod::sendCommitString(), QWSInputMethod::sendEvent(), and QWSInputMethod::sendPreeditString().
void QWSServer::sendIMQuery | ( | int | property | ) |
Sends an input method query for the given property.
To receive responses to input method queries, the virtual QWSInputMethod::queryResponse() function must be reimplemented in a QWSInputMethod subclass that is activated using the setCurrentInputMethod() function.
Definition at line 2851 of file qwindowsystem_qws.cpp.
Referenced by QWSInputMethod::sendQuery().
|
static |
Sends the given key event.
The key is identified by its unicode value and the given keycode, modifiers, isPress and autoRepeat parameters.
Use this function to send key events generated by "virtual keyboards" (note that the processKeyEvent() function is impelemented using this function).
The keycode parameter is the Qt keycode value as defined by the Qt::Key enum. The modifiers is an OR combination of Qt::KeyboardModifier values, indicating whether Shift/Alt/Ctrl keys are pressed. The isPress parameter is true if the event is a key press event and autoRepeat is true if the event is caused by an auto-repeat mechanism and not an actual key press.
Note that this function can only be used in the server process.
Definition at line 2652 of file qwindowsystem_qws.cpp.
Referenced by QVNCServer::keyEvent(), and processKeyEvent().
|
static |
Send a mouse event.
pos is the screen position where the mouse event occurred and state is a mask indicating which buttons are pressed.
pos is in device coordinates
Definition at line 2334 of file qwindowsystem_qws.cpp.
Referenced by QWSMouseHandler::mouseChanged(), and QVNCServer::pointerEvent().
void QWSServer::sendPropertyNotifyEvent | ( | int | property, |
int | state | ||
) |
Definition at line 2896 of file qwindowsystem_qws.cpp.
|
static |
Sets the brush used as background in the absence of obscuring windows, to be the given brush.
Note that this function can only be used in the server process.
Definition at line 4126 of file qwindowsystem_qws.cpp.
|
static |
Sets the current input method to be the given method.
Note that this function can only be used in the server process.
Definition at line 2877 of file qwindowsystem_qws.cpp.
|
static |
Shows the cursor if visible is true: otherwise the cursor is hidden.
Note that this function can only be used in the server process.
Definition at line 2761 of file qwindowsystem_qws.cpp.
Referenced by openMouse().
|
static |
Sets the keyboard driver that will be used if the QWS_KEYBOARD environment variable is not defined, to be the given keyboardDriver.
Note that the default is platform-dependent. This function can only be used in the server process.
Definition at line 2309 of file qwindowsystem_qws.cpp.
Referenced by QIntfbScreen::connect(), QVNCScreen::connect(), QVFbScreen::initDevice(), and QDirectFBScreen::initDevice().
|
static |
Sets the mouse driver that will be used if the QWS_MOUSE_PROTO environment variable is not defined, to be the given mouseDriver.
Note that the default is platform-dependent. This function can only be used in the server process.
Definition at line 2292 of file qwindowsystem_qws.cpp.
Referenced by QIntfbScreen::connect(), QVNCScreen::connect(), QVFbScreen::initDevice(), and QDirectFBScreen::initDevice().
|
static |
Sets the primary keyboard driver to be the given driver.
Qt for Embedded Linux provides several ready-made keyboard drivers, and custom drivers are typically added using Qt's plugin mechanism. See the Qt for Embedded Linux Character Input documentation for details.
Note that this function can only be used in the server process.
Definition at line 3874 of file qwindowsystem_qws.cpp.
Referenced by openKeyboard().
|
static |
Sets the maximum area of the screen that Qt for Embedded Linux applications can use, to be the given rectangle.
Note that this function can only be used in the server process.
Definition at line 2249 of file qwindowsystem_qws.cpp.
|
static |
Sets the primary mouse driver to be the given driver.
Qt for Embedded Linux provides several ready-made mouse drivers, and custom drivers are typically added using Qt's plugin mechanism. See the Qt for Embedded Linux Pointer Handling documentation for details.
Note that this function can only be used in the server process.
Definition at line 2534 of file qwindowsystem_qws.cpp.
Referenced by openMouse().
|
static |
Installs the given screenSaver, deleting the current screen saver.
Note that this function can only be used in the server process.
Definition at line 4474 of file qwindowsystem_qws.cpp.
|
static |
Block the key or mouse event that wakes the system from level eventBlockLevel or higher.
To completely disable event blocking (the default behavior), set eventBlockLevel to -1.
The algorithm blocks the "down", "up" as well as any "repeat" events for the same key but will not block other key events after the initial "down" event. For mouse events, the algorithm blocks all mouse events until an event with no buttons pressed is received.
There are 2 keys that are never blocked, Qt::Key_F34 (POWER) and Qt::Key_F35 (LIGHT).
Example usage:
Note that this function can only be used in the server process.
Definition at line 4417 of file qwindowsystem_qws.cpp.
|
static |
Sets the timeout interval for the screensaver to the specified milliseconds.
To turn off the screensaver, set the timout interval to 0.
Note that this function can only be used in the server process.
Definition at line 4391 of file qwindowsystem_qws.cpp.
|
static |
Specifies the time intervals (in milliseconds) between the different levels of screen responsiveness.
Qt for Embedded Linux supports multilevel screen saving, i.e., it is possible to specify several different levels of screen responsiveness by implementing the QWSScreenSaver::save() function. For example, you can choose to first turn off the light before you fully activate the screensaver. See the QWSScreenSaver documentation for details.
Note that an interval of 0 milliseconds will turn off the screensaver, and that the intervals array must be 0-terminated. This function can only be used in the server process.
Definition at line 4350 of file qwindowsystem_qws.cpp.
Referenced by setScreenSaverInterval().
|
static |
Definition at line 4195 of file qwindowsystem_qws.cpp.
Referenced by qt_init().
void QWSServer::suspendMouse | ( | ) |
Suspends pointer handling by deactivating all the mouse drivers registered by the QWS_MOUSE_PROTO environment variable.
Definition at line 3777 of file qwindowsystem_qws.cpp.
Referenced by QWSTtyKbPrivate::handleConsoleSwitch().
|
protectedvirtual |
Reimplemented from QObject.
Definition at line 1575 of file qwindowsystem_qws.cpp.
|
private |
Definition at line 4552 of file qwindowsystem_qws.cpp.
Referenced by QApplicationPrivate::setScreenTransformation().
Returns the window containing the given position.
Note that if there is no window under the specified point this function returns 0.
Definition at line 2606 of file qwindowsystem_qws.cpp.
Referenced by QWSServerPrivate::sendMouseEventUnfiltered(), QWSServerPrivate::updateClientCursorPos(), and QWSDisplay::windowAt().
|
signal |
This signal is emitted whenever something happens to a top-level window (e.g., it's created or destroyed), passing a pointer to the window and the event's type in the window and eventType parameters, respectively.
|
static |
Definition at line 2547 of file qwindowsystem_qws.cpp.
Referenced by QWSDisplay::windowList().
|
friend |
Definition at line 344 of file qwindowsystem_qws.h.
|
friend |
Definition at line 211 of file qwindowsystem_qws.h.
|
friend |
Definition at line 214 of file qwindowsystem_qws.h.
|
friend |
Definition at line 215 of file qwindowsystem_qws.h.
|
friend |
Definition at line 212 of file qwindowsystem_qws.h.
Definition at line 213 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::newWindow().
|
static |
Definition at line 309 of file qwindowsystem_qws.h.
Referenced by QWSServerPrivate::invokePositionCursor(), QWSServerPrivate::invokeSelectCursor(), openKeyboard(), and sendMouseEvent().