summaryrefslogtreecommitdiff
path: root/src/flash.h
blob: 346f61217e7e04e631e741f42a2a79873f9b2e01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/**
*
* Compiz plugin Flash
*
* Copyright : (C) 2007 by Jean-Fran�is Souville & Charles Jeremy
* E-mail    : souville@ecole.ensicaen.fr , charles@ecole.ensicaen.fr
*
* Ported to compiz++ by:
* Sam Spilsbury <smspillaz@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
*/

#include <math.h>

#include <core/core.h>
#include <core/pluginclasshandler.h>

#include <opengl/opengl.h>
#include <composite/composite.h>

#include "flash_options.h"

#define POS_TOP 0
#define POS_BOTTOM 1
#define POS_LEFT 2
#define POS_RIGHT 3

class FlashScreen :
    public PluginClassHandler <FlashScreen, CompScreen>,
    public ScreenInterface,
    public CompositeScreenInterface,
    public GLScreenInterface,
    public FlashOptions
{
    public:

	FlashScreen (CompScreen *);

	CompositeScreen *cScreen;
	GLScreen *gScreen;

	int pointX, pointY;
	int winX,winY,winW,winH;

	double** CoordinateArray;

	int tailleTab;

	int *remainTime;

	int *interval;

	int** alea;

	int location;

	unsigned int WindowMask;

	bool active;
	bool *lightning;

	bool existWindow;

	bool isAnimated;
	bool anotherPluginIsUsing;

	void
	preparePaint (int ms);

	bool
	glPaintOutput (const GLScreenPaintAttrib &sAttrib,
		       const GLMatrix            &transform,
		       const CompRegion          &region,
		       CompOutput                *output,
		       unsigned int              mask);

	void
	donePaint ();

	static bool
	flashInitiate (CompAction *action,
		       CompAction::State state,
		       CompOption::Vector options);
};

#define FLASH_SCREEN(s)							       \
    FlashScreen *fs = FlashScreen::get (s)

class FlashPluginVTable :
    public CompPlugin::VTableForScreen <FlashScreen>
{
    public:

	bool
	init ();
};