NETWinInfo

Search for usage in LXR

#include <netwm.h>

Inheritance diagram for NETWinInfo:

Public Types

enum  { PROTOCOLS , PROTOCOLS2 , PROPERTIES_SIZE }
 
- Public Types inherited from NET
enum  { OnAllDesktops = -1 }
 
enum  Action {
  ActionMove = 1u << 0 , ActionResize = 1u << 1 , ActionMinimize = 1u << 2 , ActionShade = 1u << 3 ,
  ActionStick = 1u << 4 , ActionMaxVert = 1u << 5 , ActionMaxHoriz = 1u << 6 , ActionMax = ActionMaxVert | ActionMaxHoriz ,
  ActionFullScreen = 1u << 7 , ActionChangeDesktop = 1u << 8 , ActionClose = 1u << 9
}
 
typedef QFlags< ActionActions
 
enum  DesktopLayoutCorner { DesktopLayoutCornerTopLeft = 0 , DesktopLayoutCornerTopRight = 1 , DesktopLayoutCornerBottomLeft = 2 , DesktopLayoutCornerBottomRight = 3 }
 
enum  Direction {
  TopLeft = 0 , Top = 1 , TopRight = 2 , Right = 3 ,
  BottomRight = 4 , Bottom = 5 , BottomLeft = 6 , Left = 7 ,
  Move = 8 , KeyboardSize = 9 , KeyboardMove = 10 , MoveResizeCancel = 11
}
 
enum  MappingState { Visible = 1 , Withdrawn = 0 , Iconic = 3 }
 
enum  Orientation { OrientationHorizontal = 0 , OrientationVertical = 1 }
 
typedef QFlags< PropertyProperties
 
typedef QFlags< Property2Properties2
 
enum  Property {
  Supported = 1u << 0 , ClientList = 1u << 1 , ClientListStacking = 1u << 2 , NumberOfDesktops = 1u << 3 ,
  DesktopGeometry = 1u << 4 , DesktopViewport = 1u << 5 , CurrentDesktop = 1u << 6 , DesktopNames = 1u << 7 ,
  ActiveWindow = 1u << 8 , WorkArea = 1u << 9 , SupportingWMCheck = 1u << 10 , VirtualRoots = 1u << 11 ,
  CloseWindow = 1u << 13 , WMMoveResize = 1u << 14 , WMName = 1u << 15 , WMVisibleName = 1u << 16 ,
  WMDesktop = 1u << 17 , WMWindowType = 1u << 18 , WMState = 1u << 19 , WMStrut = 1u << 20 ,
  WMIconGeometry = 1u << 21 , WMIcon = 1u << 22 , WMPid = 1u << 23 , WMHandledIcons = 1u << 24 ,
  WMPing = 1u << 25 , XAWMState = 1u << 27 , WMFrameExtents = 1u << 28 , WMIconName = 1u << 29 ,
  WMVisibleIconName = 1u << 30 , WMGeometry = 1u << 31 , WMAllProperties = ~0u
}
 
enum  Property2 {
  WM2UserTime = 1u << 0 , WM2StartupId = 1u << 1 , WM2TransientFor = 1u << 2 , WM2GroupLeader = 1u << 3 ,
  WM2AllowedActions = 1u << 4 , WM2RestackWindow = 1u << 5 , WM2MoveResizeWindow = 1u << 6 , WM2ExtendedStrut = 1u << 7 ,
  WM2KDETemporaryRules = 1u << 8 , WM2WindowClass = 1u << 9 , WM2WindowRole = 1u << 10 , WM2ClientMachine = 1u << 11 ,
  WM2ShowingDesktop = 1u << 12 , WM2Opacity = 1u << 13 , WM2DesktopLayout = 1u << 14 , WM2FullPlacement = 1u << 15 ,
  WM2FullscreenMonitors = 1u << 16 , WM2FrameOverlap = 1u << 17 , WM2Activities = 1u << 18 , WM2BlockCompositing = 1u << 19 ,
  WM2KDEShadow = 1u << 20 , WM2Urgency = 1u << 21 , WM2Input = 1u << 22 , WM2Protocols = 1u << 23 ,
  WM2InitialMappingState = 1u << 24 , WM2IconPixmap = 1u << 25 , WM2OpaqueRegion = 1u << 25 , WM2DesktopFileName = 1u << 26 ,
  WM2GTKFrameExtents = 1u << 27 , WM2AppMenuServiceName = 1u << 28 , WM2AppMenuObjectPath = 1u << 29 , WM2GTKApplicationId = 1u << 30 ,
  WM2GTKShowWindowMenu = 1u << 31 , WM2AllProperties = ~0u
}
 
enum  Protocol {
  NoProtocol = 0 , TakeFocusProtocol = 1 << 0 , DeleteWindowProtocol = 1 << 1 , PingProtocol = 1 << 2 ,
  SyncRequestProtocol = 1 << 3 , ContextHelpProtocol = 1 << 4
}
 
typedef QFlags< ProtocolProtocols
 
enum  RequestSource { FromUnknown = 0 , FromApplication = 1 , FromTool = 2 }
 
enum  Role { Client , WindowManager }
 
enum  State {
  Modal = 1u << 0 , Sticky = 1u << 1 , MaxVert = 1u << 2 , MaxHoriz = 1u << 3 ,
  Max = MaxVert | MaxHoriz , Shaded = 1u << 4 , SkipTaskbar = 1u << 5 , KeepAbove = 1u << 6 ,
  SkipPager = 1u << 7 , Hidden = 1u << 8 , FullScreen = 1u << 9 , KeepBelow = 1u << 10 ,
  DemandsAttention = 1u << 11 , SkipSwitcher = 1u << 12 , Focused = 1u << 13
}
 
typedef QFlags< StateStates
 
enum  WindowType {
  Unknown = -1 , Normal = 0 , Desktop = 1 , Dock = 2 ,
  Toolbar = 3 , Menu = 4 , Dialog = 5 , Override = 6 ,
  TopMenu = 7 , Utility = 8 , Splash = 9 , DropdownMenu = 10 ,
  PopupMenu = 11 , Tooltip = 12 , Notification = 13 , ComboBox = 14 ,
  DNDIcon = 15 , OnScreenDisplay = 16 , CriticalNotification = 17 , AppletPopup = 18
}
 
enum  WindowTypeMask {
  NormalMask = 1u << 0 , DesktopMask = 1u << 1 , DockMask = 1u << 2 , ToolbarMask = 1u << 3 ,
  MenuMask = 1u << 4 , DialogMask = 1u << 5 , OverrideMask = 1u << 6 , TopMenuMask = 1u << 7 ,
  UtilityMask = 1u << 8 , SplashMask = 1u << 9 , DropdownMenuMask = 1u << 10 , PopupMenuMask = 1u << 11 ,
  TooltipMask = 1u << 12 , NotificationMask = 1u << 13 , ComboBoxMask = 1u << 14 , DNDIconMask = 1u << 15 ,
  OnScreenDisplayMask = 1u << 16 , CriticalNotificationMask = 1u << 17 , AppletPopupMask = 1u << 18 , AllTypesMask = 0U - 1
}
 
typedef QFlags< WindowTypeMaskWindowTypes
 

Public Member Functions

 NETWinInfo (const NETWinInfo &wininfo)
 
 NETWinInfo (xcb_connection_t *connection, xcb_window_t window, xcb_window_t rootWindow, NET::Properties properties, NET::Properties2 properties2, Role role=Client)
 
virtual ~NETWinInfo ()
 
const char * activities () const
 
NET::Actions allowedActions () const
 
const char * appMenuObjectPath () const
 
const char * appMenuServiceName () const
 
const char * clientMachine () const
 
int desktop (bool ignore_viewport=false) const
 
const char * desktopFileName () const
 
NET::Properties event (xcb_generic_event_t *event)
 
void event (xcb_generic_event_t *event, NET::Properties *properties, NET::Properties2 *properties2=nullptr)
 
NETExtendedStrut extendedStrut () const
 
NETStrut frameExtents () const
 
NETStrut frameOverlap () const
 
NETFullscreenMonitors fullscreenMonitors () const
 
xcb_window_t groupLeader () const
 
const char * gtkApplicationId () const
 
NETStrut gtkFrameExtents () const
 
bool handledIcons () const
 
bool hasNETSupport () const
 
bool hasWindowType () const
 
xcb_pixmap_t icccmIconPixmap () const
 
xcb_pixmap_t icccmIconPixmapMask () const
 
NETIcon icon (int width=-1, int height=-1) const
 
NETRect iconGeometry () const
 
const char * iconName () const
 
const int * iconSizes () const
 
MappingState initialMappingState () const
 
bool input () const
 
bool isBlockingCompositing () const
 
void kdeGeometry (NETRect &frame, NETRect &window)
 
MappingState mappingState () const
 
const char * name () const
 
unsigned long opacity () const
 
qreal opacityF () const
 
std::vector< NETRectopaqueRegion () const
 
const NETWinInfooperator= (const NETWinInfo &wintinfo)
 
NET::Properties passedProperties () const
 
NET::Properties2 passedProperties2 () const
 
int pid () const
 
NET::Protocols protocols () const
 
void setActivities (const char *activities)
 
void setAllowedActions (NET::Actions actions)
 
void setAppMenuObjectPath (const char *path)
 
void setAppMenuServiceName (const char *name)
 
void setBlockingCompositing (bool active)
 
void setDesktop (int desktop, bool ignore_viewport=false)
 
void setDesktopFileName (const char *name)
 
void setExtendedStrut (const NETExtendedStrut &extended_strut)
 
void setFrameExtents (NETStrut strut)
 
void setFrameOverlap (NETStrut strut)
 
void setFullscreenMonitors (NETFullscreenMonitors topology)
 
void setGtkFrameExtents (NETStrut strut)
 
void setHandledIcons (bool handled)
 
void setIcon (NETIcon icon, bool replace=true)
 
void setIconGeometry (NETRect geometry)
 
void setIconName (const char *name)
 
void setName (const char *name)
 
void setOpacity (unsigned long opacity)
 
void setOpacityF (qreal opacity)
 
void setPid (int pid)
 
void setStartupId (const char *startup_id)
 
void setState (NET::States state, NET::States mask)
 
void setStrut (NETStrut strut)
 
void setUserTime (xcb_timestamp_t time)
 
void setVisibleIconName (const char *name)
 
void setVisibleName (const char *visibleName)
 
void setWindowType (WindowType type)
 
const char * startupId () const
 
NET::States state () const
 
NETStrut strut () const
 
bool supportsProtocol (NET::Protocol protocol) const
 
xcb_window_t transientFor () const
 
bool urgency () const
 
xcb_timestamp_t userTime () const
 
const char * visibleIconName () const
 
const char * visibleName () const
 
const char * windowClassClass () const
 
const char * windowClassName () const
 
const char * windowRole () const
 
WindowType windowType (WindowTypes supported_types) const
 
xcb_connection_t * xcbConnection () const
 

Static Public Attributes

static const int OnAllDesktops = NET::OnAllDesktops
 

Protected Member Functions

virtual void changeDesktop (int desktop)
 
virtual void changeFullscreenMonitors (NETFullscreenMonitors topology)
 
virtual void changeState (NET::States state, NET::States mask)
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Static Public Member Functions inherited from NET
static int timestampCompare (unsigned long time1, unsigned long time2)
 
static int timestampDiff (unsigned long time1, unsigned long time2)
 
static bool typeMatchesMask (WindowType type, WindowTypes mask)
 

Detailed Description

Common API for application window properties/protocols.

The NETWinInfo class provides a common API for clients and window managers to set/read/change properties on an application window as defined by the NET Window Manager Specification.

Author
Bradley T. Hughes bhugh.nosp@m.es@t.nosp@m.rollt.nosp@m.ech..nosp@m.com
See also
NET
NETRootInfo
http://www.freedesktop.org/standards/wm-spec/

Definition at line 966 of file netwm.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Indexes for the properties array.

Definition at line 973 of file netwm.h.

Constructor & Destructor Documentation

◆ NETWinInfo() [1/2]

NETWinInfo::NETWinInfo ( xcb_connection_t * connection,
xcb_window_t window,
xcb_window_t rootWindow,
NET::Properties properties,
NET::Properties2 properties2,
Role role = Client )

Create a NETWinInfo object, which will be used to set/read/change information stored on an application window.

Parameters
connectionXCB connection
windowThe Window id of the application window.
rootWindowThe Window id of the root window.
propertiesThe NET::Properties flags
properties2The NET::Properties2 flags
roleSelect the application role. If this argument is omitted, the role will default to Client.

Definition at line 2515 of file netwm.cpp.

◆ NETWinInfo() [2/2]

NETWinInfo::NETWinInfo ( const NETWinInfo & wininfo)

Creates a shared copy of the specified NETWinInfo object.

Parameters
wininfothe NETWinInfo to copy

Definition at line 2582 of file netwm.cpp.

◆ ~NETWinInfo()

NETWinInfo::~NETWinInfo ( )
virtual

Destroys the NETWinInfo object.

Definition at line 2588 of file netwm.cpp.

Member Function Documentation

◆ activities()

const char * NETWinInfo::activities ( ) const

returns a comma-separated list of the activities the window is associated with.

FIXME this might be better as a NETRArray ?

Since
4.6

Definition at line 4809 of file netwm.cpp.

◆ allowedActions()

NET::Actions NETWinInfo::allowedActions ( ) const

Returns actions that the window manager allows for the window.

Definition at line 4744 of file netwm.cpp.

◆ appMenuObjectPath()

const char * NETWinInfo::appMenuObjectPath ( ) const
Returns
The menu object path of the window's application if present.
Since
5.69

Definition at line 3462 of file netwm.cpp.

◆ appMenuServiceName()

const char * NETWinInfo::appMenuServiceName ( ) const
Returns
The menu service name of the window's application if present.
Since
5.69

Definition at line 3467 of file netwm.cpp.

◆ changeDesktop()

virtual void NETWinInfo::changeDesktop ( int desktop)
inlineprotectedvirtual

A Window Manager should subclass NETWinInfo and reimplement this function when it wants to know when a Client made a request to change desktops (ie.

move to another desktop).

Parameters
desktopthe number of the desktop

Definition at line 1669 of file netwm.h.

◆ changeFullscreenMonitors()

virtual void NETWinInfo::changeFullscreenMonitors ( NETFullscreenMonitors topology)
inlineprotectedvirtual

A Window Manager should subclass NETWinInfo2 and reimplement this function when it wants to know when a Client made a request to change the fullscreen monitor topology for its fullscreen state.

Parameters
topologyA structure (top, bottom, left, right) representing the fullscreen monitor topology.

Definition at line 1697 of file netwm.h.

◆ changeState()

virtual void NETWinInfo::changeState ( NET::States state,
NET::States mask )
inlineprotectedvirtual

A Window Manager should subclass NETWinInfo and reimplement this function when it wants to know when a Client made a request to change state (ie.

to Shade / Unshade).

Parameters
statethe new state
maskthe mask for the state

Definition at line 1683 of file netwm.h.

◆ clientMachine()

const char * NETWinInfo::clientMachine ( ) const

Returns the client machine for the window (i.e.

WM_CLIENT_MACHINE property).

Definition at line 4804 of file netwm.cpp.

◆ desktop()

int NETWinInfo::desktop ( bool ignore_viewport = false) const

Returns the desktop where the window is residing.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. It is however mapped to virtual desktops if needed.

Parameters
ignore_viewportif false, viewport is mapped to virtual desktops
Returns
the number of the window's desktop
See also
OnAllDesktops()

Definition at line 4707 of file netwm.cpp.

◆ desktopFileName()

const char * NETWinInfo::desktopFileName ( ) const
Returns
The desktop file name of the window's application if present.
Since
5.28
See also
setDesktopFileName

Definition at line 4912 of file netwm.cpp.

◆ event() [1/2]

NET::Properties NETWinInfo::event ( xcb_generic_event_t * event)

This function takes the pass XEvent and returns an OR'ed list of NETWinInfo properties that have changed.

The new information will be read immediately by the class. This overloaded version returns only a single mask, and therefore cannot check state of all properties like the other variant.

Parameters
eventthe event
Returns
the properties

Definition at line 3574 of file netwm.cpp.

◆ event() [2/2]

void NETWinInfo::event ( xcb_generic_event_t * event,
NET::Properties * properties,
NET::Properties2 * properties2 = nullptr )

This function takes the passed in xcb_generic_event_t and returns the updated properties in the passed in arguments.

The new information will be read immediately by the class. It is possible to pass in a null pointer in the arguments. In that case the passed in argument will obviously not be updated, but the class will process the information nevertheless.

Parameters
eventthe event
propertiesThe NET::Properties that changed
properties2The NET::Properties2 that changed
Since
5.0

Definition at line 3581 of file netwm.cpp.

◆ extendedStrut()

NETExtendedStrut NETWinInfo::extendedStrut ( ) const

Returns the extended (partial) strut specified by this client.

See _NET_WM_STRUT_PARTIAL in the spec.

Definition at line 4625 of file netwm.cpp.

◆ frameExtents()

NETStrut NETWinInfo::frameExtents ( ) const

Returns the frame decoration strut, i.e.

the width of the decoration borders.

Since
4.3

Definition at line 3376 of file netwm.cpp.

◆ frameOverlap()

NETStrut NETWinInfo::frameOverlap ( ) const

Returns the frame overlap strut, i.e.

how far the window frame extends behind the client area on each side.

Since
4.4

Definition at line 3401 of file netwm.cpp.

◆ fullscreenMonitors()

NETFullscreenMonitors NETWinInfo::fullscreenMonitors ( ) const

Returns the desired fullscreen monitor topology for this client, should it be in fullscreen state.

See _NET_WM_FULLSCREEN_MONITORS in the spec.

Definition at line 4630 of file netwm.cpp.

◆ groupLeader()

xcb_window_t NETWinInfo::groupLeader ( ) const

Returns the leader window for the group the window is in, if any.

Definition at line 4759 of file netwm.cpp.

◆ gtkApplicationId()

const char * NETWinInfo::gtkApplicationId ( ) const
Returns
The GTK application id of the window if present.
Since
5.91

Definition at line 4917 of file netwm.cpp.

◆ gtkFrameExtents()

NETStrut NETWinInfo::gtkFrameExtents ( ) const

Returns the extents of the drop-shadow drawn by a GTK client.

Since
5.65

Definition at line 3419 of file netwm.cpp.

◆ handledIcons()

bool NETWinInfo::handledIcons ( ) const

Returns whether or not this client handles icons.

Returns
true if this client handles icons, false otherwise

Definition at line 4853 of file netwm.cpp.

◆ hasNETSupport()

bool NETWinInfo::hasNETSupport ( ) const

Returns true if the window has any window type set, even if the type itself is not known to this implementation.

Presence of a window type as specified by the NETWM spec is considered as the window supporting this specification.

Returns
true if the window has support for the NETWM spec

Definition at line 4749 of file netwm.cpp.

◆ hasWindowType()

bool NETWinInfo::hasWindowType ( ) const

This function returns false if the window has not window type specified at all.

Used by KWindowInfo::windowType() to return either NET::Normal or NET::Dialog as appropriate as a fallback.

Definition at line 4682 of file netwm.cpp.

◆ icccmIconPixmap()

xcb_pixmap_t NETWinInfo::icccmIconPixmap ( ) const

Returns the icon pixmap as set in WM_HINTS.

See ICCCM 4.1.2.4.

The default value is XCB_PIXMAP_NONE.

Using the ICCCM variant for the icon is deprecated and only offers a limited functionality compared to icon. Only use this variant as a fallback.

See also
icccmIconPixmapMask
icon
Since
5.7

Definition at line 4779 of file netwm.cpp.

◆ icccmIconPixmapMask()

xcb_pixmap_t NETWinInfo::icccmIconPixmapMask ( ) const

Returns the mask for the icon pixmap as set in WM_HINTS.

See ICCCM 4.1.2.4.

The default value is XCB_PIXMAP_NONE.

See also
icccmIconPixmap
Since
5.7

Definition at line 4784 of file netwm.cpp.

◆ icon()

NETIcon NETWinInfo::icon ( int width = -1,
int height = -1 ) const

Returns an icon.

If width and height are passed, the icon returned will be the closest it can find (the next biggest). If width and height are omitted, then the largest icon in the list is returned.

Parameters
widththe preferred width for the icon, -1 to ignore
heightthe preferred height for the icon, -1 to ignore
Returns
the icon

Definition at line 3508 of file netwm.cpp.

◆ iconGeometry()

NETRect NETWinInfo::iconGeometry ( ) const

Returns the icon geometry.

Returns
the geometry of the icon

Definition at line 4610 of file netwm.cpp.

◆ iconName()

const char * NETWinInfo::iconName ( ) const

Returns the iconic name of the window in UTF-8 format.

Note that this has nothing to do with icons, but it's for "iconic" representations of the window (taskbars etc.), that should be shown when the window is in iconic state. See description of _NET_WM_ICON_NAME for details.

Returns
the iconic name

Definition at line 4697 of file netwm.cpp.

◆ iconSizes()

const int * NETWinInfo::iconSizes ( ) const

Returns a list of provided icon sizes.

Each size is pair width,height, terminated with pair 0,0.

Since
4.3

Definition at line 3513 of file netwm.cpp.

◆ initialMappingState()

NET::MappingState NETWinInfo::initialMappingState ( ) const

Returns the initial mapping state as set in WM_HINTS.

See ICCCM 4.1.2.4 and 4.1.4.

The default value if Withdrawn in case the Client is mapped without a WM_HINTS property or without the initial state hint set.

Since
5.5

Definition at line 4774 of file netwm.cpp.

◆ input()

bool NETWinInfo::input ( ) const

Returns whether the Input flag is set in WM_HINTS.

See ICCCM 4.1.2.4 and 4.1.7.

The default value is true in case the Client is mapped without a WM_HINTS property.

Since
5.3

Definition at line 4769 of file netwm.cpp.

◆ isBlockingCompositing()

bool NETWinInfo::isBlockingCompositing ( ) const

Returns whether the client wishes to block compositing (for better performance)

Since
4.7

Definition at line 4848 of file netwm.cpp.

◆ kdeGeometry()

void NETWinInfo::kdeGeometry ( NETRect & frame,
NETRect & window )

Places the window frame geometry in frame, and the application window geometry in window.

Both geometries are relative to the root window.

Parameters
framethe geometry for the frame
windowthe geometry for the window

Definition at line 3472 of file netwm.cpp.

◆ mappingState()

NET::MappingState NETWinInfo::mappingState ( ) const

Returns the mapping state for the window (see the NET base class documentation for a description of mapping state).

Returns
the mapping state

Definition at line 4868 of file netwm.cpp.

◆ name()

const char * NETWinInfo::name ( ) const

Returns the name of the window in UTF-8 format.

Returns
the name of the window

Definition at line 4687 of file netwm.cpp.

◆ opacity()

unsigned long NETWinInfo::opacity ( ) const

Returns the opacity of the window.

Definition at line 4731 of file netwm.cpp.

◆ opacityF()

qreal NETWinInfo::opacityF ( ) const

Returns the opacity of the window.

Definition at line 4736 of file netwm.cpp.

◆ opaqueRegion()

std::vector< NETRect > NETWinInfo::opaqueRegion ( ) const
Returns
The opaque region as specified by the Client.
Since
5.7

Definition at line 4883 of file netwm.cpp.

◆ operator=()

const NETWinInfo & NETWinInfo::operator= ( const NETWinInfo & wintinfo)

Assignment operator.

Ensures that the shared data reference counts are correct.

Definition at line 2599 of file netwm.cpp.

◆ passedProperties()

NET::Properties NETWinInfo::passedProperties ( ) const
Returns
the properties argument passed to the constructor.
See also
passedProperties2()

Definition at line 4858 of file netwm.cpp.

◆ passedProperties2()

NET::Properties2 NETWinInfo::passedProperties2 ( ) const
Returns
the properties2 argument passed to the constructor.
See also
passedProperties()
Since
5.0

Definition at line 4863 of file netwm.cpp.

◆ pid()

int NETWinInfo::pid ( ) const

Returns the process id for the client window.

Returns
the process id of the window

Definition at line 4716 of file netwm.cpp.

◆ protocols()

NET::Protocols NETWinInfo::protocols ( ) const
Returns
The window manager protocols this Client supports.
Since
5.3

Definition at line 4873 of file netwm.cpp.

◆ setActivities()

void NETWinInfo::setActivities ( const char * activities)

Sets the comma-separated list of activities the window is associated with.

Since
5.1

Definition at line 4814 of file netwm.cpp.

◆ setAllowedActions()

void NETWinInfo::setAllowedActions ( NET::Actions actions)

Sets actions that the window manager allows for the window.

Definition at line 3306 of file netwm.cpp.

◆ setAppMenuObjectPath()

void NETWinInfo::setAppMenuObjectPath ( const char * path)

Sets the name as the D-BUS object path for the application menu.

Since
5.69

Definition at line 3424 of file netwm.cpp.

◆ setAppMenuServiceName()

void NETWinInfo::setAppMenuServiceName ( const char * name)

Sets the name as the D-BUS service name for the application menu.

Since
5.69

Definition at line 3443 of file netwm.cpp.

◆ setBlockingCompositing()

void NETWinInfo::setBlockingCompositing ( bool active)

Sets whether the client wishes to block compositing (for better performance)

Since
4.7

Definition at line 4831 of file netwm.cpp.

◆ setDesktop()

void NETWinInfo::setDesktop ( int desktop,
bool ignore_viewport = false )

Set which window the desktop is (should be) on.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. It is however mapped to virtual desktops if needed.

Parameters
desktopthe number of the new desktop
ignore_viewportif false, viewport is mapped to virtual desktops
See also
OnAllDesktops()

Definition at line 3218 of file netwm.cpp.

◆ setDesktopFileName()

void NETWinInfo::setDesktopFileName ( const char * name)

Sets the name as the desktop file name.

This is either the base name without full path and without file extension of the desktop file for the window's application (e.g. "org.kde.foo").

If the application's desktop file name is not at a standard location it should be the full path to the desktop file name (e.g. "/opt/kde/share/org.kde.foo.desktop").

If the window does not know the desktop file name, it should not set the name at all.

Since
5.28

Definition at line 4893 of file netwm.cpp.

◆ setExtendedStrut()

void NETWinInfo::setExtendedStrut ( const NETExtendedStrut & extended_strut)

Set the extended (partial) strut for the application window.

Parameters
extended_strutthe new strut

Definition at line 2708 of file netwm.cpp.

◆ setFrameExtents()

void NETWinInfo::setFrameExtents ( NETStrut strut)

Set the frame decoration strut, i.e.

the width of the decoration borders.

Parameters
strutthe new strut

Definition at line 3358 of file netwm.cpp.

◆ setFrameOverlap()

void NETWinInfo::setFrameOverlap ( NETStrut strut)

Sets the window frame overlap strut, i.e.

how far the window frame extends behind the client area on each side.

Set the strut values to -1 if you want the window frame to cover the whole client area.

The default values are 0.

Since
4.4

Definition at line 3381 of file netwm.cpp.

◆ setFullscreenMonitors()

void NETWinInfo::setFullscreenMonitors ( NETFullscreenMonitors topology)

Sets the desired multiple-monitor topology (4 monitor indices indicating the top, bottom, left, and right edges of the window) when the fullscreen state is enabled.

The indices are from the set returned by the Xinerama extension. See _NET_WM_FULLSCREEN_MONITORS for details.

Parameters
topologyA struct that models the desired monitor topology, namely: top is the monitor whose top edge defines the top edge of the fullscreen window, bottom is the monitor whose bottom edge defines the bottom edge of the fullscreen window, left is the monitor whose left edge defines the left edge of the fullscreen window, and right is the monitor whose right edge defines the right edge of the fullscreen window.

Definition at line 2750 of file netwm.cpp.

◆ setGtkFrameExtents()

void NETWinInfo::setGtkFrameExtents ( NETStrut strut)

Sets the extents of the drop-shadow drawn by the client.

Since
5.65

Definition at line 3406 of file netwm.cpp.

◆ setHandledIcons()

void NETWinInfo::setHandledIcons ( bool handled)

Set whether this application window handles icons.

Parameters
handledtrue if the window handles icons, false otherwise

Definition at line 3263 of file netwm.cpp.

◆ setIcon()

void NETWinInfo::setIcon ( NETIcon icon,
bool replace = true )

Set icons for the application window.

If replace is True, then the specified icon is defined to be the only icon. If replace is False, then the specified icon is added to a list of icons.

Parameters
iconthe new icon
replacetrue to replace, false to append to the list of icons

Definition at line 2619 of file netwm.cpp.

◆ setIconGeometry()

void NETWinInfo::setIconGeometry ( NETRect geometry)

Set the icon geometry for the application window.

Parameters
geometrythe new icon geometry

Definition at line 2681 of file netwm.cpp.

◆ setIconName()

void NETWinInfo::setIconName ( const char * name)

Sets the iconic name for the application window.

Parameters
namethe new iconic name

Definition at line 3172 of file netwm.cpp.

◆ setName()

void NETWinInfo::setName ( const char * name)

Sets the name for the application window.

Parameters
namethe new name of the window

Definition at line 3133 of file netwm.cpp.

◆ setOpacity()

void NETWinInfo::setOpacity ( unsigned long opacity)

Sets opacity (0 = transparent, 0xffffffff = opaque ) on the window.

Definition at line 3293 of file netwm.cpp.

◆ setOpacityF()

void NETWinInfo::setOpacityF ( qreal opacity)

Sets opacity (0 = transparent, 1 = opaque) on the window.

Definition at line 3301 of file netwm.cpp.

◆ setPid()

void NETWinInfo::setPid ( int pid)

Set the application window's process id.

Parameters
pidthe window's process id

Definition at line 3252 of file netwm.cpp.

◆ setStartupId()

void NETWinInfo::setStartupId ( const char * startup_id)

Sets the startup notification id id on the window.

Definition at line 3274 of file netwm.cpp.

◆ setState()

void NETWinInfo::setState ( NET::States state,
NET::States mask )

Set the state for the application window (see the NET base class documentation for a description of window state).

Parameters
statethe name state
maskthe mask for the state

Definition at line 2769 of file netwm.cpp.

◆ setStrut()

void NETWinInfo::setStrut ( NETStrut strut)
Deprecated
use setExtendedStrut() Set the strut for the application window.
Parameters
strutthe new strut

Definition at line 2733 of file netwm.cpp.

◆ setUserTime()

void NETWinInfo::setUserTime ( xcb_timestamp_t time)

Sets user timestamp time on the window (property _NET_WM_USER_TIME).

The timestamp is expressed as XServer time. If a window is shown with user timestamp older than the time of the last user action, it won't be activated after being shown, with the special value 0 meaning not to activate the window after being shown.

Definition at line 3562 of file netwm.cpp.

◆ setVisibleIconName()

void NETWinInfo::setVisibleIconName ( const char * name)

For Window Managers only: set the visible iconic name ( i.e.

xterm, xterm <2>, xterm <3>, ... )

Parameters
namethe new visible iconic name

Definition at line 3195 of file netwm.cpp.

◆ setVisibleName()

void NETWinInfo::setVisibleName ( const char * visibleName)

For Window Managers only: set the visible name ( i.e.

xterm, xterm <2>, xterm <3>, ... )

Parameters
visibleNamethe new visible name

Definition at line 3149 of file netwm.cpp.

◆ setWindowType()

void NETWinInfo::setWindowType ( WindowType type)

Sets the window type for this client (see the NET base class documentation for a description of the various window types).

Parameters
typethe window type

Definition at line 3000 of file netwm.cpp.

◆ startupId()

const char * NETWinInfo::startupId ( ) const

Returns the startup notification id of the window.

Definition at line 4726 of file netwm.cpp.

◆ state()

NET::States NETWinInfo::state ( ) const

Returns the state of the window (see the NET base class documentation for a description of the various states).

Returns
the state of the window

Definition at line 4615 of file netwm.cpp.

◆ strut()

NETStrut NETWinInfo::strut ( ) const
Deprecated
use strutPartial() Returns the strut specified by this client.
Returns
the strut of the window

Definition at line 4620 of file netwm.cpp.

◆ supportsProtocol()

bool NETWinInfo::supportsProtocol ( NET::Protocol protocol) const
Returns
true if the Client supports the protocol.
Parameters
protocolThe window manager protocol to test for
Since
5.3

Definition at line 4878 of file netwm.cpp.

◆ transientFor()

xcb_window_t NETWinInfo::transientFor ( ) const

Returns the WM_TRANSIENT_FOR property for the window, i.e.

the mainwindow for this window.

Definition at line 4754 of file netwm.cpp.

◆ urgency()

bool NETWinInfo::urgency ( ) const

Returns whether the UrgencyHint is set in the WM_HINTS.flags.

See ICCCM 4.1.2.4.

Since
5.3

Definition at line 4764 of file netwm.cpp.

◆ userTime()

xcb_timestamp_t NETWinInfo::userTime ( ) const

Returns the time of last user action on the window, or -1 if not set.

Definition at line 4721 of file netwm.cpp.

◆ virtual_hook()

void NETWinInfo::virtual_hook ( int id,
void * data )
protectedvirtual

Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.

Unused in this class.

Definition at line 4927 of file netwm.cpp.

◆ visibleIconName()

const char * NETWinInfo::visibleIconName ( ) const

Returns the visible iconic name as set by the window manager in UTF-8 format.

Note that this has nothing to do with icons, but it's for "iconic" representations of the window (taskbars etc.), that should be shown when the window is in iconic state. See description of _NET_WM_VISIBLE_ICON_NAME for details.

Returns
the visible iconic name

Definition at line 4702 of file netwm.cpp.

◆ visibleName()

const char * NETWinInfo::visibleName ( ) const

Returns the visible name as set by the window manager in UTF-8 format.

Returns
the visible name of the window

Definition at line 4692 of file netwm.cpp.

◆ windowClassClass()

const char * NETWinInfo::windowClassClass ( ) const

Returns the class component of the window class for the window (i.e.

WM_CLASS property).

Definition at line 4789 of file netwm.cpp.

◆ windowClassName()

const char * NETWinInfo::windowClassName ( ) const

Returns the name component of the window class for the window (i.e.

WM_CLASS property).

Definition at line 4794 of file netwm.cpp.

◆ windowRole()

const char * NETWinInfo::windowRole ( ) const

Returns the window role for the window (i.e.

WM_WINDOW_ROLE property).

Definition at line 4799 of file netwm.cpp.

◆ windowType()

NET::WindowType NETWinInfo::windowType ( WindowTypes supported_types) const

Returns the window type for this client (see the NET base class documentation for a description of the various window types).

Since clients may specify several windows types for a window in order to support backwards compatibility and extensions not available in the NETWM spec, you should specify all window types you application supports (see the NET::WindowTypeMask mask values for various window types). This method will return the first window type that is listed in the supported types, or NET::Unknown if none of the window types is supported.

Returns
the type of the window

Definition at line 4671 of file netwm.cpp.

◆ xcbConnection()

xcb_connection_t * NETWinInfo::xcbConnection ( ) const

Returns the xcb connection used.

Returns
the XCB connection

Definition at line 4888 of file netwm.cpp.

Member Data Documentation

◆ OnAllDesktops

const int NETWinInfo::OnAllDesktops = NET::OnAllDesktops
static

Sentinel value to indicate that the client wishes to be visible on all desktops.

Returns
the value to be on all desktops

Definition at line 1659 of file netwm.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:51:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.