1XParseGeometry(3)               XLIB FUNCTIONS               XParseGeometry(3)
2
3
4

NAME

6       XParseGeometry, XWMGeometry - parse window geometry
7

SYNTAX

9       int   XParseGeometry(_Xconst  char  *parsestring,  int  *x_return,  int
10              *y_return,   unsigned   int    *width_return,    unsigned    int
11              *height_return);
12
13       int  XWMGeometry(Display *display, int screen, _Xconst char *user_geom,
14              _Xconst char *def_geom, unsigned int bwidth, XSizeHints  *hints,
15              int   *x_return,   int   *y_return,   int   *width_return,   int
16              *height_return, int *gravity_return);
17

ARGUMENTS

19       position
20       default_position
21                 Specify the geometry specifications.
22
23       display   Specifies the connection to the X server.
24
25       fheight
26       fwidth    Specify the font height and width in pixels (increment size).
27
28       parsestring
29                 Specifies the string you want to parse.
30
31       screen    Specifies the screen.
32
33       width_return
34       height_return
35                 Return the width and height determined.
36
37       xadder
38       yadder    Specify additional interior padding needed in the window.
39
40       x_return
41       y_return  Return the x and y offsets.
42
43       bwidth    Specifies the border width.
44
45       hints     Specifies the size hints for the window in its normal state.
46
47       def_geom  Specifies the application's default geometry or NULL.
48
49       gravity_return
50                 Returns the window gravity.
51
52       user_geom Specifies the user-specified geometry or NULL.
53

DESCRIPTION

55       By convention, X applications use a standard string to indicate  window
56       size  and placement.  XParseGeometry makes it easier to conform to this
57       standard because it allows you to parse the standard  window  geometry.
58       Specifically, this function lets you parse strings of the form:
59
60       [=][<width>{xX}<height>][{+-}<xoffset>{+-}<yoffset>]
61
62       The  fields  map  into  the  arguments  associated  with this function.
63       (Items enclosed in <> are integers, items in [] are optional, and items
64       enclosed in {} indicate “choose one of.”  Note that the brackets should
65       not appear in the actual string.)  If the string is  not  in  the  Host
66       Portable Character Encoding, the result is implementation-dependent.
67
68       The  XParseGeometry  function returns a bitmask that indicates which of
69       the four values (width, height, xoffset,  and  yoffset)  were  actually
70       found  in  the  string and whether the x and y values are negative.  By
71       convention, -0 is not equal to +0, because the user needs to be able to
72       say  “position  the  window relative to the right or bottom edge.”  For
73       each value found, the corresponding  argument  is  updated.   For  each
74       value  not  found, the argument is left unchanged.  The bits are repre‐
75       sented by XValue, YValue, WidthValue, HeightValue, XNegative, or YNega‐
76       tive  and are defined in They will be set whenever one of the values is
77       defined or one of the signs is set.
78
79       If the function returns either the XValue or YValue  flag,  you  should
80       place the window at the requested position.
81
82       The  XWMGeometry  function  combines any geometry information (given in
83       the format used by XParseGeometry) specified by the  user  and  by  the
84       calling  program  with  size  hints  (usually  the ones to be stored in
85       WM_NORMAL_HINTS) and returns the position, size, and gravity NorthEast‐
86       Gravity,  SouthEastGravity, or SouthWestGravity) that describe the win‐
87       dow.  If the base size is not set in the XSizeHints structure, the min‐
88       imum  size  is used if set.  Otherwise, a base size of zero is assumed.
89       If no minimum size is set in the hints  structure,  the  base  size  is
90       used.   A  mask (in the form returned by XParseGeometry) that describes
91       which values came from the user specification and whether  or  not  the
92       position  coordinates  are  relative  to  the right and bottom edges is
93       returned.  Note that these coordinates will have already been accounted
94       for in the x_return and y_return values.
95
96       Note  that  invalid geometry specifications can cause a width or height
97       of zero to be returned.  The caller may pass the address of  the  hints
98       win_gravity field as gravity_return to update the hints directly.
99

SEE ALSO

101       XSetWMProperties(3)
102       Xlib - C Language X Interface
103
104
105
106X Version 11                     libX11 1.6.12               XParseGeometry(3)
Impressum