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 resizeMode;
151 MoveResizeMode moveMode;
153 static MoveResizeMode stringToMoveResizeMode(
const TQString& s );
154 static const char* moveResizeModeToString( MoveResizeMode mode );
156 Placement::Policy placement;
158 bool focusPolicyIsReasonable()
160 return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
182 bool snapOnlyWhenOverlapping;
187 bool animateMinimize;
192 int animateMinimizeSpeed;
194 bool showDesktopIsMinimizeAll;
199 bool rollOverDesktops;
202 int focusStealingPreventionLevel;
207 TQStringList ignorePositionClasses;
209 bool checkIgnoreFocusStealing(
const Client* c );
211 WindowOperation operationTitlebarDblClick() {
return OpTitlebarDblClick; }
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,
229 enum MouseWheelCommand
231 MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
232 MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
233 MouseWheelChangeOpacity,
237 MouseCommand operationTitlebarMouseWheel(
int delta )
239 return wheelToMouseCommand( CmdTitlebarWheel, delta );
241 MouseCommand operationWindowMouseWheel(
int delta )
243 return wheelToMouseCommand( CmdAllWheel, delta );
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; }
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);
269 bool showGeometryTip();
275 TQColor &shadowColour(
bool active=
true);
281 bool shadowWindowType(NET::WindowType t);
286 bool shadowEnabled(
bool active=
true);
291 double shadowOpacity(
bool active=
true);
296 int shadowThickness(
bool active=
true);
302 int shadowXOffset(
bool active=
true);
308 int shadowYOffset(
bool active=
true);
310 enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
316 int electricBorders();
321 int electricBorderDelay();
323 bool topMenuEnabled()
const {
return topmenus; }
324 bool desktopTopMenu()
const {
return desktop_topmenu; }
330 bool hideUtilityWindowsForInactive;
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;
344 bool keepAboveAsActive;
345 bool useTitleMenuSlider;
346 uint activeWindowShadowSize;
347 uint inactiveWindowShadowSize;
350 bool onlyDecoTranslucent;
355 WindowOperation OpTitlebarDblClick;
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;
374 int electric_borders;
375 int electric_border_delay;
376 bool show_geometry_tip;
378 bool desktop_topmenu;
379 TQColor shadow_colour;
380 TQColor shadow_inactive_colour;
383 bool shadow_overrides;
384 bool shadow_topMenus;
385 bool shadow_inactive_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;
393 int shadow_inactive_y_offset;
396 TQStringList ignoreFocusStealingClasses;
398 MouseCommand wheelToMouseCommand( MouseWheelCommand com,
int delta );
401 extern Options* options;