~hypodermia/ubuntu/oneiric/compiz/fix-for-bug-301174

« back to all changes in this revision

Viewing changes to plugins/bell/src/bell.h

  • Committer: Emily Strickland
  • Date: 2011-06-15 04:52:00 UTC
  • Revision ID: emily@zubon.org-20110615045200-aqfclpzec14oaoja
Add 'bell' plugin and a small fix to bcop.xslt to properly trigger bell events (see http://cgit.compiz.org/compiz/core/commit/?id=e6afcfd735db5a9f507fb9cd810bdb139ab8480f); fixes https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/301174 and https://bugs.launchpad.net/ubuntu/+source/unity/+bug/769314

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 *
 
3
 * Compiz bell plugin
 
4
 *
 
5
 * bell.c
 
6
 *
 
7
 * Copyright (c) 2011 Emily Strickland <emily@zubon.org>
 
8
 *
 
9
 * Authors:
 
10
 * Emily Strickland <emily@zubon.org>
 
11
 *
 
12
 * This program is free software; you can redistribute it and/or
 
13
 * modify it under the terms of the GNU General Public License
 
14
 * as published by the Free Software Foundation; either version 2
 
15
 * of the License, or (at your option) any later version.
 
16
 *
 
17
 * This program is distributed in the hope that it will be useful,
 
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 * GNU General Public License for more details.
 
21
 *
 
22
 **/
 
23
 
 
24
#include <core/core.h>
 
25
#include <core/pluginclasshandler.h>
 
26
 
 
27
#include <canberra.h>
 
28
 
 
29
#include "bell_options.h"
 
30
 
 
31
class AudibleBell :
 
32
    public PluginClassHandler<AudibleBell, CompScreen>,
 
33
    public ScreenInterface,
 
34
    public BellOptions
 
35
{
 
36
    public:
 
37
 
 
38
        AudibleBell (CompScreen *screen);
 
39
        ~AudibleBell ();
 
40
 
 
41
        bool bell ();
 
42
 
 
43
    private:
 
44
 
 
45
        ca_context *mCanberraContext;
 
46
        CompString mFilename;
 
47
        
 
48
        void
 
49
        filenameChange (CompOption *option,
 
50
                        Options    num);
 
51
};
 
52
 
 
53
class BellPluginVTable :
 
54
    public CompPlugin::VTableForScreen<AudibleBell>
 
55
{
 
56
    public:
 
57
        bool init ();
 
58
};
 
59