XGeometry()XGeometry()NameXGeometry – calculate window geometry given user geometry string and
default geometry.
Synopsis
int XGeometry(display, screen, position, default_position, bwidth,
fwidth, fheight, xadder, yadder, x_return, y_return,
height_return, width_return, height_return)
Display *display;
int screen;
char *position, *default_position;
unsigned int bwidth;
unsigned int fwidth, fheight;
int xadder, yadder;
int *x_return, *y_return, *width_return, *height_return;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
screen Specifies which screen the window is on.
position Specifies the user- or program-supplied geometry string,
perhaps incomplete.
default_position
Specifies the default geometry string and must be complete.
bwidth Specifies the border width.
fheight Specify the font height and width in pixels (increment
fwidth size).
xadder Specify additional interior padding in pixels needed in the
yadder window.
x_return Return the user-specified or default coordinates of the
y_return window.
width_returnReturn the window dimensions in pixels.
height_return
Returns
A bitmask composed of the symbols XValue, YValue, WidthValue, Height‐
Value, XNegative, and/or YNegative.
DescriptionXGeometry has been superseded by XWMGeometry as of Release 4.
XGeometry returns the position and size of a window given a user-sup‐
plied geometry (allowed to be partial) and a default geometry. Each
user-supplied specification is copied into the appropriate returned
argument, unless it is not present, in which case the default specifi‐
cation is used. The default geometry should be complete while the
user-supplied one may not be.
XGeometry is useful for processing command-line options and user pref‐
erences. These geometry strings are of the form:
=<width>x<height>{+-}<xoffset>{+-}<yoffset>
The "=" at the beginning of the string is now optional. (Items
enclosed in <> are integers, and items enclosed in {} are a set from
which one item is to be chosen. Note that the brackets should not
appear in the actual string.)
The XGeometry return value is a bitmask that indicates which values
were present in user_position. This bitmask is composed of the exclu‐
sive OR of the symbols XValue, YValue, WidthValue, HeightValue, XNega‐
tive, or YNegative.
If the function returns either XValue or YValue, you should place the
window at the requested position. The border width (bwidth), size of
the width and height increments (typically fwidth and fheight), and any
additional interior space (xadder and yadder) are passed in to make it
easy to compute the resulting size.
See AlsoXParseGeometry(), XTranslateCoordinates(), XWMGeometry.
Xlib - Standard Geometry XGeometry()