summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thomas <markbt@efaref.net>2008-05-14 00:45:12 +0100
committerMark Thomas <markbt@efaref.net>2008-05-14 00:45:12 +0100
commitd2de48e12ab000c558122bad9f04e83adcfd1ce7 (patch)
tree689ba167a2ffdffb0a365f5a49c4c5235a32aa40
parentfb1c2e6919893287f05dbb20806b998cb32b56bb (diff)
downloadstatic-d2de48e12ab000c558122bad9f04e83adcfd1ce7.tar.gz
static-d2de48e12ab000c558122bad9f04e83adcfd1ce7.tar.bz2
Update to latest Compiz. (Patch from SmSpillaz).
-rw-r--r--static.c50
1 files changed, 31 insertions, 19 deletions
diff --git a/static.c b/static.c
index 1b859a7..8ae1d23 100644
--- a/static.c
+++ b/static.c
@@ -20,7 +20,7 @@
*/
#include <stdlib.h>
-#include <compiz.h>
+#include <compiz-core.h>
#include "static_options.h"
@@ -52,12 +52,12 @@ typedef struct _StaticScreen
StaticScreen;
#define GET_STATIC_DISPLAY(d) \
- ((StaticDisplay *) (d)->privates[displayPrivateIndex].ptr)
+ ((StaticDisplay *) (d)->base.privates[displayPrivateIndex].ptr)
#define STATIC_DISPLAY(d) \
StaticDisplay *sd = GET_STATIC_DISPLAY(d);
#define GET_STATIC_SCREEN(s, sd) \
- ((StaticScreen *) (s)->privates[(sd)->screenPrivateIndex].ptr)
+ ((StaticScreen *) (s)->base.privates[(sd)->screenPrivateIndex].ptr)
#define STATIC_SCREEN(s) \
StaticScreen *ss = GET_STATIC_SCREEN(s, GET_STATIC_DISPLAY(s->display))
@@ -189,7 +189,7 @@ staticInitScreen (CompPlugin *p,
WRAP (ss, s, paintTransformedOutput, staticPaintTransformedOutput);
WRAP (ss, s, preparePaintScreen, staticPreparePaintScreen);
- s->privates[sd->screenPrivateIndex].ptr = ss;
+ s->base.privates[sd->screenPrivateIndex].ptr = ss;
return TRUE;
}
@@ -227,7 +227,7 @@ staticInitDisplay (CompPlugin *p,
return FALSE;
}
- d->privates[displayPrivateIndex].ptr = sd;
+ d->base.privates[displayPrivateIndex].ptr = sd;
return TRUE;
}
@@ -261,32 +261,44 @@ staticFini (CompPlugin *p)
freeDisplayPrivateIndex (displayPrivateIndex);
}
-static int
-staticGetVersion (CompPlugin *plugin,
- int version)
+static CompBool
+staticInitObject (CompPlugin *p,
+ CompObject *o)
{
- return ABIVERSION;
+ static InitPluginObjectProc dispTab[] = {
+ (InitPluginObjectProc) 0, /* InitCore */
+ (InitPluginObjectProc) staticInitDisplay,
+ (InitPluginObjectProc) staticInitScreen
+ };
+
+ RETURN_DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), TRUE, (p, o));
}
-CompPluginVTable staticVTable = {
+static void
+staticFiniObject (CompPlugin *p,
+ CompObject *o)
+{
+ static FiniPluginObjectProc dispTab[] = {
+ (FiniPluginObjectProc) 0, /* FiniCore */
+ (FiniPluginObjectProc) staticFiniDisplay,
+ (FiniPluginObjectProc) staticFiniScreen
+ };
+
+ DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), (p, o));
+}
+static CompPluginVTable staticVTable = {
"static",
- staticGetVersion,
0,
staticInit,
staticFini,
- staticInitDisplay,
- staticFiniDisplay,
- staticInitScreen,
- staticFiniScreen,
- 0,
- 0,
- 0,
- 0,
+ staticInitObject,
+ staticFiniObject,
0,
0
};
+
CompPluginVTable *
getCompPluginInfo (void)
{