7
* Copyright (c) 2008 Dennis Kasprzyk <racarr@opencompositing.org>
8
* Copyright (c) 2006 Robert Carr <racarr@beryl-project.org>
11
* Robert Carr <racarr@beryl-project.org>
12
* Dennis Kasprzyk <onestone@opencompositing.org>
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>
29
#include <composite/composite.h>
30
#include <opengl/opengl.h>
32
#include "expo_options.h"
35
public ScreenInterface,
36
public CompositeScreenInterface,
37
public GLScreenInterface,
38
public PluginClassHandler<ExpoScreen, CompScreen>,
42
ExpoScreen (CompScreen *);
44
void handleEvent (XEvent *);
46
void preparePaint (int);
47
void paint (CompOutput::ptrList&, unsigned int);
50
bool glPaintOutput (const GLScreenPaintAttrib&, const GLMatrix&,
51
const CompRegion&, CompOutput *, unsigned int);
52
void glPaintTransformedOutput (const GLScreenPaintAttrib&,
53
const GLMatrix&, const CompRegion&,
54
CompOutput *, unsigned int);
56
bool dndInit (CompAction *, CompAction::State, CompOption::Vector&);
57
bool dndFini (CompAction *, CompAction::State, CompOption::Vector&);
58
bool doExpo (CompAction *, CompAction::State, CompOption::Vector&);
59
bool exitExpo (CompAction *, CompAction::State, CompOption::Vector&);
60
bool termExpo (CompAction *, CompAction::State, CompOption::Vector&);
61
bool nextVp (CompAction *, CompAction::State, CompOption::Vector&);
62
bool prevVp (CompAction *, CompAction::State, CompOption::Vector&);
76
CompositeScreen *cScreen;
84
CompWindow *dndWindow;
93
std::vector<float> vpActivity;
97
VPUpdateMode vpUpdateMode;
100
unsigned int clickTime;
103
CompRegion tmpRegion;
109
std::vector<GLfloat> vpNormals;
110
std::vector<GLfloat> winNormals;
112
CompScreen::GrabHandle grabIndex;
115
void moveFocusViewport (int, int);
116
void finishWindowMovement ();
117
void updateWraps (bool);
119
void invertTransformedVertex (const GLScreenPaintAttrib&,
120
const GLMatrix&, CompOutput *, int[2]);
121
void paintWall (const GLScreenPaintAttrib&, const GLMatrix&,
122
const CompRegion&, CompOutput *, unsigned int, bool);
131
public CompositeWindowInterface,
132
public GLWindowInterface,
133
public PluginClassHandler<ExpoWindow, CompWindow>
136
ExpoWindow (CompWindow *);
138
bool damageRect (bool, const CompRect&);
140
bool glDraw (const GLMatrix&, GLFragment::Attrib&,
141
const CompRegion&, unsigned int);
142
bool glPaint (const GLWindowPaintAttrib&, const GLMatrix&,
143
const CompRegion&, unsigned int);
144
void glAddGeometry (const GLTexture::MatrixList&,
145
const CompRegion&, const CompRegion&,
146
unsigned int, unsigned int);
147
void glDrawTexture (GLTexture *, GLFragment::Attrib& attrib,
151
CompositeWindow *cWindow;
156
class ExpoPluginVTable :
157
public CompPlugin::VTableForScreenAndWindow<ExpoScreen, ExpoWindow>