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 #include "framebuffer.h"
0011 
0012 #include <config-krfb.h>
0013 #include <QCursor>
0014 
0015 
0016 FrameBuffer::FrameBuffer(QObject *parent)
0017     : QObject(parent)
0018 {
0019 }
0020 
0021 FrameBuffer::~FrameBuffer()
0022 {
0023     delete fb;
0024 }
0025 
0026 char *FrameBuffer::data()
0027 {
0028     return fb;
0029 }
0030 
0031 QList< QRect > FrameBuffer::modifiedTiles()
0032 {
0033     QList<QRect> ret = tiles;
0034     tiles.clear();
0035     return ret;
0036 }
0037 
0038 int FrameBuffer::width()
0039 {
0040     return 0;
0041 }
0042 
0043 int FrameBuffer::height()
0044 {
0045     return 0;
0046 }
0047 
0048 void FrameBuffer::getServerFormat(rfbPixelFormat &)
0049 {
0050 }
0051 
0052 QVariant FrameBuffer::customProperty(const QString &property) const
0053 {
0054     Q_UNUSED(property)
0055     return QVariant();
0056 }
0057 
0058 int FrameBuffer::depth()
0059 {
0060     return 32;
0061 }
0062 
0063 int FrameBuffer::paddedWidth()
0064 {
0065     return width() * depth() / 8;
0066 }
0067 
0068 void FrameBuffer::startMonitor()
0069 {
0070 }
0071 
0072 void FrameBuffer::stopMonitor()
0073 {
0074 }
0075 
0076 QPoint FrameBuffer::cursorPosition()
0077 {
0078     return QCursor::pos();
0079 }