42 #ifndef QSCREENVNC_P_H 43 #define QSCREENVNC_P_H 58 #define QT_NO_QWS_CURSOR 62 #include <QtCore/qvarlengtharray.h> 63 #include <QtCore/qsharedmemory.h> 64 #include <QtNetwork/qtcpsocket.h> 65 #include <QtNetwork/qtcpserver.h> 71 #ifndef QT_NO_QWS_CURSOR 81 void move(
int x,
int y);
100 #endif // QT_NO_QWS_CURSOR 102 #define MAP_TILE_SIZE 16 103 #define MAP_WIDTH 1280 / MAP_TILE_SIZE 104 #define MAP_HEIGHT 1024 / MAP_TILE_SIZE 113 bool dirty(
int x,
int y)
const;
114 virtual void setDirty(
int x,
int y,
bool force =
false) = 0;
115 void setClean(
int x,
int y);
140 void setDirty(
int x,
int y,
bool force =
false);
148 x = _x; y = _y; w = _w; h = _h;
163 static int size() {
return 16; }
187 void setName(
const char *n);
260 bool doOnScreenSurface;
265 #if !defined(QT_NO_QWS_MULTIPROCESS) && !defined(QT_NO_SHAREDMEMORY) 278 virtual void write() = 0;
302 bool read(
const uchar *
data,
int width,
int height,
int stride);
314 bool read(
const uchar *
data,
int width,
int height,
int stride);
327 inline int lastx()
const {
return rectx(numRects); }
328 inline int lasty()
const {
return recty(numRects); }
329 inline int rectx(
int r)
const {
return rects[r].xy >> 4; }
330 inline int recty(
int r)
const {
return rects[r].xy & 0x0f; }
331 inline int width(
int r)
const {
return (rects[r].wh >> 4) + 1; }
332 inline int height(
int r)
const {
return (rects[r].wh & 0x0f) + 1; }
334 inline void setX(
int r,
int x) {
335 rects[r].xy = (x << 4) | (rects[r].xy & 0x0f);
337 inline void setY(
int r,
int y) {
338 rects[r].xy = (rects[r].xy & 0xf0) | y;
341 rects[r].wh = ((width - 1) << 4) | (rects[r].wh & 0x0f);
344 rects[r].wh = (rects[r].wh & 0xf0) | (height - 1);
359 bool read(
const uchar *
data,
int width,
int height,
int stride);
364 return rects.data() + r * (bpp + 2);
367 return rects.constData() + r * (bpp + 2);
369 inline void setX(
int r,
int x) {
371 *ptr = (x << 4) | (*ptr & 0x0f);
373 inline void setY(
int r,
int y) {
375 *ptr = (*ptr & 0xf0) | y;
377 void setColor(SRC color);
388 *ptr = ((width - 1) << 4) | (*ptr & 0x0f);
392 *ptr = (*ptr & 0xf0) | (height - 1);
398 static const int maxRectsSize = 16 * 16;
416 BackgroundSpecified = 2,
417 ForegroundSpecified = 4,
419 SubrectsColoured = 16
451 FixColourMapEntries = 1,
453 FramebufferUpdateRequest = 3,
459 SetColourMapEntries = 1 };
461 void convertPixels(
char *dst,
const char *src,
int count)
const;
464 return pixelFormat.bitsPerPixel / 8;
470 QImage *screenImage()
const;
472 #ifndef QT_NO_QWS_CURSOR 473 inline bool hasClientCursor()
const {
return qvnc_cursor != 0; }
478 void setPixelFormat();
480 void frameBufferUpdateRequest();
483 void clientCutText();
484 bool pixelConversionNeeded()
const;
487 void newConnection();
490 void discardClient();
502 Qt::KeyboardModifiers keymod;
504 int encodingsPending;
506 uint supportCopyRect : 1;
508 uint supportCoRRE : 1;
509 uint supportHextile : 1;
510 uint supportZRLE : 1;
511 uint supportCursor : 1;
512 uint supportDesktopSize : 1;
516 #if Q_BYTE_ORDER == Q_BIG_ENDIAN 522 #ifndef QT_NO_QWS_CURSOR 532 #endif // QT_NO_QWS_VNC 533 #endif // QSCREENVNC_P_H
The QProxyScreenCursor class provides a generic interface to QScreenCursor implementations.
QRfbSingleColorHextile(QRfbHextileEncoder< SRC > *e)
#define QT_END_NAMESPACE
This macro expands to.
static void keyEvent(KeyAction action, QWidget *widget, char ascii, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
void setCursor(QVNCCursor *c)
The QByteArray class provides an array of bytes.
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
const quint8 * rect(int r) const
void setWidth(int r, int width)
static int bytesPerPixel(QImage::Format format)
QRfbRawEncoder(QVNCServer *s)
bool doPixelConversion() const
void setHeight(int r, int height)
The QObject class is the base class of all Qt objects.
void setHeight(int height)
QVNCDirtyMapOptimized(QVNCScreen *screen)
QImage image() const
Returns the cursor's image.
QVNCScreen * screen() const
QFuture< void > map(Sequence &sequence, MapFunction function)
#define QT_BEGIN_NAMESPACE
This macro expands to.
void setRefreshRate(int rate)
The QVNCScreen class implements a screen driver for VNC servers.
QVNCCursor(QVNCScreen *s)
void show()
Reimplemented Function
void setWidth(int r, int width)
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
The QTcpSocket class provides a TCP socket.
const T * ptr(const T &t)
void setHeight(int r, int height)
QTcpSocket * clientSocket() const
QVNCDirtyMap * dirtyMap() const
QObject * parent() const
Returns a pointer to the parent object.
void hide()
Reimplemented Function
The QTcpServer class provides a TCP-based server.
The QRect class defines a rectangle in the plane using integer precision.
The QSharedMemory class provides access to a shared memory segment.
QRfbEncoder(QVNCServer *s)
QRfbMultiColorHextile(QRfbHextileEncoder< SRC > *e)
The QTimer class provides repetitive and single-shot timers.
void move(int x, int y)
Reimplemented Function
QRfbRect(quint16 _x, quint16 _y, quint16 _w, quint16 _h)
QRfbDualColorHextile(QRfbHextileEncoder< SRC > *e)
int clientBytesPerPixel() const
The KeyEvent object provides information about a key event.