• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KWin

options.h

Go to the documentation of this file.
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 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020 *********************************************************************/
00021 
00022 #ifndef KWIN_OPTIONS_H
00023 #define KWIN_OPTIONS_H
00024 
00025 #include <QObject>
00026 #include <QFont>
00027 #include <QPalette>
00028 #include <kdecoration.h>
00029 
00030 #include "placement.h"
00031 #include "utils.h"
00032 
00033 namespace KWin
00034 {
00035 
00036 class Client;
00037 class CompositingPrefs;
00038 
00039 class Options : public KDecorationOptions
00040     {
00041     public:
00042 
00043         Options();
00044         ~Options();
00045 
00046         virtual unsigned long updateSettings();
00047 
00079         enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
00080         FocusPolicy focusPolicy;
00081 
00082 
00087         bool clickRaise;
00088 
00092         bool autoRaise;
00093 
00097         int autoRaiseInterval;
00098 
00102         bool delayFocus;
00103 
00107         int delayFocusInterval;
00108 
00112         bool shadeHover;
00113 
00117         int shadeHoverInterval;
00118 
00136         enum AltTabStyle { KDE, CDE };
00137         AltTabStyle altTabStyle;
00138 
00139         // whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client)
00140         bool separateScreenFocus;
00141         // whether active Xinerama screen is the one with mouse (or with the active window)
00142         bool activeMouseScreen;
00143 
00147         bool xineramaEnabled;
00148         bool xineramaPlacementEnabled;
00149         bool xineramaMovementEnabled;
00150         bool xineramaMaximizeEnabled;
00151         bool xineramaFullscreenEnabled;
00152 
00153         // number, or -1 = active screen (Workspace::activeScreen())
00154         int xineramaPlacementScreen;
00155 
00159         enum MoveResizeMode { Transparent, Opaque };
00160 
00161         MoveResizeMode resizeMode;
00162         MoveResizeMode moveMode;
00163 
00164         static MoveResizeMode stringToMoveResizeMode( const QString& s );
00165         static const char* moveResizeModeToString( MoveResizeMode mode );
00166 
00167         Placement::Policy placement;
00168 
00169         bool focusPolicyIsReasonable()
00170             {
00171             return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
00172             }
00173 
00177         int borderSnapZone;
00178 
00182         int windowSnapZone;
00183 
00187         int centerSnapZone;
00188 
00189 
00193         bool snapOnlyWhenOverlapping;
00194 
00195         bool showDesktopIsMinimizeAll;
00196 
00200         bool rollOverDesktops;
00201 
00202         // 0 - 4 , see Workspace::allowClientActivation()
00203         int focusStealingPreventionLevel;
00204 
00208         QStringList ignorePositionClasses;
00209 
00210         bool checkIgnoreFocusStealing( const Client* c );
00211 
00212         WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
00213 
00214         enum MouseCommand
00215             {
00216             MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
00217             MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
00218             MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
00219             MouseMove, MouseUnrestrictedMove,
00220             MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
00221             MouseResize, MouseUnrestrictedResize,
00222             MouseShade, MouseSetShade, MouseUnsetShade,
00223             MouseMaximize, MouseRestore, MouseMinimize,
00224             MouseNextDesktop, MousePreviousDesktop,
00225             MouseAbove, MouseBelow,
00226             MouseOpacityMore, MouseOpacityLess,
00227             MouseNothing
00228             };
00229 
00230         enum MouseWheelCommand
00231             {
00232             MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
00233             MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
00234             MouseWheelChangeOpacity,
00235             MouseWheelNothing
00236             };
00237 
00238         MouseCommand operationTitlebarMouseWheel( int delta )
00239             {
00240             return wheelToMouseCommand( CmdTitlebarWheel, delta );
00241             }
00242         MouseCommand operationWindowMouseWheel( int delta )
00243             {
00244             return wheelToMouseCommand( CmdAllWheel, delta );
00245             }
00246 
00247         MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
00248         MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
00249         MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
00250         MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
00251         MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
00252         MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
00253         MouseCommand commandWindow1() { return CmdWindow1; }
00254         MouseCommand commandWindow2() { return CmdWindow2; }
00255         MouseCommand commandWindow3() { return CmdWindow3; }
00256         MouseCommand commandAll1() { return CmdAll1; }
00257         MouseCommand commandAll2() { return CmdAll2; }
00258         MouseCommand commandAll3() { return CmdAll3; }
00259         uint keyCmdAllModKey() { return CmdAllModKey; }
00260 
00261 
00262         static WindowOperation windowOperation(const QString &name, bool restricted );
00263         static MouseCommand mouseCommand(const QString &name, bool restricted );
00264         static MouseWheelCommand mouseWheelCommand(const QString &name);
00265 
00269         bool showGeometryTip();
00270 
00271         enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
00277         int electricBorders();
00278 
00282         int electricBorderDelay();
00283 
00284         bool topMenuEnabled() const { return topmenus; }
00285         bool desktopTopMenu() const { return desktop_topmenu; }
00286 
00287         // timeout before non-responding application will be killed after attempt to close
00288         int killPingTimeout;
00289 
00290         // Whether to hide utility windows for inactive applications.
00291         bool hideUtilityWindowsForInactive;
00292 
00293         // Compositing settings
00294         bool useCompositing;
00295         CompositingType compositingMode;
00296         HiddenPreviews hiddenPreviews;
00297         bool unredirectFullscreen;
00298         bool disableCompositingChecks;
00299 
00300         uint refreshRate;
00301         // This is for OpenGL mode
00302         int smoothScale; // 0 = no, 1 = yes when transformed,
00303                          // 2 = try trilinear when transformed; else 1,
00304                          // -1 = auto
00305         // This is for XRender mode
00306         bool xrenderSmoothScale;
00307 
00308         enum GLMode { GLTFP, GLSHM, GLFallback };
00309         GLMode glMode;
00310         bool glDirect;
00311         bool glVSync;
00312         bool glStrictBinding;
00313         double animationTimeFactor() const;
00314 
00315     private:
00316         WindowOperation OpTitlebarDblClick;
00317 
00318         // mouse bindings
00319         MouseCommand CmdActiveTitlebar1;
00320         MouseCommand CmdActiveTitlebar2;
00321         MouseCommand CmdActiveTitlebar3;
00322         MouseCommand CmdInactiveTitlebar1;
00323         MouseCommand CmdInactiveTitlebar2;
00324         MouseCommand CmdInactiveTitlebar3;
00325         MouseWheelCommand CmdTitlebarWheel;
00326         MouseCommand CmdWindow1;
00327         MouseCommand CmdWindow2;
00328         MouseCommand CmdWindow3;
00329         MouseCommand CmdAll1;
00330         MouseCommand CmdAll2;
00331         MouseCommand CmdAll3;
00332         MouseWheelCommand CmdAllWheel;
00333         uint CmdAllModKey;
00334 
00335         int electric_borders;
00336         int electric_border_delay;
00337         bool show_geometry_tip;
00338         bool topmenus;
00339         bool desktop_topmenu;
00340         // List of window classes for which not to use focus stealing prevention
00341         QStringList ignoreFocusStealingClasses;
00342         int animationSpeed; // 0 - instant, 5 - very slow
00343 
00344         MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta );
00345         void reloadCompositingSettings(const CompositingPrefs& prefs);
00346     };
00347 
00348 extern Options* options;
00349 
00350 } // namespace
00351 
00352 #endif

KWin

Skip menu "KWin"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal