~george-edison55/stackfusion/trunk

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
// StackFusion - Experimental Compiz plugin that provides
// fancy animations when events happen on registered Stack Exchange
// accounts.

// Include files
#include <core/core.h>
#include <core/pluginclasshandler.h>
#include <composite/composite.h>
#include <opengl/opengl.h>

#include "stackfusion_options.h"

class StackFusionScreen :
        public PluginClassHandler <StackFusionScreen, CompScreen>,
        public GLScreenInterface,
        public CompositeScreenInterface,
        public StackfusionOptions
{
public:

    StackFusionScreen(CompScreen *);
    ~StackFusionScreen();

    // Painting functions
    void preparePaint(int);
    void donePaint();

    // Functions that I know NOTHING about but figure must
    // play some kind of important role in the plugin's life.
    void postLoad();

    bool glPaintOutput (const GLScreenPaintAttrib &,
                        const GLMatrix &,
                        const CompRegion &,
                        CompOutput *,
                        unsigned int);

private:

    CompositeScreen * m_c_screen;
    GLScreen	    * m_g_screen;
};

class StackFusionVTable :
        public CompPlugin::VTableForScreen <StackFusionScreen>
{
public:

    bool init();
};