summaryrefslogtreecommitdiff
path: root/plugins/compiztoolbox
diff options
context:
space:
mode:
authorSam Spilsbury <SmSpillaz@gmail.com>2010-05-15 12:54:32 +0800
committerSam Spilsbury <SmSpillaz@gmail.com>2010-05-15 12:54:32 +0800
commit9ba6b2fc793b88e3d7775fe36a5915a96641b5da (patch)
treeca2e9d5d26b78c3477ed512d80a8f557196198b4 /plugins/compiztoolbox
parentc3d7dd9fb629fd85530b24fa7b14c7e5824f97ad (diff)
downloadcompiz-with-glib-mainloop-9ba6b2fc793b88e3d7775fe36a5915a96641b5da.tar.gz
compiz-with-glib-mainloop-9ba6b2fc793b88e3d7775fe36a5915a96641b5da.tar.bz2
Add necessary changes to compile without rpath usage
Diffstat (limited to 'plugins/compiztoolbox')
-rw-r--r--plugins/compiztoolbox/CMakeLists.txt2
-rw-r--r--plugins/compiztoolbox/compiztoolbox.xml.in7
-rw-r--r--plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h2
-rw-r--r--plugins/compiztoolbox/src/compiztoolbox.cpp43
4 files changed, 53 insertions, 1 deletions
diff --git a/plugins/compiztoolbox/CMakeLists.txt b/plugins/compiztoolbox/CMakeLists.txt
index d6a1f89..776f518 100644
--- a/plugins/compiztoolbox/CMakeLists.txt
+++ b/plugins/compiztoolbox/CMakeLists.txt
@@ -2,4 +2,4 @@ find_package (Compiz REQUIRED)
include (CompizPlugin)
-compiz_plugin(compiztoolbox PLUGINDEPS composite opengl)
+compiz_plugin (compiztoolbox PLUGINDEPS composite opengl)
diff --git a/plugins/compiztoolbox/compiztoolbox.xml.in b/plugins/compiztoolbox/compiztoolbox.xml.in
new file mode 100644
index 0000000..2152ee6
--- /dev/null
+++ b/plugins/compiztoolbox/compiztoolbox.xml.in
@@ -0,0 +1,7 @@
+<compiz>
+ <plugin name="compiztoolbox" useBcop="true">
+ <_short>Compiz Library Toolbox</_short>
+ <_long>Commonly used routines by plugins separated into a separate library</_long>
+ <category>Utility</category>
+ </plugin>
+</compiz>
diff --git a/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h b/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h
index 3223348..953bbd1 100644
--- a/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h
+++ b/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h
@@ -39,6 +39,8 @@
#include <fstream>
+#define COMPIZ_COMPIZTOOLBOX_ABI 1
+
typedef enum
{
XDGUserDirDesktop = 0,
diff --git a/plugins/compiztoolbox/src/compiztoolbox.cpp b/plugins/compiztoolbox/src/compiztoolbox.cpp
index 2a4dabf..f251df4 100644
--- a/plugins/compiztoolbox/src/compiztoolbox.cpp
+++ b/plugins/compiztoolbox/src/compiztoolbox.cpp
@@ -26,6 +26,24 @@
#include <core/core.h>
#include <compiztoolbox/compiztoolbox.h>
+#include "compiztoolbox_options.h"
+
+class CompizToolboxScreen :
+ public PluginClassHandler <CompizToolboxScreen, CompScreen>,
+ public CompiztoolboxOptions
+{
+ public:
+ CompizToolboxScreen (CompScreen *);
+};
+
+class CompizToolboxPluginVTable :
+ public CompPlugin::VTableForScreen <CompizToolboxScreen>
+{
+ bool init ();
+ void fini ();
+};
+
+COMPIZ_PLUGIN_20090315 (compiztoolbox, CompizToolboxPluginVTable);
CompString
getXDGUserDir (XDGUserDir userDir)
@@ -660,3 +678,28 @@ BaseSwitchWindow::BaseSwitchWindow (BaseSwitchScreen *ss, CompWindow *w) :
{
}
+CompizToolboxScreen::CompizToolboxScreen (CompScreen *screen) :
+ PluginClassHandler <CompizToolboxScreen, CompScreen> (screen)
+{
+}
+
+bool
+CompizToolboxPluginVTable::init ()
+{
+ if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION) ||
+ !CompPlugin::checkPluginABI ("composite", COMPIZ_COMPOSITE_ABI) ||
+ !CompPlugin::checkPluginABI ("opengl", COMPIZ_OPENGL_ABI))
+ return false;
+
+ CompPrivate p;
+ p.uval = COMPIZ_COMPOSITE_ABI;
+ screen->storeValue ("compiztoolbox_ABI", p);
+
+ return true;
+}
+
+void
+CompizToolboxPluginVTable::fini ()
+{
+ screen->eraseValue ("compiztoolbox_ABI");
+}