File indexing completed on 2024-04-14 04:53:33

0001 /* This file is part of the KDE project
0002    Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
0003 
0004    This program is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU General Public
0006    License as published by the Free Software Foundation; either
0007    version 2 of the License, or (at your option) any later version.
0008 */
0009 
0010 #ifndef FRAMEBUFFER_H
0011 #define FRAMEBUFFER_H
0012 
0013 #include "rfb.h"
0014 
0015 #include "krfbprivate_export.h"
0016 
0017 #include <QObject>
0018 #include <QRect>
0019 #include <QList>
0020 #include <QVariant>
0021 #include <QWidget>
0022 
0023 
0024 class FrameBuffer;
0025 /**
0026     @author Alessandro Praduroux <pradu@pradu.it>
0027 */
0028 class KRFBPRIVATE_EXPORT FrameBuffer : public QObject
0029 {
0030     Q_OBJECT
0031 public:
0032     explicit FrameBuffer(QObject *parent = nullptr);
0033 
0034     ~FrameBuffer() override;
0035 
0036     char *data();
0037 
0038     virtual QList<QRect> modifiedTiles();
0039     virtual int paddedWidth();
0040     virtual int width();
0041     virtual int height();
0042     virtual int depth();
0043     virtual void startMonitor();
0044     virtual void stopMonitor();
0045     virtual QPoint cursorPosition();
0046 
0047     virtual void getServerFormat(rfbPixelFormat &format);
0048 
0049     virtual QVariant customProperty(const QString &property) const;
0050 
0051 Q_SIGNALS:
0052     void frameBufferChanged();
0053 
0054 protected:
0055     char *fb = nullptr;
0056     QList<QRect> tiles;
0057 
0058 private:
0059     Q_DISABLE_COPY(FrameBuffer)
0060 
0061 };
0062 
0063 #endif