XSetWMProtocols(3X) XSetWMProtocols(3X)NAME XSetWMProtocols, XGetWMProtocols - set and get a window's WM_PROTOCOLS property SYNOPSIS Status XSetWMProtocols(display, w, protocols, count) Display *display; Window w; Atom *protocols; int count; Status GetWMProtocols(display, w, protocols-return, count- return) Display *display; Window w; Atom **protocols-return; int *count-return; DESCRIPTION The XSetWMProtocols function replaces the WM_PROTOCOLS pro- perty on the specified window with the list of atoms speci- fied by the protocols argument. If the property does not already exist, XSetWMProtocols sets the WM_PROTOCOLS proper- ty on the specified window to the list of atoms specified by the protocols argument. The property is stored with a type of ATOM and a format of 32. If it cannot intern the WM_PROTOCOLS atom, XSetWMProtocols returns a zero status. Otherwise, it returns a nonzero status. The XGetWMProtocols function returns the list of atoms stored in the WM_PROTOCOLS property on the specified window. These atoms describe window manager protocols in which the owner of this window is willing to participate. If the pro- perty exists, is of type ATOM, is of format 32, and the atom WM_PROTOCOLS can be interned, XGetWMProtocols sets the protocols-return argument to a list of atoms, sets the count-return argument to the number of elements in list, and returns a nonzero status. Otherwise, it sets neither of the return arguments and returns a zero status. To release the list of atoms, use XFree. Arguments These functions accept the following arguments: display Specifies the connection to the X server. count Specifies the number of protocols in the list. count-return Returns the number of protocols in the list. protocols November, 1990 1
XSetWMProtocols(3X) XSetWMProtocols(3X)Specifies the list of protocols. protocols-return Returns the list of protocols. Properties These functions use the following property: WM_PROTOCOLS Lists the atoms that identify the communications protocols between the client and window manager in which the client is willing to participate. ERRORS BadAlloc The server failed to allocate the requested resource or server memory. BadWindow A value for a Window argument does not name a de- fined Window. The XGetWMProtocols function can generate a BadWindow error. The XSetWMProtocols function can generate BadAlloc and BadWindow errors. SEE ALSO XAllocClassHint(3X), XAllocIconSize(3X), XAllocSizeHints(3X), XAllocWMHints(3X), XFree(3X), XSetCommand(3X), XSetTransientForHint(3X), XSetTextProperty(3X), XSetWMClientMachine(3X), XSetWMColormapWindows(3X), XSetWMIconName(3X), XSetWMName(3X), XSetWMProperties(3X), XStringListToTextProperty(3X)Xlib - C Language Interface2 November, 1990