• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

netwm_def.h

Go to the documentation of this file.
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 #include <kdeui_export.h>
00029 
00043 struct NETPoint {
00047     NETPoint() : x(0), y(0) { }
00048 
00049     /*
00050        Public data member.
00051     **/
00052     int x, 
00053       y;   
00054 };
00055 
00056 
00070 struct NETSize {
00074     NETSize() : width(0), height(0) { }
00075 
00076     /*
00077        Public data member.
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, // NON STANDARD
00345     TopMenu  = 7, // NON STANDARD
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,   // NOT STANDARD
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,  // movement only
00522     KeyboardSize = 9,  // size via keyboard
00523     KeyboardMove = 10, // move via keyboard
00524     MoveResizeCancel = 11 // to ask the WM to stop moving a window
00525     };
00526 
00533     enum MappingState {
00537     Visible = 1, //NormalState,
00541     Withdrawn = 0, //WithdrawnState,
00547     Iconic = 3 // IconicState
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     
00612     enum Property {
00613     // root
00614     Supported             = 1<<0,
00615     ClientList            = 1<<1,
00616     ClientListStacking    = 1<<2,
00617     NumberOfDesktops      = 1<<3,
00618     DesktopGeometry       = 1<<4,
00619     DesktopViewport       = 1<<5,
00620     CurrentDesktop        = 1<<6,
00621     DesktopNames          = 1<<7,
00622     ActiveWindow          = 1<<8,
00623     WorkArea              = 1<<9,
00624     SupportingWMCheck     = 1<<10,
00625     VirtualRoots          = 1<<11,
00626         //
00627     CloseWindow           = 1<<13,
00628     WMMoveResize          = 1<<14,
00629 
00630     // window
00631     WMName                = 1<<15,
00632     WMVisibleName         = 1<<16,
00633     WMDesktop             = 1<<17,
00634     WMWindowType          = 1<<18,
00635     WMState               = 1<<19,
00636     WMStrut               = 1<<20,
00637     WMIconGeometry        = 1<<21,
00638     WMIcon                = 1<<22,
00639     WMPid                 = 1<<23,
00640     WMHandledIcons        = 1<<24,
00641     WMPing                = 1<<25,
00642     XAWMState             = 1<<27,
00643         WMFrameExtents        = 1<<28,
00644 
00645     // Need to be reordered
00646     WMIconName            = 1<<29,
00647     WMVisibleIconName     = 1<<30,
00648     WMGeometry        = 1<<31
00649     };
00650     
00675     enum Property2 {
00676         WM2UserTime            = 1<<0,
00677         WM2StartupId           = 1<<1,
00678         WM2TransientFor        = 1<<2,
00679         WM2GroupLeader         = 1<<3,
00680         WM2AllowedActions      = 1<<4,
00681         WM2RestackWindow       = 1<<5,
00682         WM2MoveResizeWindow    = 1<<6,
00683         WM2ExtendedStrut       = 1<<7,
00684         WM2TakeActivity        = 1<<8,
00685         WM2KDETemporaryRules   = 1<<9,  // NOT STANDARD
00686         WM2WindowClass         = 1<<10,
00687         WM2WindowRole          = 1<<11,
00688         WM2ClientMachine       = 1<<12,
00689         WM2ShowingDesktop      = 1<<13,
00690         WM2Opacity             = 1<<14,
00691         WM2DesktopLayout       = 1<<15,        
00692         WM2FullPlacement       = 1<<16,
00693         WM2FullscreenMonitors  = 1<<17
00694     };
00695 
00700     enum { OnAllDesktops = -1 };
00701     
00705     // must match the values for data.l[0] field in _NET_ACTIVE_WINDOW message
00706     enum RequestSource {
00710         FromUnknown = 0, // internal
00714         FromApplication = 1,
00718         FromTool = 2
00719     };
00720     
00724     enum Orientation {
00725         OrientationHorizontal = 0,
00726         OrientationVertical = 1
00727     };
00728     
00732     enum DesktopLayoutCorner {
00733         DesktopLayoutCornerTopLeft = 0,
00734         DesktopLayoutCornerTopRight = 1,
00735         DesktopLayoutCornerBottomLeft = 2,
00736         DesktopLayoutCornerBottomRight = 3
00737     };
00738     
00744     static int timestampCompare( unsigned long time1, unsigned long time2 );
00750     static int timestampDiff( unsigned long time1, unsigned long time2 );
00751 
00752 };
00753 
00754 #endif // netwm_def_h

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal