• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • windowmanagement
netwm_def.h
Go to the documentation of this file.
1/*
2
3 Copyright (c) 2000 Troll Tech AS
4 Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org>
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23
24*/
25
26#ifndef netwm_def_h
27#define netwm_def_h
28#include <kdeui_export.h>
29
43struct NETPoint {
47 NETPoint() : x(0), y(0) { }
48
49 /*
50 Public data member.
51 **/
52 int x,
53 y;
54};
55
56
70struct NETSize {
74 NETSize() : width(0), height(0) { }
75
76 /*
77 Public data member.
78 **/
79 int width,
80 height;
81};
82
93struct NETRect {
99 NETPoint pos;
100
106 NETSize size;
107};
108
109
121struct NETIcon {
125 NETIcon() : data(0) { }
126
132 NETSize size;
133
139 unsigned char *data;
140};
141
142
152struct NETExtendedStrut {
156 NETExtendedStrut() : left_width(0), left_start(0), left_end(0),
157 right_width(0), right_start(0), right_end(0), top_width(0), top_start(0), top_end(0),
158 bottom_width(0), bottom_start(0), bottom_end(0) {}
159
163 int left_width, left_start, left_end;
164
168 int right_width, right_start, right_end;
169
173 int top_width, top_start, top_end;
174
178 int bottom_width, bottom_start, bottom_end;
179
180};
181
182
194struct NETStrut {
198 NETStrut() : left(0), right(0), top(0), bottom(0) { }
199
203 int left;
204
208 int right;
209
213 int top;
214
218 int bottom;
219};
220
221
234struct NETFullscreenMonitors {
239 NETFullscreenMonitors() : top(-1), bottom(0), left(0), right(0) { }
240
244 int top;
245
249 int bottom;
250
254 int left;
255
259 int right;
260
267 bool isSet() const { return (top != -1); };
268};
269
270
283class KDEUI_EXPORT NET {
284public:
290 enum Role {
294 Client,
298 WindowManager
299 };
300
305 enum WindowType {
309 Unknown = -1,
313 Normal = 0,
320 Desktop = 1,
324 Dock = 2,
328 Toolbar = 3,
332 Menu = 4,
336 Dialog = 5,
340 Override = 6, // NON STANDARD
345 TopMenu = 7, // NON STANDARD
349 Utility = 8,
353 Splash = 9,
357 DropdownMenu = 10,
361 PopupMenu = 11,
365 Tooltip = 12,
369 Notification = 13,
373 ComboBox = 14,
377 DNDIcon = 15
378 };
379
384 enum WindowTypeMask {
385 NormalMask = 1<<0,
386 DesktopMask = 1<<1,
387 DockMask = 1<<2,
388 ToolbarMask = 1<<3,
389 MenuMask = 1<<4,
390 DialogMask = 1<<5,
391 OverrideMask = 1<<6,
392 TopMenuMask = 1<<7,
393 UtilityMask = 1<<8,
394 SplashMask = 1<<9,
395 DropdownMenuMask = 1<<10,
396 PopupMenuMask = 1<<11,
397 TooltipMask = 1<<12,
398 NotificationMask = 1<<13,
399 ComboBoxMask = 1<<14,
400 DNDIconMask = 1<<15,
401 AllTypesMask = 0LU-1
402 };
403
408 static bool typeMatchesMask( WindowType type, unsigned long mask );
409
425 enum State {
431 Modal = 1<<0,
437 Sticky = 1<<1,
441 MaxVert = 1<<2,
445 MaxHoriz = 1<<3,
449 Max = MaxVert | MaxHoriz,
453 Shaded = 1<<4,
457 SkipTaskbar = 1<<5,
462 KeepAbove = 1<<6,
466 StaysOnTop = KeepAbove, // NOT STANDARD
470 SkipPager = 1<<7,
475 Hidden = 1<<8,
480 FullScreen = 1<<9,
484 KeepBelow = 1<<10,
490 DemandsAttention = 1<<11
491 };
492
512 enum Direction {
513 TopLeft = 0,
514 Top = 1,
515 TopRight = 2,
516 Right = 3,
517 BottomRight = 4,
518 Bottom = 5,
519 BottomLeft = 6,
520 Left = 7,
521 Move = 8, // movement only
522 KeyboardSize = 9, // size via keyboard
523 KeyboardMove = 10, // move via keyboard
524 MoveResizeCancel = 11 // to ask the WM to stop moving a window
525 };
526
533 enum MappingState {
537 Visible = 1, //NormalState,
541 Withdrawn = 0, //WithdrawnState,
547 Iconic = 3 // IconicState
548 };
549
553 enum Action {
554 ActionMove = 1<<0,
555 ActionResize = 1<<1,
556 ActionMinimize = 1<<2,
557 ActionShade = 1<<3,
558 ActionStick = 1<<4,
559 ActionMaxVert = 1<<5,
560 ActionMaxHoriz = 1<<6,
561 ActionMax = ActionMaxVert | ActionMaxHoriz,
562 ActionFullScreen = 1<<7,
563 ActionChangeDesktop = 1<<8,
564 ActionClose = 1<<9
565 };
566
612 enum Property {
613 // root
614 Supported = 1<<0,
615 ClientList = 1<<1,
616 ClientListStacking = 1<<2,
617 NumberOfDesktops = 1<<3,
618 DesktopGeometry = 1<<4,
619 DesktopViewport = 1<<5,
620 CurrentDesktop = 1<<6,
621 DesktopNames = 1<<7,
622 ActiveWindow = 1<<8,
623 WorkArea = 1<<9,
624 SupportingWMCheck = 1<<10,
625 VirtualRoots = 1<<11,
626 //
627 CloseWindow = 1<<13,
628 WMMoveResize = 1<<14,
629
630 // window
631 WMName = 1<<15,
632 WMVisibleName = 1<<16,
633 WMDesktop = 1<<17,
634 WMWindowType = 1<<18,
635 WMState = 1<<19,
636 WMStrut = 1<<20,
637 WMIconGeometry = 1<<21,
638 WMIcon = 1<<22,
639 WMPid = 1<<23,
640 WMHandledIcons = 1<<24,
641 WMPing = 1<<25,
642 XAWMState = 1<<27,
643 WMFrameExtents = 1<<28,
644
645 // Need to be reordered
646 WMIconName = 1<<29,
647 WMVisibleIconName = 1<<30,
648 WMGeometry = 1<<31
649 };
650
675 enum Property2 {
676 WM2UserTime = 1<<0,
677 WM2StartupId = 1<<1,
678 WM2TransientFor = 1<<2,
679 WM2GroupLeader = 1<<3,
680 WM2AllowedActions = 1<<4,
681 WM2RestackWindow = 1<<5,
682 WM2MoveResizeWindow = 1<<6,
683 WM2ExtendedStrut = 1<<7,
684 WM2TakeActivity = 1<<8,
685 WM2KDETemporaryRules = 1<<9, // NOT STANDARD
686 WM2WindowClass = 1<<10,
687 WM2WindowRole = 1<<11,
688 WM2ClientMachine = 1<<12,
689 WM2ShowingDesktop = 1<<13,
690 WM2Opacity = 1<<14,
691 WM2DesktopLayout = 1<<15,
692 WM2FullPlacement = 1<<16,
693 WM2FullscreenMonitors = 1<<17,
694 WM2FrameOverlap = 1<<18, // NOT STANDARD
695 WM2Activities = 1<<19, // NOT STANDARD @since 4.6
696 WM2BlockCompositing = 1<<20, // NOT STANDARD @since 4.7
697 WM2KDEShadow = 1<<21 // NOT Standard @since 4.7
698 };
699
704 enum { OnAllDesktops = -1 };
705
709 // must match the values for data.l[0] field in _NET_ACTIVE_WINDOW message
710 enum RequestSource {
714 FromUnknown = 0, // internal
718 FromApplication = 1,
722 FromTool = 2
723 };
724
728 enum Orientation {
729 OrientationHorizontal = 0,
730 OrientationVertical = 1
731 };
732
736 enum DesktopLayoutCorner {
737 DesktopLayoutCornerTopLeft = 0,
738 DesktopLayoutCornerTopRight = 1,
739 DesktopLayoutCornerBottomLeft = 2,
740 DesktopLayoutCornerBottomRight = 3
741 };
742
748 static int timestampCompare( unsigned long time1, unsigned long time2 );
754 static int timestampDiff( unsigned long time1, unsigned long time2 );
755
756};
757
758#endif // netwm_def_h
NET
Base namespace class.
Definition: netwm_def.h:283
NET::State
State
Window state.
Definition: netwm_def.h:425
NET::WindowTypeMask
WindowTypeMask
Values for WindowType when they should be OR'ed together, e.g.
Definition: netwm_def.h:384
NET::DesktopLayoutCorner
DesktopLayoutCorner
Starting corner for desktop layout.
Definition: netwm_def.h:736
NET::WindowType
WindowType
Window type.
Definition: netwm_def.h:305
NET::Role
Role
Application role.
Definition: netwm_def.h:290
NET::Client
@ Client
indicates that the application is a client application.
Definition: netwm_def.h:294
NET::Property2
Property2
Supported properties.
Definition: netwm_def.h:675
NET::Property
Property
Supported properties.
Definition: netwm_def.h:612
NET::RequestSource
RequestSource
Source of the request.
Definition: netwm_def.h:710
NET::Direction
Direction
Direction for WMMoveResize.
Definition: netwm_def.h:512
NET::Orientation
Orientation
Orientation.
Definition: netwm_def.h:728
NET::MappingState
MappingState
Client window mapping state.
Definition: netwm_def.h:533
kdeui_export.h
Unknown
Unknown
Tooltip
Tooltip
Menu
Menu
Action
NETExtendedStrut
Partial strut class for NET classes.
Definition: netwm_def.h:152
NETExtendedStrut::bottom_width
int bottom_width
Bottom border of the strut, width and range.
Definition: netwm_def.h:178
NETExtendedStrut::NETExtendedStrut
NETExtendedStrut()
Constructor to initialize this struct to 0,0,0,0.
Definition: netwm_def.h:156
NETExtendedStrut::left_end
int left_end
Definition: netwm_def.h:163
NETExtendedStrut::top_start
int top_start
Definition: netwm_def.h:173
NETExtendedStrut::bottom_start
int bottom_start
Definition: netwm_def.h:178
NETExtendedStrut::left_width
int left_width
Left border of the strut, width and range.
Definition: netwm_def.h:163
NETExtendedStrut::right_width
int right_width
Right border of the strut, width and range.
Definition: netwm_def.h:168
NETExtendedStrut::left_start
int left_start
Definition: netwm_def.h:163
NETExtendedStrut::bottom_end
int bottom_end
Definition: netwm_def.h:178
NETExtendedStrut::top_end
int top_end
Definition: netwm_def.h:173
NETExtendedStrut::top_width
int top_width
Top border of the strut, width and range.
Definition: netwm_def.h:173
NETExtendedStrut::right_start
int right_start
Definition: netwm_def.h:168
NETExtendedStrut::right_end
int right_end
Definition: netwm_def.h:168
NETFullscreenMonitors
Simple multiple monitor topology class for NET classes.
Definition: netwm_def.h:234
NETFullscreenMonitors::isSet
bool isSet() const
Convenience check to make sure that we are not holding the initial (invalid) values.
Definition: netwm_def.h:267
NETFullscreenMonitors::right
int right
Monitor index whose right border defines the right edge of the topology.
Definition: netwm_def.h:259
NETFullscreenMonitors::NETFullscreenMonitors
NETFullscreenMonitors()
Constructor to initialize this struct to -1,0,0,0 (an initialized, albeit invalid,...
Definition: netwm_def.h:239
NETFullscreenMonitors::top
int top
Monitor index whose top border defines the top edge of the topology.
Definition: netwm_def.h:244
NETFullscreenMonitors::left
int left
Monitor index whose left border defines the left edge of the topology.
Definition: netwm_def.h:254
NETFullscreenMonitors::bottom
int bottom
Monitor index whose bottom border defines the bottom edge of the topology.
Definition: netwm_def.h:249
NETIcon
Simple icon class for NET classes.
Definition: netwm_def.h:121
NETIcon::size
NETSize size
Size of the icon.
Definition: netwm_def.h:132
NETIcon::data
unsigned char * data
Image data for the icon.
Definition: netwm_def.h:139
NETIcon::NETIcon
NETIcon()
Constructor to initialize this icon to 0x0 with data=0.
Definition: netwm_def.h:125
NETPoint
Simple point class for NET classes.
Definition: netwm_def.h:43
NETPoint::x
int x
x coordinate.
Definition: netwm_def.h:52
NETPoint::NETPoint
NETPoint()
Constructor to initialize this point to 0,0.
Definition: netwm_def.h:47
NETPoint::y
int y
y coordinate
Definition: netwm_def.h:53
NETRect
Simple rectangle class for NET classes.
Definition: netwm_def.h:93
NETRect::pos
NETPoint pos
Position of the rectangle.
Definition: netwm_def.h:99
NETRect::size
NETSize size
Size of the rectangle.
Definition: netwm_def.h:106
NETSize
Simple size class for NET classes.
Definition: netwm_def.h:70
NETSize::height
int height
Height.
Definition: netwm_def.h:80
NETSize::NETSize
NETSize()
Constructor to initialize this size to 0x0.
Definition: netwm_def.h:74
NETSize::width
int width
Width.
Definition: netwm_def.h:79
NETStrut
Definition: netwm_def.h:194
NETStrut::bottom
int bottom
Bottom border of the strut.
Definition: netwm_def.h:218
NETStrut::left
int left
Left border of the strut.
Definition: netwm_def.h:203
NETStrut::right
int right
Right border of the strut.
Definition: netwm_def.h:208
NETStrut::top
int top
Top border of the strut.
Definition: netwm_def.h:213
NETStrut::NETStrut
NETStrut()
Constructor to initialize this struct to 0,0,0,0.
Definition: netwm_def.h:198
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal