### Name

> XmHTMLImageReplace - replace an image with another image in the currently displayed document.

### Synopsis

> XmImageStatus XmHTMLImageReplace(Widget w, XmImageInfo *image, XmImageInfo *new_image)

### Description

> XmHTMLImageReplace allows one to replace an existing image with a new one. This function is typically used in combination with delayed image loading. Delayed Image Loading takes place when the function installed on the XmNimageProc resource sets the XmIMAGE_DELAYED option bit on the returned XmImageInfo structure. This bit signals XmHTML that the actual image will be provided at a later stage (for example, the image needs to be fetched from a remote location).

> When the image data has become available, the XmHTMLImageReplace function can be used to inform a XmHTML widget that the image is readily available and the delayed image should be replaced with the real image data.

> w
>   Specifies the parent Widget ID, which must be of class xmHTMLWidgetClass.
> *image
>   the image that is to be replaced.
> *new_image
>   the new image data.

### Return Value

> Any of the following values:

    	typedef enum{
    		XmIMAGE_ERROR    /* unknown error occured */
    		XmIMAGE_BAD      /* bad function call: missing arguments */
    		XmIMAGE_UNKNOWN  /* provided XmImageInfo structure unknown/unbound */
    		XmIMAGE_ALMOST   /* action completed, further response necessary */
    		XmIMAGE_OK       /* action completed. */
    	}XmImageStatus;

> A return value of XmIMAGE_ALMOST indicates that a redisplay of the current document is necessary (this value can be returned if the dimensions of the new image differ from the image that it replaced).

### See Also

> XmHTML(3X), XmHTMLImageDefaultProc(3X), XmHTMLImageUpdate(3X), XmHTMLRedisplay(3X), XmImageInfo(3X)

XmHTML, June 4, 1998