3
* Compiz scale plugin addon plugin
7
* Copyright : (C) 2007 by Danny Baumann
8
* E-mail : maniac@opencompositing.org
10
* Organic scale mode taken from Beryl's scale.c, written by
11
* Copyright : (C) 2006 Diogo Ferreira
12
* E-mail : diogo@underdev.org
14
* Ported to Compiz 0.9 by:
15
* Copyright : (C) 2009 by Sam Spilsbury
16
* E-mail : smspillaz@gmail.com
18
* This program is free software; you can redistribute it and/or
19
* modify it under the terms of the GNU General Public License
20
* as published by the Free Software Foundation; either version 2
21
* of the License, or (at your option) any later version.
23
* This program is distributed in the hope that it will be useful,
24
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
* GNU General Public License for more details.
33
#include <X11/Xatom.h>
35
#include <core/core.h>
36
#include <composite/composite.h>
37
#include <opengl/opengl.h>
38
#include <text/text.h>
39
#include <scale/scale.h>
41
#include "scaleaddon_options.h"
43
class ScaleAddonScreen :
44
public PluginClassHandler <ScaleAddonScreen, CompScreen>,
45
public ScreenInterface,
46
public CompositeScreenInterface,
47
public ScaleScreenInterface,
48
public ScaleaddonOptions
51
ScaleAddonScreen (CompScreen *);
53
CompositeScreen *cScreen;
56
Window highlightedWindow;
57
Window lastHighlightedWindow;
63
std::vector <ScaleSlot> paintSlots;
66
handleEvent (XEvent *);
69
layoutSlotsAndAssignWindows ();
72
layoutNaturalThumbs ();
75
isOverlappingAny (ScaleWindow *w,
76
const std::map <ScaleWindow *, CompRegion>,
77
const CompRegion &border);
83
checkWindowHighlight ();
86
closeWindow (CompAction *action,
87
CompAction::State state,
88
CompOption::Vector options);
91
pullWindow (CompAction *action,
92
CompAction::State state,
93
CompOption::Vector options);
96
zoomWindow (CompAction *action,
97
CompAction::State state,
98
CompOption::Vector options);
101
handleCompizEvent (const char *pluginName,
102
const char *eventName,
103
CompOption::Vector &options);
106
optionChanged (CompOption *opt,
107
ScaleaddonOptions::Options num);
110
#define ADDON_SCREEN(s) \
111
ScaleAddonScreen *as = ScaleAddonScreen::get (s)
113
class ScaleAddonWindow :
114
public PluginClassHandler <ScaleAddonWindow, CompWindow>,
115
public ScaleWindowInterface
118
ScaleAddonWindow (CompWindow *);
121
ScaleWindow *sWindow;
122
CompositeWindow *cWindow;
129
CompWindow *oldAbove;
132
scalePaintDecoration (const GLWindowPaintAttrib &,
138
scaleSelectWindow ();
150
#define ADDON_WINDOW(w) \
151
ScaleAddonWindow *aw = ScaleAddonWindow::get (w)
154
class ScaleAddonPluginVTable :
155
public CompPlugin::VTableForScreenAndWindow <ScaleAddonScreen,