Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xparsegeometry(3x11) [ultrix man page]

XParseGeometry(3X11)						     MIT X11R4						      XParseGeometry(3X11)

Name
       XParseGeometry, XParseColor - parse window geometry and color

Syntax
       int XParseGeometry(parsestring, x_return, y_return, width_return, height_return)
	  char *parsestring;
	  int *x_return, *y_return;
	  int *width_return, *height_return;

       Status XParseColor(display, colormap, spec, exact_def_return)
	   Display *display;
	   Colormap colormap;
	   char *spec;
	   XColor *exact_def_return;

Arguments
       colormap  Specifies the colormap.

       position
       default_position
		 Specify the geometry specifications.

       display	 Specifies the connection to the X server.

       exact_def_return
		 Returns the exact color value for later use and sets the and flags.

       fheight
       fwidth	 Specify the font height and width in pixels (increment size).

       parsestring
		 Specifies the string you want to parse.

       screen	 Specifies the screen.

       spec	 Specifies the color name string; case is ignored.

       width_return
       height_return
		 Return the width and height determined.

       xadder
       yadder	 Specify additional interior padding needed in the window.

       x_return
       y_return  Return the x and y offsets.

Description
       By convention, X applications use a standard string to indicate window size and placement.  makes it easier to conform to this standard
       because it allows you to parse the standard window geometry.  Specifically, this function lets you parse strings of the form:

       [=][<width>x<height>][{+-}<xoffset>{+-}<yoffset>]

       The items in this form map into the arguments associated with this function.  (Items enclosed in <> are integers, items in [] are optional,
       and items enclosed in {} indicate ``choose one of''.  Note that the brackets should not appear in the actual string.)

       The function returns a bitmask that indicates which of the four values (width, height, xoffset, and yoffset) were actually found in the
       string and whether the x and y values are negative.  By convention, -0 is not equal to +0, because the user needs to be able to say ``posi-
       tion the window relative to the right or bottom edge.''	For each value found, the corresponding argument is updated.  For each value not
       found, the argument is left unchanged.  The bits are represented by or and are defined in They will be set whenever one of the values is
       defined or one of the signs is set.

       If the function returns either the or flag, you should place the window at the requested position.

       The function provides a simple way to create a standard user interface to color.  It takes a string specification of a color, typically
       from a command line or option, and returns the corresponding red, green, and blue values that are suitable for a subsequent call to or The
       color can be specified either as a color name (as in or as an initial sharp sign character followed by a numeric specification, in one of
       the following formats:

       (R)  #RGB	      (4 bits each)
	 #RRGGBB	   (8 bits each)
	 #RRRGGGBBB	   (12 bits each)
	 #RRRRGGGGBBBB	   (16 bits each)

       The R, G, and B represent single hexadecimal digits (both uppercase and lowercase).  When fewer than 16 bits each are specified, they rep-
       resent the most-significant bits of the value.  For example, #3a7 is the same as #3000a0007000.	The colormap is used only to determine
       which screen to look up the color on.  For example, you can use the screen's default colormap.

       If the initial character is a sharp sign but the string otherwise fails to fit the above formats or if the initial character is not a sharp
       sign and the named color does not exist in the server's database, fails and returns zero.

       can generate a error.

Diagnostics
       A value for a Colormap argument does not name a defined Colormap.

See Also
       XAllocColor(3X11), XCreateColormap(3X11), XGetDefault(3X11), XSetWMProperties(3X11), XStoreColors(3X11)
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

															      XParseGeometry(3X11)
Man Page