options.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef KWIN_OPTIONS_H
00013 #define KWIN_OPTIONS_H
00014
00015 #include <qobject.h>
00016 #include <qfont.h>
00017 #include <qpalette.h>
00018 #include <qstringlist.h>
00019 #include <kdecoration_p.h>
00020
00021 namespace KWinInternal
00022 {
00023
00024 class Client;
00025
00026 class Options : public KDecorationOptions
00027 {
00028 public:
00029
00030 Options();
00031 ~Options();
00032
00033 virtual unsigned long updateSettings();
00034
00066 enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
00067 FocusPolicy focusPolicy;
00068
00069
00074 bool clickRaise;
00075
00079 bool autoRaise;
00080
00084 int autoRaiseInterval;
00085
00089 bool shadeHover;
00090
00094 int shadeHoverInterval;
00095
00113 enum AltTabStyle { KDE, CDE };
00114 AltTabStyle altTabStyle;
00115
00119 bool xineramaEnabled;
00120 bool xineramaPlacementEnabled;
00121 bool xineramaMovementEnabled;
00122 bool xineramaMaximizeEnabled;
00123
00127 enum MoveResizeMode { Transparent, Opaque };
00128
00129 MoveResizeMode resizeMode;
00130 MoveResizeMode moveMode;
00131
00138 enum PlacementPolicy { Random, Smart, Cascade, Centered, ZeroCornered };
00139 PlacementPolicy placement;
00140
00141 bool focusPolicyIsReasonable()
00142 {
00143 return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
00144 }
00145
00149 bool animateShade;
00150
00154 int borderSnapZone;
00155
00159 int windowSnapZone;
00160
00161
00165 bool snapOnlyWhenOverlapping;
00166
00170 bool animateMinimize;
00171
00175 int animateMinimizeSpeed;
00176
00180 bool rollOverDesktops;
00181
00182
00183 int focusStealingPreventionLevel;
00184
00188 QStringList ignorePositionClasses;
00189
00190 bool checkIgnoreFocusStealing( const Client* c );
00191
00192 WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
00193
00194 enum MouseCommand
00195 {
00196 MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
00197 MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
00198 MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
00199 MouseMove, MouseUnrestrictedMove,
00200 MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
00201 MouseResize, MouseUnrestrictedResize,
00202 MouseShade,
00203 MouseMinimize,
00204 MouseNothing
00205 };
00206
00207 MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
00208 MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
00209 MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
00210 MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
00211 MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
00212 MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
00213 MouseCommand commandWindow1() { return CmdWindow1; }
00214 MouseCommand commandWindow2() { return CmdWindow2; }
00215 MouseCommand commandWindow3() { return CmdWindow3; }
00216 MouseCommand commandAll1() { return CmdAll1; }
00217 MouseCommand commandAll2() { return CmdAll2; }
00218 MouseCommand commandAll3() { return CmdAll3; }
00219 uint keyCmdAllModKey() { return CmdAllModKey; }
00220
00221
00222 static WindowOperation windowOperation(const QString &name, bool restricted );
00223 static MouseCommand mouseCommand(const QString &name, bool restricted );
00224
00229 bool showGeometryTip();
00230
00231 enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
00237 int electricBorders();
00238
00242 int electricBorderDelay();
00243
00244 bool topMenuEnabled() const { return topmenus; }
00245 bool desktopTopMenu() const { return desktop_topmenu; }
00246
00247 private:
00248 WindowOperation OpTitlebarDblClick;
00249
00250
00251 MouseCommand CmdActiveTitlebar1;
00252 MouseCommand CmdActiveTitlebar2;
00253 MouseCommand CmdActiveTitlebar3;
00254 MouseCommand CmdInactiveTitlebar1;
00255 MouseCommand CmdInactiveTitlebar2;
00256 MouseCommand CmdInactiveTitlebar3;
00257 MouseCommand CmdWindow1;
00258 MouseCommand CmdWindow2;
00259 MouseCommand CmdWindow3;
00260 MouseCommand CmdAll1;
00261 MouseCommand CmdAll2;
00262 MouseCommand CmdAll3;
00263 uint CmdAllModKey;
00264
00265 int electric_borders;
00266 int electric_border_delay;
00267 bool show_geometry_tip;
00268 bool topmenus;
00269 bool desktop_topmenu;
00270
00271 QStringList ignoreFocusStealingClasses;
00272 };
00273
00274 extern Options* options;
00275
00276 }
00277
00278 #endif
This file is part of the documentation for kwin Library Version 3.2.2.