• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • twin
 

twin

  • twin
options.h
1 /*****************************************************************
2  KWin - the KDE window manager
3  This file is part of the KDE project.
4 
5 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
6 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
7 
8 You can Freely distribute this program under the GNU General Public
9 License. See the file "COPYING" for the exact licensing terms.
10 ******************************************************************/
11 
12 #ifndef KWIN_OPTIONS_H
13 #define KWIN_OPTIONS_H
14 
15 #include <tqobject.h>
16 #include <tqfont.h>
17 #include <tqpalette.h>
18 #include <tqstringlist.h>
19 #include <kdecoration_p.h>
20 
21 #include "placement.h"
22 
23 namespace KWinInternal
24 {
25 
26 class Client;
27 
28 class Options : public KDecorationOptions
29  {
30  public:
31 
32  Options();
33  ~Options();
34 
35  virtual unsigned long updateSettings();
36 
68  enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
69  FocusPolicy focusPolicy;
70 
71 
76  bool clickRaise;
77 
81  bool autoRaise;
82 
86  int autoRaiseInterval;
87 
91  bool delayFocus;
92 
96  int delayFocusInterval;
97 
101  bool shadeHover;
102 
106  int shadeHoverInterval;
107 
125  enum AltTabStyle { KDE, CDE };
126  AltTabStyle altTabStyle;
127 
128  // whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client)
129  bool separateScreenFocus;
130  // whether active Xinerama screen is the one with mouse (or with the active window)
131  bool activeMouseScreen;
132 
136  bool xineramaEnabled;
137  bool xineramaPlacementEnabled;
138  bool xineramaMovementEnabled;
139  bool xineramaMaximizeEnabled;
140  bool xineramaFullscreenEnabled;
141 
142  // number, or -1 = active screen (Workspace::activeScreen())
143  int xineramaPlacementScreen;
144 
148  enum MoveResizeMode { Transparent, Opaque };
149 
150  MoveResizeMode resizeMode;
151  MoveResizeMode moveMode;
152 
153  static MoveResizeMode stringToMoveResizeMode( const TQString& s );
154  static const char* moveResizeModeToString( MoveResizeMode mode );
155 
156  Placement::Policy placement;
157 
158  bool focusPolicyIsReasonable()
159  {
160  return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
161  }
162 
166  bool animateShade;
167 
171  int borderSnapZone;
172 
176  int windowSnapZone;
177 
178 
182  bool snapOnlyWhenOverlapping;
183 
187  bool animateMinimize;
188 
192  int animateMinimizeSpeed;
193 
194  bool showDesktopIsMinimizeAll;
195 
199  bool rollOverDesktops;
200 
201  // 0 - 4 , see Workspace::allowClientActivation()
202  int focusStealingPreventionLevel;
203 
207  TQStringList ignorePositionClasses;
208 
209  bool checkIgnoreFocusStealing( const Client* c );
210 
211  WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
212 
213  enum MouseCommand
214  {
215  MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
216  MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
217  MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
218  MouseMove, MouseUnrestrictedMove,
219  MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
220  MouseResize, MouseUnrestrictedResize,
221  MouseShade, MouseSetShade, MouseUnsetShade,
222  MouseMaximize, MouseRestore, MouseMinimize,
223  MouseNextDesktop, MousePreviousDesktop,
224  MouseAbove, MouseBelow,
225  MouseOpacityMore, MouseOpacityLess,
226  MouseNothing
227  };
228 
229  enum MouseWheelCommand
230  {
231  MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
232  MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
233  MouseWheelChangeOpacity,
234  MouseWheelNothing
235  };
236 
237  MouseCommand operationTitlebarMouseWheel( int delta )
238  {
239  return wheelToMouseCommand( CmdTitlebarWheel, delta );
240  }
241  MouseCommand operationWindowMouseWheel( int delta )
242  {
243  return wheelToMouseCommand( CmdAllWheel, delta );
244  }
245 
246  MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
247  MouseCommand commandActiveTitlebar2() { return CmdActiveTitlebar2; }
248  MouseCommand commandActiveTitlebar3() { return CmdActiveTitlebar3; }
249  MouseCommand commandInactiveTitlebar1() { return CmdInactiveTitlebar1; }
250  MouseCommand commandInactiveTitlebar2() { return CmdInactiveTitlebar2; }
251  MouseCommand commandInactiveTitlebar3() { return CmdInactiveTitlebar3; }
252  MouseCommand commandWindow1() { return CmdWindow1; }
253  MouseCommand commandWindow2() { return CmdWindow2; }
254  MouseCommand commandWindow3() { return CmdWindow3; }
255  MouseCommand commandAll1() { return CmdAll1; }
256  MouseCommand commandAll2() { return CmdAll2; }
257  MouseCommand commandAll3() { return CmdAll3; }
258  uint keyCmdAllModKey() { return CmdAllModKey; }
259 
260 
261  static WindowOperation windowOperation(const TQString &name, bool restricted );
262  static MouseCommand mouseCommand(const TQString &name, bool restricted );
263  static MouseWheelCommand mouseWheelCommand(const TQString &name);
264 
269  bool showGeometryTip();
270 
275  TQColor &shadowColour(bool active=true);
276 
281  bool shadowWindowType(NET::WindowType t);
282 
286  bool shadowEnabled(bool active=true);
287 
291  double shadowOpacity(bool active=true);
292 
296  int shadowThickness(bool active=true);
297 
302  int shadowXOffset(bool active=true);
303 
308  int shadowYOffset(bool active=true);
309 
310  enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
316  int electricBorders();
317 
321  int electricBorderDelay();
322 
323  bool topMenuEnabled() const { return topmenus; }
324  bool desktopTopMenu() const { return desktop_topmenu; }
325 
326  // timeout before non-responding application will be killed after attempt to close
327  int killPingTimeout;
328 
329  // Whether to hide utility windows for inactive applications.
330  bool hideUtilityWindowsForInactive;
331 
332  //translucency settings
333  bool useTranslucency;
334  bool translucentActiveWindows;
335  uint activeWindowOpacity;
336  bool translucentInactiveWindows;
337  uint inactiveWindowOpacity;
338  bool translucentMovingWindows;
339  uint movingWindowOpacity;
340  bool removeShadowsOnResize;
341  bool removeShadowsOnMove;
342  bool translucentDocks;
343  uint dockOpacity;
344  bool keepAboveAsActive;
345  bool useTitleMenuSlider;
346  uint activeWindowShadowSize;
347  uint inactiveWindowShadowSize;
348  uint dockShadowSize;
349  uint menuShadowSize;
350  bool onlyDecoTranslucent;
351  bool resetKompmgr;
352  bool tabboxOutline;
353 
354  private:
355  WindowOperation OpTitlebarDblClick;
356 
357  // mouse bindings
358  MouseCommand CmdActiveTitlebar1;
359  MouseCommand CmdActiveTitlebar2;
360  MouseCommand CmdActiveTitlebar3;
361  MouseCommand CmdInactiveTitlebar1;
362  MouseCommand CmdInactiveTitlebar2;
363  MouseCommand CmdInactiveTitlebar3;
364  MouseWheelCommand CmdTitlebarWheel;
365  MouseCommand CmdWindow1;
366  MouseCommand CmdWindow2;
367  MouseCommand CmdWindow3;
368  MouseCommand CmdAll1;
369  MouseCommand CmdAll2;
370  MouseCommand CmdAll3;
371  MouseWheelCommand CmdAllWheel;
372  uint CmdAllModKey;
373 
374  int electric_borders;
375  int electric_border_delay;
376  bool show_geometry_tip;
377  bool topmenus;
378  bool desktop_topmenu;
379  TQColor shadow_colour;
380  TQColor shadow_inactive_colour;
381  bool shadow_docks;
382  bool shadow_menus;
383  bool shadow_overrides;
384  bool shadow_topMenus;
385  bool shadow_inactive_enabled;
386  bool shadow_enabled;
387  double shadow_inactive_opacity;
388  double shadow_opacity;
389  int shadow_inactive_thickness;
390  int shadow_thickness;
391  int shadow_inactive_x_offset;
392  int shadow_x_offset;
393  int shadow_inactive_y_offset;
394  int shadow_y_offset;
395  // List of window classes for which not to use focus stealing prevention
396  TQStringList ignoreFocusStealingClasses;
397 
398  MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta );
399  };
400 
401 extern Options* options;
402 
403 } // namespace
404 
405 #endif

twin

Skip menu "twin"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

twin

Skip menu "twin"
  • kate
  • libkonq
  • twin
  •   lib
Generated for twin by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.