2
* Copyright © 2008 Dennis Kasprzyk
3
* Copyright © 2007 Novell, Inc.
5
* Permission to use, copy, modify, distribute, and sell this software
6
* and its documentation for any purpose is hereby granted without
7
* fee, provided that the above copyright notice appear in all copies
8
* and that both that copyright notice and this permission notice
9
* appear in supporting documentation, and that the name of
10
* Dennis Kasprzyk not be used in advertising or publicity pertaining to
11
* distribution of the software without specific, written prior permission.
12
* Dennis Kasprzyk makes no representations about the suitability of this
13
* software for any purpose. It is provided "as is" without express or
16
* DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
18
* NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
20
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
21
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
22
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24
* Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
25
* David Reveman <davidr@novell.com>
28
#ifndef _COMPOSITE_PRIVATES_H
29
#define _COMPOSITE_PRIVATES_H
31
#include <composite/composite.h>
32
#include <core/atoms.h>
34
#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR > 2
39
#define COMPOSITE_OPTION_SLOW_ANIMATIONS_KEY 0
40
#define COMPOSITE_OPTION_DETECT_REFRESH_RATE 1
41
#define COMPOSITE_OPTION_REFRESH_RATE 2
42
#define COMPOSITE_OPTION_UNREDIRECT_FS 3
43
#define COMPOSITE_OPTION_FORCE_INDEPENDENT 4
44
#define COMPOSITE_OPTION_NUM 5
46
extern CompPlugin::VTable *compositeVTable;
48
extern const CompMetadata::OptionInfo
49
compositeOptionInfo[COMPOSITE_OPTION_NUM];
51
extern CompWindow *lastDamagedWindow;
53
class PrivateCompositeScreen : ScreenInterface
56
PrivateCompositeScreen (CompositeScreen *cs);
57
~PrivateCompositeScreen ();
59
void outputChangeNotify ();
61
void handleEvent (XEvent *event);
63
void makeOutputWindow ();
67
void handleExposeEvent (XExposeEvent *event);
71
CompositeScreen *cScreen;
73
int compositeEvent, compositeError, compositeOpcode;
74
int damageEvent, damageError;
75
int fixesEvent, fixesError, fixesVersion;
78
int shapeEvent, shapeError;
81
int randrEvent, randrError;
84
unsigned long damageMask;
91
std::list <CompRect> exposeRects;
93
CompPoint windowPaintOffset;
95
int overlayWindowCount;
97
struct timeval lastRedraw;
100
int optimalRedrawTime;
108
CompTimer paintTimer;
111
CompositeScreen::PaintHandler *pHnd;
113
CompOption::Vector opt;
116
class PrivateCompositeWindow : WindowInterface
119
PrivateCompositeWindow (CompWindow *w, CompositeWindow *cw);
120
~PrivateCompositeWindow ();
122
void windowNotify (CompWindowNotify n);
123
void resizeNotify (int dx, int dy, int dwidth, int dheight);
124
void moveNotify (int dx, int dy, bool now);
126
static void handleDamageRect (CompositeWindow *w,
135
CompositeWindow *cWindow;
136
CompositeScreen *cScreen;
147
unsigned short opacity;
148
unsigned short brightness;
149
unsigned short saturation;
151
XRectangle *damageRects;