summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Goldberg <george.goldberg@collabora.co.uk>2009-09-02 12:44:51 (GMT)
committerGeorge Goldberg <george.goldberg@collabora.co.uk>2009-09-02 12:44:51 (GMT)
commit1ded9047f10d9a94034870ff744d245e6df2a601 (patch)
treedcbbb0cfa8ce090b2baadf7bc449cc43bfabf7a5
parent00bf2d97d1a7b58139ede636833e7fb4886c3e40 (diff)
downloadkrfb-telepathy-1ded9047f10d9a94034870ff744d245e6df2a601.tar.gz
krfb-telepathy-1ded9047f10d9a94034870ff744d245e6df2a601.tar.xz
Get the X11 framebuffer compiling again and working as a plugin again. No changes to the actual substance of the framebuffer yet.
-rw-r--r--framebuffers/CMakeLists.txt2
-rw-r--r--framebuffers/x11/CMakeLists.txt7
-rw-r--r--framebuffers/x11/krfb_framebuffer_x11.desktop13
-rw-r--r--framebuffers/x11/x11framebuffer.h6
-rw-r--r--framebuffers/x11/x11framebufferplugin.cpp46
-rw-r--r--framebuffers/x11/x11framebufferplugin.h47
6 files changed, 116 insertions, 5 deletions
diff --git a/framebuffers/CMakeLists.txt b/framebuffers/CMakeLists.txt
index 96ccd60..32f42c3 100644
--- a/framebuffers/CMakeLists.txt
+++ b/framebuffers/CMakeLists.txt
@@ -1,3 +1,3 @@
add_subdirectory (qt)
-# add_subdirectory (x11)
+add_subdirectory (x11)
diff --git a/framebuffers/x11/CMakeLists.txt b/framebuffers/x11/CMakeLists.txt
index f69d12c..eabf445 100644
--- a/framebuffers/x11/CMakeLists.txt
+++ b/framebuffers/x11/CMakeLists.txt
@@ -4,6 +4,7 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}
set (krfb_framebuffer_x11_SRCS
x11framebuffer.cpp
+ x11framebufferplugin.cpp
)
kde4_add_plugin (krfb_framebuffer_x11
@@ -21,6 +22,10 @@ target_link_libraries (krfb_framebuffer_x11
)
install (TARGETS krfb_framebuffer_x11
- DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+install (FILES krfb_framebuffer_x11.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
)
diff --git a/framebuffers/x11/krfb_framebuffer_x11.desktop b/framebuffers/x11/krfb_framebuffer_x11.desktop
new file mode 100644
index 0000000..197c6a3
--- /dev/null
+++ b/framebuffers/x11/krfb_framebuffer_x11.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Encoding=UTF-8
+Comment=X11 XDamage/XShm based Framebuffer for KRfb.
+Name=X11 Framebuffer for KRfb
+Type=Service
+ServiceTypes=krfb/framebuffer
+
+X-KDE-Library=krfb_framebuffer_x11
+X-KDE-PluginInfo-Name=x11
+X-KDE-PluginInfo-Version=0.1
+X-KDE-PluginInfo-Website=http://www.kde.org
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/framebuffers/x11/x11framebuffer.h b/framebuffers/x11/x11framebuffer.h
index 8fef1ef..fbee0eb 100644
--- a/framebuffers/x11/x11framebuffer.h
+++ b/framebuffers/x11/x11framebuffer.h
@@ -6,8 +6,8 @@
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
-#ifndef X11FRAMEBUFFER_H
-#define X11FRAMEBUFFER_H
+#ifndef KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFER_H
+#define KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFER_H
#include <framebuffer.h>
#include <QWidget>
@@ -35,7 +35,7 @@ class X11FrameBuffer : public FrameBuffer
{
Q_OBJECT
public:
- X11FrameBuffer(WId id, QObject* parent);
+ X11FrameBuffer(WId id, QObject* parent = 0);
~X11FrameBuffer();
diff --git a/framebuffers/x11/x11framebufferplugin.cpp b/framebuffers/x11/x11framebufferplugin.cpp
new file mode 100644
index 0000000..b3a3af7
--- /dev/null
+++ b/framebuffers/x11/x11framebufferplugin.cpp
@@ -0,0 +1,46 @@
+/* This file is part of the KDE project
+ Copyright (C) 2009 Collabora Ltd <info@collabora.co.uk>
+
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "x11framebufferplugin.h"
+
+#include "x11framebuffer.h"
+
+#include <KGenericFactory>
+
+
+X11FrameBufferPlugin::X11FrameBufferPlugin(QObject *parent, const QVariantList &args)
+ : FrameBufferPlugin(parent, args)
+{
+}
+
+X11FrameBufferPlugin::~X11FrameBufferPlugin()
+{
+}
+
+FrameBuffer *X11FrameBufferPlugin::frameBuffer(WId id)
+{
+ return new X11FrameBuffer(id);
+}
+
+K_PLUGIN_FACTORY(factory, registerPlugin<X11FrameBufferPlugin>();) \
+K_EXPORT_PLUGIN(factory("krfb_framebuffer_x11"))
+
+
+#include "x11framebufferplugin.moc"
+
diff --git a/framebuffers/x11/x11framebufferplugin.h b/framebuffers/x11/x11framebufferplugin.h
new file mode 100644
index 0000000..4262969
--- /dev/null
+++ b/framebuffers/x11/x11framebufferplugin.h
@@ -0,0 +1,47 @@
+/* This file is part of the KDE project
+ Copyright (C) 2009 Collabora Ltd <info@collabora.co.uk>
+
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFERPLUGIN_H
+#define KRFB_FRAMEBUFFER_X11_X11FRAMEBUFFERPLUGIN_H
+
+#include "framebufferplugin.h"
+
+#include <kdemacros.h>
+
+#include <QtGui/QWidget>
+
+class FrameBuffer;
+
+class X11FrameBufferPlugin : public FrameBufferPlugin
+{
+ Q_OBJECT
+
+public:
+ X11FrameBufferPlugin(QObject *parent, const QVariantList &args);
+ virtual ~X11FrameBufferPlugin();
+
+ virtual FrameBuffer *frameBuffer(WId id);
+
+private:
+ Q_DISABLE_COPY(X11FrameBufferPlugin);
+};
+
+
+#endif // Header guard
+