# class NETWinInfo

###

Module | kdeui
Namespace |
Class | NETWinInfo
Inherits | NET

### enums

- anonymous { PROTOCOLS, PROTOCOLS2, PROPERTIES_SIZE }

enum details

### methods

- NETWinInfo (a0, a1, a2, a3, a4)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | Display |
  a1 | Window |
  a2 | Window |
  a3 | SIP_PYLIST |
  a4 | NET.Role | NET.Client

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

  display - An X11 Display struct.

  window - The Window id of the application window.

  rootWindow - The Window id of the root window.

  properties - An array of elements listing all properties the client is interested in.The elements contain OR'ed values of constants from the NET base class, in the following order: [0]= NET.Property, [1]= NET.Property2. In future versions, the list may be extended. In case you pass less elements, the missing ones will be replaced with default values.

  properties_size - The number of elements in the properties array.

  role - Select the application role. If this argument is omitted, the role will default to Client.

- NETWinInfo (display, window, rootWindow, properties, role)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  display | Display |
  window | Window |
  rootWindow | Window |
  properties | unsigned long |
  role | NET.Role | NET.Client

  This constructor differs from the above one only in the way it accepts the list of properties the client is interested in. The properties argument is equivalent to the first element of the properties array in the above constructor.

- NETWinInfo (wininfo)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  wininfo | NETWinInfo |

  Creates a shared copy of the specified NETWinInfo object.

  wininfo - the NETWinInfo to copy

- allowedActions ( )

  returns unsigned long

  Returns actions that the window manager allows for the window.

- changeDesktop (desktop)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  desktop | int |

  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).

  desktop - the number of the desktop

- changeState (state, mask)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  state | unsigned long |
  mask | unsigned long |

  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).

  state - the new state

  mask - the mask for the state

- clientMachine ( )

  returns char

  Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property).

- desktop (ignore_viewport)

  returns int

  Argument | Type | Default
  --- | --- | ---
  ignore_viewport | bool | 0

  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.

  ignore_viewport - if false, viewport is mapped to virtual desktops

  Returns the number of the window's desktop

  See also OnAllDesktops()

- event (event, properties, properties_size)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  event | XEvent |
  properties | unsigned long |
  properties_size | int |

  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).

  event - the event

  properties - properties that changed

  properties_size - size of the passed properties array

- event (event)

  returns unsigned long
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  event | XEvent |

  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.

  event - the event

  Returns the properties

- extendedStrut ( )

  returns NETExtendedStrut

  Returns the extended (partial) strut specified by this client. See _NET_WM_STRUT_PARTIAL in the spec.

- groupLeader ( )

  returns Window

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

- handledIcons ( )

  returns Bool

  Returns whether or not this client handles icons.

  Returns true if this client handles icons, false otherwise

- hasNETSupport ( )

  returns bool

  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

- hasWindowType ( )

  returns bool

  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.

- icon (width, height)

  returns NETIcon
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  width | int | -1
  height | int | -1

  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.

  width - the preferred width for the icon, -1 to ignore

  height - the preferred height for the icon, -1 to ignore

  Returns the icon

- iconGeometry ( )

  returns NETRect

  Returns the icon geometry.

  Returns the geometry of the icon

- iconName ( )

  returns char

  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

- kdeGeometry (frame, window)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  frame | NETRect |
  window | NETRect |

  Places the window frame geometry in frame, and the application window geometry in window. Both geometries are relative to the root window.

  frame - the geometry for the frame

  window - the geometry for the window

- mappingState ( )

  returns NET.MappingState

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

  Returns the mapping state

- name ( )

  returns char

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

  Returns the name of the window

- opacity ( )

  returns unsigned long

  Returns the opacity of the window.

- passedProperties ( )

  returns unsigned long
  KDE 4.1.0 and later only

  Returns the properties argument passed to the constructor. The size is the maximum array size the constructor accepts.

- passedProperties ( )

  returns SIP_PYLIST
  before KDE 4.1.0 only

- passedProperties ( )

  returns SIP_PYLIST
  before KDE 4.1.0 only

- pid ( )

  returns int

  Returns the process id for the client window.

  Returns the process id of the window

- setAllowedActions (actions)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  actions | unsigned long |

  Sets actions that the window manager allows for the window.

- setDesktop (desktop, ignore_viewport)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  desktop | int |
  ignore_viewport | bool | 0

  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.

  desktop - the number of the new desktop

  ignore_viewport - if false, viewport is mapped to virtual desktops

  See also OnAllDesktops()

- setExtendedStrut (extended_strut)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  extended_strut | NETExtendedStrut |

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

  extended_strut - the new strut

- setFrameExtents (strut)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  strut | NETStrut |

  Set the frame decoration strut, i.e. the width of the decoration borders.

  strut - the new strut

- setHandledIcons (handled)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  handled | Bool |

  Set whether this application window handles icons.

  handled - true if the window handles icons, false otherwise

- setIcon (icon, replace)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  icon | NETIcon |
  replace | Bool | 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.

  icon - the new icon

  replace - true to replace, false to append to the list of icons

- setIconGeometry (geometry)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  geometry | NETRect |

  Set the icon geometry for the application window.

  geometry - the new icon geometry

- setIconName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | char |

  Sets the iconic name for the application window.

  name - the new iconic name

- setName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | char |

  Sets the name for the application window.

  name - the new name of the window

- setOpacity (opacity)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  opacity | unsigned long |

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

- setPid (pid)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  pid | int |

  Set the application window's process id.

  pid - the window's process id

- setStartupId (startup_id)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  startup_id | char |

  Sets the startup notification id id on the window.

- setState (state, mask)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  state | unsigned long |
  mask | unsigned long |

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

  state - the name state

  mask - the mask for the state

- setStrut (strut)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  strut | NETStrut |

  Deprecated use setExtendedStrut() Set the strut for the application window.

  strut - the new strut

- setUserTime (time)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  time | 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.

- setVisibleIconName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | char |

  For Window Managers only: set the visible iconic name ( i.e. xterm, xterm <2>, xterm <3>, ... )

  name - the new visible iconic name

- setVisibleName (visibleName)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  visibleName | char |

  For Window Managers only: set the visible name ( i.e. xterm, xterm <2>, xterm <3>, ... )

  visibleName - the new visible name

- setWindowType (type)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  type | NET.WindowType |

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

  type - the window type

- startupId ( )

  returns char

  Returns the startup notification id of the window.

- state ( )

  returns unsigned long

  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

- strut ( )

  returns NETStrut

  Deprecated use strutPartial() Returns the strut specified by this client.

  Returns the strut of the window

- transientFor ( )

  returns Window

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

- userTime ( )

  returns Time

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

- virtual_hook (id, data)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  id | int |
  data | void |

  Virtual hook, used to add new "virtual" functions while maintaining binary compatibility. Unused in this class.

- visibleIconName ( )

  returns char

  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

- visibleName ( )

  returns char

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

  Returns the visible name of the window

- windowClassClass ( )

  returns char

  Returns the class component of the window class for the window (i.e. WM_CLASS property).

- windowClassName ( )

  returns char

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

- windowRole ( )

  returns char

  Returns the window role for the window (i.e. WM_WINDOW_ROLE property).

- windowType (supported_types)

  returns NET.WindowType

  Argument | Type | Default
  --- | --- | ---
  supported_types | unsigned long |

  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

### variables

int OnAllDesktops | Sentinel value to indicate that the client wishes to be visible on all desktops. Returns the value to be on all desktops
int OnAllDesktops |

### enums - detail

- anonymous { PROTOCOLS, PROTOCOLS2, PROPERTIES_SIZE }

  Indexes for the properties array.

  | PROTOCOLS | - | - |
  | PROTOCOLS2 | - | - |
  | PROPERTIES_SIZE | - | - |