• Skip to content
  • Skip to link menu
KDE 4.1 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 class KDEUI_EXPORT NET {
00235 public:
00241     enum Role {
00245     Client,
00249     WindowManager
00250     };
00251 
00256     enum WindowType {
00260     Unknown  = -1,
00264     Normal   = 0,
00271     Desktop  = 1,
00275     Dock     = 2,
00279     Toolbar  = 3,
00283     Menu     = 4,
00287     Dialog   = 5,
00291     Override = 6, // NON STANDARD
00296     TopMenu  = 7, // NON STANDARD
00300     Utility  = 8,
00304     Splash   = 9,
00308         DropdownMenu = 10,
00312         PopupMenu = 11,
00316         Tooltip = 12,
00320         Notification = 13,
00324         ComboBox = 14,
00328         DNDIcon = 15
00329     };
00330     
00335     enum WindowTypeMask {
00336     NormalMask   = 1<<0,   
00337     DesktopMask  = 1<<1,   
00338     DockMask     = 1<<2,   
00339     ToolbarMask  = 1<<3,   
00340     MenuMask     = 1<<4,   
00341     DialogMask   = 1<<5,   
00342     OverrideMask = 1<<6,   
00343     TopMenuMask  = 1<<7,   
00344     UtilityMask  = 1<<8,   
00345     SplashMask   = 1<<9,   
00346         DropdownMenuMask = 1<<10, 
00347         PopupMenuMask    = 1<<11, 
00348         TooltipMask      = 1<<12, 
00349         NotificationMask = 1<<13, 
00350         ComboBoxMask     = 1<<14, 
00351         DNDIconMask      = 1<<15, 
00352         AllTypesMask     = 0LU-1  
00353     };
00354 
00359     static bool typeMatchesMask( WindowType type, unsigned long mask );
00360 
00376     enum State {
00382     Modal        = 1<<0,
00388     Sticky       = 1<<1,
00392     MaxVert      = 1<<2,
00396     MaxHoriz     = 1<<3,
00400     Max = MaxVert | MaxHoriz,
00404     Shaded       = 1<<4,
00408     SkipTaskbar  = 1<<5,
00413     KeepAbove    = 1<<6,
00417     StaysOnTop   = KeepAbove,   // NOT STANDARD
00421     SkipPager    = 1<<7,
00426     Hidden       = 1<<8,
00431     FullScreen   = 1<<9,
00435     KeepBelow    = 1<<10,
00441         DemandsAttention = 1<<11
00442     };
00443 
00463     enum Direction {
00464     TopLeft      = 0,
00465     Top          = 1,
00466     TopRight     = 2,
00467     Right        = 3,
00468     BottomRight  = 4,
00469     Bottom       = 5,
00470     BottomLeft   = 6,
00471     Left         = 7,
00472     Move         = 8,  // movement only
00473     KeyboardSize = 9,  // size via keyboard
00474     KeyboardMove = 10, // move via keyboard
00475     MoveResizeCancel = 11 // to ask the WM to stop moving a window
00476     };
00477 
00484     enum MappingState {
00488     Visible = 1, //NormalState,
00492     Withdrawn = 0, //WithdrawnState,
00498     Iconic = 3 // IconicState
00499     };
00500 
00504     enum Action {
00505         ActionMove           = 1<<0,
00506         ActionResize         = 1<<1,
00507         ActionMinimize       = 1<<2,
00508         ActionShade          = 1<<3,
00509         ActionStick          = 1<<4,
00510         ActionMaxVert        = 1<<5,
00511         ActionMaxHoriz       = 1<<6,
00512         ActionMax            = ActionMaxVert | ActionMaxHoriz,
00513         ActionFullScreen     = 1<<7,
00514         ActionChangeDesktop  = 1<<8,
00515         ActionClose          = 1<<9
00516     };
00517     
00559     enum Property {
00560     // root
00561     Supported             = 1<<0,
00562     ClientList            = 1<<1,
00563     ClientListStacking    = 1<<2,
00564     NumberOfDesktops      = 1<<3,
00565     DesktopGeometry       = 1<<4,
00566     DesktopViewport       = 1<<5,
00567     CurrentDesktop        = 1<<6,
00568     DesktopNames          = 1<<7,
00569     ActiveWindow          = 1<<8,
00570     WorkArea              = 1<<9,
00571     SupportingWMCheck     = 1<<10,
00572     VirtualRoots          = 1<<11,
00573         //
00574     CloseWindow           = 1<<13,
00575     WMMoveResize          = 1<<14,
00576 
00577     // window
00578     WMName                = 1<<15,
00579     WMVisibleName         = 1<<16,
00580     WMDesktop             = 1<<17,
00581     WMWindowType          = 1<<18,
00582     WMState               = 1<<19,
00583     WMStrut               = 1<<20,
00584     WMIconGeometry        = 1<<21,
00585     WMIcon                = 1<<22,
00586     WMPid                 = 1<<23,
00587     WMHandledIcons        = 1<<24,
00588     WMPing                = 1<<25,
00589     XAWMState             = 1<<27,
00590         WMFrameExtents        = 1<<28,
00591 
00592     // Need to be reordered
00593     WMIconName            = 1<<29,
00594     WMVisibleIconName     = 1<<30,
00595     WMGeometry        = 1<<31
00596     };
00597     
00621     enum Property2 {
00622         WM2UserTime            = 1<<0,
00623         WM2StartupId           = 1<<1,
00624         WM2TransientFor        = 1<<2,
00625         WM2GroupLeader         = 1<<3,
00626         WM2AllowedActions      = 1<<4,
00627         WM2RestackWindow       = 1<<5,
00628         WM2MoveResizeWindow    = 1<<6,
00629         WM2ExtendedStrut       = 1<<7,
00630         WM2TakeActivity        = 1<<8,
00631         WM2KDETemporaryRules   = 1<<9,  // NOT STANDARD
00632         WM2WindowClass         = 1<<10,
00633         WM2WindowRole          = 1<<11,
00634         WM2ClientMachine       = 1<<12,
00635         WM2ShowingDesktop      = 1<<13,
00636         WM2Opacity             = 1<<14,
00637         WM2DesktopLayout       = 1<<15,        
00638         WM2FullPlacement       = 1<<16
00639     };
00640 
00645     enum { OnAllDesktops = -1 };
00646     
00650     // must match the values for data.l[0] field in _NET_ACTIVE_WINDOW message
00651     enum RequestSource {
00655         FromUnknown, // internal
00659         FromApplication,
00663         FromTool
00664     };
00665     
00669     enum Orientation {
00670         OrientationHorizontal = 0,
00671         OrientationVertical = 1
00672     };
00673     
00677     enum DesktopLayoutCorner {
00678         DesktopLayoutCornerTopLeft = 0,
00679         DesktopLayoutCornerTopRight = 1,
00680         DesktopLayoutCornerBottomLeft = 2,
00681         DesktopLayoutCornerBottomRight = 3
00682     };
00683     
00689     static int timestampCompare( unsigned long time1, unsigned long time2 );
00695     static int timestampDiff( unsigned long time1, unsigned long time2 );
00696 
00697 };
00698 
00699 #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
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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