3
* Compiz KDE compatibility plugin
7
* Copyright : (C) 2007 by Danny Baumann
8
* E-mail : maniac@opencompositing.org
10
* Based on scale.c and switcher.c:
11
* Copyright : (C) 2007 David Reveman
12
* E-mail : davidr@novell.com
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU General Public License for more details.
26
#include <core/core.h>
27
#include <core/pluginclasshandler.h>
28
#include <composite/composite.h>
29
#include <opengl/opengl.h>
30
#include <decoration.h>
32
#include <X11/Xatom.h>
33
#include <core/atoms.h>
35
#include "kdecompat_options.h"
39
class KDECompatScreen :
40
public PluginClassHandler <KDECompatScreen, CompScreen>,
41
public CompositeScreenInterface,
42
public GLScreenInterface,
43
public ScreenInterface,
44
public KdecompatOptions
48
KDECompatScreen (CompScreen *);
54
handleEvent (XEvent *);
57
advertiseSupport (Atom atom,
61
optionChanged (CompOption *option,
62
KdecompatOptions::Options num);
68
glPaintOutput (const GLScreenPaintAttrib &attrib,
69
const GLMatrix &transform,
70
const CompRegion ®ion,
78
handleCompizEvent (const char *pluginName,
79
const char *eventName,
80
CompOption::Vector options);
83
getScaleAction (const char *name);
92
checkPaintFunctions ();
94
CompositeScreen *cScreen;
99
Atom mKdePresentGroupAtom;
100
Atom mKdeBlurBehindRegionAtom;
101
Atom mCompizWindowBlurAtom;
103
bool mHasSlidingPopups;
108
CompPlugin *mScaleHandle;
110
CompTimer mScaleTimeout;
114
CompWindow *mPresentWindow;
115
std::vector<Window> mPresentWindowList;
118
#define KDECOMPAT_SCREEN(s) \
119
KDECompatScreen *ks = KDECompatScreen::get (s)
121
class KDECompatWindow :
122
public PluginClassHandler <KDECompatWindow, CompWindow>,
123
public WindowInterface,
124
public CompositeWindowInterface,
125
public GLWindowInterface
129
KDECompatWindow (CompWindow *);
133
CompositeWindow *cWindow;
151
SlidePosition position;
158
std::list<Thumb> mPreviews;
161
SlideData *mSlideData;
165
bool mBlurPropertySet;
170
glPaint (const GLWindowPaintAttrib &,
183
stopCloseAnimation ();
186
sendSlideEvent (bool start);
189
startSlideAnimation (bool appearing);
192
endSlideAnimation ();
195
updateSlidePosition ();
198
updateBlurProperty (bool enabled);
207
windowNotify (CompWindowNotify n);
210
#define KDECOMPAT_WINDOW(w) \
211
KDECompatWindow *kw = KDECompatWindow::get(w)
213
class KDECompatPluginVTable :
214
public CompPlugin::VTableForScreenAndWindow <KDECompatScreen,