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 #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 // 0 - 4 , see Workspace::allowClientActivation() 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 // timeout before non-responding application will be killed after attempt to close 00257 int killPingTimeout; 00258 00259 private: 00260 WindowOperation OpTitlebarDblClick; 00261 00262 // mouse bindings 00263 MouseCommand CmdActiveTitlebar1; 00264 MouseCommand CmdActiveTitlebar2; 00265 MouseCommand CmdActiveTitlebar3; 00266 MouseCommand CmdInactiveTitlebar1; 00267 MouseCommand CmdInactiveTitlebar2; 00268 MouseCommand CmdInactiveTitlebar3; 00269 MouseCommand CmdWindow1; 00270 MouseCommand CmdWindow2; 00271 MouseCommand CmdWindow3; 00272 MouseCommand CmdAll1; 00273 MouseCommand CmdAll2; 00274 MouseCommand CmdAll3; 00275 uint CmdAllModKey; 00276 00277 int electric_borders; 00278 int electric_border_delay; 00279 bool show_geometry_tip; 00280 bool topmenus; 00281 bool desktop_topmenu; 00282 // List of window classes for which not to use focus stealing prevention 00283 QStringList ignoreFocusStealingClasses; 00284 }; 00285 00286 extern Options* options; 00287 00288 } // namespace 00289 00290 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 13 21:47:05 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003