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 #include "placement.h"
00022
00023 namespace KWinInternal
00024 {
00025
00026 class Client;
00027
00028 class Options : public KDecorationOptions
00029 {
00030 public:
00031
00032 Options();
00033 ~Options();
00034
00035 virtual unsigned long updateSettings();
00036
00068 enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
00069 FocusPolicy focusPolicy;
00070
00071
00076 bool clickRaise;
00077
00081 bool autoRaise;
00082
00086 int autoRaiseInterval;
00087
00091 bool delayFocus;
00092
00096 int delayFocusInterval;
00097
00101 bool shadeHover;
00102
00106 int shadeHoverInterval;
00107
00125 enum AltTabStyle { KDE, CDE };
00126 AltTabStyle altTabStyle;
00127
00131 bool xineramaEnabled;
00132 bool xineramaPlacementEnabled;
00133 bool xineramaMovementEnabled;
00134 bool xineramaMaximizeEnabled;
00135 bool xineramaFullscreenEnabled;
00136
00140 enum MoveResizeMode { Transparent, Opaque };
00141
00142 MoveResizeMode resizeMode;
00143 MoveResizeMode moveMode;
00144
00145 static MoveResizeMode stringToMoveResizeMode( const QString& s );
00146 static const char* moveResizeModeToString( MoveResizeMode mode );
00147
00148 Placement::Policy placement;
00149
00150 bool focusPolicyIsReasonable()
00151 {
00152 return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
00153 }
00154
00158 bool animateShade;
00159
00163 int borderSnapZone;
00164
00168 int windowSnapZone;
00169
00170
00174 bool snapOnlyWhenOverlapping;
00175
00179 bool animateMinimize;
00180
00184 int animateMinimizeSpeed;
00185
00189 bool rollOverDesktops;
00190
00191
00192 int focusStealingPreventionLevel;
00193
00197 QStringList ignorePositionClasses;
00198
00199 bool checkIgnoreFocusStealing( const Client* c );
00200
00201 WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
00202
00203 enum MouseCommand
00204 {
00205 MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
00206 MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
00207 MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
00208 MouseMove, MouseUnrestrictedMove,
00209 MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
00210 MouseResize, MouseUnrestrictedResize,
00211 MouseShade,
00212 MouseMinimize,
00213 MouseNothing
00214 };
00215
00216 MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
00217 MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
00218 MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
00219 MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
00220 MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
00221 MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
00222 MouseCommand commandWindow1() { return CmdWindow1; }
00223 MouseCommand commandWindow2() { return CmdWindow2; }
00224 MouseCommand commandWindow3() { return CmdWindow3; }
00225 MouseCommand commandAll1() { return CmdAll1; }
00226 MouseCommand commandAll2() { return CmdAll2; }
00227 MouseCommand commandAll3() { return CmdAll3; }
00228 uint keyCmdAllModKey() { return CmdAllModKey; }
00229
00230
00231 static WindowOperation windowOperation(const QString &name, bool restricted );
00232 static MouseCommand mouseCommand(const QString &name, bool restricted );
00233
00238 bool showGeometryTip();
00239
00240 enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
00246 int electricBorders();
00247
00251 int electricBorderDelay();
00252
00253 bool topMenuEnabled() const { return topmenus; }
00254 bool desktopTopMenu() const { return desktop_topmenu; }
00255
00256
00257 int killPingTimeout;
00258
00259
00260 bool useTranslucency;
00261 bool translucentActiveWindows;
00262 uint activeWindowOpacity;
00263 bool translucentInactiveWindows;
00264 uint inactiveWindowOpacity;
00265 bool translucentMovingWindows;
00266 uint movingWindowOpacity;
00267 bool removeShadowsOnResize;
00268 bool removeShadowsOnMove;
00269 bool translucentDocks;
00270 uint dockOpacity;
00271 bool keepAboveAsActive;
00272 bool useTitleMenuSlider;
00273 uint activeWindowShadowSize;
00274 uint inactiveWindowShadowSize;
00275 uint dockShadowSize;
00276 bool resetKompmgr;
00277
00278 private:
00279 WindowOperation OpTitlebarDblClick;
00280
00281
00282 MouseCommand CmdActiveTitlebar1;
00283 MouseCommand CmdActiveTitlebar2;
00284 MouseCommand CmdActiveTitlebar3;
00285 MouseCommand CmdInactiveTitlebar1;
00286 MouseCommand CmdInactiveTitlebar2;
00287 MouseCommand CmdInactiveTitlebar3;
00288 MouseCommand CmdWindow1;
00289 MouseCommand CmdWindow2;
00290 MouseCommand CmdWindow3;
00291 MouseCommand CmdAll1;
00292 MouseCommand CmdAll2;
00293 MouseCommand CmdAll3;
00294 uint CmdAllModKey;
00295
00296 int electric_borders;
00297 int electric_border_delay;
00298 bool show_geometry_tip;
00299 bool topmenus;
00300 bool desktop_topmenu;
00301
00302 QStringList ignoreFocusStealingClasses;
00303
00304 };
00305
00306 extern Options* options;
00307
00308 }
00309
00310 #endif
This file is part of the documentation for kwin Library Version 3.4.1.