kwin Library API Documentation

options.h

00001 /*****************************************************************
00002  KWin - the KDE window manager
00003  This file is part of the KDE project.
00004 
00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
00007 
00008 You can Freely distribute this program under the GNU General Public
00009 License. See the file "COPYING" for the exact licensing terms.
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 Options : public KDecorationOptions 
00025     {
00026     public:
00027 
00028         Options();
00029         ~Options();
00030 
00031         virtual unsigned long updateSettings();
00032 
00064         enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
00065         FocusPolicy focusPolicy;
00066 
00067 
00072         bool clickRaise;
00073 
00077         bool autoRaise;
00078 
00082         int autoRaiseInterval;
00083 
00087         bool shadeHover;
00088 
00092         int shadeHoverInterval;
00093 
00111         enum AltTabStyle { KDE, CDE };
00112         AltTabStyle altTabStyle;
00113 
00117         bool xineramaEnabled;
00118         bool xineramaPlacementEnabled;
00119         bool xineramaMovementEnabled;
00120         bool xineramaMaximizeEnabled;
00121 
00125         enum MoveResizeMode { Transparent, Opaque };
00126 
00127         MoveResizeMode resizeMode;
00128         MoveResizeMode moveMode;
00129 
00136         enum PlacementPolicy { Random, Smart, Cascade, Centered, ZeroCornered };
00137         PlacementPolicy placement;
00138 
00139         bool focusPolicyIsReasonable() 
00140             {
00141             return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
00142             }
00143 
00147         bool animateShade;
00148 
00152         int borderSnapZone;
00153 
00157         int windowSnapZone;
00158 
00159 
00163         bool snapOnlyWhenOverlapping;
00164 
00168         bool  animateMinimize;
00169 
00173         int animateMinimizeSpeed;
00174 
00178         bool rollOverDesktops;
00179 
00180         // 0 - 4 , see Workspace::allowClientActivation()
00181         int focusStealingPreventionLevel;
00182 
00186         QStringList ignorePositionClasses;
00187         // List of window classes for which not to use focus stealing prevention
00188         QStringList ignoreFocusStealingClasses;
00189 
00190         WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
00191 
00192         enum MouseCommand 
00193             {
00194             MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
00195             MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
00196             MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
00197             MouseMove, MouseUnrestrictedMove,
00198             MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
00199             MouseResize, MouseUnrestrictedResize,
00200             MouseShade,
00201             MouseMinimize,
00202             MouseNothing
00203             };
00204 
00205         MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
00206         MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
00207         MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
00208         MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
00209         MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
00210         MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
00211         MouseCommand commandWindow1() { return CmdWindow1; }
00212         MouseCommand commandWindow2() { return CmdWindow2; }
00213         MouseCommand commandWindow3() { return CmdWindow3; }
00214         MouseCommand commandAll1() { return CmdAll1; }
00215         MouseCommand commandAll2() { return CmdAll2; }
00216         MouseCommand commandAll3() { return CmdAll3; }
00217         uint keyCmdAllModKey() { return CmdAllModKey; }
00218 
00219 
00220         static WindowOperation windowOperation(const QString &name, bool restricted );
00221         static MouseCommand mouseCommand(const QString &name, bool restricted );
00222 
00227         bool showGeometryTip();
00228 
00229         enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
00235         int electricBorders();
00236 
00240         int electricBorderDelay();
00241         
00242         bool topMenuEnabled() const { return topmenus; }
00243         bool desktopTopMenu() const { return desktop_topmenu; }
00244 
00245     private:
00246         WindowOperation OpTitlebarDblClick;
00247 
00248     // mouse bindings
00249         MouseCommand CmdActiveTitlebar1;
00250         MouseCommand CmdActiveTitlebar2;
00251         MouseCommand CmdActiveTitlebar3;
00252         MouseCommand CmdInactiveTitlebar1;
00253         MouseCommand CmdInactiveTitlebar2;
00254         MouseCommand CmdInactiveTitlebar3;
00255         MouseCommand CmdWindow1;
00256         MouseCommand CmdWindow2;
00257         MouseCommand CmdWindow3;
00258         MouseCommand CmdAll1;
00259         MouseCommand CmdAll2;
00260         MouseCommand CmdAll3;
00261         uint CmdAllModKey;
00262 
00263         int electric_borders;
00264         int electric_border_delay;
00265         bool show_geometry_tip;
00266         bool topmenus;
00267         bool desktop_topmenu;
00268     };
00269 
00270 extern Options* options;
00271 
00272 } // namespace
00273 
00274 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Mar 5 04:41:14 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003