42 #ifndef QWINDOWSYSTEM_QWS_H
43 #define QWINDOWSYSTEM_QWS_H
60 struct QWSWindowPrivate;
63 class QWSRegionManager;
68 class QWSBackingStore;
69 class QWSWindowSurface;
89 virtual void restore()=0;
90 virtual bool save(
int level)=0;
97 friend class QWSServerPrivate;
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(); }
132 bool forClient(
const QWSClient* cl)
const {
return cl==
c; }
137 void focus(
bool get);
138 int focusPriority()
const {
return last_focus_time; }
140 void shuttingDown() { last_focus_time=0; }
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
165 QWSWindowSurface *surface;
170 inline QT3_SUPPORT
QRegion requested()
const {
return requested_region; }
178 #ifdef QT_USE_OLD_QWS_SOUND
179 class QWSSoundServerData;
186 void playFile(
const QString& filename);
188 void feedDevice(
int fd);
190 QWSSoundServerData* d;
203 struct QWSCommandStruct;
204 class QWSServerPrivate;
215 friend class QWSInputMethod;
225 DisableMouse = 0x02 };
227 static void sendKeyEvent(
int unicode,
int keycode, Qt::KeyboardModifiers modifiers,
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 };
241 void sendIMEvent(
const QInputMethodEvent*);
245 #ifndef QT_NO_QWS_KEYBOARD
250 virtual bool filter(
int unicode,
int keycode,
int modifiers,
251 bool isPress,
bool autoRepeat)=0;
253 static void addKeyboardFilter(KeyboardFilter *
f);
254 static void removeKeyboardFilter();
257 #ifndef QT_NO_QWS_INPUTMETHODS
258 static void setCurrentInputMethod(QWSInputMethod *im);
259 static void resetInputMethod();
262 static void setDefaultMouse(
const char *);
263 static void setDefaultKeyboard(
const char *);
264 static void setMaxWindowRect(
const QRect&);
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,
336 #ifndef QT_NO_QWS_INPUTMETHODS
337 void markedText(
const QString &);
344 friend class QApplicationPrivate;
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
371 class Q_GUI_EXPORT QWSInputMethod :
public QObject
376 virtual ~QWSInputMethod();
378 enum UpdateType {Update, FocusIn, FocusOut, Reset, Destroyed};
380 virtual bool filter(
int unicode,
int keycode,
int modifiers,
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);
396 void sendEvent(
const QInputMethodEvent*);
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);
410 qwsServer->sendIMEvent(ime);
413 inline void QWSInputMethod::sendIMEvent(QWSServer::IMState state,
const QString& txt,
int cpos,
int selLen)
421 qwsServer->sendIMQuery(property);
425 #endif // QT_NO_QWS_INPUTMETHODS
439 class QWSClientPrivate;
441 class QWSConvertSelectionCommand;
446 Q_DECLARE_PRIVATE(QWSClient)
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);
462 void sendSelectionRequestEvent(QWSConvertSelectionCommand *cmd,
int windowid);
463 #ifndef QT_QWS_CLIENTBLIT
464 void sendRegionEvent(
int winid,
QRegion rgn,
int type);
466 void sendRegionEvent(
int winid,
QRegion rgn,
int type,
int id = 0);
468 #ifndef QT_NO_QWSEMBEDWIDGET
472 QWSCommand* readMoreCommand();
478 void connectionClosed();
485 #ifndef QT_NO_QWS_MULTIPROCESS
487 void removeUnbufferedSurface();
488 void addUnbufferedSurface();
492 int socketDescriptor;
493 #ifndef QT_NO_QWS_MULTIPROCESS
501 friend class QWSServerPrivate;
508 #endif // QWINDOWSYSTEM_QWS_H
GLuint GLuint GLsizei GLenum type
State
The state the media producing object is in at the moment.
#define Q_PRIVATE_SLOT(d, signature)
const QString & name() const
virtual void timerEvent(QTimerEvent *)
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
const QRegion & requestedRegion() const
static QPoint mousePosition
bool isFullyObscured() const
static QWSServer * instance()
bool isPartiallyObscured() const
virtual ~KeyboardFilter()
GLuint const GLchar * name
const QString & caption() const
QWSWindowSurface * windowSurface() const
QVariant property(const char *name) const
Q_GUI_EXPORT QWSServer * qwsServer
GLubyte GLubyte GLubyte GLubyte w
QWSClient * client() const
QMap< int, QWSCursor * > QWSCursorMap