00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef netwm_def_h
00027 #define netwm_def_h
00028 #include <kdeui_export.h>
00029
00043 struct NETPoint {
00047 NETPoint() : x(0), y(0) { }
00048
00049
00050
00051
00052 int x,
00053 y;
00054 };
00055
00056
00070 struct NETSize {
00074 NETSize() : width(0), height(0) { }
00075
00076
00077
00078
00079 int width,
00080 height;
00081 };
00082
00093 struct NETRect {
00099 NETPoint pos;
00100
00106 NETSize size;
00107 };
00108
00109
00121 struct NETIcon {
00125 NETIcon() : data(0) { }
00126
00132 NETSize size;
00133
00139 unsigned char *data;
00140 };
00141
00142
00152 struct NETExtendedStrut {
00156 NETExtendedStrut() : left_width(0), left_start(0), left_end(0),
00157 right_width(0), right_start(0), right_end(0), top_width(0), top_start(0), top_end(0),
00158 bottom_width(0), bottom_start(0), bottom_end(0) {}
00159
00163 int left_width, left_start, left_end;
00164
00168 int right_width, right_start, right_end;
00169
00173 int top_width, top_start, top_end;
00174
00178 int bottom_width, bottom_start, bottom_end;
00179
00180 };
00181
00182
00194 struct NETStrut {
00198 NETStrut() : left(0), right(0), top(0), bottom(0) { }
00199
00203 int left;
00204
00208 int right;
00209
00213 int top;
00214
00218 int bottom;
00219 };
00220
00221
00234 struct NETFullscreenMonitors {
00239 NETFullscreenMonitors() : top(-1), bottom(0), left(0), right(0) { }
00240
00244 int top;
00245
00249 int bottom;
00250
00254 int left;
00255
00259 int right;
00260
00267 bool isSet() const { return (top != -1); };
00268 };
00269
00270
00283 class KDEUI_EXPORT NET {
00284 public:
00290 enum Role {
00294 Client,
00298 WindowManager
00299 };
00300
00305 enum WindowType {
00309 Unknown = -1,
00313 Normal = 0,
00320 Desktop = 1,
00324 Dock = 2,
00328 Toolbar = 3,
00332 Menu = 4,
00336 Dialog = 5,
00340 Override = 6,
00345 TopMenu = 7,
00349 Utility = 8,
00353 Splash = 9,
00357 DropdownMenu = 10,
00361 PopupMenu = 11,
00365 Tooltip = 12,
00369 Notification = 13,
00373 ComboBox = 14,
00377 DNDIcon = 15
00378 };
00379
00384 enum WindowTypeMask {
00385 NormalMask = 1<<0,
00386 DesktopMask = 1<<1,
00387 DockMask = 1<<2,
00388 ToolbarMask = 1<<3,
00389 MenuMask = 1<<4,
00390 DialogMask = 1<<5,
00391 OverrideMask = 1<<6,
00392 TopMenuMask = 1<<7,
00393 UtilityMask = 1<<8,
00394 SplashMask = 1<<9,
00395 DropdownMenuMask = 1<<10,
00396 PopupMenuMask = 1<<11,
00397 TooltipMask = 1<<12,
00398 NotificationMask = 1<<13,
00399 ComboBoxMask = 1<<14,
00400 DNDIconMask = 1<<15,
00401 AllTypesMask = 0LU-1
00402 };
00403
00408 static bool typeMatchesMask( WindowType type, unsigned long mask );
00409
00425 enum State {
00431 Modal = 1<<0,
00437 Sticky = 1<<1,
00441 MaxVert = 1<<2,
00445 MaxHoriz = 1<<3,
00449 Max = MaxVert | MaxHoriz,
00453 Shaded = 1<<4,
00457 SkipTaskbar = 1<<5,
00462 KeepAbove = 1<<6,
00466 StaysOnTop = KeepAbove,
00470 SkipPager = 1<<7,
00475 Hidden = 1<<8,
00480 FullScreen = 1<<9,
00484 KeepBelow = 1<<10,
00490 DemandsAttention = 1<<11
00491 };
00492
00512 enum Direction {
00513 TopLeft = 0,
00514 Top = 1,
00515 TopRight = 2,
00516 Right = 3,
00517 BottomRight = 4,
00518 Bottom = 5,
00519 BottomLeft = 6,
00520 Left = 7,
00521 Move = 8,
00522 KeyboardSize = 9,
00523 KeyboardMove = 10,
00524 MoveResizeCancel = 11
00525 };
00526
00533 enum MappingState {
00537 Visible = 1,
00541 Withdrawn = 0,
00547 Iconic = 3
00548 };
00549
00553 enum Action {
00554 ActionMove = 1<<0,
00555 ActionResize = 1<<1,
00556 ActionMinimize = 1<<2,
00557 ActionShade = 1<<3,
00558 ActionStick = 1<<4,
00559 ActionMaxVert = 1<<5,
00560 ActionMaxHoriz = 1<<6,
00561 ActionMax = ActionMaxVert | ActionMaxHoriz,
00562 ActionFullScreen = 1<<7,
00563 ActionChangeDesktop = 1<<8,
00564 ActionClose = 1<<9
00565 };
00566
00608 enum Property {
00609
00610 Supported = 1<<0,
00611 ClientList = 1<<1,
00612 ClientListStacking = 1<<2,
00613 NumberOfDesktops = 1<<3,
00614 DesktopGeometry = 1<<4,
00615 DesktopViewport = 1<<5,
00616 CurrentDesktop = 1<<6,
00617 DesktopNames = 1<<7,
00618 ActiveWindow = 1<<8,
00619 WorkArea = 1<<9,
00620 SupportingWMCheck = 1<<10,
00621 VirtualRoots = 1<<11,
00622
00623 CloseWindow = 1<<13,
00624 WMMoveResize = 1<<14,
00625
00626
00627 WMName = 1<<15,
00628 WMVisibleName = 1<<16,
00629 WMDesktop = 1<<17,
00630 WMWindowType = 1<<18,
00631 WMState = 1<<19,
00632 WMStrut = 1<<20,
00633 WMIconGeometry = 1<<21,
00634 WMIcon = 1<<22,
00635 WMPid = 1<<23,
00636 WMHandledIcons = 1<<24,
00637 WMPing = 1<<25,
00638 XAWMState = 1<<27,
00639 WMFrameExtents = 1<<28,
00640
00641
00642 WMIconName = 1<<29,
00643 WMVisibleIconName = 1<<30,
00644 WMGeometry = 1<<31
00645 };
00646
00671 enum Property2 {
00672 WM2UserTime = 1<<0,
00673 WM2StartupId = 1<<1,
00674 WM2TransientFor = 1<<2,
00675 WM2GroupLeader = 1<<3,
00676 WM2AllowedActions = 1<<4,
00677 WM2RestackWindow = 1<<5,
00678 WM2MoveResizeWindow = 1<<6,
00679 WM2ExtendedStrut = 1<<7,
00680 WM2TakeActivity = 1<<8,
00681 WM2KDETemporaryRules = 1<<9,
00682 WM2WindowClass = 1<<10,
00683 WM2WindowRole = 1<<11,
00684 WM2ClientMachine = 1<<12,
00685 WM2ShowingDesktop = 1<<13,
00686 WM2Opacity = 1<<14,
00687 WM2DesktopLayout = 1<<15,
00688 WM2FullPlacement = 1<<16,
00689 WM2FullscreenMonitors = 1<<17
00690 };
00691
00696 enum { OnAllDesktops = -1 };
00697
00701
00702 enum RequestSource {
00706 FromUnknown,
00710 FromApplication,
00714 FromTool
00715 };
00716
00720 enum Orientation {
00721 OrientationHorizontal = 0,
00722 OrientationVertical = 1
00723 };
00724
00728 enum DesktopLayoutCorner {
00729 DesktopLayoutCornerTopLeft = 0,
00730 DesktopLayoutCornerTopRight = 1,
00731 DesktopLayoutCornerBottomLeft = 2,
00732 DesktopLayoutCornerBottomRight = 3
00733 };
00734
00740 static int timestampCompare( unsigned long time1, unsigned long time2 );
00746 static int timestampDiff( unsigned long time1, unsigned long time2 );
00747
00748 };
00749
00750 #endif // netwm_def_h