• Skip to content
  • Skip to link menu
KDE 4.1 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 
00184 
00188         bool snapOnlyWhenOverlapping;
00189 
00190         bool showDesktopIsMinimizeAll;
00191 
00195         bool rollOverDesktops;
00196 
00197         // 0 - 4 , see Workspace::allowClientActivation()
00198         int focusStealingPreventionLevel;
00199 
00203         QStringList ignorePositionClasses;
00204         
00205         bool checkIgnoreFocusStealing( const Client* c );
00206 
00207         WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
00208 
00209         enum MouseCommand 
00210             {
00211             MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
00212             MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
00213             MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
00214             MouseMove, MouseUnrestrictedMove,
00215             MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
00216             MouseResize, MouseUnrestrictedResize,
00217             MouseShade, MouseSetShade, MouseUnsetShade,
00218             MouseMaximize, MouseRestore, MouseMinimize,
00219             MouseNextDesktop, MousePreviousDesktop,
00220             MouseAbove, MouseBelow,
00221             MouseOpacityMore, MouseOpacityLess,
00222             MouseNothing
00223             };
00224             
00225         enum MouseWheelCommand
00226             {
00227             MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
00228             MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
00229             MouseWheelChangeOpacity,
00230             MouseWheelNothing
00231             };
00232 
00233         MouseCommand operationTitlebarMouseWheel( int delta )
00234             {
00235             return wheelToMouseCommand( CmdTitlebarWheel, delta );
00236             }
00237         MouseCommand operationWindowMouseWheel( int delta )
00238             {
00239             return wheelToMouseCommand( CmdAllWheel, delta );
00240             }
00241 
00242         MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
00243         MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
00244         MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
00245         MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
00246         MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
00247         MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
00248         MouseCommand commandWindow1() { return CmdWindow1; }
00249         MouseCommand commandWindow2() { return CmdWindow2; }
00250         MouseCommand commandWindow3() { return CmdWindow3; }
00251         MouseCommand commandAll1() { return CmdAll1; }
00252         MouseCommand commandAll2() { return CmdAll2; }
00253         MouseCommand commandAll3() { return CmdAll3; }
00254         uint keyCmdAllModKey() { return CmdAllModKey; }
00255 
00256 
00257         static WindowOperation windowOperation(const QString &name, bool restricted );
00258         static MouseCommand mouseCommand(const QString &name, bool restricted );
00259         static MouseWheelCommand mouseWheelCommand(const QString &name);
00260 
00264         bool showGeometryTip();
00265 
00266         enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
00272         int electricBorders();
00273 
00277         int electricBorderDelay();
00278         
00279         bool topMenuEnabled() const { return topmenus; }
00280         bool desktopTopMenu() const { return desktop_topmenu; }
00281         
00282         // timeout before non-responding application will be killed after attempt to close
00283         int killPingTimeout;
00284         
00285         // Whether to hide utility windows for inactive applications.
00286         bool hideUtilityWindowsForInactive;
00287 
00288         // Compositing settings
00289         bool useCompositing;
00290         CompositingType compositingMode;
00291         HiddenPreviews hiddenPreviews;
00292         
00293         uint refreshRate;
00294         // This is for OpenGL mode
00295         int smoothScale; // 0 = no, 1 = yes when transformed,
00296                          // 2 = try trilinear when transformed; else 1,
00297                          // -1 = auto
00298         // This is for XRender mode
00299         bool xrenderSmoothScale;
00300         
00301         enum GLMode { GLTFP, GLSHM, GLFallback };
00302         GLMode glMode;
00303         bool glDirect;
00304         bool glVSync;
00305         bool glStrictBinding;
00306 
00307     private:
00308         WindowOperation OpTitlebarDblClick;
00309 
00310     // mouse bindings
00311         MouseCommand CmdActiveTitlebar1;
00312         MouseCommand CmdActiveTitlebar2;
00313         MouseCommand CmdActiveTitlebar3;
00314         MouseCommand CmdInactiveTitlebar1;
00315         MouseCommand CmdInactiveTitlebar2;
00316         MouseCommand CmdInactiveTitlebar3;
00317         MouseWheelCommand CmdTitlebarWheel;
00318         MouseCommand CmdWindow1;
00319         MouseCommand CmdWindow2;
00320         MouseCommand CmdWindow3;
00321         MouseCommand CmdAll1;
00322         MouseCommand CmdAll2;
00323         MouseCommand CmdAll3;
00324         MouseWheelCommand CmdAllWheel;
00325         uint CmdAllModKey;
00326 
00327         int electric_borders;
00328         int electric_border_delay;
00329         bool show_geometry_tip;
00330         bool topmenus;
00331         bool desktop_topmenu;
00332         // List of window classes for which not to use focus stealing prevention
00333         QStringList ignoreFocusStealingClasses;
00334 
00335         MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta );
00336         void reloadCompositingSettings(const CompositingPrefs& prefs);
00337     };
00338 
00339 extern Options* options;
00340 
00341 } // namespace
00342 
00343 #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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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