summaryrefslogtreecommitdiff
path: root/include/core/action.h
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-12-22 11:00:18 +0100
committerDennis Kasprzyk <onestone@compiz-fusion.org>2008-12-22 11:00:18 +0100
commit51c755cd98acb9f37bd6868b5bd6256402273f99 (patch)
tree3782e2ff77d4a1153ec67923711213f4a13f272f /include/core/action.h
parent1acfd96b7843e28bc37b4b2e8da21b9ea3106fc7 (diff)
downloadmobileperf-51c755cd98acb9f37bd6868b5bd6256402273f99.tar.gz
mobileperf-51c755cd98acb9f37bd6868b5bd6256402273f99.tar.bz2
Allow to set keycode/buttons/modifiers in CompAction.
Diffstat (limited to 'include/core/action.h')
-rw-r--r--include/core/action.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/core/action.h b/include/core/action.h
index a7e18fd..9e16df1 100644
--- a/include/core/action.h
+++ b/include/core/action.h
@@ -84,12 +84,13 @@ class CompAction {
public:
KeyBinding ();
KeyBinding (const KeyBinding&);
+ KeyBinding (int keycode, unsigned int modifiers = 0);
- unsigned int modifiers ();
- int keycode ();
+ unsigned int modifiers () const;
+ int keycode () const;
bool fromString (const CompString &str);
- CompString toString ();
+ CompString toString () const;
private:
unsigned int mModifiers;
@@ -100,12 +101,13 @@ class CompAction {
public:
ButtonBinding ();
ButtonBinding (const ButtonBinding&);
+ ButtonBinding (int button, unsigned int modifiers = 0);
- unsigned int modifiers ();
- int button ();
+ unsigned int modifiers () const;
+ int button () const;
bool fromString (const CompString &str);
- CompString toString ();
+ CompString toString () const;
private:
unsigned int mModifiers;
@@ -131,7 +133,10 @@ class CompAction {
BindingType type ();
KeyBinding & key ();
+ void setKey (const KeyBinding &key);
+
ButtonBinding & button ();
+ void setButton (const ButtonBinding &button);
unsigned int edgeMask ();
void setEdgeMask (unsigned int edge);