00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef KWIN_OPTIONS_H
00013 #define KWIN_OPTIONS_H
00014
00015 #include <tqobject.h>
00016 #include <tqfont.h>
00017 #include <tqpalette.h>
00018 #include <tqstringlist.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
00128
00129 bool separateScreenFocus;
00130
00131 bool activeMouseScreen;
00132
00136 bool xineramaEnabled;
00137 bool xineramaPlacementEnabled;
00138 bool xineramaMovementEnabled;
00139 bool xineramaMaximizeEnabled;
00140 bool xineramaFullscreenEnabled;
00141
00142
00143 int xineramaPlacementScreen;
00144
00148 enum MoveResizeMode { Transparent, Opaque };
00149
00150 MoveResizeMode resizeMode;
00151 MoveResizeMode moveMode;
00152
00153 static MoveResizeMode stringToMoveResizeMode( const TQString& s );
00154 static const char* moveResizeModeToString( MoveResizeMode mode );
00155
00156 Placement::Policy placement;
00157
00158 bool focusPolicyIsReasonable()
00159 {
00160 return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
00161 }
00162
00166 bool animateShade;
00167
00171 int borderSnapZone;
00172
00176 int windowSnapZone;
00177
00178
00182 bool snapOnlyWhenOverlapping;
00183
00187 bool animateMinimize;
00188
00192 int animateMinimizeSpeed;
00193
00194 bool showDesktopIsMinimizeAll;
00195
00199 bool rollOverDesktops;
00200
00201
00202 int focusStealingPreventionLevel;
00203
00207 TQStringList ignorePositionClasses;
00208
00209 bool checkIgnoreFocusStealing( const Client* c );
00210
00211 WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
00212
00213 enum MouseCommand
00214 {
00215 MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
00216 MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
00217 MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
00218 MouseMove, MouseUnrestrictedMove,
00219 MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
00220 MouseResize, MouseUnrestrictedResize,
00221 MouseShade, MouseSetShade, MouseUnsetShade,
00222 MouseMaximize, MouseRestore, MouseMinimize,
00223 MouseNextDesktop, MousePreviousDesktop,
00224 MouseAbove, MouseBelow,
00225 MouseOpacityMore, MouseOpacityLess,
00226 MouseNothing
00227 };
00228
00229 enum MouseWheelCommand
00230 {
00231 MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
00232 MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
00233 MouseWheelChangeOpacity,
00234 MouseWheelNothing
00235 };
00236
00237 MouseCommand operationTitlebarMouseWheel( int delta )
00238 {
00239 return wheelToMouseCommand( CmdTitlebarWheel, delta );
00240 }
00241 MouseCommand operationWindowMouseWheel( int delta )
00242 {
00243 return wheelToMouseCommand( CmdAllWheel, delta );
00244 }
00245
00246 MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
00247 MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
00248 MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
00249 MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
00250 MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
00251 MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
00252 MouseCommand commandWindow1() { return CmdWindow1; }
00253 MouseCommand commandWindow2() { return CmdWindow2; }
00254 MouseCommand commandWindow3() { return CmdWindow3; }
00255 MouseCommand commandAll1() { return CmdAll1; }
00256 MouseCommand commandAll2() { return CmdAll2; }
00257 MouseCommand commandAll3() { return CmdAll3; }
00258 uint keyCmdAllModKey() { return CmdAllModKey; }
00259
00260
00261 static WindowOperation windowOperation(const TQString &name, bool restricted );
00262 static MouseCommand mouseCommand(const TQString &name, bool restricted );
00263 static MouseWheelCommand mouseWheelCommand(const TQString &name);
00264
00269 bool showGeometryTip();
00270
00275 TQColor &shadowColour(bool active=true);
00276
00281 bool shadowWindowType(NET::WindowType t);
00282
00286 bool shadowEnabled(bool active=true);
00287
00291 double shadowOpacity(bool active=true);
00292
00296 int shadowThickness(bool active=true);
00297
00302 int shadowXOffset(bool active=true);
00303
00308 int shadowYOffset(bool active=true);
00309
00310 enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
00316 int electricBorders();
00317
00321 int electricBorderDelay();
00322
00323 bool topMenuEnabled() const { return topmenus; }
00324 bool desktopTopMenu() const { return desktop_topmenu; }
00325
00326
00327 int killPingTimeout;
00328
00329
00330 bool hideUtilityWindowsForInactive;
00331
00332
00333 bool useTranslucency;
00334 bool translucentActiveWindows;
00335 uint activeWindowOpacity;
00336 bool translucentInactiveWindows;
00337 uint inactiveWindowOpacity;
00338 bool translucentMovingWindows;
00339 uint movingWindowOpacity;
00340 bool removeShadowsOnResize;
00341 bool removeShadowsOnMove;
00342 bool translucentDocks;
00343 uint dockOpacity;
00344 bool keepAboveAsActive;
00345 bool useTitleMenuSlider;
00346 uint activeWindowShadowSize;
00347 uint inactiveWindowShadowSize;
00348 uint dockShadowSize;
00349 bool onlyDecoTranslucent;
00350 bool resetKompmgr;
00351 bool tabboxOutline;
00352
00353 private:
00354 WindowOperation OpTitlebarDblClick;
00355
00356
00357 MouseCommand CmdActiveTitlebar1;
00358 MouseCommand CmdActiveTitlebar2;
00359 MouseCommand CmdActiveTitlebar3;
00360 MouseCommand CmdInactiveTitlebar1;
00361 MouseCommand CmdInactiveTitlebar2;
00362 MouseCommand CmdInactiveTitlebar3;
00363 MouseWheelCommand CmdTitlebarWheel;
00364 MouseCommand CmdWindow1;
00365 MouseCommand CmdWindow2;
00366 MouseCommand CmdWindow3;
00367 MouseCommand CmdAll1;
00368 MouseCommand CmdAll2;
00369 MouseCommand CmdAll3;
00370 MouseWheelCommand CmdAllWheel;
00371 uint CmdAllModKey;
00372
00373 int electric_borders;
00374 int electric_border_delay;
00375 bool show_geometry_tip;
00376 bool topmenus;
00377 bool desktop_topmenu;
00378 TQColor shadow_colour;
00379 TQColor shadow_inactive_colour;
00380 bool shadow_docks;
00381 bool shadow_overrides;
00382 bool shadow_topMenus;
00383 bool shadow_inactive_enabled;
00384 bool shadow_enabled;
00385 double shadow_inactive_opacity;
00386 double shadow_opacity;
00387 int shadow_inactive_thickness;
00388 int shadow_thickness;
00389 int shadow_inactive_x_offset;
00390 int shadow_x_offset;
00391 int shadow_inactive_y_offset;
00392 int shadow_y_offset;
00393
00394 TQStringList ignoreFocusStealingClasses;
00395
00396 MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta );
00397 };
00398
00399 extern Options* options;
00400
00401 }
00402
00403 #endif