XSetWMProperties



XSetWMProperties

NAME
SYNTAX
ARGUMENTS
DESCRIPTION
PROPERTIES
DIAGNOSTICS
SEE ALSO

NAME

XSetWMProperties, XmbSetWMProperties, Xutf8SetWMProperties − set standard window properties

SYNTAX

void XSetWMProperties(Display *display, Window w, XTextProperty *window_name, XTextProperty *icon_name, char **argv, int argc, XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint *class_hints);

void XmbSetWMProperties(Display *display, Window w, char *window_name, char *icon_name, char *argv[], int argc, XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint *class_hints);

void Xutf8SetWMProperties(Display *display, Window w, char *window_name, char *icon_name, char *argv[], int argc, XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint *class_hints);

ARGUMENTS

argc

Specifies the number of arguments.

argv

Specifies the application’s argument list.

class_hints

Specifies the XClassHint structure to be used.

display

Specifies the connection to the X server.

icon_name

Specifies the icon name, which should be a null-terminated string.

normal_hints

Specifies the size hints for the window in its normal state.

w

Specifies the window.

window_name

Specifies the window name, which should be a null-terminated string.

wm_hints

Specifies the XWMHints structure to be used.

DESCRIPTION

The XSetWMProperties convenience function provides a single programming interface for setting those essential window properties that are used for communicating with other clients (particularly window and session managers).

If the window_name argument is non-NULL, XSetWMProperties calls XSetWMName, which in turn, sets the WM_NAME property (see section 14.1.4). If the icon_name argument is non-NULL, XSetWMProperties calls XSetWMIconName, which sets the WM_ICON_NAME property (see section 14.1.5). If the argv argument is non-NULL, XSetWMProperties calls XSetCommand, which sets the WM_COMMAND property (see section 14.2.1). Note that an argc of zero is allowed to indicate a zero-length command. Note also that the hostname of this machine is stored using XSetWMClientMachine (see section 14.2.2).

If the normal_hints argument is non-NULL, XSetWMProperties calls XSetWMNormalHints, which sets the WM_NORMAL_HINTS property (see section 14.1.7). If the wm_hints argument is non-NULL, XSetWMProperties calls XSetWMHints, which sets the WM_HINTS property (see section 14.1.6).

If the class_hints argument is non-NULL, XSetWMProperties calls XSetClassHint, which sets the WM_CLASS property (see section 14.1.8). If the res_name member in the XClassHint structure is set to the NULL pointer and the RESOURCE_NAME environment variable is set, then the value of the environment variable is substituted for res_name. If the res_name member is NULL, the environment variable is not set, and argv and argv[0] are set, then the value of argv[0], stripped of any directory prefixes, is substituted for res_name.

The XmbSetWMProperties and Xutf8SetWMProperties convenience functions provide a simple programming interface for setting those essential window properties that are used for communicating with other clients (particularly window and session managers).

If the window_name argument is non-NULL, they set the WM_NAME property. If the icon_name argument is non-NULL, they set the WM_ICON_NAME property. The window_name and icon_name arguments are null-terminated strings, for XmbSetWMProperties in the encoding of the current locale, for Xutf8SetWMProperties in UTF-8 encoding. If the arguments can be fully converted to the STRING encoding, the properties are created with type ‘‘STRING’’; otherwise, the arguments are converted to Compound Text, and the properties are created with type ‘‘COMPOUND_TEXT’’.

If the normal_hints argument is non-NULL, XmbSetWMProperties and Xutf8SetWMProperties call XSetWMNormalHints, which sets the WM_NORMAL_HINTS property (see section 14.1.7). If the wm_hints argument is non-NULL, XmbSetWMProperties and Xutf8SetWMProperties call XSetWMHints, which sets the WM_HINTS property (see section 14.1.6).

If the argv argument is non-NULL, XmbSetWMProperties and Xutf8SetWMProperties set the WM_COMMAND property from argv and argc. An argc of zero indicates a zero-length command.

The hostname of the machine is stored using XSetWMClientMachine (see section 14.2.2).

If the class_hints argument is non-NULL, XmbSetWMProperties and Xutf8SetWMProperties set the WM_CLASS property. If the res_name member in the XClassHint structure is set to the NULL pointer and the RESOURCE_NAME environment variable is set, the value of the environment variable is substituted for res_name. If the res_name member is NULL, the environment variable is not set, and argv and argv[0] are set, then the value of argv[0], stripped of any directory prefixes, is substituted for res_name.

It is assumed that the supplied class_hints.res_name and argv, the RESOURCE_NAME environment variable, and the hostname of the machine are in the encoding of the current locale. The corresponding WM_CLASS, WM_COMMAND, and WM_CLIENT_MACHINE properties are typed according to the local host locale announcer. No encoding conversion is performed for these strings prior to storage in the properties.

For clients that need to process the property text in a locale, XmbSetWMProperties and Xutf8SetWMProperties set the WM_LOCALE_NAME property to be the name of the current locale. The name is assumed to be in the Host Portable Character Encoding and is converted to STRING for storage in the property.

XSetWMProperties, XmbSetWMProperties and Xutf8SetWMProperties can generate BadAlloc and BadWindow errors.

The function Xutf8SetWMProperties is an extension introduced by The XFree86 Project, Inc. in their 4.0.2 release. Its presence is indicated by the macro X_HAVE_UTF8_STRING.

PROPERTIES

WM_CLASS

Set by application programs to allow window and session managers to obtain the application’s resources from the resource database.

WM_CLIENT_MACHINE

The string name of the machine on which the client application is running.

WM_COMMAND

The command and arguments, null-separated, used to invoke the application.

WM_HINTS

Additional hints set by the client for use by the window manager. The C type of this property is XWMHints.

WM_ICON_NAME

The name to be used in an icon.

WM_NAME

The name of the application.

WM_NORMAL_HINTS

Size hints for a window in its normal state. The C type of this property is XSizeHints.

DIAGNOSTICS

BadAlloc

The server failed to allocate the requested resource or server memory.

BadWindow

A value for a Window argument does not name a defined Window.

SEE ALSO

XAllocClassHint(3), XAllocIconSize(3), XAllocSizeHints(3), XAllocWMHints(3), XParseGeometry(3), XSetCommand(3), XSetTransientForHint(3), XSetTextProperty(3), XSetWMClientMachine(3), XSetWMColormapWindows(3), XSetWMIconName(3), XSetWMName(3), XSetWMProtocols(3), XStringListToTextProperty(3), XTextListToTextProperty(3)
Xlib − C Language X Interface






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.