NETWinInfo

#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, 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,
  StaysOnTop = KeepAbove, 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
}
 
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, AllTypesMask = 0U - 1
}
 
typedef QFlags< WindowTypeMaskWindowTypes
 

Public Member Functions

 NETWinInfo (xcb_connection_t *connection, xcb_window_t window, xcb_window_t rootWindow, NET::Properties properties, NET::Properties2 properties2, Role role=Client)
 
 NETWinInfo (xcb_connection_t *connection, xcb_window_t window, xcb_window_t rootWindow, NET::Properties properties, Role role=Client)
 
 NETWinInfo (const NETWinInfo &wininfo)
 
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
 
void event (xcb_generic_event_t *event, unsigned long *properties, int properties_size)
 
void event (xcb_generic_event_t *event, NET::Properties *properties, NET::Properties2 *properties2=nullptr)
 
NET::Properties event (xcb_generic_event_t *event)
 
NETExtendedStrut extendedStrut () const
 
NETStrut frameExtents () const
 
NETStrut frameOverlap () const
 
NETFullscreenMonitors fullscreenMonitors () const
 
xcb_window_t groupLeader () 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
 
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 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[email protected][email protected][email protected]rollt[email protected]ech.[email protected]com
See also
NET
NETRootInfo
http://www.freedesktop.org/standards/wm-spec/

Definition at line 935 of file netwm.h.

Member Enumeration Documentation

anonymous enum

Indexes for the properties array.

Definition at line 942 of file netwm.h.

Constructor & Destructor Documentation

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 2563 of file netwm.cpp.

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

This constructor differs from the above one only in the way it accepts the list of properties the client is interested in.

Deprecated:
since 5.0 use above ctor

Definition at line 2629 of file netwm.cpp.

NETWinInfo::NETWinInfo ( const NETWinInfo wininfo)

Creates a shared copy of the specified NETWinInfo object.

Parameters
wininfothe NETWinInfo to copy

Definition at line 2694 of file netwm.cpp.

NETWinInfo::~NETWinInfo ( )
virtual

Destroys the NETWinInfo object.

Definition at line 2700 of file netwm.cpp.

Member Function Documentation

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 4902 of file netwm.cpp.

NET::Actions NETWinInfo::allowedActions ( ) const

Returns actions that the window manager allows for the window.

Definition at line 4837 of file netwm.cpp.

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

Definition at line 3556 of file netwm.cpp.

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

Definition at line 3561 of file netwm.cpp.

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 1649 of file netwm.h.

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 1677 of file netwm.h.

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 1663 of file netwm.h.

const char * NETWinInfo::clientMachine ( ) const

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

WM_CLIENT_MACHINE property).

Definition at line 4897 of file netwm.cpp.

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 4808 of file netwm.cpp.

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 5004 of file netwm.cpp.

void NETWinInfo::event ( xcb_generic_event_t *  event,
unsigned long *  properties,
int  properties_size 
)

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

The new information will be read immediately by the class. The elements of the properties argument are as they would be passed to the constructor, if the array is not large enough, changed properties that don't fit in it won't be listed there (they'll be updated in the class though).

Parameters
eventthe event
propertiesproperties that changed
properties_sizesize of the passed properties array
Deprecated:
since 5.0 use event(xcb_generic_event_t*, NET::Properties*, NET::Properties2*)

Definition at line 3922 of file netwm.cpp.

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 3684 of file netwm.cpp.

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 3677 of file netwm.cpp.

NETExtendedStrut NETWinInfo::extendedStrut ( ) const

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

See _NET_WM_STRUT_PARTIAL in the spec.

Definition at line 4727 of file netwm.cpp.

NETStrut NETWinInfo::frameExtents ( ) const

Returns the frame decoration strut, i.e.

the width of the decoration borders.

Since
4.3

Definition at line 3478 of file netwm.cpp.

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 3504 of file netwm.cpp.

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 4732 of file netwm.cpp.

xcb_window_t NETWinInfo::groupLeader ( ) const

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

Definition at line 4852 of file netwm.cpp.

NETStrut NETWinInfo::gtkFrameExtents ( ) const

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

Since
5.65

Definition at line 3523 of file netwm.cpp.

bool NETWinInfo::handledIcons ( ) const

Returns whether or not this client handles icons.

Returns
true if this client handles icons, false otherwise

Definition at line 4950 of file netwm.cpp.

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 4842 of file netwm.cpp.

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 4783 of file netwm.cpp.

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 4872 of file netwm.cpp.

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 4877 of file netwm.cpp.

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 3605 of file netwm.cpp.

NETRect NETWinInfo::iconGeometry ( ) const

Returns the icon geometry.

Returns
the geometry of the icon

Definition at line 4712 of file netwm.cpp.

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 4798 of file netwm.cpp.

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 3610 of file netwm.cpp.

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 4867 of file netwm.cpp.

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 4862 of file netwm.cpp.

bool NETWinInfo::isBlockingCompositing ( ) const

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

Since
4.7

Definition at line 4945 of file netwm.cpp.

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 3566 of file netwm.cpp.

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 4965 of file netwm.cpp.

const char * NETWinInfo::name ( ) const

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

Returns
the name of the window

Definition at line 4788 of file netwm.cpp.

unsigned long NETWinInfo::opacity ( ) const

Returns the opacity of the window.

Definition at line 4832 of file netwm.cpp.

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

Definition at line 4980 of file netwm.cpp.

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

Assignment operator.

Ensures that the shared data reference counts are correct.

Definition at line 2711 of file netwm.cpp.

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

Definition at line 4955 of file netwm.cpp.

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

Definition at line 4960 of file netwm.cpp.

int NETWinInfo::pid ( ) const

Returns the process id for the client window.

Returns
the process id of the window

Definition at line 4817 of file netwm.cpp.

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

Definition at line 4970 of file netwm.cpp.

void NETWinInfo::setActivities ( const char *  activities)

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

Since
5.1

Definition at line 4907 of file netwm.cpp.

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

Sets actions that the window manager allows for the window.

Definition at line 3404 of file netwm.cpp.

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 3528 of file netwm.cpp.

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 3542 of file netwm.cpp.

void NETWinInfo::setBlockingCompositing ( bool  active)

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

Since
4.7

Definition at line 4926 of file netwm.cpp.

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 3320 of file netwm.cpp.

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 4990 of file netwm.cpp.

void NETWinInfo::setExtendedStrut ( const NETExtendedStrut extended_strut)

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

Parameters
extended_strutthe new strut

Definition at line 2818 of file netwm.cpp.

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 3458 of file netwm.cpp.

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 3483 of file netwm.cpp.

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 2862 of file netwm.cpp.

void NETWinInfo::setGtkFrameExtents ( NETStrut  strut)

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

Since
5.65

Definition at line 3509 of file netwm.cpp.

void NETWinInfo::setHandledIcons ( bool  handled)

Set whether this application window handles icons.

Parameters
handledtrue if the window handles icons, false otherwise

Definition at line 3369 of file netwm.cpp.

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 2732 of file netwm.cpp.

void NETWinInfo::setIconGeometry ( NETRect  geometry)

Set the icon geometry for the application window.

Parameters
geometrythe new icon geometry

Definition at line 2795 of file netwm.cpp.

void NETWinInfo::setIconName ( const char *  name)

Sets the iconic name for the application window.

Parameters
namethe new iconic name

Definition at line 3284 of file netwm.cpp.

void NETWinInfo::setName ( const char *  name)

Sets the name for the application window.

Parameters
namethe new name of the window

Definition at line 3249 of file netwm.cpp.

void NETWinInfo::setOpacity ( unsigned long  opacity)

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

Definition at line 3395 of file netwm.cpp.

void NETWinInfo::setPid ( int  pid)

Set the application window's process id.

Parameters
pidthe window's process id

Definition at line 3357 of file netwm.cpp.

void NETWinInfo::setStartupId ( const char *  startup_id)

Sets the startup notification id id on the window.

Definition at line 3381 of file netwm.cpp.

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 2884 of file netwm.cpp.

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

Definition at line 2844 of file netwm.cpp.

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 3664 of file netwm.cpp.

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 3302 of file netwm.cpp.

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 3266 of file netwm.cpp.

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 3121 of file netwm.cpp.

const char * NETWinInfo::startupId ( ) const

Returns the startup notification id of the window.

Definition at line 4827 of file netwm.cpp.

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 4717 of file netwm.cpp.

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

Definition at line 4722 of file netwm.cpp.

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 4975 of file netwm.cpp.

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 4847 of file netwm.cpp.

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 4857 of file netwm.cpp.

xcb_timestamp_t NETWinInfo::userTime ( ) const

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

Definition at line 4822 of file netwm.cpp.

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 5014 of file netwm.cpp.

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 4803 of file netwm.cpp.

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 4793 of file netwm.cpp.

const char * NETWinInfo::windowClassClass ( ) const

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

WM_CLASS property).

Definition at line 4882 of file netwm.cpp.

const char * NETWinInfo::windowClassName ( ) const

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

WM_CLASS property).

Definition at line 4887 of file netwm.cpp.

const char * NETWinInfo::windowRole ( ) const

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

WM_WINDOW_ROLE property).

Definition at line 4892 of file netwm.cpp.

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 4770 of file netwm.cpp.

xcb_connection_t * NETWinInfo::xcbConnection ( ) const

Returns the xcb connection used.

Returns
the XCB connection

Definition at line 4985 of file netwm.cpp.

Member Data Documentation

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 1639 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-2020 The KDE developers.
Generated on Fri Jul 3 2020 22:39:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.