xwindows - X11 Utility Methods for ImageMagick

- NAME
- SYNOPSIS
- FUNCTION DESCRIPTIONS
  - IsTrue
  - XAnnotateImage
  - XBestFont
  - XBestIconSize
  - XBestPixel
  - XBestVisualInfo
  - XCheckRefreshWindows
  - XClientMessage
  - XClientWindow
  - XConfigureImageColormap
  - XConstrainWindowPosition
  - XDelay
  - XDestroyWindowColors
  - XDisplayImageInfo
  - XDrawImage
  - XError
  - XFreeResources
  - XFreeStandardColormap
  - XGetAnnotateInfo
  - XGetMapInfo
  - XGetImageInfo
  - XGetPixelInfo
  - XGetResourceClass
  - XGetResourceDatabase
  - XGetResourceInfo
  - XGetResourceInstance
  - XGetScreenDensity
  - XGetSubwindow
  - XGetWindowColor
  - XGetWindowImage
  - XGetWindowInfo
  - XHighlightEllipse
  - XHighlightLine
  - XHighlightRectangle
  - XImportImage
  - XInitializeWindows
  - XMakeCursor
  - XMakeImage
  - XMakeMagnifyImage
  - XMakePixmap
  - XMakeStandardColormap
  - XMakeWindow
  - XProgressMonitor
  - XQueryColorDatabase
  - XQueryPosition
  - XRefreshWindow
  - XRemoteCommand
  - XRetainWindowColors
  - XSelectWindow
  - XSignalHandler
  - XSetWindows
  - XUserPreferences
  - XVisualClassName
  - XWarning
  - XWindowByID
  - XWindowByName
  - XWindowByPropery

# NAME

xwindows - X11 Utility Methods for ImageMagick

# SYNOPSIS

unsigned int IsTrue( const char `*message` );

unsigned int XAnnotateImage( Display *display, const XPixelInfo *pixel_info, XAnnotateInfo *annotate_info, Image `*image` );

XFontStruct * XBestFont( Display *display, const XResourceInfo *resource_info, const unsigned int text_font );

void XBestIconSize( Display *display, XWindowInfo *window, Image `*image` );

void XBestPixel( Display *display, const Colormap colormap, XColor *colors, unsigned int number_colors, XColor `*color` );

XVisualInfo * XBestVisualInfo( Display *display, XStandardColormap *map_info, XResourceInfo `*resource_info` );

void XCheckRefreshWindows( Display *display, XWindows `*windows` );

XClientMessage( display, window, protocol, message, timestamp );

client_window= XClientWindow( display, target_window );

void XConfigureImageColormap( Display *display, XResourceInfo *resource_info, XWindows *windows, Image `*image` );

void XConstrainWindowPosition( Display *display, XWindowInfo `*window_info` );

void XDelay( Display *display, const unsigned long milliseconds );

void XDestroyWindowColors( Display *display, Window window );

void XDisplayImageInfo( Display *display, const XResourceInfo *resource_info, XWindows *windows, Image *undo_image, Image `*image` );

status= XDrawImage( display, pixel_info, draw_info, image );

XError( display, error );

void XFreeResources( Display *display, XVisualInfo *visual_info, XStandardColormap *map_info, XPixelInfo *pixel_info, XFontStruct *font_info, XResourceInfo *resource_info, XWindowInfo `*window_info` )resource_info, window_info );

void XFreeStandardColormap( Display *display, const XVisualInfo *visual_info, XStandardColormap *map_info, XPixelInfo `*pixel_info` );

void XGetAnnotateInfo( XAnnotateInfo `*annotate_info` );

void XGetMapInfo( const XVisualInfo *visual_info, const Colormap colormap, XStandardColormap `*map_info` );

void XGetPixelInfo( Display *display, const XVisualInfo *visual_info, const XStandardColormap *map_info, const XResourceInfo *resource_info, Image *image, XPixelInfo `*pixel_info` )pixel_info );

char * XGetResourceClass( XrmDatabase database, const char *client_name, const char *keyword, char `*resource_default` );

XrmDatabase XGetResourceDatabase( Display *display, const char `*client_name` );

void XGetResourceInfo( XrmDatabase database, char *client_name, XResourceInfo `*resource_info` );

char * XGetResourceInstance( XrmDatabase database, const char *client_name, const char *keyword, const char `*resource_default` );

char * XGetScreenDensity( Display `*display` );

Window XGetSubwindow( Display *display, Window window, int x, int y );

unsigned int XGetWindowColor( Display *display, char `*name` );

Image * XGetWindowImage( Display *display, const Window window, const unsigned int borders, const unsigned int level );

void XGetWindowInfo( Display *display, XVisualInfo *visual_info, XStandardColormap *map_info, XPixelInfo *pixel_info, XFontStruct *font_info, XResourceInfo *resource_info, XWindowInfo `*window` )resource_info, window );

void XHighlightEllipse( Display *display, Window window, GC annotate_context, const RectangleInfo `*highlight_info` );

void XHighlightLine( Display *display, Window window, GC annotate_context, const XSegment `*highlight_info` );

void XHighlightRectangle( Display *display, Window window, GC annotate_context, const RectangleInfo `*highlight_info` );

Image * XImportImage( const ImageInfo *image_info, XImportInfo `*ximage_info` );

XWindows * XInitializeWindows( Display *display, XResourceInfo `*resource_info` );

Cursor XMakeCursor( Display *display, Window window, Colormap colormap, char *background_color, char `*foreground_color` );

unsigned int XMakeImage( Display *display, const XResourceInfo *resource_info, XWindowInfo *window, Image *image, unsigned int width, unsigned int height );

XMakeMagnifyImage( display, windows );

XMakeStandardColormap( display, visual_info, resource_info, image, map_info, pixel_info );

void XMakeWindow( Display *display, Window parent, char ** argv, int argc, XClassHint *class_hint, XWMHints *manager_hints, XWindowInfo `*window_info` )window_info );

void XProgressMonitor( const char *task, const unsigned int quantum, const unsigned int span );

unsigned int XQueryColorDatabase( const char *target, ColorPacket `*color` );

void XQueryPosition( Display *display, const Window window, int *x, int `*y` );

void XRefreshWindow( Display *display, const XWindowInfo *window, const XEvent `*event` );

void XRemoteCommand( Display *display, const char *window, const char `*filename` );

void XRetainWindowColors( Display *display, const Window window );

target_window= XSelectWindow( display, crop_info );

XSetCursorState( display, windows, state );

XWindows * XSetWindows( XWindows `*windows_info` );

void XUserPreferences( XResourceInfo `*resource_info` );

char * XVisualClassName( const int class );

void XWarning( const unsigned int warning, const char *message, const char `*qualifier` );

child= XWindowByID( display, window, id );

window= XWindowByName( display, root_window, name );

# FUNCTION DESCRIPTIONS

## IsTrue

Method IsTrue returns True if the message is ``true'', ``on'', ``yes'' or ``1''.

The format of the IsTrue method is:

> unsigned int IsTrue ( const char *message );

A description of each parameter follows:

option:

  either True or False depending on the message parameter.

message:

  Specifies a pointer to a character array.

## XAnnotateImage

Method XAnnotateImage annotates the image with text.

The format of the XAnnotateImage method is:

> unsigned int XAnnotateImage ( Display *display, const XPixelInfo *pixel_info, XAnnotateInfo *annotate_info, Image *image );

A description of each parameter follows:

status:

  Method XAnnotateImage returns True if the image is successfully annotated with text. False is returned is there is a memory shortage.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

annotate_info:

  Specifies a pointer to a XAnnotateInfo structure.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

## XBestFont

Method 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 method is:

> XFontStruct *XBestFont ( Display *display, const XResourceInfo *resource_info, const unsigned int text_font );

A description of each parameter follows:

font:

  XBestFont returns a pointer to a XFontStruct structure.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

text_font:

  True is font should be mono-spaced (typewriter style).

## XBestIconSize

Method 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 method is:

> void XBestIconSize ( Display *display, XWindowInfo *window, Image *image );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

## XBestPixel

Method 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 method is:

> void XBestPixel ( Display *display, const Colormap colormap, XColor *colors, unsigned int number_colors, XColor *color );

A description of each parameter follows:

pixel:

  XBestPixel returns the pixel value closest to the requested color.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

colormap:

  Specifies the ID of the X server colormap.

colors:

  Specifies an array of XColor structures.

number_colors:

  Specifies the number of XColor structures in the color definition array.

color:

  Specifies the desired RGB value to find in the colors array.

## XBestVisualInfo

Method XBestVisualInfo returns visual information for a visual that is the ``best'' the server supports. ``Best'' is defined as:

1. .

        Restrict the visual list to those supported by the default screen.

2. .

        If a visual type is specified, restrict the visual list to those of that type.

3. .

        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 chosen based on a rank.

The format of the XBestVisualInfo method is:

> XVisualInfo *XBestVisualInfo ( Display *display, XStandardColormap *map_info, XResourceInfo *resource_info );

A description of each parameter follows:

visual_info:

  XBestVisualInfo returns a pointer to a X11 XVisualInfo structure.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

map_info:

  If map_type is specified, this structure is initialized with info from the Standard Colormap.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

## XCheckRefreshWindows

Method 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 method is:

> void XCheckRefreshWindows ( Display *display, XWindows *windows );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

windows:

  Specifies a pointer to a XWindows structure.

## XClientMessage

Method 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:

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window structure.

protocol:

  Specifies an atom value.

message:

  Specifies an atom value which is the message to send.

timestamp:

  Specifies a value of type Time.

## XClientWindow

Method 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:

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.

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

target_window:

  Specifies the window to find a WM_STATE property.

## XConfigureImageColormap

Method XConfigureImageColormap creates a new X colormap.

The format of the XConfigureImageColormap method is:

> void XConfigureImageColormap ( Display *display, XResourceInfo *resource_info, XWindows *windows, Image *image );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

windows:

  Specifies a pointer to a XWindows structure.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

## XConstrainWindowPosition

Method XConstrainWindowPosition assures a window is positioned witin the X server boundaries.

The format of the XConstrainWindowPosition method is:

> void XConstrainWindowPosition ( Display *display, XWindowInfo *window_info );

A description of each parameter follows:

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

window_info:

  Specifies a pointer to a XWindowInfo structure.

## XDelay

Method XDelay suspends program execution for the number of milliseconds specified.

The format of the Delay method is:

> void XDelay ( Display *display, const unsigned long milliseconds );

A description of each parameter follows:

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

milliseconds:

  Specifies the number of milliseconds to delay before returning.

## XDestroyWindowColors

Method XDestroyWindowColors frees X11 color resources previously saved on a window by XRetainWindowColors or programs like xsetroot.

The format of the XDestroyWindowColors method is:

> void XDestroyWindowColors ( Display *display, Window window );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window structure.

## XDisplayImageInfo

Method XDisplayImageInfo displays information about an X image.

The format of the XDisplayImageInfo method is:

> void XDisplayImageInfo ( Display *display, const XResourceInfo *resource_info, XWindows *windows, Image *undo_image, Image *image );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

windows:

  Specifies a pointer to a XWindows structure.

undo_image:

  Specifies a pointer to a Image structure; returned from ReadImage.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

## XDrawImage

Method XDrawImage draws a line on the image.

The format of the XDrawImage method is:

> status=XDrawImage ( display, pixel_info, draw_info, image );

A description of each parameter follows:

status:

  Method XDrawImage returns True if the image is successfully drawd with text. False is returned is there is a memory shortage.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

draw_info:

  Specifies a pointer to a XDrawInfo structure.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

## XError

Method 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:

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

error:

  Specifies the error event.

## XFreeResources

Method XFreeResources frees X11 resources.

The format of the XFreeResources method is:

> void XFreeResources ( Display *display, XVisualInfo *visual_info, XStandardColormap *map_info, XPixelInfo *pixel_info, XFontStruct *font_info, XResourceInfo *resource_info, XWindowInfo *window_info ) resource_info, window_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

visual_info:

  Specifies a pointer to a X11 XVisualInfo structure; returned from XGetVisualInfo.

map_info:

  If map_type is specified, this structure is initialized with info from the Standard Colormap.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

font_info:

  Specifies a pointer to a XFontStruct structure.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

window_info:

  Specifies a pointer to a X11 XWindowInfo structure.

## XFreeStandardColormap

Method XFreeStandardColormap frees an X11 colormap.

The format of the XFreeStandardColormap method is:

> void XFreeStandardColormap ( Display *display, const XVisualInfo *visual_info, XStandardColormap *map_info, XPixelInfo *pixel_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

visual_info:

  Specifies a pointer to a X11 XVisualInfo structure; returned from XGetVisualInfo.

map_info:

  If map_type is specified, this structure is initialized with info from the Standard Colormap.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

## XGetAnnotateInfo

Method XGetAnnotateInfo initializes the AnnotateInfo structure.

The format of the GetAnnotateInfo method is:

> void XGetAnnotateInfo ( XAnnotateInfo *annotate_info );

A description of each parameter follows:

annotate_info:

  Specifies a pointer to a XAnnotateInfo structure.

## XGetMapInfo

Method XGetMapInfo initializes the XStandardColormap structure.

The format of the XStandardColormap method is:

> void XGetMapInfo ( const XVisualInfo *visual_info, const Colormap colormap, XStandardColormap *map_info );

A description of each parameter follows:

colormap:

  Specifies the ID of the X server colormap.

visual_info:

  Specifies a pointer to a X11 XVisualInfo structure; returned from XGetVisualInfo.

map_info:

  Specifies a pointer to a X11 XStandardColormap structure.

## XGetImageInfo

Method XGetImportInfo initializes the XImportInfo structure.

The format of the XGetImportInfo method is:

        void XGetImportInfo(XImportInfo *ximage_info)

A description of each parameter follows:

ximage_info:

  Specifies a pointer to a ImageInfo structure.

## XGetPixelInfo

Method XGetPixelInfo initializes the PixelInfo structure.

The format of the XGetPixelInfo method is:

> void XGetPixelInfo ( Display *display, const XVisualInfo *visual_info, const XStandardColormap *map_info, const XResourceInfo *resource_info, Image *image, XPixelInfo *pixel_info ) pixel_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

visual_info:

  Specifies a pointer to a X11 XVisualInfo structure; returned from XGetVisualInfo.

map_info:

  If map_type is specified, this structure is initialized with info from the Standard Colormap.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

## XGetResourceClass

Method 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 method is:

> char *XGetResourceClass ( XrmDatabase database, const char *client_name, const char *keyword, char *resource_default );

A description of each parameter follows:

value:

  Method XGetResourceClass returns the resource value associated with the name or class. If none is found, the supplied default value is returned.

database:

  Specifies a resource database; returned from XrmGetStringDatabase.

client_name:

  Specifies the application name used to retrieve resource info from the X server database.

keyword:

  Specifies the keyword of the value being retrieved.

resource_default:

  Specifies the default value to return if the query fails to find the specified keyword/class.

## XGetResourceDatabase

Method XGetResourceDatabase creates a new resource database and initializes it.

The format of the XGetResourceDatabase method is:

> XrmDatabase XGetResourceDatabase ( Display *display, const char *client_name );

A description of each parameter follows:

database:

  Method XGetResourceDatabase returns the database after it is initialized.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

client_name:

  Specifies the application name used to retrieve resource info from the X server database.

## XGetResourceInfo

Method XGetResourceInfo initializes the ResourceInfo structure.

The format of the XGetResourceInfo method is:

> void XGetResourceInfo ( XrmDatabase database, char *client_name, XResourceInfo *resource_info );

A description of each parameter follows:

database:

  Specifies a resource database; returned from XrmGetStringDatabase.

client_name:

  Specifies the application name used to retrieve resource info from the X server database.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

## XGetResourceInstance

Method 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 method is:

> char *XGetResourceInstance ( XrmDatabase database, const char *client_name, const char *keyword, const char *resource_default );

A description of each parameter follows:

value:

  Method XGetResourceInstance returns the resource value associated with the name or class. If none is found, the supplied default value is returned.

database:

  Specifies a resource database; returned from XrmGetStringDatabase.

client_name:

  Specifies the application name used to retrieve resource info from the X server database.

keyword:

  Specifies the keyword of the value being retrieved.

resource_default:

  Specifies the default value to return if the query fails to find the specified keyword/class.

## XGetScreenDensity

Method XGetScreenDensity returns the density of the X server screen in dots-per-inch.

The format of the XGetScreenDensity method is:

> char *XGetScreenDensity ( Display *display );

A description of each parameter follows:

density:

  Method XGetScreenDensity returns the density of the X screen in dots-per-inch.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

## XGetSubwindow

Method XGetSubwindow returns the subwindow of a window chosen the user with the pointer and a button press.

The format of the XGetSubwindow method is:

> Window XGetSubwindow ( Display *display, Window window, int x, int y );

A description of each parameter follows:

subwindow:

  Method XGetSubwindow returns NULL if no subwindow is found otherwise the subwindow is returned.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window.

x:

  the x coordinate of the pointer relative to the origin of the window.

y:

  the y coordinate of the pointer relative to the origin of the window.

## XGetWindowColor

Method XGetWindowColor returns the color of a pixel interactively chosen from the X server.

The format of the XGetWindowColor method is:

> unsigned int XGetWindowColor ( Display *display, char *name );

A description of each parameter follows:

status:

  Method XGetWindowColor returns True if the color is obtained from the X server. False is returned if any errors occurs.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

name:

  The name of of the color if found in the X Color Database is returned in this character string.

## XGetWindowImage

Method 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 child image in an optimized fashion. Any child window that have the same visual, colormap, and are contained by its parent are exempted.

The format of the XGetWindowImage method is:

> Image *XGetWindowImage ( Display *display, const Window window, const unsigned int borders, const unsigned int level );

A description of each parameter follows:

image:

  Method XGetWindowImage returns a MIFF image if it can be successfully read from the X window. A null image is returned if any errors occurs.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies the window to obtain the image from.

borders:

  Specifies whether borders pixels are to be saved with the image.

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 overlay the target image with each subwindow image.

## XGetWindowInfo

Method XGetWindowInfo initializes the XWindowInfo structure.

The format of the XGetWindowInfo method is:

> void XGetWindowInfo ( Display *display, XVisualInfo *visual_info, XStandardColormap *map_info, XPixelInfo *pixel_info, XFontStruct *font_info, XResourceInfo *resource_info, XWindowInfo *window ) resource_info, window );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

visual_info:

  Specifies a pointer to a X11 XVisualInfo structure; returned from XGetVisualInfo.

map_info:

  If map_type is specified, this structure is initialized with info from the Standard Colormap.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

font_info:

  Specifies a pointer to a XFontStruct structure.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

## XHighlightEllipse

Method XHighlightEllipse puts a border on the X server around a region defined by highlight_info.

The format of the XHighlightEllipse method is:

> void XHighlightEllipse ( Display *display, Window window, GC annotate_context, const RectangleInfo *highlight_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window structure.

annotate_context:

  Specifies a pointer to a GC structure.

highlight_info:

  Specifies a pointer to a RectangleInfo structure. It contains the extents of any highlighting rectangle.

## XHighlightLine

Method XHighlightLine puts a border on the X server around a region defined by highlight_info.

The format of the XHighlightLine method is:

> void XHighlightLine ( Display *display, Window window, GC annotate_context, const XSegment *highlight_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window structure.

annotate_context:

  Specifies a pointer to a GC structure.

highlight_info:

  Specifies a pointer to a RectangleInfo structure. It contains the extents of any highlighting rectangle.

## XHighlightRectangle

Method XHighlightRectangle puts a border on the X server around a region defined by highlight_info.

The format of the XHighlightRectangle method is:

> void XHighlightRectangle ( Display *display, Window window, GC annotate_context, const RectangleInfo *highlight_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window structure.

annotate_context:

  Specifies a pointer to a GC structure.

highlight_info:

  Specifies a pointer to a RectangleInfo structure. It contains the extents of any highlighting rectangle.

## XImportImage

Procedure XImportImage reads an image from an X window.

The format of the XImportImage method is:

> Image *XImportImage ( const ImageInfo *image_info, XImportInfo *ximage_info );

A description of each parameter follows:

image_info:

  Specifies a pointer to an ImageInfo structure.

ximage_info:

  Specifies a pointer to an XImportInfo structure.

## XInitializeWindows

Method XInitializeWindows initializes the XWindows structure.

The format of the XInitializeWindows method is:

> XWindows *XInitializeWindows ( Display *display, XResourceInfo *resource_info );

A description of each parameter follows:

windows:

  XInitializeWindows returns a pointer to a XWindows structure.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

## XMakeCursor

Method XMakeCursor creates a crosshairs X11 cursor.

The format of the XMakeCursor method is:

> Cursor XMakeCursor ( Display *display, Window window, Colormap colormap, char *background_color, char *foreground_color );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies the ID of the window for which the cursor is assigned.

colormap:

  Specifies the ID of the colormap from which the background and foreground color will be retrieved.

background_color:

  Specifies the color to use for the cursor background.

foreground_color:

  Specifies the color to use for the cursor foreground.

## XMakeImage

Method 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 method is:

> unsigned int XMakeImage ( Display *display, const XResourceInfo *resource_info, XWindowInfo *window, Image *image, unsigned int width, unsigned int height );

A description of each parameter follows:

status:

  Method XMakeImage returns True if the X image is successfully created. False is returned is there is a memory shortage.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

window:

  Specifies a pointer to a XWindowInfo structure.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

width:

  Specifies the width in pixels of the rectangular area to display.

height:

  Specifies the height in pixels of the rectangular area to display.

## XMakeMagnifyImage

Method XMakeMagnifyImage magnifies a region of an X image and displays it.

The format of the XMakeMagnifyImage method is:

> XMakeMagnifyImage ( display, windows );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

windows:

  Specifies a pointer to a XWindows structure.

## XMakePixmap

Method XMakePixmap creates an X11 pixmap.

The format of the XMakePixmap method is:

        void XMakeStandardColormap(Display *display,XVisualInfo *visual_info,
          XResourceInfo *resource_info,Image *image,XStandardColormap *map_info,
          XPixelInfo *pixel_info)

A description of each parameter follows:

status:

  Method XMakePixmap returns True if the X pixmap is successfully created. False is returned is there is a memory shortage.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a XWindowInfo structure.

## XMakeStandardColormap

Method XMakeStandardColormap creates an X11 Standard Colormap.

The format of the XMakeStandardColormap method is:

> XMakeStandardColormap ( display, visual_info, resource_info, image, map_info, pixel_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

visual_info:

  Specifies a pointer to a X11 XVisualInfo structure; returned from XGetVisualInfo.

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

image:

  Specifies a pointer to a Image structure; returned from ReadImage.

map_info:

  If a Standard Colormap type is specified, this structure is initialized with info from the Standard Colormap.

pixel_info:

  Specifies a pointer to a XPixelInfo structure.

## XMakeWindow

Method XMakeWindow creates an X11 window.

The format of the XMakeWindow method is:

> void XMakeWindow ( Display *display, Window parent, char **argv, int argc, XClassHint *class_hint, XWMHints *manager_hints, XWindowInfo *window_info ) window_info );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

parent:

  Specifies the parent window_info.

argv:

  Specifies the application's argument list.

argc:

  Specifies the number of arguments.

class_hint:

  Specifies a pointer to a X11 XClassHint structure.

manager_hints:

  Specifies a pointer to a X11 XWMHints structure.

window_info:

  Specifies a pointer to a X11 XWindowInfo structure.

## XProgressMonitor

Method XProgressMonitor displays the progress a task is making in completing a task.

The format of the XProgressMonitor method is:

> void XProgressMonitor ( const char *task, const unsigned int quantum, const unsigned int span );

A description of each parameter follows:

task:

  Identifies the task in progress.

quantum:

  Specifies the quantum position within the span which represents how much progress has been made in completing a task.

span:

  Specifies the span relative to completing a task.

## XQueryColorDatabase

Method XQueryColorDatabase looks up a RGB values for a color given in the target string.

The format of the XQueryColorDatabase method is:

> unsigned int XQueryColorDatabase ( const char *target, ColorPacket *color );

A description of each parameter follows:

status:

  Method XQueryColorDatabase returns True if the RGB values of the target color is defined, otherwise False is returned.

target:

  Specifies the color to lookup in the X color database.

color:

  A pointer to an ColorPacket structure. The RGB value of the target color is returned as this value.

## XQueryPosition

Method XQueryPosition gets the pointer coordinates relative to a window.

The format of the XQueryPosition method is:

> void XQueryPosition ( Display *display, const Window window, int *x, int *y );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a Window.

x:

  Return the x coordinate of the pointer relative to the origin of the window.

y:

  Return the y coordinate of the pointer relative to the origin of the window.

## XRefreshWindow

Method XRefreshWindow refreshes an image in a X window.

The format of the XRefreshWindow method is:

> void XRefreshWindow ( Display *display, const XWindowInfo *window, const XEvent *event );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a XWindowInfo structure.

event:

  Specifies a pointer to a XEvent structure. If it is NULL, the entire image is refreshed.

## XRemoteCommand

Method XRemoteCommand forces a remote `display(1)` to display the specified image filename.

The format of the XRemoteCommand method is:

> void XRemoteCommand ( Display *display, const char *window, const char *filename );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies the name or id of an X window.

filename:

  The name of the image filename to display.

## XRetainWindowColors

Method XRetainWindowColors sets X11 color resources on a window. This preserves the colors associated with an image displayed on the window.

The format of the XRetainWindowColors method is:

> void XRetainWindowColors ( Display *display, const Window window );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

window:

  Specifies a pointer to a XWindowInfo structure.

## XSelectWindow

Method 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:

window:

  XSelectWindow returns the window id.

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

crop_info:

  Specifies a pointer to a RectangleInfo structure. It contains the extents of any cropping rectangle.

## XSignalHandler

Method XSignalHandler is called if the program execution is interrupted.

The format of the XSignalHandler method is:

        void XSetCursorState(Display *display,XWindows *windows,
          const unsigned int state)
    =head2 XSetCursorState

Method XSetCursorState sets the cursor state to busy, otherwise the cursor are reset to their default.

The format of the XXSetCursorState method is:

> XSetCursorState ( display, windows, state );

A description of each parameter follows:

display:

  Specifies a connection to an X server; returned from XOpenDisplay.

windows:

  Specifies a pointer to a XWindows structure.

state:

  An unsigned integer greater than 0 sets the cursor state to busy, otherwise the cursor are reset to their default.

## XSetWindows

Method XSetWindows sets the X windows structure if the windows info is specified. Otherwise the current windows structure is returned.

The format of the XSetWindows method is:

> XWindows *XSetWindows ( XWindows *windows_info );

A description of each parameter follows:

windows:

  Method XSetWindows returns a pointer to the XWindows structure.

windows_info:

  Initialize the Windows structure with this information.

## XUserPreferences

Method XUserPreferences saves the preferences in a configuration file in the users' home directory.

The format of the XUserPreferences method is:

> void XUserPreferences ( XResourceInfo *resource_info );

A description of each parameter follows:

resource_info:

  Specifies a pointer to a X11 XResourceInfo structure.

## XVisualClassName

Method XVisualClassName returns the visual class name as a character string.

The format of the XVisualClassName method is:

> char *XVisualClassName ( const int class );

A description of each parameter follows:

visual_type:

  XVisualClassName returns the visual class as a character string.

class:

  Specifies the visual class.

## XWarning

Method XWarning displays a warning message in a Notice widget.

The format of the XWarning method is:

> void XWarning ( const unsigned int warning, const char *message, const char *qualifier );

A description of each parameter follows:

warning:

  Specifies the numeric warning category.

message:

  Specifies the message to display before terminating the program.

qualifier:

  Specifies any qualifier to the message.

## XWindowByID

Method 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:

child:

  XWindowByID returns the window with the specified id. If no windows are found, XWindowByID returns 0.

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

id:

  Specifies the id of the window to locate.

## XWindowByName

Method 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:

window:

  XWindowByName returns the window id.

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

root_window:

  Specifies the id of the root window.

name:

  Specifies the name of the window to locate.

## XWindowByPropery

Method 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:

child:

  XWindowByProperty returns the window id with the specified property. If no windows are found, XWindowByProperty returns 0.

display:

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

property:

  Specifies the property of the window to locate.