X - X11 Utility Routines for ImageMagick
option=IsTrue(boolean)
Latin1Compare(first,second)
Latin1Upper(string)
status=XAnnotateImage(display,pixel_info,annotate_info,image)
font=XBestFont(display,resource_info,text_font)
XBestIconSize(display,window,image)
pixel=XBestPixel(display,colormap,colors,number_colors,color)
visual_info=XBestVisualInfo(display,map_info,resource_info)
XCheckRefreshWindows(display,windows)
XClientMessage(display,window,protocol,message,timestamp)
client_window=XClientWindow(display,target_window)
XConfigureImageColormap(display,resource_info,windows,image)
XConstrainWindowPosition(display,window_info)
XDelay(display,milliseconds)
XDestroyWindowColors(display,window)
XDisplayImageInfo(display,resource_info,windows,undo_image,image)
XDitherImage(image,ximage)
status=XDrawImage(display,pixel_info,draw_info,image)
XError(display,error)
XFreeStandardColormap(display,visual_info,map_info,pixel_info)
XGetAnnotateInfo(annotate_info)
XGetMapInfo(visual_info,colormap,map_info)
XGetMontageInfo(montage_info)
value=XGetResourceClass(database,client_name,keyword,resource_default)
database=XGetResourceDatabase(display,client_name)
XGetResourceInfo(database,client_name,resource_info)
value=XGetResourceInstance(database,client_name,keyword,resource_default)
subwindow=XGetSubwindow(display,window,x,y)
status=XGetWindowColor(display,name)
image=XGetWindowImage(display,window,borders,level)
XHighlightEllipse(display,window,annotate_context,highlight_info)
XHighlightLine(display,window,annotate_context,highlight_info)
XHighlightRectangle(display,window,annotate_context,highlight_info)
XMakeCursor(display,window,colormap,background_color,foreground_color)
status=XMakeImage(display,resource_info,window,image,width,height)
XMakeImageLSBFirst(resource_info,window,image,ximage,matte_image)
XMakeImageMSBFirst(resource_info,window,image,ximage,matte_image)
XMakeMagnifyImage(display,windows)
status=XMakePixmap(display,resource_info,window)
XProgressMonitor(task,quantum,span)
status=XQueryColorDatabase(target,color)
XQueryPosition(display,window,x,y)
XRefreshWindow(display,window,event)
XRetainWindowColors(display,window)
target_window=XSelectWindow(display,crop_info)
XSetCursorState(display,windows,state)
XUserPreferences(resource_info)
visual_type=XVisualClassName(class)
XWarning(message,qualifier)
child=XWindowByID(display,window,id)
window=XWindowByName(display,root_window,name)
Function IsTrue returns True if the boolean is ``true'', ``on'', ``yes'' or
``1''.
The format of the IsTrue routine is:
option=IsTrue(boolean)
A description of each parameter follows:
- o option:
-
either True or False depending on the boolean parameter.
- o boolean:
-
Specifies a pointer to a character array.
Function Latin1Compare compares two null terminated Latin-1 strings,
ignoring case differences, and returns an integer greater than, equal to,
or less than 0, according to whether first is lexicographically greater
than, equal to, or less than second. The two strings are assumed to be
encoded using ISO 8859-1.
The format of the Latin1Compare routine is:
Latin1Compare(first,second)
A description of each parameter follows:
- o first:
-
A pointer to the string to convert to Latin1 string.
- o second:
-
A pointer to the string to convert to Latin1 string.
Function Latin1Upper copies a null terminated string from source to
destination (including the null), changing all Latin-1 lowercase letters to
uppercase. The string is assumed to be encoded using ISO 8859-1.
The format of the Latin1Upper routine is:
Latin1Upper(string)
A description of each parameter follows:
- o string:
-
A pointer to the string to convert to upper-case Latin1.
Function XAnnotateImage annotates the image with text.
The format of the XAnnotateImage routine is:
status=XAnnotateImage(display,pixel_info,annotate_info,image)
A description of each parameter follows:
- o status:
-
Function XAnnotateImage returns True if the image is successfully annotated
with text. False is returned is there is a memory shortage.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
- o annotate_info:
-
Specifies a pointer to a XAnnotateInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
Function XBestFont returns the ``best'' font. ``Best'' is defined as a font
specified in the X resource database or a font such that the text width
displayed with the font does not exceed the specified maximum width.
The format of the XBestFont routine is:
font=XBestFont(display,resource_info,text_font)
A description of each parameter follows:
- o font:
-
XBestFont returns a pointer to a XFontStruct structure.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o text_font:
-
True is font should be mono-spaced (typewriter style).
Function XBestIconSize returns the ``best'' icon size. ``Best'' is defined
as an icon size that maintains the aspect ratio of the image. If the window
manager has preferred icon sizes, one of the preferred sizes is used.
The format of the XBestIconSize routine is:
XBestIconSize(display,window,image)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
Function XBestPixel returns a pixel from an array of pixels that is closest
to the requested color. If the color array is NULL, the colors are obtained
from the X server.
The format of the XBestPixel routine is:
pixel=XBestPixel(display,colormap,colors,number_colors,color)
A description of each parameter follows:
- o pixel:
-
XBestPixel returns the pixel value closest to the requested color.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o colormap:
-
Specifies the ID of the X server colormap.
- o colors:
-
Specifies an array of XColor structures.
- o number_colors:
-
Specifies the number of XColor structures in the color definition array.
- o color:
-
Specifies the desired RGB value to find in the colors array.
Function XBestVisualInfo returns visual information for a visual that is
the ``best'' the server supports. ``Best'' is defined as:
-
Restrict the visual list to those supported by the default screen.
-
If a visual type is specified, restrict the visual list to those of that type.
-
If a map type is specified, choose the visual that matches the id specified by the Standard Colormap.
4 From the list of visuals, choose one that can display the most
simultaneous colors. If more than one visual can display the same
number of simultaneous colors, one is choosen based on a rank.
The format of the XBestVisualInfo routine is:
visual_info=XBestVisualInfo(display,map_info,resource_info)
A description of each parameter follows:
- o visual_info:
-
XBestVisualInfo returns a pointer to a X11 XVisualInfo structure.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o map_info:
-
If map_type is specified, this structure is initialized with info from the
Standard Colormap.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
Function XCheckRefreshWindows checks the X server for exposure events for a
particular window and updates the area associated withe exposure event.
The format of the XCheckRefreshWindows routine is:
XCheckRefreshWindows(display,windows)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o windows:
-
Specifies a pointer to a XWindows structure.
Function XClientMessage sends a message to a window with XSendEvent. The
message is initialized with a particular protocol type and atom.
The format of the XClientMessage function is:
XClientMessage(display,window,protocol,message,timestamp)
A description of each parameter follows:
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window structure.
- o protocol:
-
Specifies an atom value.
- o message:
-
Specifies an atom value which is the message to send.
- o timestamp:
-
Specifies a value of type Time.
Function XClientWindow finds a window, at or below the specified window,
which has a WM_STATE property. If such a window is found, it is returned,
otherwise the argument window is returned.
The format of the XClientWindow function is:
client_window=XClientWindow(display,target_window)
A description of each parameter follows:
- o client_window:
-
XClientWindow returns a window, at or below the specified window, which has
a WM_STATE property otherwise the argument target_window is returned.
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o target_window:
-
Specifies the window to find a WM_STATE property.
Function XConfigureImageColormap creates a new X colormap.
The format of the XConfigureImageColormap routine is:
XConfigureImageColormap(display,resource_info,windows,image)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o windows:
-
Specifies a pointer to a XWindows structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
Function XConstrainWindowPosition assures a window is positioned witin the
X server boundaries.
The format of the XConstrainWindowPosition routine is:
XConstrainWindowPosition(display,window_info)
A description of each parameter follows:
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o window_info:
-
Specifies a pointer to a XWindowInfo structure.
Function XDelay suspends program execution for the number of milliseconds
specified.
The format of the Delay routine is:
XDelay(display,milliseconds)
A description of each parameter follows:
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o milliseconds:
-
Specifies the number of milliseconds to delay before returning.
Function XDestroyWindowColors frees X11 color resources previously saved on
a window by XRetainWindowColors or programs like xsetroot.
The format of the XDestroyWindowColors routine is:
XDestroyWindowColors(display,window)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window structure.
Function XDisplayImageInfo displays information about an X image.
The format of the XDisplayImageInfo routine is:
XDisplayImageInfo(display,resource_info,windows,undo_image,image)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o windows:
-
Specifies a pointer to a XWindows structure.
- o undo_image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
Function XDitherImage dithers the reference image as required by the HP
Color Recovery algorithm. The color values are quantized to 3 bits of red
and green, and 2 bits of blue (3/3/2) and can be used as indices into a
8-bit X standard colormap.
The format of the XDitherImage routine is:
XDitherImage(image,ximage)
A description of each parameter follows:
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o ximage:
-
Specifies a pointer to a XImage structure; returned from XCreateImage.
Function XDrawImage draws a line on the image.
The format of the XDrawImage routine is:
status=XDrawImage(display,pixel_info,draw_info,image)
A description of each parameter follows:
- o status:
-
Function XDrawImage returns True if the image is successfully drawd with
text. False is returned is there is a memory shortage.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
- o draw_info:
-
Specifies a pointer to a XDrawInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
Function XError ignores BadWindow errors for XQueryTree and
XGetWindowAttributes, and ignores BadDrawable errors for XGetGeometry, and
ignores BadValue errors for XQueryColor. It returns False in those cases.
Otherwise it returns True.
The format of the XError function is:
XError(display,error)
A description of each parameter follows:
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o error:
-
Specifies the error event.
Function XFreeResources frees X11 resources.
The format of the XFreeResources routine is:
XFreeResources(display,visual_info,map_info,pixel_info,font_info,
resource_info,window_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o visual_info:
-
Specifies a pointer to a X11 XVisualInfo structure; returned from
XGetVisualInfo.
- o map_info:
-
If map_type is specified, this structure is initialized with info from the
Standard Colormap.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
- o font_info:
-
Specifies a pointer to a XFontStruct structure.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o window_info:
-
Specifies a pointer to a X11 XWindowInfo structure.
Function XFreeStandardColormap frees an X11 colormap.
The format of the XFreeStandardColormap routine is:
XFreeStandardColormap(display,visual_info,map_info,pixel_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o visual_info:
-
Specifies a pointer to a X11 XVisualInfo structure; returned from
XGetVisualInfo.
- o map_info:
-
If map_type is specified, this structure is initialized with info from the
Standard Colormap.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
Function XGetAnnotateInfo initializes the AnnotateInfo structure.
The format of the GetAnnotateInfo routine is:
XGetAnnotateInfo(annotate_info)
A description of each parameter follows:
- o annotate_info:
-
Specifies a pointer to a XAnnotateInfo structure.
Function XGetMapInfo initializes the XStandardColormap structure.
The format of the XStandardColormap routine is:
XGetMapInfo(visual_info,colormap,map_info)
A description of each parameter follows:
- o colormap:
-
Specifies the ID of the X server colormap.
- o visual_info:
-
Specifies a pointer to a X11 XVisualInfo structure; returned from
XGetVisualInfo.
- o map_info:
-
Specifies a pointer to a X11 XStandardColormap structure.
Function XGetMontageInfo initializes the MontageInfo structure.
The format of the GetMontageInfo routine is:
XGetMontageInfo(montage_info)
A description of each parameter follows:
- o montage_info:
-
Specifies a pointer to a MontageInfo structure.
Function XGetPixelInfo initializes the PixelInfo structure.
The format of the XGetPixelInfo routine is:
XGetPixelInfo(display,visual_info,map_info,resource_info,image,
pixel_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o visual_info:
-
Specifies a pointer to a X11 XVisualInfo structure; returned from
XGetVisualInfo.
- o map_info:
-
If map_type is specified, this structure is initialized with info from the
Standard Colormap.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
Function XGetResourceClass queries the X server for the specified resource
name or class. If the resource name or class is not defined in the
database, the supplied default value is returned.
The format of the XGetResourceClass routine is:
value=XGetResourceClass(database,client_name,keyword,resource_default)
A description of each parameter follows:
- o value:
-
Function XGetResourceClass returns the resource value associated with the
name or class. If none is found, the supplied default value is returned.
- o database:
-
Specifies a resource database; returned from XrmGetStringDatabase.
- o client_name:
-
Specifies the application name used to retrieve resource info from the X
server database.
- o keyword:
-
Specifies the keyword of the value being retrieved.
- o resource_default:
-
Specifies the default value to return if the query fails to find the
specified keyword/class.
Function XGetResourceDatabase creates a new resource database and
initializes it.
The format of the XGetResourceDatabase routine is:
database=XGetResourceDatabase(display,client_name)
A description of each parameter follows:
- o database:
-
Function XGetResourceDatabase returns the database after it is initialized.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o client_name:
-
Specifies the application name used to retrieve resource info from the X
server database.
Function XGetResourceInfo initializes the ResourceInfo structure.
The format of the XGetResourceInfo routine is:
XGetResourceInfo(database,client_name,resource_info)
A description of each parameter follows:
- o database:
-
Specifies a resource database; returned from XrmGetStringDatabase.
- o client_name:
-
Specifies the application name used to retrieve resource info from the X
server database.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
Function XGetResourceInstance queries the X server for the specified
resource name. If the resource name is not defined in the database, the
supplied default value is returned.
The format of the XGetResourceInstance routine is:
value=XGetResourceInstance(database,client_name,keyword,resource_default)
A description of each parameter follows:
- o value:
-
Function XGetResourceInstance returns the resource value associated with
the name or class. If none is found, the supplied default value is
returned.
- o database:
-
Specifies a resource database; returned from XrmGetStringDatabase.
- o client_name:
-
Specifies the application name used to retrieve resource info from the X
server database.
- o keyword:
-
Specifies the keyword of the value being retrieved.
- o resource_default:
-
Specifies the default value to return if the query fails to find the
specified keyword/class.
Function XGetSubwindow returns the subwindow of a window choosen the user
with the pointer and a button press.
The format of the XGetSubwindow routine is:
subwindow=XGetSubwindow(display,window,x,y)
A description of each parameter follows:
- o subwindow:
-
Function XGetSubwindow returns NULL if no subwindow is found otherwise the
subwindow is returned.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window.
- o x:
-
the x coordinate of the pointer relative to the origin of the window.
- o y:
-
the y coordinate of the pointer relative to the origin of the window.
Function XGetWindowColor returns the color of a pixel interactively choosen
from the X server.
The format of the XGetWindowColor routine is:
status=XGetWindowColor(display,name)
A description of each parameter follows:
- o status:
-
Function XGetWindowColor returns True if the color is obtained from the X
server. False is returned if any errors occurs.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o name:
-
The name of of the color if found in the X Color Database is returned in
this character string.
Function XGetWindowImage reads an image from the target X window and
returns it. XGetWindowImage optionally descends the window hierarchy and
overlays the target image with each subwindow image.
The format of the XGetWindowImage routine is:
image=XGetWindowImage(display,window,borders,level)
A description of each parameter follows:
- o image:
-
Function XGetWindowImage returns a MIFF image if it can be successfully
read from the X window. A null image is returned if any errors occurs.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies the window to obtain the image from.
- o borders:
-
Specifies whether borders pixels are to be saved with the image.
- o level:
-
Specifies an unsigned integer representing the level of decent in the
window hierarchy. This value must be zero or one on the initial call to
XGetWindowImage. A value of zero returns after one call. A value of one
causes the function to descend the window hierarchy and overlays the target
image with each subwindow image.
Function XGetWindowInfo initializes the XWindowInfo structure.
The format of the XGetWindowInfo routine is:
XGetWindowInfo(display,visual_info,map_info,pixel_info,font_info,
resource_info,window)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o visual_info:
-
Specifies a pointer to a X11 XVisualInfo structure; returned from
XGetVisualInfo.
- o map_info:
-
If map_type is specified, this structure is initialized with info from the
Standard Colormap.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
- o font_info:
-
Specifies a pointer to a XFontStruct structure.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
Function XHighlightEllipse puts a border on the X server around a region
defined by highlight_info.
The format of the XHighlightEllipse routine is:
XHighlightEllipse(display,window,annotate_context,highlight_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window structure.
- o annotate_context:
-
Specifies a pointer to a GC structure.
- o highlight_info:
-
Specifies a pointer to a RectangleInfo structure. It contains the extents
of any highlighting rectangle.
Function XHighlightLine puts a border on the X server around a region
defined by highlight_info.
The format of the XHighlightLine routine is:
XHighlightLine(display,window,annotate_context,highlight_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window structure.
- o annotate_context:
-
Specifies a pointer to a GC structure.
- o highlight_info:
-
Specifies a pointer to a RectangleInfo structure. It contains the extents
of any highlighting rectangle.
Function XHighlightRectangle puts a border on the X server around a region
defined by highlight_info.
The format of the XHighlightRectangle routine is:
XHighlightRectangle(display,window,annotate_context,highlight_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window structure.
- o annotate_context:
-
Specifies a pointer to a GC structure.
- o highlight_info:
-
Specifies a pointer to a RectangleInfo structure. It contains the extents
of any highlighting rectangle.
Function XMakeCursor creates a crosshairs X11 cursor.
The format of the XMakeCursor routine is:
XMakeCursor(display,window,colormap,background_color,foreground_color)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies the ID of the window for which the cursor is assigned.
- o colormap:
-
Specifies the ID of the colormap from which the background and foreground
color will be retrieved.
- o background_color:
-
Specifies the color to use for the cursor background.
- o foreground_color:
-
Specifies the color to use for the cursor foreground.
Function XMakeImage creates an X11 image. If the image size differs from
the X11 image size, the image is first resized.
The format of the XMakeImage routine is:
status=XMakeImage(display,resource_info,window,image,width,height)
A description of each parameter follows:
- o status:
-
Function XMakeImage returns True if the X image is successfully created.
False is returned is there is a memory shortage.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o window:
-
Specifies a pointer to a XWindowInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o width:
-
Specifies the width in pixels of the rectangular area to display.
- o height:
-
Specifies the height in pixels of the rectangular area to display.
Function XMakeImageLSBFirst initializes the pixel data of an X11 Image. The
X image pixels are copied in least-significant bit and byte first order.
The server's scanline pad is respected. Rather than using one or two
general cases, many special cases are found here to help speed up the image
conversion.
The format of the XMakeImageLSBFirst routine is:
XMakeImageLSBFirst(resource_info,window,image,ximage,matte_image)
A description of each parameter follows:
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o window:
-
Specifies a pointer to a XWindowInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o ximage:
-
Specifies a pointer to a XImage structure; returned from XCreateImage.
- o matte_image:
-
Specifies a pointer to a XImage structure; returned from XCreateImage.
Function XMakeImageMSBFirst initializes the pixel data of an X11 Image. The
X image pixels are copied in most-significant bit and byte first order. The
server's scanline pad is also resprected. Rather than using one or two
general cases, many special cases are found here to help speed up the image
conversion.
The format of the XMakeImageMSBFirst routine is:
XMakeImageMSBFirst(resource_info,window,image,ximage,matte_image)
A description of each parameter follows:
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o window:
-
Specifies a pointer to a XWindowInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o ximage:
-
Specifies a pointer to a XImage structure; returned from XCreateImage.
- o matte_image:
-
Specifies a pointer to a XImage structure; returned from XCreateImage.
Function XMakeMagnifyImage magnifies a region of an X image and displays
it.
The format of the XMakeMagnifyImage routine is:
XMakeMagnifyImage(display,windows)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o windows:
-
Specifies a pointer to a XWindows structure.
Function XMakePixmap creates an X11 pixmap.
The format of the XMakePixmap routine is:
status=XMakePixmap(display,resource_info,window)
A description of each parameter follows:
- o status:
-
Function XMakePixmap returns True if the X pixmap is successfully created.
False is returned is there is a memory shortage.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a XWindowInfo structure.
Function XMakeStandardColormap creates an X11 Standard Colormap.
The format of the XMakeStandardColormap routine is:
XMakeStandardColormap(display,visual_info,resource_info,image,
map_info,pixel_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o visual_info:
-
Specifies a pointer to a X11 XVisualInfo structure; returned from
XGetVisualInfo.
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o image:
-
Specifies a pointer to a Image structure; returned from ReadImage.
- o map_info:
-
If a Standard Colormap type is specified, this structure is initialized
with info from the Standard Colormap.
- o pixel_info:
-
Specifies a pointer to a XPixelInfo structure.
Function XMakeWindow creates an X11 window.
The format of the XMakeWindow routine is:
XMakeWindow(display,parent,argv,argc,class_hint,manager_hints,
window_info)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o parent:
-
Specifies the parent window_info.
- o argv:
-
Specifies the application's argument list.
- o argc:
-
Specifies the number of arguments.
- o class_hint:
-
Specifies a pointer to a X11 XClassHint structure.
- o manager_hints:
-
Specifies a pointer to a X11 XWMHints structure.
- o window_info:
-
Specifies a pointer to a X11 XWindowInfo structure.
Function XMontageImages creates a composite image by combining several
separate images.
The format of the MontageImages routine is:
XMontageImages(resource_info,montage_info,image)
A description of each parameter follows:
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
- o montage_info:
-
Specifies a pointer to a XMontageInfo structure.
- o image:
-
Specifies a pointer to an array of Image structures.
Function XProgressMonitor displays the progress a task is making in
completing a task.
The format of the XProgressMonitor routine is:
XProgressMonitor(task,quantum,span)
A description of each parameter follows:
- o task:
-
Identifies the task in progress.
- o quantum:
-
Specifies the quantum position within the span which represents how much
progress has been made in completing a task.
- o span:
-
Specifies the span relative to completing a task.
Function XQueryColorDatabase looks up a RGB values for a color given in the
target string.
The format of the XQueryColorDatabase routine is:
status=XQueryColorDatabase(target,color)
A description of each parameter follows:
- o status:
-
Function XQueryColorDatabase returns True if the RGB values of the target
color is defined, otherwise False is returned.
- o target:
-
Specifies the color to lookup in the X color database.
- o color:
-
A pointer to an XColor structure. The RGB value of the target color is
returned as this value.
Function XQueryPosition gets the pointer coodinates relative to a window.
The format of the XQueryPosition routine is:
XQueryPosition(display,window,x,y)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a Window.
- o x:
-
Return the x coordinate of the pointer relative to the origin of the
window.
- o y:
-
Return the y coordinate of the pointer relative to the origin of the
window.
Function XRefreshWindow refreshes an image in a X window.
The format of the XRefreshWindow routine is:
XRefreshWindow(display,window,event)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a XWindowInfo structure.
- o event:
-
Specifies a pointer to a XEvent structure. If it is NULL, the entire image
is refreshed.
Function XRetainWindowColors sets X11 color resources on a window. This
perserves the colors associated with an image displayed on the window.
The format of the XRetainWindowColors routine is:
XRetainWindowColors(display,window)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o window:
-
Specifies a pointer to a XWindowInfo structure.
Function XSelectWindow allows a user to select a window using the mouse. If
the mouse moves, a cropping rectangle is drawn and the extents of the
rectangle is returned in the crop_info structure.
The format of the XSelectWindow function is:
target_window=XSelectWindow(display,crop_info)
A description of each parameter follows:
- o window:
-
XSelectWindow returns the window id.
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o crop_info:
-
Specifies a pointer to a RectangleInfo structure. It contains the extents
of any cropping rectangle.
Function XSetCursorState sets the cursor state to busy, otherwise the
cursor are reset to their default.
The format of the XXSetCursorState routine is:
XSetCursorState(display,windows,state)
A description of each parameter follows:
- o display:
-
Specifies a connection to an X server; returned from XOpenDisplay.
- o windows:
-
Specifies a pointer to a XWindows structure.
- o state:
-
An unsigned integer greater than 0 sets the cursor state to busy, otherwise
the cursor are reset to their default.
Function XUserPreferences saves the preferences in a configuration file in
the users' home directory.
The format of the XUserPreferences routine is:
XUserPreferences(resource_info)
A description of each parameter follows:
- o resource_info:
-
Specifies a pointer to a X11 XResourceInfo structure.
Function XVisualClassName returns the visual class name as a character
string.
The format of the XVisualClassName routine is:
visual_type=XVisualClassName(class)
A description of each parameter follows:
- o visual_type:
-
XVisualClassName returns the visual class as a character string.
- o class:
-
Specifies the visual class.
Function XWarning displays a warning message in a Notice widget.
The format of the XWarning routine is:
XWarning(message,qualifier)
A description of each parameter follows:
- o message:
-
Specifies the message to display before terminating the program.
- o qualifier:
-
Specifies any qualifier to the message.
Function XWindowByID locates a child window with a given ID. If not window
with the given name is found, 0 is returned. Only the window specified and
its subwindows are searched.
The format of the XWindowByID function is:
child=XWindowByID(display,window,id)
A description of each parameter follows:
- o child:
-
XWindowByID returns the window with the specified id. If no windows are
found, XWindowByID returns 0.
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o id:
-
Specifies the id of the window to locate.
Function XWindowByName locates a window with a given name on a display. If
no window with the given name is found, 0 is returned. If more than one
window has the given name, the first one is returned. Only root and its
children are searched.
The format of the XWindowByName function is:
window=XWindowByName(display,root_window,name)
A description of each parameter follows:
- o window:
-
XWindowByName returns the window id.
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o root_window:
-
Specifies the id of the root window.
- o name:
-
Specifies the name of the window to locate.
Function XWindowByProperty locates a child window with a given property. If
no window with the given name is found, 0 is returned. If more than one
window has the given property, the first one is returned. Only the window
specified and its subwindows are searched.
The format of the XWindowByProperty function is:
child=XWindowByProperty(display,window,property)
A description of each parameter follows:
- o child:
-
XWindowByProperty returns the window id with the specified property. If no
windows are found, XWindowByProperty returns 0.
- o display:
-
Specifies a pointer to the Display structure; returned from XOpenDisplay.
- o property:
-
Specifies the property of the window to locate.