summaryrefslogtreecommitdiff
path: root/src/sound.h
blob: c093d2cadca6aeb4900ba47093f17f165018e8de (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
#include <core/core.h>
#include <core/pluginclasshandler.h>
#include <compiz.h>
#include <gst/gst.h>
#include <stdbool.h>

#include "sound_options.h"

class SoundScreen :
    public PluginClassHandler <SoundScreen, CompScreen>,
    public SoundOptions
{
    public:

	SoundScreen (CompScreen *);
	~SoundScreen ();

	GstElement *pipeline;

    public:

	void playSound (CompString &);
	gboolean busCall (GstBus *, GstMessage *, void *);
};

#define SOUND_SCREEN(s)						   	      \
    SoundScreen *ss = SoundScreen::get (s);

class SoundWindow :
    public PluginClassHandler <SoundWindow, CompWindow>,
    public WindowInterface
{
    public:

	SoundWindow (CompWindow *w);

	CompWindow *window;

    public:

	void windowNotify (CompWindowNotify);
	bool shouldSound ();
};

#define SOUND_WINDOW(w)							      \
    SoundWindow *sw = SoundWindow::get (w);

class SoundPluginVTable :
    public CompPlugin::VTableForScreenAndWindow <SoundScreen, SoundWindow>
{
    public:

	bool init ();
};