~compiz-linaro-team/compiz/gles2

« back to all changes in this revision

Viewing changes to kde/window-decorator-kde4/options.h

  • Committer: Dennis Kasprzyk
  • Date: 2008-01-22 18:32:13 UTC
  • Revision ID: git-v1:0d27505802e3236496f5e3d9252b08577581d19f
Added kde-window-decorator KDE 4 port.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2008 Dennis Kasprzyk <onestone@opencompositing.org>
 
3
 * Copyright © 2006 Novell, Inc.
 
4
 * Copyright © 2006 Volker Krause <vkrause@kde.org>
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
19
 * MA 02110-1301, USA.
 
20
 *
 
21
 * Author: David Reveman <davidr@novell.com>
 
22
 */
 
23
 
 
24
#ifndef _OPTIONS_H
 
25
#define _OPTIONS_H
 
26
 
 
27
#include <kdecoration.h>
 
28
 
 
29
class KConfig;
 
30
 
 
31
namespace KWD
 
32
{
 
33
 
 
34
class Options : public KDecorationOptions
 
35
    {
 
36
    public:
 
37
        enum MouseCommand
 
38
        {
 
39
            MouseRaise,
 
40
            MouseLower,
 
41
            MouseOperationsMenu,
 
42
            MouseToggleRaiseAndLower,
 
43
            MouseActivateAndRaise,
 
44
            MouseActivateAndLower,
 
45
            MouseActivate,
 
46
            MouseActivateRaiseAndPassClick,
 
47
            MouseActivateAndPassClick,
 
48
            MouseMove,
 
49
            MouseUnrestrictedMove,
 
50
            MouseActivateRaiseAndMove,
 
51
            MouseActivateRaiseAndUnrestrictedMove,
 
52
            MouseResize,
 
53
            MouseUnrestrictedResize,
 
54
            MouseShade,
 
55
            MouseSetShade,
 
56
            MouseUnsetShade,
 
57
            MouseMaximize,
 
58
            MouseRestore,
 
59
            MouseMinimize,
 
60
            MouseNextDesktop,
 
61
            MousePreviousDesktop,
 
62
            MouseAbove,
 
63
            MouseBelow,
 
64
            MouseOpacityMore,
 
65
            MouseOpacityLess,
 
66
            MouseNothing
 
67
        };
 
68
        enum MouseWheelCommand
 
69
        {
 
70
            MouseWheelRaiseLower,
 
71
            MouseWheelShadeUnshade,
 
72
            MouseWheelMaximizeRestore,
 
73
            MouseWheelAboveBelow,
 
74
            MouseWheelPreviousNextDesktop,
 
75
            MouseWheelChangeOpacity,
 
76
            MouseWheelNothing
 
77
        };
 
78
 
 
79
        Options (KConfig *config);
 
80
 
 
81
        virtual unsigned long updateSettings (void);
 
82
 
 
83
        WindowOperation operationTitlebarDblClick (void)
 
84
        {
 
85
            return OpTitlebarDblClick;
 
86
        }
 
87
 
 
88
        MouseCommand commandActiveTitlebar1 (void)
 
89
        {
 
90
            return CmdActiveTitlebar1;
 
91
        }
 
92
        MouseCommand commandActiveTitlebar2 (void)
 
93
        {
 
94
            return CmdActiveTitlebar2;
 
95
        }
 
96
        MouseCommand commandActiveTitlebar3 (void)
 
97
        {
 
98
            return CmdActiveTitlebar3;
 
99
        }
 
100
        MouseCommand commandInactiveTitlebar1 (void)
 
101
        {
 
102
            return CmdInactiveTitlebar1;
 
103
        }
 
104
        MouseCommand commandInactiveTitlebar2 (void)
 
105
        {
 
106
            return CmdInactiveTitlebar2;
 
107
        }
 
108
        MouseCommand commandInactiveTitlebar3 (void)
 
109
        {
 
110
            return CmdInactiveTitlebar3;
 
111
        }
 
112
 
 
113
        MouseCommand operationTitlebarMouseWheel (int delta)
 
114
        {
 
115
            return wheelToMouseCommand (CmdTitlebarWheel, delta);
 
116
        }
 
117
 
 
118
    private:
 
119
        static KDecorationDefines::WindowOperation
 
120
            windowOperation (const QString &name, bool restricted);
 
121
        MouseCommand mouseCommand (const QString &name, bool restricted);
 
122
        MouseWheelCommand mouseWheelCommand (const QString &name);
 
123
        MouseCommand wheelToMouseCommand (MouseWheelCommand com, int delta);
 
124
 
 
125
    private:
 
126
        KDecorationDefines::WindowOperation OpTitlebarDblClick;
 
127
        MouseCommand CmdActiveTitlebar1;
 
128
        MouseCommand CmdActiveTitlebar2;
 
129
        MouseCommand CmdActiveTitlebar3;
 
130
        MouseCommand CmdInactiveTitlebar1;
 
131
        MouseCommand CmdInactiveTitlebar2;
 
132
        MouseCommand CmdInactiveTitlebar3;
 
133
        MouseWheelCommand CmdTitlebarWheel;
 
134
 
 
135
        KConfig *mConfig;
 
136
    };
 
137
 
 
138
}
 
139
 
 
140
#endif