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

tdecore

  • tdecore
netwm_def.h
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
29#include <tdelibs_export.h>
30
44struct NETPoint {
48 NETPoint() : x(0), y(0) { }
49
50 /*
51 Public data member.
52 **/
53 int x,
54 y;
55};
56
57
71struct NETSize {
75 NETSize() : width(0), height(0) { }
76
77 /*
78 Public data member.
79 **/
80 int width,
81 height;
82};
83
94struct NETRect {
100 NETPoint pos;
101
107 NETSize size;
108};
109
110
122struct NETIcon {
126 NETIcon() : data(0) { }
127
133 NETSize size;
134
140 unsigned char *data;
141};
142
143
153struct NETExtendedStrut {
157 NETExtendedStrut() : left_width(0), left_start(0), left_end(0),
158 right_width(0), right_start(0), right_end(0), top_width(0), top_start(0), top_end(0),
159 bottom_width(0), bottom_start(0), bottom_end(0) {}
160
164 int left_width, left_start, left_end;
165
169 int right_width, right_start, right_end;
170
174 int top_width, top_start, top_end;
175
179 int bottom_width, bottom_start, bottom_end;
180
181};
182
183
195struct NETStrut {
199 NETStrut() : left(0), right(0), top(0), bottom(0) { }
200
204 int left;
205
209 int right;
210
214 int top;
215
219 int bottom;
220};
221
222
235class TDECORE_EXPORT NET {
236public:
247 enum Role {
248 Client,
249 WindowManager
250 };
251
294 enum WindowType {
295 Unknown = -1,
296 Normal = 0,
297 Desktop = 1,
298 Dock = 2,
299 Toolbar = 3,
300 Menu = 4,
301 Dialog = 5,
302 Override = 6,
303 TopMenu = 7, // NON STANDARD
304 Tool = Toolbar, // This will go away soon, COMPAT (How soon? :)
305 Utility = 8,
306 Splash = 9,
307 DropdownMenu = 10,
308 PopupMenu = 11,
309 Tooltip = 12,
310 Notification = 13,
311 ComboBox = 14,
312 DNDIcon = 15
313 };
314
320 enum WindowTypeMask {
321 NormalMask = 1<<0,
322 DesktopMask = 1<<1,
323 DockMask = 1<<2,
324 ToolbarMask = 1<<3,
325 MenuMask = 1<<4,
326 DialogMask = 1<<5,
327 OverrideMask = 1<<6,
328 TopMenuMask = 1<<7,
329 UtilityMask = 1<<8,
330 SplashMask = 1<<9,
331 DropdownMenuMask = 1<<10,
332 PopupMenuMask = 1<<11,
333 TooltipMask = 1<<12,
334 NotificationMask = 1<<13,
335 ComboBoxMask = 1<<14,
336 DNDIconMask = 1<<15
337 };
338
339 // KDE4 move to WindowTypeMask
340 enum { AllTypesMask = 0LU-1 };
341
346 static bool typeMatchesMask( WindowType type, unsigned long mask );
347
389 enum State {
390 Modal = 1<<0,
391 Sticky = 1<<1,
392 MaxVert = 1<<2,
393 MaxHoriz = 1<<3,
394 Max = MaxVert | MaxHoriz,
395 Shaded = 1<<4,
396 SkipTaskbar = 1<<5,
397 KeepAbove = 1<<6,
398 StaysOnTop = KeepAbove, // NOT STANDARD
399 SkipPager = 1<<7,
400 Hidden = 1<<8,
401 FullScreen = 1<<9,
402 KeepBelow = 1<<10,
403 DemandsAttention = 1<<11
404 };
405
425 enum Direction {
426 TopLeft = 0,
427 Top = 1,
428 TopRight = 2,
429 Right = 3,
430 BottomRight = 4,
431 Bottom = 5,
432 BottomLeft = 6,
433 Left = 7,
434 Move = 8, // movement only
438 KeyboardSize = 9, // size via keyboard
442 KeyboardMove = 10, // move via keyboard
446 MoveResizeCancel = 11 // to ask the WM to stop moving a window
447 };
448
463 // KDE4 aaarghl, this doesn't map correctly to Xlib #defines
464 enum MappingState {
465 Visible, // ie. NormalState
466 Withdrawn,
467 Iconic
468 };
469
474 enum Action {
475 ActionMove = 1<<0,
476 ActionResize = 1<<1,
477 ActionMinimize = 1<<2,
478 ActionShade = 1<<3,
479 ActionStick = 1<<4,
480 ActionMaxVert = 1<<5,
481 ActionMaxHoriz = 1<<6,
482 ActionMax = ActionMaxVert | ActionMaxHoriz,
483 ActionFullScreen = 1<<7,
484 ActionChangeDesktop = 1<<8,
485 ActionClose = 1<<9
486 };
487
534 enum Property {
535 // root
536 Supported = 1<<0,
537 ClientList = 1<<1,
538 ClientListStacking = 1<<2,
539 NumberOfDesktops = 1<<3,
540 DesktopGeometry = 1<<4,
541 DesktopViewport = 1<<5,
542 CurrentDesktop = 1<<6,
543 DesktopNames = 1<<7,
544 ActiveWindow = 1<<8,
545 WorkArea = 1<<9,
546 SupportingWMCheck = 1<<10,
547 VirtualRoots = 1<<11,
548 KDESystemTrayWindows = 1<<12, // NOT STANDARD
549 CloseWindow = 1<<13,
550 WMMoveResize = 1<<14,
551
552 // window
553 WMName = 1<<15,
554 WMVisibleName = 1<<16,
555 WMDesktop = 1<<17,
556 WMWindowType = 1<<18,
557 WMState = 1<<19,
558 WMStrut = 1<<20,
559 WMIconGeometry = 1<<21,
560 WMIcon = 1<<22,
561 WMPid = 1<<23,
562 WMHandledIcons = 1<<24,
563 WMPing = 1<<25,
564 WMKDESystemTrayWinFor = 1<<26, // NOT STANDARD
565 XAWMState = 1<<27, // NOT STANDARD
566 WMFrameExtents = 1<<28,
567 WMKDEFrameStrut = WMFrameExtents, // NOT STANDARD
568
569 // Need to be reordered
570 WMIconName = 1<<29,
571 WMVisibleIconName = 1<<30,
572 WMGeometry = 1<<31
573 };
574
598 enum Property2 {
599 WM2UserTime = 1<<0,
600 WM2StartupId = 1<<1,
601 WM2TransientFor = 1<<2,
602 WM2GroupLeader = 1<<3,
603 WM2AllowedActions = 1<<4,
604 WM2RestackWindow = 1<<5,
605 WM2MoveResizeWindow = 1<<6,
606 WM2ExtendedStrut = 1<<7,
607 WM2TakeActivity = 1<<8,
608 WM2KDETemporaryRules = 1<<9, // NOT STANDARD
609 WM2WindowClass = 1<<10,
610 WM2WindowRole = 1<<11,
611 WM2ClientMachine = 1<<12,
612 WM2ShowingDesktop = 1<<13,
613 WM2FullPlacement = 1<<14,
614 WM2DesktopLayout = 1<<15
615 };
616
622 enum { OnAllDesktops = -1 };
623
630 // must match the values for data.l[0] field in _NET_ACTIVE_WINDOW message
631 enum RequestSource {
632 FromUnknown, // internal
633 FromApplication,
634 FromTool
635 };
636
640 enum Orientation {
641 OrientationHorizontal = 0,
642 OrientationVertical = 1
643 };
644
648 enum DesktopLayoutCorner {
649 DesktopLayoutCornerTopLeft = 0,
650 DesktopLayoutCornerTopRight = 1,
651 DesktopLayoutCornerBottomLeft = 2,
652 DesktopLayoutCornerBottomRight = 3
653 };
654
660 static int timestampCompare( unsigned long time1, unsigned long time2 );
666 static int timestampDiff( unsigned long time1_, unsigned long time2_ );
667
668};
669
670
671#endif // __netwm_def_h
NET
Base namespace class.
Definition: netwm_def.h:235
NET::State
State
Window state.
Definition: netwm_def.h:389
NET::timestampDiff
static int timestampDiff(unsigned long time1_, unsigned long time2_)
Returns a difference of two X timestamps, time2 - time1, where time2 must be later than time1,...
NET::WindowTypeMask
WindowTypeMask
Values for WindowType when they should be OR'ed together, e.g.
Definition: netwm_def.h:320
NET::DesktopLayoutCorner
DesktopLayoutCorner
Starting corner for desktop layout.
Definition: netwm_def.h:648
NET::typeMatchesMask
static bool typeMatchesMask(WindowType type, unsigned long mask)
Returns true if the given window type matches the mask given using WindowTypeMask flags.
NET::WindowType
WindowType
Window type.
Definition: netwm_def.h:294
NET::Role
Role
Application role.
Definition: netwm_def.h:247
NET::Property2
Property2
Supported properties.
Definition: netwm_def.h:598
NET::Property
Property
Supported properties.
Definition: netwm_def.h:534
NET::RequestSource
RequestSource
Source of the request.
Definition: netwm_def.h:631
NET::timestampCompare
static int timestampCompare(unsigned long time1, unsigned long time2)
Compares two X timestamps, taking into account wrapping and 64bit architectures.
NET::Direction
Direction
Direction for WMMoveResize.
Definition: netwm_def.h:425
NET::Action
Action
Actions that can be done with a window (_NET_WM_ALLOWED_ACTIONS).
Definition: netwm_def.h:474
NET::Orientation
Orientation
Orientation.
Definition: netwm_def.h:640
NET::MappingState
MappingState
Client window mapping state.
Definition: netwm_def.h:464
NETExtendedStrut
Partial strut class for NET classes.
Definition: netwm_def.h:153
NETExtendedStrut::bottom_width
int bottom_width
Bottom border of the strut, width and range.
Definition: netwm_def.h:179
NETExtendedStrut::NETExtendedStrut
NETExtendedStrut()
Constructor to initialize this struct to 0,0,0,0.
Definition: netwm_def.h:157
NETExtendedStrut::left_width
int left_width
Left border of the strut, width and range.
Definition: netwm_def.h:164
NETExtendedStrut::right_width
int right_width
Right border of the strut, width and range.
Definition: netwm_def.h:169
NETExtendedStrut::top_width
int top_width
Top border of the strut, width and range.
Definition: netwm_def.h:174
NETIcon
Simple icon class for NET classes.
Definition: netwm_def.h:122
NETIcon::size
NETSize size
Size of the icon.
Definition: netwm_def.h:133
NETIcon::data
unsigned char * data
Image data for the icon.
Definition: netwm_def.h:140
NETIcon::NETIcon
NETIcon()
Constructor to initialize this icon to 0x0 with data=0.
Definition: netwm_def.h:126
NETPoint
Simple point class for NET classes.
Definition: netwm_def.h:44
NETPoint::x
int x
x coordinate.
Definition: netwm_def.h:53
NETPoint::NETPoint
NETPoint()
Constructor to initialize this point to 0,0.
Definition: netwm_def.h:48
NETPoint::y
int y
y coordinate
Definition: netwm_def.h:54
NETRect
Simple rectangle class for NET classes.
Definition: netwm_def.h:94
NETRect::pos
NETPoint pos
Position of the rectangle.
Definition: netwm_def.h:100
NETRect::size
NETSize size
Size of the rectangle.
Definition: netwm_def.h:107
NETSize
Simple size class for NET classes.
Definition: netwm_def.h:71
NETSize::height
int height
Height.
Definition: netwm_def.h:81
NETSize::NETSize
NETSize()
Constructor to initialize this size to 0x0.
Definition: netwm_def.h:75
NETSize::width
int width
Width.
Definition: netwm_def.h:80
NETStrut
Definition: netwm_def.h:195
NETStrut::bottom
int bottom
Bottom border of the strut.
Definition: netwm_def.h:219
NETStrut::left
int left
Left border of the strut.
Definition: netwm_def.h:204
NETStrut::right
int right
Right border of the strut.
Definition: netwm_def.h:209
NETStrut::top
int top
Top border of the strut.
Definition: netwm_def.h:214
NETStrut::NETStrut
NETStrut()
Constructor to initialize this struct to 0,0,0,0.
Definition: netwm_def.h:199

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.