1
0
mirror of https://invent.kde.org/network/krfb synced 2024-07-03 00:18:36 +00:00
krfb/framebuffer.cpp
George Goldberg 0b04afe5c1 Framebuffers are now plugins. This means we can switch between the Qt and X11 framebuffers at runtime.
- Currently there is no configuration UI, so you have to edit the krfbrc by hand to select the framebuffer plugin to use. This will be fixed later.
- Framebuffers are shared, so that when krfb supports having mutliple servers running, the framebuffer can be shared between them (when appropriate) for better performance.
- Currently defaults to the X11 framebuffer, since this is what was hardcoded before.

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1027330
2009-09-23 20:57:47 +00:00

72 lines
1.1 KiB
C++

/* This file is part of the KDE project
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
#include "framebuffer.h"
#include "framebuffer.moc"
#include <config-krfb.h>
#include <X11/Xutil.h>
FrameBuffer::FrameBuffer(WId id, QObject *parent)
: QObject(parent), win(id)
{
}
FrameBuffer::~FrameBuffer()
{
delete fb;
}
char * FrameBuffer::data()
{
return fb;
}
QList< QRect > FrameBuffer::modifiedTiles()
{
QList<QRect> ret = tiles;
tiles.clear();
return ret;
}
int FrameBuffer::width()
{
return 0;
}
int FrameBuffer::height()
{
return 0;
}
void FrameBuffer::getServerFormat(rfbPixelFormat &)
{
}
int FrameBuffer::depth()
{
return 32;
}
int FrameBuffer::paddedWidth()
{
return width() * depth() / 8;
}
void FrameBuffer::startMonitor()
{
}
void FrameBuffer::stopMonitor()
{
}