12 #ifndef KWIN_OPTIONS_H
13 #define KWIN_OPTIONS_H
17 #include <tqpalette.h>
18 #include <tqstringlist.h>
19 #include <kdecoration_p.h>
21 #include "placement.h"
23 namespace KWinInternal
28 class Options :
public KDecorationOptions
35 virtual unsigned long updateSettings();
68 enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
69 FocusPolicy focusPolicy;
86 int autoRaiseInterval;
96 int delayFocusInterval;
106 int shadeHoverInterval;
125 enum AltTabStyle { KDE, CDE };
126 AltTabStyle altTabStyle;
129 bool separateScreenFocus;
131 bool activeMouseScreen;
136 bool xineramaEnabled;
137 bool xineramaPlacementEnabled;
138 bool xineramaMovementEnabled;
139 bool xineramaMaximizeEnabled;
140 bool xineramaFullscreenEnabled;
143 int xineramaPlacementScreen;
148 enum MoveResizeMode { Transparent, Opaque };
150 MoveResizeMode moveMode;
151 MoveResizeMode resizeMode;
152 MoveResizeMode tilingMode;
154 static MoveResizeMode stringToMoveResizeMode(
const TQString& s );
155 static const char* moveResizeModeToString( MoveResizeMode mode );
157 Placement::Policy placement;
159 bool focusPolicyIsReasonable()
161 return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
183 bool snapOnlyWhenOverlapping;
188 bool animateMinimize;
193 int animateMinimizeSpeed;
195 bool showDesktopIsMinimizeAll;
200 bool rollOverDesktops;
203 int focusStealingPreventionLevel;
208 TQStringList ignorePositionClasses;
210 bool checkIgnoreFocusStealing(
const Client* c );
212 WindowOperation operationTitlebarDblClick() {
return OpTitlebarDblClick; }
216 MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
217 MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
218 MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
219 MouseMove, MouseUnrestrictedMove,
220 MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
221 MouseResize, MouseUnrestrictedResize,
222 MouseShade, MouseSetShade, MouseUnsetShade,
223 MouseMaximize, MouseRestore, MouseMinimize,
224 MouseNextDesktop, MousePreviousDesktop,
225 MouseAbove, MouseBelow,
226 MouseOpacityMore, MouseOpacityLess,
230 enum MouseWheelCommand
232 MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
233 MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
234 MouseWheelChangeOpacity,
238 MouseCommand operationTitlebarMouseWheel(
int delta )
240 return wheelToMouseCommand( CmdTitlebarWheel, delta, CmdTitlebarRevWheel );
242 MouseCommand operationWindowMouseWheel(
int delta )
244 return wheelToMouseCommand( CmdAllWheel, delta, CmdAllRevWheel );
247 MouseCommand commandActiveTitlebar1() {
return CmdActiveTitlebar1; }
248 MouseCommand commandActiveTitlebar2() {
return CmdActiveTitlebar2; }
249 MouseCommand commandActiveTitlebar3() {
return CmdActiveTitlebar3; }
250 MouseCommand commandInactiveTitlebar1() {
return CmdInactiveTitlebar1; }
251 MouseCommand commandInactiveTitlebar2() {
return CmdInactiveTitlebar2; }
252 MouseCommand commandInactiveTitlebar3() {
return CmdInactiveTitlebar3; }
253 MouseCommand commandWindow1() {
return CmdWindow1; }
254 MouseCommand commandWindow2() {
return CmdWindow2; }
255 MouseCommand commandWindow3() {
return CmdWindow3; }
256 MouseCommand commandAll1() {
return CmdAll1; }
257 MouseCommand commandAll2() {
return CmdAll2; }
258 MouseCommand commandAll3() {
return CmdAll3; }
259 uint keyCmdAllModKey() {
return CmdAllModKey; }
262 static WindowOperation windowOperation(
const TQString &name,
bool restricted );
263 static MouseCommand mouseCommand(
const TQString &name,
bool restricted );
264 static MouseWheelCommand mouseWheelCommand(
const TQString &name);
270 bool showGeometryTip();
277 bool resetMaximizedWindowGeometry();
283 TQColor &shadowColour(
bool active=
true);
289 bool shadowWindowType(NET::WindowType t);
294 bool shadowEnabled(
bool active=
true);
299 double shadowOpacity(
bool active=
true);
304 int shadowThickness(
bool active=
true);
310 int shadowXOffset(
bool active=
true);
316 int shadowYOffset(
bool active=
true);
318 enum { ActiveDisabled = 0,
319 ActiveSwitchOnMove = 1,
320 ActiveSwitchAlways = 2,
322 ActiveTileMaximize = 4 };
330 int borderActivationDistance();
335 int activeBorderDelay();
337 bool topMenuEnabled()
const {
return topmenus; }
338 bool desktopTopMenu()
const {
return desktop_topmenu; }
344 bool hideUtilityWindowsForInactive;
347 bool useTranslucency;
348 bool translucentActiveWindows;
349 uint activeWindowOpacity;
350 bool translucentInactiveWindows;
351 uint inactiveWindowOpacity;
352 bool translucentMovingWindows;
353 uint movingWindowOpacity;
354 bool removeShadowsOnResize;
355 bool removeShadowsOnMove;
356 bool translucentDocks;
358 bool keepAboveAsActive;
359 bool useTitleMenuSlider;
360 uint activeWindowShadowSize;
361 uint inactiveWindowShadowSize;
364 bool onlyDecoTranslucent;
369 WindowOperation OpTitlebarDblClick;
372 MouseCommand CmdActiveTitlebar1;
373 MouseCommand CmdActiveTitlebar2;
374 MouseCommand CmdActiveTitlebar3;
375 MouseCommand CmdInactiveTitlebar1;
376 MouseCommand CmdInactiveTitlebar2;
377 MouseCommand CmdInactiveTitlebar3;
378 MouseWheelCommand CmdTitlebarWheel;
379 bool CmdTitlebarRevWheel;
380 MouseCommand CmdWindow1;
381 MouseCommand CmdWindow2;
382 MouseCommand CmdWindow3;
383 MouseCommand CmdAll1;
384 MouseCommand CmdAll2;
385 MouseCommand CmdAll3;
386 MouseWheelCommand CmdAllWheel;
391 int active_border_delay;
392 int active_border_distance;
393 bool show_geometry_tip;
394 bool reset_maximized_window_geometry;
396 bool desktop_topmenu;
397 TQColor shadow_colour;
398 TQColor shadow_inactive_colour;
401 bool shadow_overrides;
402 bool shadow_topMenus;
403 bool shadow_inactive_enabled;
405 double shadow_inactive_opacity;
406 double shadow_opacity;
407 int shadow_inactive_thickness;
408 int shadow_thickness;
409 int shadow_inactive_x_offset;
411 int shadow_inactive_y_offset;
414 TQStringList ignoreFocusStealingClasses;
416 MouseCommand wheelToMouseCommand( MouseWheelCommand com,
int delta,
bool revDir );
419 extern Options* options;