~ps-jenkins/compiz/latestsnapshot-10.9.9daily13.06.1913.04-0ubuntu1

2121 by Dennis Kasprzyk
Added missing license headers.
1
/*
2
 * Copyright © 2008 Dennis Kasprzyk
3
 * Copyright © 2007 Novell, Inc.
4
 *
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
14
 * implied warranty.
15
 *
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.
23
 *
24
 * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
25
 *          David Reveman <davidr@novell.com>
26
 */
27
1982.1.14 by Dennis Kasprzyk
Port of CompOption and CompAction to C++.
28
#ifndef _PRIVATEACTION_H
29
#define _PRIVATEACTION_H
30
3382.2.7 by Sam Spilsbury
Restrict access of private data in CompAction to a separate nonmember
31
namespace compiz
32
{
3382.2.14 by Sam Spilsbury
Cleanup.
33
namespace actions
34
{
35
class BoundAction
36
{
37
    public:
38
39
	virtual ~BoundAction () {}
40
41
	virtual void setActive (bool) = 0;
42
};
43
44
void setActionActiveState (const CompAction  &action,
45
			   bool              active);
46
}
3382.2.7 by Sam Spilsbury
Restrict access of private data in CompAction to a separate nonmember
47
}
48
49
class PrivateAction :
50
    public compiz::actions::BoundAction
51
{
1982.1.14 by Dennis Kasprzyk
Port of CompOption and CompAction to C++.
52
    public:
53
	PrivateAction ();
54
	PrivateAction (const PrivateAction&);
2308 by Danny Baumann
Whitespace fixes.
55
3382.2.14 by Sam Spilsbury
Cleanup.
56
	void setActive (bool);
3382.2.7 by Sam Spilsbury
Restrict access of private data in CompAction to a separate nonmember
57
1982.1.14 by Dennis Kasprzyk
Port of CompOption and CompAction to C++.
58
	CompAction::CallBack initiate;
59
	CompAction::CallBack terminate;
60
61
	CompAction::State state;
62
63
	CompAction::BindingType   type;
64
65
	CompAction::KeyBinding    key;
66
	CompAction::ButtonBinding button;
67
68
	bool bell;
69
70
	unsigned int edgeMask;
71
2654 by Sam Spilsbury
Don't increase core action register reference counts if the same action was already registered
72
	bool active;
73
1982.1.14 by Dennis Kasprzyk
Port of CompOption and CompAction to C++.
74
	CompPrivate priv;
75
};
76
77
#endif