kdecore Library API Documentation

netwm_def.h

00001 /* 00002 00003 Copyright (c) 2000 Troll Tech AS 00004 Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org> 00005 00006 Permission is hereby granted, free of charge, to any person obtaining a 00007 copy of this software and associated documentation files (the "Software"), 00008 to deal in the Software without restriction, including without limitation 00009 the rights to use, copy, modify, merge, publish, distribute, sublicense, 00010 and/or sell copies of the Software, and to permit persons to whom the 00011 Software is furnished to do so, subject to the following conditions: 00012 00013 The above copyright notice and this permission notice shall be included in 00014 all copies or substantial portions of the Software. 00015 00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00019 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00020 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00021 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00022 DEALINGS IN THE SOFTWARE. 00023 00024 */ 00025 00026 #ifndef __netwm_def_h 00027 #define __netwm_def_h 00028 00042 struct NETPoint { 00046 NETPoint() : x(0), y(0) { } 00047 00048 /* 00049 Public data member. 00050 **/ 00051 int x, 00052 y; 00053 }; 00054 00055 00069 struct NETSize { 00073 NETSize() : width(0), height(0) { } 00074 00075 /* 00076 Public data member. 00077 **/ 00078 int width, 00079 height; 00080 }; 00081 00092 struct NETRect { 00098 NETPoint pos; 00099 00105 NETSize size; 00106 }; 00107 00108 00120 struct NETIcon { 00124 NETIcon() : data(0) { } 00125 00131 NETSize size; 00132 00138 unsigned char *data; 00139 }; 00140 00141 00150 struct NETStrut { 00154 NETStrut() : left(0), right(0), top(0), bottom(0) { } 00155 00159 int left; 00160 00164 int right; 00165 00169 int top; 00170 00174 int bottom; 00175 }; 00176 00177 00190 class NET { 00191 public: 00202 enum Role { 00203 Client, 00204 WindowManager 00205 }; 00206 00237 enum WindowType { 00238 Unknown = -1, 00239 Normal = 0, 00240 Desktop = 1, 00241 Dock = 2, 00242 Toolbar = 3, 00243 Menu = 4, 00244 Dialog = 5, 00245 Override = 6, // NON STANDARD 00246 TopMenu = 7, // NON STANDARD 00247 Tool = Toolbar, // This will go away soon, COMPAT (How soon? :) 00248 Utility = 8, 00249 Splash = 9 00250 }; 00251 00257 enum WindowTypeMask { 00258 NormalMask = 1<<0, 00259 DesktopMask = 1<<1, 00260 DockMask = 1<<2, 00261 ToolbarMask = 1<<3, 00262 MenuMask = 1<<4, 00263 DialogMask = 1<<5, 00264 OverrideMask = 1<<6, 00265 TopMenuMask = 1<<7, 00266 UtilityMask = 1<<8, 00267 SplashMask = 1<<9 00268 }; 00269 00311 enum State { 00312 Modal = 1<<0, 00313 Sticky = 1<<1, 00314 MaxVert = 1<<2, 00315 MaxHoriz = 1<<3, 00316 Max = MaxVert | MaxHoriz, 00317 Shaded = 1<<4, 00318 SkipTaskbar = 1<<5, 00319 KeepAbove = 1<<6, 00320 StaysOnTop = KeepAbove, // NOT STANDARD 00321 SkipPager = 1<<7, 00322 Hidden = 1<<8, 00323 FullScreen = 1<<9, 00324 KeepBelow = 1<<10, 00325 DemandsAttention = 1<<11 00326 }; 00327 00347 enum Direction { 00348 TopLeft = 0, 00349 Top = 1, 00350 TopRight = 2, 00351 Right = 3, 00352 BottomRight = 4, 00353 Bottom = 5, 00354 BottomLeft = 6, 00355 Left = 7, 00356 Move = 8, // movement only 00360 KeyboardSize = 9, // size via keyboard 00364 KeyboardMove = 10 // move via keyboard 00365 }; 00366 00381 // KDE4 aaarghl, this doesn't map correctly to Xlib #defines 00382 enum MappingState { 00383 Visible, // ie. NormalState 00384 Withdrawn, 00385 Iconic 00386 }; 00387 00392 enum Action { 00393 ActionMove = 1<<0, 00394 ActionResize = 1<<1, 00395 ActionMinimize = 1<<2, 00396 ActionShade = 1<<3, 00397 ActionStick = 1<<4, 00398 ActionMaxVert = 1<<5, 00399 ActionMaxHoriz = 1<<6, 00400 ActionMax = ActionMaxVert | ActionMaxHoriz, 00401 ActionFullScreen = 1<<7, 00402 ActionChangeDesktop = 1<<8, 00403 ActionClose = 1<<9 00404 }; 00405 00452 enum Property { 00453 // root 00454 Supported = 1<<0, 00455 ClientList = 1<<1, 00456 ClientListStacking = 1<<2, 00457 NumberOfDesktops = 1<<3, 00458 DesktopGeometry = 1<<4, 00459 DesktopViewport = 1<<5, 00460 CurrentDesktop = 1<<6, 00461 DesktopNames = 1<<7, 00462 ActiveWindow = 1<<8, 00463 WorkArea = 1<<9, 00464 SupportingWMCheck = 1<<10, 00465 VirtualRoots = 1<<11, 00466 KDESystemTrayWindows = 1<<12, // NOT STANDARD 00467 CloseWindow = 1<<13, 00468 WMMoveResize = 1<<14, 00469 00470 // window 00471 WMName = 1<<15, 00472 WMVisibleName = 1<<16, 00473 WMDesktop = 1<<17, 00474 WMWindowType = 1<<18, 00475 WMState = 1<<19, 00476 WMStrut = 1<<20, 00477 WMIconGeometry = 1<<21, 00478 WMIcon = 1<<22, 00479 WMPid = 1<<23, 00480 WMHandledIcons = 1<<24, 00481 WMPing = 1<<25, 00482 WMKDESystemTrayWinFor = 1<<26, // NOT STANDARD 00483 XAWMState = 1<<27, // NOT STANDARD 00484 WMKDEFrameStrut = 1<<28, // NOT STANDARD 00485 00486 // Need to be reordered 00487 WMIconName = 1<<29, 00488 WMVisibleIconName = 1<<30, 00489 WMGeometry = 1<<31 00490 }; 00491 00509 enum Property2 { 00510 WM2UserTime = 1<<0, 00511 WM2StartupId = 1<<1, 00512 WM2TransientFor = 1<<2, 00513 WM2GroupLeader = 1<<3, 00514 WM2AllowedActions = 1<<4, 00515 WM2RestackWindow = 1<<5, 00516 WM2MoveResizeWindow = 1<<6 00517 }; 00518 00524 enum { OnAllDesktops = -1 }; 00525 00532 // must match the values for data.l[0] field in _NET_ACTIVE_WINDOW message 00533 enum RequestSource { 00534 FromUnknown, // internal 00535 FromApplication, 00536 FromTool 00537 }; 00538 }; 00539 00540 00541 #endif // __netwm_def_h
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 16 17:21:44 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003