42 #ifndef QSCREENVNC_P_H 43 #define QSCREENVNC_P_H 60 #include <QtCore/qvarlengtharray.h> 61 #include <QtCore/qsharedmemory.h> 62 #include <QtNetwork/qtcpsocket.h> 63 #include <QtNetwork/qtcpserver.h> 69 #ifndef QT_NO_QWS_CURSOR 79 void move(
int x,
int y);
98 #endif // QT_NO_QWS_CURSOR 100 #define MAP_TILE_SIZE 16 101 #define MAP_WIDTH 1280 / MAP_TILE_SIZE 102 #define MAP_HEIGHT 1024 / MAP_TILE_SIZE 111 bool dirty(
int x,
int y)
const;
112 virtual void setDirty(
int x,
int y,
bool force =
false) = 0;
113 void setClean(
int x,
int y);
138 void setDirty(
int x,
int y,
bool force =
false);
146 x = _x; y = _y; w = _w; h = _h;
161 static int size() {
return 16; }
185 void setName(
const char *n);
257 #if !defined(QT_NO_QWS_MULTIPROCESS) && !defined(QT_NO_SHAREDMEMORY) 272 virtual void write() = 0;
296 bool read(
const uchar *
data,
int width,
int height,
int stride);
308 bool read(
const uchar *
data,
int width,
int height,
int stride);
321 inline int lastx()
const {
return rectx(numRects); }
322 inline int lasty()
const {
return recty(numRects); }
323 inline int rectx(
int r)
const {
return rects[r].xy >> 4; }
324 inline int recty(
int r)
const {
return rects[r].xy & 0x0f; }
325 inline int width(
int r)
const {
return (rects[r].wh >> 4) + 1; }
326 inline int height(
int r)
const {
return (rects[r].wh & 0x0f) + 1; }
328 inline void setX(
int r,
int x) {
329 rects[r].xy = (x << 4) | (rects[r].xy & 0x0f);
331 inline void setY(
int r,
int y) {
332 rects[r].xy = (rects[r].xy & 0xf0) | y;
335 rects[r].wh = ((width - 1) << 4) | (rects[r].wh & 0x0f);
338 rects[r].wh = (rects[r].wh & 0xf0) | (height - 1);
353 bool read(
const uchar *
data,
int width,
int height,
int stride);
358 return rects.data() + r * (bpp + 2);
361 return rects.constData() + r * (bpp + 2);
363 inline void setX(
int r,
int x) {
365 *ptr = (x << 4) | (*ptr & 0x0f);
367 inline void setY(
int r,
int y) {
369 *ptr = (*ptr & 0xf0) | y;
371 void setColor(SRC color);
382 *ptr = ((width - 1) << 4) | (*ptr & 0x0f);
386 *ptr = (*ptr & 0xf0) | (height - 1);
392 static const int maxRectsSize = 16 * 16;
410 BackgroundSpecified = 2,
411 ForegroundSpecified = 4,
413 SubrectsColoured = 16
445 FixColourMapEntries = 1,
447 FramebufferUpdateRequest = 3,
453 SetColourMapEntries = 1 };
455 void convertPixels(
char *dst,
const char *src,
int count)
const;
458 return pixelFormat.bitsPerPixel / 8;
464 QImage screenImage()
const;
466 #ifndef QT_NO_QWS_CURSOR 471 void setPixelFormat();
473 void frameBufferUpdateRequest();
476 void clientCutText();
477 bool pixelConversionNeeded()
const;
480 void newConnection();
483 void discardClient();
508 #if Q_BYTE_ORDER == Q_BIG_ENDIAN 514 #ifndef QT_NO_QWS_CURSOR 523 #endif // QT_NO_QWS_VNC 524 #endif // QSCREENVNC_P_H
The QProxyScreenCursor class provides a generic interface to QScreenCursor implementations.
QRfbSingleColorHextile(QRfbHextileEncoder< SRC > *e)
bool dirty(int x, int y) const
#define QT_END_NAMESPACE
This macro expands to.
QRfbPixelFormat pixelFormat
static void keyEvent(KeyAction action, QWidget *widget, char ascii, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
QRfbHextileEncoder< SRC > * encoder
The QByteArray class provides an array of bytes.
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
const quint8 * rect(int r) const
Qt::KeyboardModifiers keymod
void setWidth(int r, int width)
bool hasClientCursor() const
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)
QImage image() const
Returns the cursor's image.
QVNCScreen * screen() const
QTcpServer * serverSocket
#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)
QRfbHextileEncoder< SRC > * encoder
QVarLengthArray< quint8, maxRectsSize > rects
QTcpSocket * clientSocket() const
QVNCDirtyMapOptimized(QScreen *screen)
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.
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
QRfbEncoder(QVNCServer *s)
QRfbMultiColorHextile(QRfbHextileEncoder< SRC > *e)
The QTimer class provides repetitive and single-shot timers.
void move(int x, int y)
Reimplemented Function
QRfbSingleColorHextile< SRC > singleColorHextile
QRfbMultiColorHextile< SRC > multiColorHextile
QRfbRect(quint16 _x, quint16 _y, quint16 _w, quint16 _h)
QRfbDualColorHextile< SRC > dualColorHextile
QRfbHextileEncoder< SRC > * encoder
QRfbDualColorHextile(QRfbHextileEncoder< SRC > *e)
int clientBytesPerPixel() const
The KeyEvent object provides information about a key event.
QVNCClientCursor * qvnc_cursor