42 #ifndef QWINDOWSYSTEM_QWS_H 43 #define QWINDOWSYSTEM_QWS_H 45 #include <QtCore/qbytearray.h> 46 #include <QtCore/qmap.h> 47 #include <QtCore/qdatetime.h> 48 #include <QtCore/qlist.h> 50 #include <QtGui/qwsevent_qws.h> 51 #include <QtGui/qkbd_qws.h> 52 #include <QtGui/qregion.h> 63 class QWSRegionManager;
68 class QWSBackingStore;
89 virtual void restore()=0;
90 virtual bool save(
int level)=0;
108 QRegion allocatedRegion()
const;
110 bool isVisible()
const {
return !requested_region.isEmpty(); }
114 enum State {
NoState, Hidden, Showing,
Visible, Hiding, Raising, Lowering, Moving, ChangingGeometry, Destroyed };
116 Qt::WindowFlags windowFlags()
const;
123 void setActiveWindow();
125 bool isOpaque()
const {
return opaque && _opacity == 255;}
131 bool hidden()
const {
return requested_region.isEmpty(); }
134 void setName(
const QString &n);
137 void focus(
bool get);
142 #ifdef QT_QWS_CLIENTBLIT 143 QRegion directPaintRegion()
const;
144 inline void setDirectPaintRegion(
const QRegion &topmost);
146 inline void setAllocatedRegion(
const QRegion ®ion);
150 #ifndef QT_NO_QWSEMBEDWIDGET 170 inline QT3_SUPPORT
QRegion requested()
const {
return requested_region; }
177 class QWSSoundServer;
178 #ifdef QT_USE_OLD_QWS_SOUND 179 class QWSSoundServerData;
184 QWSSoundServer(
QObject* parent);
186 void playFile(
const QString& filename);
188 void feedDevice(
int fd);
190 QWSSoundServerData*
d;
225 DisableMouse = 0x02 };
228 bool isPress,
bool autoRepeat);
229 #ifndef QT_NO_QWS_KEYBOARD 230 static void processKeyEvent(
int unicode,
int keycode, Qt::KeyboardModifiers modifiers,
231 bool isPress,
bool autoRepeat);
236 #ifndef QT_NO_QWS_INPUTMETHODS 238 enum IMState { IMCompose, IMEnd, IMStart = IMCompose };
245 #ifndef QT_NO_QWS_KEYBOARD 251 bool isPress,
bool autoRepeat)=0;
254 static void removeKeyboardFilter();
257 #ifndef QT_NO_QWS_INPUTMETHODS 259 static void resetInputMethod();
262 static void setDefaultMouse(
const char *);
263 static void setDefaultKeyboard(
const char *);
265 static void sendMouseEvent(
const QPoint& pos,
int state,
int wheel = 0);
267 static void setBackground(
const QBrush &);
269 static QT3_SUPPORT
void setDesktopBackground(
const QImage &img);
270 static QT3_SUPPORT
void setDesktopBackground(
const QColor &);
275 #ifndef QT_NO_QWS_KEYBOARD 287 #ifndef QT_NO_QWS_KEYBOARD 289 void closeKeyboard();
293 static void setScreenSaverIntervals(
int* ms);
294 static void setScreenSaverInterval(
int);
295 static void setScreenSaverBlockLevel(
int);
296 static bool screenSaverActive();
297 static void screenSaverActivate(
bool);
303 void enablePainting(
bool);
304 static void processEventQueue();
307 void sendPropertyNotifyEvent(
int property,
int state);
311 static void startup(
int flags);
312 static void closedown();
314 static void beginDisplayReconfigure();
315 static void endDisplayReconfigure();
317 #ifndef QT_NO_QWS_CURSOR 318 static void setCursorVisible(
bool);
319 static bool isCursorVisible();
322 const QBrush &backgroundBrush()
const;
324 enum WindowEvent { Create=0x0001, Destroy=0x0002, Hide=0x0004, Show=0x0008,
325 Raise=0x0010, Lower=0x0020, Geometry=0x0040, Active = 0x0080,
332 void newChannel(
const QString& channel);
333 void removedChannel(
const QString& channel);
336 #ifndef QT_NO_QWS_INPUTMETHODS 337 void markedText(
const QString &);
345 void updateWindowRegions()
const;
348 #ifndef QT_NO_QWS_KEYBOARD 350 {
if (f) addKeyboardFilter(f);
else removeKeyboardFilter(); }
355 #ifndef QT_NO_QWS_MULTIPROCESS 365 #ifndef QT_NO_QWS_MULTIPROCESS 370 #ifndef QT_NO_QWS_INPUTMETHODS 381 bool isPress,
bool autoRepeat);
383 virtual bool filter(
const QPoint &,
int state,
int wheel);
385 virtual void reset();
386 virtual void updateHandler(
int type);
387 virtual void mouseHandler(
int pos,
int state);
388 virtual void queryResponse(
int property,
const QVariant&);
391 uint setInputResolution(
bool isHigh);
392 uint inputResolutionShift()
const;
394 void sendMouseEvent(
const QPoint &pos,
int state,
int wheel);
397 void sendPreeditString(
const QString &preeditString,
int cursorPosition,
int selectionLength = 0);
398 void sendCommitString(
const QString &commitString,
int replaceFrom = 0,
int replaceLength = 0);
399 void sendQuery(
int property);
402 inline void sendIMEvent(QWSServer::IMState,
const QString& txt,
int cpos,
int selLen = 0);
413 inline void QWSInputMethod::sendIMEvent(QWSServer::IMState state,
const QString& txt,
int cpos,
int selLen)
415 if (state == QWSServer::IMCompose) sendPreeditString(txt, cpos, selLen);
else sendCommitString(txt);
425 #endif // QT_NO_QWS_INPUTMETHODS 453 void setIdentity(
const QString&);
457 void sendConnectedEvent(
const char *display_spec);
458 void sendMaxWindowRectEvent(
const QRect &rect);
459 void sendPropertyNotifyEvent(
int property,
int state);
460 void sendPropertyReplyEvent(
int property,
int len,
const char *
data);
461 void sendSelectionClearEvent(
int windowid);
463 #ifndef QT_QWS_CLIENTBLIT 466 void sendRegionEvent(
int winid,
QRegion rgn,
int type,
int id = 0);
468 #ifndef QT_NO_QWSEMBEDWIDGET 478 void connectionClosed();
485 #ifndef QT_NO_QWS_MULTIPROCESS 487 void removeUnbufferedSurface();
488 void addUnbufferedSurface();
493 #ifndef QT_NO_QWS_MULTIPROCESS 508 #endif // QWINDOWSYSTEM_QWS_H The QVariant class acts like a union for the most common Qt data types.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
The QWSDisplay class provides a display for QWS; it is an internal class.
The QWSKeyboardHandler class is a base class for keyboard drivers in Qt for Embedded Linux...
The KeyboardFilter class is a base class for global keyboard event filters in Qt for Embedded Linux...
#define QT_END_NAMESPACE
This macro expands to.
QWSWindowSurface * surface
static QWSServer * instance()
The QByteArray class provides an array of bytes.
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
The QWSMouseHandler class is a base class for mouse drivers in Qt for Embedded Linux.
bool isPartiallyObscured() const
Returns true if the window is partially obsured by another window or by the bounds of the screen; oth...
QWSClient * client() const
Returns a reference to the QWSClient object that owns this window.
#define Q_PRIVATE_SLOT(d, signature)
The QWSScreenSaver class is a base class for screensavers in Qt for Embedded Linux.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
The QWSEvent class encapsulates an event in Qt for Embedded Linux.
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
virtual ~KeyboardFilter()
Destroys the keyboard filter.
The QImage class provides a hardware-independent image representation that allows direct access to th...
void sendIMQuery(int property)
Sends an input method query for the given property.
static const char * data(const QByteArray &arr)
static void sendKeyEvent(KeyAction action, QWidget *widget, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1)
The QRegion class specifies a clip region for a painter.
The State element defines configurations of objects and properties.
int focusPriority() const
ServerFlags
This enum is used to pass various options to the window system server.
bool isFullyObscured() const
Returns true if the window is completely obsured by another window or by the bounds of the screen; ot...
uint opacity() const
Returns the window's alpha channel value.
void sendIMEvent(const QInputMethodEvent *)
Sends the given input method event.
bool isVisible() const
Returns true if the window is visible; otherwise returns false.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QString identity() const
Returns the name of this client's running application.
int winId() const
Returns the window's ID.
WindowEvent
This enum specifies the various events that can occur in a top-level window.
Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs=0)
The QWSServer class encapsulates a server process in Qt for Embedded Linux.
The QTimerEvent class contains parameters that describe a timer event.
const QRegion & requestedRegion() const
Returns the region that the window has requested to draw onto, including any window decorations...
int clientId() const
Returns an integer uniquely identfying this client.
QObject * parent() const
Returns a pointer to the parent object.
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
QWSWindowSurface * windowSurface() const
static void setMaxWindowRect(const QRect &rect)
The QCopChannel class provides communication capabilities between clients in Qt for Embedded Linux...
static QPoint mousePosition
const QString & caption() const
Returns the window's caption.
Q_GUI_EXPORT QWSServer * qwsServer
#define Q_DECLARE_PRIVATE(Class)
const QString & name() const
Returns the window's name, which is taken from the QWidget::objectName() at the time of QWidget::show...
bool isOpaque() const
Returns true if the window is opaque, i.
bool forClient(const QWSClient *cl) const
The QWSClient class encapsulates a client process in Qt for Embedded Linux.
IMMouse
This enum describes the various types of mouse events recognized by the QWSInputMethod::mouseHandler(...
The QList class is a template class that provides lists.
QMap< int, QWSCursor * > QWSCursorMap