diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2023-05-07 16:07:45 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2023-05-07 16:07:45 +0000 |
commit | acba27c4d7e17820e05381e22a1e8bc2a8ae882e (patch) | |
tree | 551053ee6864e9a948d0fa097eedac2af6e48a1d /lib/libXpm/man/XpmCreateXpmImage.man | |
parent | abf9c7bbe7d4b43f44127cd44a98bf106b1bfe4b (diff) |
Update to libXpm 3.5.16
Diffstat (limited to 'lib/libXpm/man/XpmCreateXpmImage.man')
-rw-r--r-- | lib/libXpm/man/XpmCreateXpmImage.man | 122 |
1 files changed, 82 insertions, 40 deletions
diff --git a/lib/libXpm/man/XpmCreateXpmImage.man b/lib/libXpm/man/XpmCreateXpmImage.man index 6be7cd0f2..93147f550 100644 --- a/lib/libXpm/man/XpmCreateXpmImage.man +++ b/lib/libXpm/man/XpmCreateXpmImage.man @@ -26,15 +26,22 @@ .SH NAME XpmCreateXpmImage \- create an Xpm image .SH SYNOPSIS - +.nf .HP -int XpmCreateXpmImageFromData(char **data, XpmImage *image, XpmInfo *info); +.BI "int XpmCreateXpmImageFromData(char **" data ", XpmImage *" image , +.BI "XpmInfo *" info ); .HP -int XpmCreateXpmImageFromBuffer(char *buffer, XpmImage *image, XpmInfo *info); +.BI "int XpmCreateXpmImageFromBuffer(char *" buffer ", XpmImage *" image , +.BI "XpmInfo *" info ); .HP -int XpmCreateXpmImageFromImage(Display *display, XImage *image, XImage *shapeimage, XpmImage *xpmimage, XpmAttributes *attributes); +.BI "int XpmCreateXpmImageFromImage(Display *" display , +.BI "XImage *" image ", XImage *" shapeimage , +.BI "XpmImage *" xpmimage ", XpmAttributes *" attributes ); .HP -int XpmCreateXpmImageFromPixmap(Display *display, Pixmap *pixmap, Pixmap *shapemask, XpmImage *xpmimage, XpmAttributes *attributes); +.BI "int XpmCreateXpmImageFromPixmap(Display *" display , +.BI "Pixmap *" pixmap ", Pixmap *" shapemask , +.BI "XpmImage *" xpmimage ", XpmAttributes *" attributes ); +.fi .SH ARGUMENTS @@ -47,61 +54,96 @@ Specifies the location of an XpmInfo structure to get and store information (or .IP \fIdisplay\fP li Specifies the connection to the X server. .IP \fIimage\fP li -Specifies the image which is created. +Specifies the X image used as the source. .IP \fIshapeimage\fP li -Specifies the shape mask image which is created if any. +Specifies the shape mask image, if any. .IP \fIxpmimage\fP li -Specifies the location of an XpmImage structure. +Specifies the XPM image which is created. .IP \fIattributes\fP li Specifies the location of a structure containing information (or NULL). .SH DESCRIPTION .SS XpmCreateXpmImageFromBuffer -To create an XpmImage from an XPM buffer, use XpmCreateXpmImageFromBuffer. -The XpmCreateXpmImageFromBuffer function reads the given buffer to fill in the given XpmImage structure. -If the buffer does not contain valid XPM data, it returns XpmFileInvalid. -If insufficient working storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on success. -If the passed XpmInfo structure pointer is not NULL, XpmCreateXpmImageFromBuffer looks for the following attributes: -XpmReturnComments and XpmReturnExtensions, and sets possibly the XpmHotspot attribute when returning. +.PP +To create an XpmImage from an XPM buffer, use +.BR XpmCreateXpmImageFromBuffer (). +The +.BR XpmCreateXpmImageFromBuffer () +function reads the given buffer to fill in the given XpmImage structure. +If the buffer does not contain valid XPM data, it returns +.BR XpmFileInvalid . +If insufficient working storage is allocated, it returns +.BR XpmNoMemory . +On success it returns +.BR XpmSuccess . +If the passed XpmInfo structure pointer is not NULL, +.BR XpmCreateXpmImageFromBuffer () +looks for the following attributes: XpmReturnComments and XpmReturnExtensions, +and sets possibly the XpmHotspot attribute when returning. As specified in the table (page 28), if the data related to the attributes XpmReturnComments and XpmReturnExtensions cannot be returned as requested because of insufficient memory storage, -XpmCreateXpmImageFromBuffer will change the valuemask to mention this and will try to continue. +.BR XpmCreateXpmImageFromBuffer () +will change the valuemask to mention this and will try to continue. So the caller should check on this before accessing requested data. - -Note: The valuemask of the passed XpmInfo structure must be set to some valid value, -at least zero, otherwise unpredictable errors can occur. +.PP +Note: The valuemask of the passed XpmInfo structure must be set to some valid +value, at least zero, otherwise unpredictable errors can occur. .SS XpmCreateXpmImageFromData -To create an XpmImage from an XPM data, use XpmCreateXpmImageFromData. -XpmCreateXpmImageFromData fills in the given XpmImage structure from the given data. If the data does not -contain validXPM data, it returns XpmFileInvalid. If insufficient working storage is allocated, it returns -XpmNoMemory, on success it returns XpmSuccess. -If the passed XpmInfo structure pointer is not NULL, XpmCreateXpmImageFromData looks for the following attributes: +.PP +To create an XpmImage from an XPM data, use +.BR XpmCreateXpmImageFromData (). +.BR XpmCreateXpmImageFromData () +fills in the given XpmImage structure from the given data. If the data does not +contain valid XPM data, it returns +.BR XpmFileInvalid . +If insufficient working storage is allocated, it returns +.BR XpmNoMemory . +On success it returns +.BR XpmSuccess. +If the passed XpmInfo structure pointer is not NULL, +.BR XpmCreateXpmImageFromData () +looks for the following attributes: XpmReturnExtensions, and sets possibly the XpmHotspot attribute when returning. As specified in the table (page 28), if the data related to the attribute XpmReturnExtensions cannot be returned as requested because of -insufficient memory storage, XpmCreateXpmImageFromData will change the valuemask to mention this and will -try to continue. +insufficient memory storage, +.BR XpmCreateXpmImageFromData () +will change the valuemask to mention this and will try to continue. So the caller should check on this before accessing requested data. - -Note: The valuemask of the passed XpmInfo structure must be set to some valid value, at least zero, -otherwise unpredictable errors can occur. +.PP +Note: The valuemask of the passed XpmInfo structure must be set to some valid +value, at least zero, otherwise unpredictable errors can occur. .SS XpmCreateXpmImageFromImage -To create an XpmImage from an XImage, use XpmCreateXpmImageFromImage. -From the given X images and XpmAttributes if not NULL, XpmCreateXpmImageFromImage creates an -XpmImage following the same mechanism as XpmWriteFileFromImage. +.PP +To create an XpmImage from an XImage, use +.BR XpmCreateXpmImageFromImage (). +From the given X images and XpmAttributes if not NULL, +.BR XpmCreateXpmImageFromImage () +creates an XpmImage following the same mechanism as +.BR XpmWriteFileFromImage (__libmansuffix__). .SS XpmCreateXpmImageFromPixmap -To create an XpmImage from a Pixmap, use XpmCreateXpmImageFromPixmap. -From the given pixmaps and XpmAttributes if not NULL, XpmCreateXpmImageFromPixmap gets the related XImages -by calling XGetImage, then it gives them to XpmCreateXpmImageFromImage() to create an -XpmImage which is returned to xpmimage. -Finally it destroys the created X images using XDestroyImage. +.PP +To create an XpmImage from a Pixmap, use +.BR XpmCreateXpmImageFromPixmap (). +From the given pixmaps and XpmAttributes if not NULL, +.BR XpmCreateXpmImageFromPixmap () +gets the related XImages by calling XGetImage, then it gives them to +.BR XpmCreateXpmImageFromImage () +to create an XpmImage which is returned to +.IR xpmimage . +Finally it destroys the created X images using +.BR XDestroyImage (__libmansuffix__). .SH "SEE ALSO" -.BR XpmCreateXpmImageFromBuffer(__libmansuffix__) , -.BR XpmCreateXpmImageFromData(__libmansuffix__) , -.BR XpmCreateXpmImageFromImage(__libmansuffix__) , -.BR XpmCreateXpmImageFromPixmap(__libmansuffix__) +.ad l +.nh +.BR XpmFreeXpmImage (__libmansuffix__), +.BR XpmReadFileToBuffer (__libmansuffix__), +.BR XpmReadFileToData (__libmansuffix__), +.BR XpmReadFileToImage (__libmansuffix__), +.BR XpmReadFileToPixmap (__libmansuffix__), +.BR XpmWriteFileFromImage (__libmansuffix__) |