Blame man/XSetWMProperties.man

Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
Packit 5bd3a9
.\" Copyright \(co 2000  The XFree86 Project, Inc.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission is hereby granted, free of charge, to any person obtaining
Packit 5bd3a9
.\" a copy of this software and associated documentation files (the
Packit 5bd3a9
.\" "Software"), to deal in the Software without restriction, including
Packit 5bd3a9
.\" without limitation the rights to use, copy, modify, merge, publish,
Packit 5bd3a9
.\" distribute, sublicense, and/or sell copies of the Software, and to
Packit 5bd3a9
.\" permit persons to whom the Software is furnished to do so, subject to
Packit 5bd3a9
.\" the following conditions:
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" The above copyright notice and this permission notice shall be included
Packit 5bd3a9
.\" in all copies or substantial portions of the Software.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 5bd3a9
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 5bd3a9
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Packit 5bd3a9
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit 5bd3a9
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit 5bd3a9
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Packit 5bd3a9
.\" OTHER DEALINGS IN THE SOFTWARE.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Except as contained in this notice, the name of the X Consortium shall
Packit 5bd3a9
.\" not be used in advertising or otherwise to promote the sale, use or
Packit 5bd3a9
.\" other dealings in this Software without prior written authorization
Packit 5bd3a9
.\" from the X Consortium.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
Packit 5bd3a9
.\" Digital Equipment Corporation
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Portions Copyright \(co 1990, 1991 by
Packit 5bd3a9
.\" Tektronix, Inc.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission to use, copy, modify and distribute this documentation for
Packit 5bd3a9
.\" any purpose and without fee is hereby granted, provided that the above
Packit 5bd3a9
.\" copyright notice appears in all copies and that both that copyright notice
Packit 5bd3a9
.\" and this permission notice appear in all copies, and that the names of
Packit 5bd3a9
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
Packit 5bd3a9
.\" to this documentation without specific, written prior permission.
Packit 5bd3a9
.\" Digital and Tektronix makes no representations about the suitability
Packit 5bd3a9
.\" of this documentation for any purpose.
Packit 5bd3a9
.\" It is provided ``as is'' without express or implied warranty.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" 
Packit 5bd3a9
.ds xT X Toolkit Intrinsics \- C Language Interface
Packit 5bd3a9
.ds xW Athena X Widgets \- C Language X Toolkit Interface
Packit 5bd3a9
.ds xL Xlib \- C Language X Interface
Packit 5bd3a9
.ds xC Inter-Client Communication Conventions Manual
Packit 5bd3a9
.na
Packit 5bd3a9
.de Ds
Packit 5bd3a9
.nf
Packit 5bd3a9
.\\$1D \\$2 \\$1
Packit 5bd3a9
.ft CW
Packit 5bd3a9
.\".ps \\n(PS
Packit 5bd3a9
.\".if \\n(VS>=40 .vs \\n(VSu
Packit 5bd3a9
.\".if \\n(VS<=39 .vs \\n(VSp
Packit 5bd3a9
..
Packit 5bd3a9
.de De
Packit 5bd3a9
.ce 0
Packit 5bd3a9
.if \\n(BD .DF
Packit 5bd3a9
.nr BD 0
Packit 5bd3a9
.in \\n(OIu
Packit 5bd3a9
.if \\n(TM .ls 2
Packit 5bd3a9
.sp \\n(DDu
Packit 5bd3a9
.fi
Packit 5bd3a9
..
Packit 5bd3a9
.de IN		\" send an index entry to the stderr
Packit 5bd3a9
..
Packit 5bd3a9
.de Pn
Packit 5bd3a9
.ie t \\$1\fB\^\\$2\^\fR\\$3
Packit 5bd3a9
.el \\$1\fI\^\\$2\^\fP\\$3
Packit 5bd3a9
..
Packit 5bd3a9
.de ZN
Packit 5bd3a9
.ie t \fB\^\\$1\^\fR\\$2
Packit 5bd3a9
.el \fI\^\\$1\^\fP\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.de hN
Packit 5bd3a9
.ie t <\fB\\$1\fR>\\$2
Packit 5bd3a9
.el <\fI\\$1\fP>\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.ny0
Packit 5bd3a9
.TH XSetWMProperties __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
Packit 5bd3a9
.SH NAME
Packit 5bd3a9
XSetWMProperties, XmbSetWMProperties, Xutf8SetWMProperties \- set standard window properties
Packit 5bd3a9
.SH SYNTAX
Packit 5bd3a9
.HP
Packit 5bd3a9
void XSetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^,
Packit 5bd3a9
XTextProperty *\fIwindow_name\fP\^, XTextProperty *\fIicon_name\fP\^, char
Packit 5bd3a9
**\fIargv\fP\^, int \fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints
Packit 5bd3a9
*\fIwm_hints\fP\^, XClassHint *\fIclass_hints\fP\^); 
Packit 5bd3a9
.HP
Packit 5bd3a9
void XmbSetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char
Packit 5bd3a9
*\fIwindow_name\fP\^, char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int
Packit 5bd3a9
\fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^,
Packit 5bd3a9
XClassHint *\fIclass_hints\fP\^); 
Packit 5bd3a9
.HP
Packit 5bd3a9
void Xutf8SetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char
Packit 5bd3a9
*\fIwindow_name\fP\^, char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int
Packit 5bd3a9
\fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^,
Packit 5bd3a9
XClassHint *\fIclass_hints\fP\^); 
Packit 5bd3a9
.SH ARGUMENTS
Packit 5bd3a9
.IP \fIargc\fP 1i
Packit 5bd3a9
Specifies the number of arguments.
Packit 5bd3a9
.IP \fIargv\fP 1i
Packit 5bd3a9
Specifies the application's argument list.
Packit 5bd3a9
.IP \fIclass_hints\fP 1i
Packit 5bd3a9
Specifies the
Packit 5bd3a9
.ZN XClassHint
Packit 5bd3a9
structure to be used.
Packit 5bd3a9
.IP \fIdisplay\fP 1i
Packit 5bd3a9
Specifies the connection to the X server.
Packit 5bd3a9
.IP \fIicon_name\fP 1i
Packit 5bd3a9
Specifies the icon name,
Packit 5bd3a9
which should be a null-terminated string.
Packit 5bd3a9
.IP \fInormal_hints\fP 1i
Packit 5bd3a9
Specifies the size hints for the window in its normal state.
Packit 5bd3a9
.IP \fIw\fP 1i
Packit 5bd3a9
Specifies the window.
Packit 5bd3a9
.IP \fIwindow_name\fP 1i
Packit 5bd3a9
Specifies the window name,
Packit 5bd3a9
which should be a null-terminated string.
Packit 5bd3a9
.IP \fIwm_hints\fP 1i
Packit 5bd3a9
Specifies the
Packit 5bd3a9
.ZN XWMHints
Packit 5bd3a9
structure to be used.
Packit 5bd3a9
.SH DESCRIPTION
Packit 5bd3a9
The 
Packit 5bd3a9
.ZN XSetWMProperties 
Packit 5bd3a9
convenience function provides a single programming interface 
Packit 5bd3a9
for setting those essential window properties that are used 
Packit 5bd3a9
for communicating with other clients (particularly window and session
Packit 5bd3a9
managers).
Packit 5bd3a9
.LP
Packit 5bd3a9
If the window_name argument is non-NULL, 
Packit 5bd3a9
.ZN XSetWMProperties
Packit 5bd3a9
calls
Packit 5bd3a9
.ZN XSetWMName ,
Packit 5bd3a9
which in turn, sets the WM_NAME property (see section 14.1.4).
Packit 5bd3a9
If the icon_name argument is non-NULL,
Packit 5bd3a9
.ZN XSetWMProperties
Packit 5bd3a9
calls
Packit 5bd3a9
.ZN XSetWMIconName ,
Packit 5bd3a9
which sets the WM_ICON_NAME property (see section 14.1.5).
Packit 5bd3a9
If the argv argument is non-NULL, 
Packit 5bd3a9
.ZN XSetWMProperties
Packit 5bd3a9
calls
Packit 5bd3a9
.ZN XSetCommand ,
Packit 5bd3a9
which sets the WM_COMMAND property (see section 14.2.1).
Packit 5bd3a9
Note that an argc of zero is allowed to indicate a zero-length command.
Packit 5bd3a9
Note also that the hostname of this machine is stored using
Packit 5bd3a9
.ZN XSetWMClientMachine 
Packit 5bd3a9
(see section 14.2.2).
Packit 5bd3a9
.LP
Packit 5bd3a9
If the normal_hints argument is non-NULL, 
Packit 5bd3a9
.ZN XSetWMProperties
Packit 5bd3a9
calls
Packit 5bd3a9
.ZN XSetWMNormalHints ,
Packit 5bd3a9
which sets the WM_NORMAL_HINTS property (see section 14.1.7).
Packit 5bd3a9
If the wm_hints argument is non-NULL, 
Packit 5bd3a9
.ZN XSetWMProperties
Packit 5bd3a9
calls
Packit 5bd3a9
.ZN XSetWMHints ,
Packit 5bd3a9
which sets the WM_HINTS property (see section 14.1.6).
Packit 5bd3a9
.LP
Packit 5bd3a9
If the class_hints argument is non-NULL, 
Packit 5bd3a9
.ZN XSetWMProperties
Packit 5bd3a9
calls
Packit 5bd3a9
.ZN XSetClassHint ,
Packit 5bd3a9
which sets the WM_CLASS property (see section 14.1.8).
Packit 5bd3a9
If the res_name member in the
Packit 5bd3a9
.ZN XClassHint
Packit 5bd3a9
structure is set to the NULL pointer and the RESOURCE_NAME environment 
Packit 5bd3a9
variable is set, 
Packit 5bd3a9
then the value of the environment variable is substituted for res_name.
Packit 5bd3a9
If the res_name member is NULL, 
Packit 5bd3a9
the environment variable is not set, 
Packit 5bd3a9
and argv and argv[0] are set, 
Packit 5bd3a9
then the value of argv[0], stripped of
Packit 5bd3a9
any directory prefixes, is substituted for res_name.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
convenience functions provide a simple programming interface 
Packit 5bd3a9
for setting those essential window properties that are used 
Packit 5bd3a9
for communicating with other clients
Packit 5bd3a9
(particularly window and session managers).
Packit 5bd3a9
.LP
Packit 5bd3a9
If the window_name argument is non-NULL,
Packit 5bd3a9
they set the WM_NAME property.
Packit 5bd3a9
If the icon_name argument is non-NULL,
Packit 5bd3a9
they set the WM_ICON_NAME property.
Packit 5bd3a9
The window_name and icon_name arguments are null-terminated strings, for
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
in the encoding of the current locale, for
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
in UTF-8 encoding.
Packit 5bd3a9
If the arguments can be fully converted to the STRING encoding,
Packit 5bd3a9
the properties are created with type ``STRING''; 
Packit 5bd3a9
otherwise, the arguments are converted to Compound Text, 
Packit 5bd3a9
and the properties are created with type ``COMPOUND_TEXT''.
Packit 5bd3a9
.LP
Packit 5bd3a9
If the normal_hints argument is non-NULL,
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
call
Packit 5bd3a9
.ZN XSetWMNormalHints ,
Packit 5bd3a9
which sets the WM_NORMAL_HINTS property (see section 14.1.7).
Packit 5bd3a9
If the wm_hints argument is non-NULL, 
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
call
Packit 5bd3a9
.ZN XSetWMHints ,
Packit 5bd3a9
which sets the WM_HINTS property (see section 14.1.6).
Packit 5bd3a9
.LP
Packit 5bd3a9
If the argv argument is non-NULL,
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
set the WM_COMMAND property from argv and argc.
Packit 5bd3a9
An argc of zero indicates a zero-length command.
Packit 5bd3a9
.LP
Packit 5bd3a9
The hostname of the machine is stored using 
Packit 5bd3a9
.ZN XSetWMClientMachine 
Packit 5bd3a9
(see section 14.2.2).
Packit 5bd3a9
.LP
Packit 5bd3a9
If the class_hints argument is non-NULL,
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
set the WM_CLASS property.
Packit 5bd3a9
If the res_name member in the 
Packit 5bd3a9
.ZN XClassHint
Packit 5bd3a9
structure is set to the NULL pointer and the RESOURCE_NAME
Packit 5bd3a9
environment variable is set,
Packit 5bd3a9
the value of the environment variable is substituted for res_name.
Packit 5bd3a9
If the res_name member is NULL,
Packit 5bd3a9
the environment variable is not set, and argv and argv[0] are set,
Packit 5bd3a9
then the value of argv[0], stripped of any directory prefixes,
Packit 5bd3a9
is substituted for res_name.
Packit 5bd3a9
.LP
Packit 5bd3a9
It is assumed that the supplied class_hints.res_name and argv,
Packit 5bd3a9
the RESOURCE_NAME environment variable, and the hostname of the machine
Packit 5bd3a9
are in the encoding of the current locale.
Packit 5bd3a9
The corresponding WM_CLASS, WM_COMMAND, and WM_CLIENT_MACHINE properties
Packit 5bd3a9
are typed according to the local host locale announcer.
Packit 5bd3a9
No encoding conversion is performed for these strings prior to storage
Packit 5bd3a9
in the properties.
Packit 5bd3a9
.LP
Packit 5bd3a9
For clients that need to process the property text in a locale,
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
set the WM_LOCALE_NAME property to be the name of the current locale.
Packit 5bd3a9
The name is assumed to be in the Host Portable Character Encoding
Packit 5bd3a9
and is converted to STRING for storage in the property.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetWMProperties ,
Packit 5bd3a9
.ZN XmbSetWMProperties
Packit 5bd3a9
and
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAlloc
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The function
Packit 5bd3a9
.ZN Xutf8SetWMProperties
Packit 5bd3a9
is an extension introduced by The XFree86 Project, Inc. in their 4.0.2
Packit 5bd3a9
release. Its presence is
Packit 5bd3a9
indicated by the macro
Packit 5bd3a9
.ZN X_HAVE_UTF8_STRING .
Packit 5bd3a9
.SH PROPERTIES
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_CLASS\s+1
Packit 5bd3a9
Set by application programs to allow window and session
Packit 5bd3a9
managers to obtain the application's resources from the resource database.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_CLIENT_MACHINE\s+1
Packit 5bd3a9
The string name of the machine on which the client application is running.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_COMMAND\s+1
Packit 5bd3a9
The command and arguments, null-separated, used to invoke the
Packit 5bd3a9
application.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_HINTS\s+1
Packit 5bd3a9
Additional hints set by the client for use by the window manager.
Packit 5bd3a9
The C type of this property is 
Packit 5bd3a9
.ZN XWMHints .
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_ICON_NAME\s+1
Packit 5bd3a9
The name to be used in an icon.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_NAME\s+1
Packit 5bd3a9
The name of the application.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
\s-1WM_NORMAL_HINTS\s+1
Packit 5bd3a9
Size hints for a window in its normal state.
Packit 5bd3a9
The C type of this property is
Packit 5bd3a9
.ZN XSizeHints .
Packit 5bd3a9
.SH DIAGNOSTICS
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadAlloc
Packit 5bd3a9
The server failed to allocate the requested resource or server memory.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadWindow
Packit 5bd3a9
A value for a Window argument does not name a defined Window.
Packit 5bd3a9
.SH "SEE ALSO"
Packit 5bd3a9
XAllocClassHint(__libmansuffix__),
Packit 5bd3a9
XAllocIconSize(__libmansuffix__),
Packit 5bd3a9
XAllocSizeHints(__libmansuffix__),
Packit 5bd3a9
XAllocWMHints(__libmansuffix__),
Packit 5bd3a9
XParseGeometry(__libmansuffix__),
Packit 5bd3a9
XSetCommand(__libmansuffix__),
Packit 5bd3a9
XSetTransientForHint(__libmansuffix__),
Packit 5bd3a9
XSetTextProperty(__libmansuffix__),
Packit 5bd3a9
XSetWMClientMachine(__libmansuffix__),
Packit 5bd3a9
XSetWMColormapWindows(__libmansuffix__),
Packit 5bd3a9
XSetWMIconName(__libmansuffix__),
Packit 5bd3a9
XSetWMName(__libmansuffix__),
Packit 5bd3a9
XSetWMProtocols(__libmansuffix__),
Packit 5bd3a9
XStringListToTextProperty(__libmansuffix__),
Packit 5bd3a9
XTextListToTextProperty(__libmansuffix__)
Packit 5bd3a9
.br
Packit 5bd3a9
\fI\*(xL\fP