XWMGeometry()XWMGeometry()NameXWMGeometry – obtain a window's geometry information.
Synopsis
int XWMGeometry(display, screen, user_geom, def_geom, bwidth_return,
hints, x_return, y_return, width_return, height_return, gravity_return)
Display *display;
int screen;
char *user_geom;
char *def_geom;
unsigned int bwidth_return;
XSizeHints *hints;
int *x_return, *y_return;
int *width, *height_return;
int *gravity_return;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
screen Specifies the screen.
user_geom Specifies the user-specified geometry or NULL.
def_geom Specifies the application's default geometry or NULL.
bwidth Specifies the border width.
hints Specifies the size hints for the window in its normal state.
x_return
y_return Return the x and y offsets.
width
height_return
Return the width and height determined.
gravity_return
Returns the window gravity.
Availability
Release 4 and later. A mask - see the "Description" section.
DescriptionXWMGeometry combines possibly incomplete or nonexistent geometry infor‐
mation (given in the format used by XParseGeometry()) specified by the
user and by the calling program with complete program-supplied default
size hints (usually the ones to be stored in WM_NORMAL_HINTS) and
returns the position, size, and gravity (NorthWestGravity, NorthEast‐
Gravity, SouthEastGravity or SouthWestGravity) that describe the win‐
dow. If the base size is not set in the XSizeHints structure, the min‐
imum size is used if set. Otherwise, a base size of zero is assumed.
If no minimum size is set in the hints structure, the base size is
used. A mask (in the form returned by XParseGeometry()) that describes
which values came from the user and whether or not the position coordi‐
nates are relative to the right and bottom edges is returned (which
will have already been accounted for in the x_return and y values).
Note that invalid user geometry specifications can cause a width or
height of zero to be returned. The caller may pass the address of the
win_gravity field of the hints argument as the gravity_return argument.
For more information, see Volume One, Chapter 12, Interclient Communi‐
cation.
Structures
typedef struct {
long flags; /* marks which fields in this structure are
/* defined */
int x, y; /* obsolete for new window mgrs, but clients */
int width, height; /* should set so old wm's don't mess up */
int min_width, min_height;
int max_width, max_height;
int width_inc, height_inc;
struct {
int x; /* numerator */
int y; /* denominator */
} min_aspect, max_aspect;
int base_width, base_height; /* added by ICCCM version 1 */
int win_gravity; /* added by ICCCM version 1 */
} XSizeHints
See AlsoXChangeWindowAttributes(), XParseGeometry(), XSetWMProperties().
Xlib - Window Manager Hints XWMGeometry()