From bfaebfdcc92433a8b78c004de4bb3c5a8a545e75 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 26 Aug 2022 17:49:25 -0700 Subject: man pages: Make file names consistent with their displayed names Lets users view the pages using the name displayed on the pages Signed-off-by: Alan Coopersmith --- man/Makefile.am | 18 ++--- man/XpmCreateBuffer.man | 81 +++++++++++++++++++++++ man/XpmCreateData.man | 80 +++++++++++++++++++++++ man/XpmCreateImage.man | 82 +++++++++++++++++++++++ man/XpmCreatePixmap.man | 79 ++++++++++++++++++++++ man/XpmCreateXpmImage.man | 108 ++++++++++++++++++++++++++++++ man/XpmMisc.man | 108 ++++++++++++++++++++++++++++++ man/XpmRead.man | 163 ++++++++++++++++++++++++++++++++++++++++++++++ man/XpmWrite.man | 128 ++++++++++++++++++++++++++++++++++++ man/xpmcreatebuffer.man | 81 ----------------------- man/xpmcreatedata.man | 80 ----------------------- man/xpmcreateimage.man | 82 ----------------------- man/xpmcreatepixmap.man | 79 ---------------------- man/xpmcreatexpmimage.man | 108 ------------------------------ man/xpmmisc.man | 108 ------------------------------ man/xpmread.man | 163 ---------------------------------------------- man/xpmwrite.man | 128 ------------------------------------ 17 files changed, 838 insertions(+), 838 deletions(-) create mode 100644 man/XpmCreateBuffer.man create mode 100644 man/XpmCreateData.man create mode 100644 man/XpmCreateImage.man create mode 100644 man/XpmCreatePixmap.man create mode 100644 man/XpmCreateXpmImage.man create mode 100644 man/XpmMisc.man create mode 100644 man/XpmRead.man create mode 100644 man/XpmWrite.man delete mode 100644 man/xpmcreatebuffer.man delete mode 100644 man/xpmcreatedata.man delete mode 100644 man/xpmcreateimage.man delete mode 100644 man/xpmcreatepixmap.man delete mode 100644 man/xpmcreatexpmimage.man delete mode 100644 man/xpmmisc.man delete mode 100644 man/xpmread.man delete mode 100644 man/xpmwrite.man (limited to 'man') diff --git a/man/Makefile.am b/man/Makefile.am index 952d911..48fe050 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2022, Oracle and/or its affiliates. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -24,14 +24,14 @@ appmandir = $(APP_MAN_DIR) libmandir = $(LIB_MAN_DIR) libman_PRE=$(all_shadows:=.man) \ - xpmmisc.man \ - xpmcreatepixmap.man \ - xpmwrite.man \ - xpmcreateimage.man \ - xpmcreatebuffer.man \ - xpmread.man \ - xpmcreatedata.man \ - xpmcreatexpmimage.man + XpmCreateBuffer.man \ + XpmCreateData.man \ + XpmCreateImage.man \ + XpmCreatePixmap.man \ + XpmCreateXpmImage.man \ + XpmMisc.man \ + XpmRead.man \ + XpmWrite.man libman_DATA = $(libman_PRE:man=$(LIB_MAN_SUFFIX)) diff --git a/man/XpmCreateBuffer.man b/man/XpmCreateBuffer.man new file mode 100644 index 0000000..56afd67 --- /dev/null +++ b/man/XpmCreateBuffer.man @@ -0,0 +1,81 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmCreateBuffer __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmCreateBuffer \- create an Xpm-Buffer + +.SH SYNOPSIS +.HP +int XpmCreateBufferFromImage( Display *display, char **buffer_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes ); +.HP +int XpmCreateBufferFromPixmap( Display *display, char **buffer_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes ); +.HP +int XpmCreateBufferFromXpmImage( char **buffer_return, XpmImage *image, XpmInfo *info ); + +.SH ARGUMENTS + +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fIbuffer_return\fP li +Returns the buffer which is created. +.IP \fIimage\fP li +Specifies the image. +.IP \fIshapeimage\fP li +Specifies the shape mask image. +.IP \fIattributes\fP li +Specifies the location of a structure containing information (or NULL). +.IP \fIinfo\fP li +Specifies the location of a structure to get possible information (or NULL). + +.SH DESCRIPTION + +.SS XpmCreateBufferFromPixmap +XpmCreateBufferFromPixmap creates an XPM buffer from a Pixmap. +The XpmCreateBufferFromPixmap function works as XpmWriteFileFromPixmap(), it just calls +XpmCreateBufferFromImage instead of XpmWriteFileFromImage. Once again, the caller should free the buffer using +XpmFree when finished. + +As a convenience, the XpmReadFileToBuffer and XpmWriteFileFromBuffer are provided to copy a file to a buffer +and to write a file from a buffer. Thus for instance one may decide to use XpmReadFileToBuffer, +XpmCreatePixmapFromBuffer, and XpmFree instead of XpmReadFileToPixmap. On some systems this may lead to a +performance improvement, since the parsing will be performed in memory, but it uses more memory. + +.SS XpmCreateBufferFromImage +The XpmCreateBufferFromImage works as XpmWriteFileFromImage(), it just writes to a malloc’ed buffer instead of to a file. +The caller should free the buffer using XpmFree when finished. + +.SS XpmCreateBufferFromXpmImage. +To create an XPM buffer from an XpmImage, use XpmCreateBufferFromXpmImage. +The XpmCreateBufferFromXpmImage writes out the givenimage to a single block malloc’ed buffer inXPM format. +If insufficient working storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on success. +If the passed XpmInfo structure pointer is not NULL, XpmCreateBufferFromXpmImage looks for the following +attributes: XpmComments, XpmExtensions, and XpmHotspot, and writes the related information out as well. +The caller should free the buffer using XpmFree when finished. + +.SH "SEE ALSO" +.BR XpmCreateBufferFromImage(__libmansuffix__) , +.BR XpmCreateBufferFromPixmap(__libmansuffix__) , +.BR XpmCreateBufferFromXpmImage(__libmansuffix__) diff --git a/man/XpmCreateData.man b/man/XpmCreateData.man new file mode 100644 index 0000000..384a95d --- /dev/null +++ b/man/XpmCreateData.man @@ -0,0 +1,80 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmCreateData __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmCreateData \- create an Data structure + +.SH SYNOPSIS +.HP +int XpmCreateDataFromImage( Display *display, char ***data_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes ); +.HP +int XpmCreateDataFromPixmap( Display *display, char ***data_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes ); +.HP +int XpmCreateDataFromXpmImage( char ***data_return, XpmImage *image, XpmInfo *info); + +.SH ARGUMENTS + +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fIdata_return\fP li +Returns the data which is created. +.IP \fIpixmap\fP li +Specifies the pixmap. +.IP \fIshapemask\fP li +Specifies the shape mask pixmap. +.IP \fIattributes\fP li +Specifies the location of a structure containing information (or NULL). +.IP \fIinfo\fP li +Specifies the location of a structure to get information. +.IP \fIimage\fP li +Specifies the image + +.SH DESCRIPTION +.SS XpmCreateDataFromImage +In some cases, one may want to create an XPM data from an XImage, to do so use XpmCreateDataFromImage. +The XpmCreateDataFromImage function exactly works asXpmWriteFileFromImage() does and returns the same way. +It just writes to a single block malloc’ed data instead of to a file. +It is the caller’s responsibility to free the data, using XpmFree when finished. + +.SS XpmCreateDataFromPixmap +XpmCreateDataFromPixmap creates an XPM data from a Pixmap. +The XpmCreateDataFromPixmap function uses XGetImage to get from the given pixmaps +the related X images which are passed to XpmCreateDataFromImage. +Then it destroys the created images using XDestroyImage. +XpmCreateDataFromPixmap returns the same errors as XpmCreateDataFromImage. + +.SS XpmCreateDataFromXpmImage +XpmCreateDataFromXpmImage creates an XPM data from an XmImage. +The XpmCreateDataFromXpmImage function writes out the given image to a single block malloc’ed data in XPM format. +If insufficient working storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on success. +If the passed XpmInfo structure pointer is not NULL, XpmCreateDataFromXpmImage looks for the following attributes: +XpmExtensions, and XpmHotspot, and writes the related information out as well. +It is the caller’s responsibility to free the data, using XpmFree when finished. + +.SH "SEE ALSO" +.BR XpmCreateDataFromImage(__libmansuffix__) , +.BR XpmCreateDataFromPixmap(__libmansuffix__) , +.BR XpmCreateDataFromXpmImage(__libmansuffix__) diff --git a/man/XpmCreateImage.man b/man/XpmCreateImage.man new file mode 100644 index 0000000..f614ea7 --- /dev/null +++ b/man/XpmCreateImage.man @@ -0,0 +1,82 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmCreateImage __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmCreateImage \- create an Xpm-image +.SH SYNOPSIS +.HP +int XpmCreateImageFromData( Display *display, char **data, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes ); +.HP +int XpmCreateImageFromBuffer( Display *display, char *buffer, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes ); +.HP +int XpmCreateImageFromXpmImage( Display *display, XpmImage *image, XImage *image_return, XImage *shapeimage_return, XpmAttributes *attributes; + +.SH ARGUMENTS + +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fIdata\fP li +Specifies the location of the data. +.IP \fIimage_return\fP li +Returns the image which is created. +.IP \fIshapeimage_return\fP li +Returns the shape mask image which is created if the color None is used. +.IP \fIattributes\fP li +Specifies the location of a structure to get and store information (or NULL). +.IP \fIshapeimage\fP li +Specifies the shape mask image which is created if any. + +.SH DESCRIPTION + +.SS XpmCreateImageFromData +To create an XImage from an XPM data, use XpmCreateImageFromData. + +The XpmCreateImageFromData function allows you to include in your C program an XPM file which was +written out by functions such as XpmWriteFileFromImage or XpmWriteFileFromPixmap without reading in the file. +XpmCreateImageFromData exactly works as XpmReadFileToImage() does and returns the same way. +It just reads data instead of a file. +Here again, it is the caller’s responsibeility to free the returned images, the colors +and possibly the data returned into the XpmAttributes structure. + +.SS XpmCreateImageFromBuffer +To create an XImage from an XPM buffer, use XpmCreateImageFromBuffer. +The XpmCreateImageFromBuffer works the same way as XpmReadFileToImage(), +it just parses the buffer instead of the file. +Be aware that the feature provided on some systems by XpmReadFileToImage +to deal with compressed files is not available here. + +.SS XpmCreateImageFromXpmImage +To create an XImage from an XpmImage, use XpmCreateImageFromXpmImage. +From the given XpmImage and XpmAttributes if not NULL, XpmCreateImageFromXpmImage allocates colors +and creates X images following the same mechanism as XpmReadFileToImage(). +When finished the caller must free the images using XDestroyImage, +the colors using XFreeColors, and possibly the +data returned into the XpmAttributes using XpmFreeAttributes(). + +.SH "SEE ALSO" +.BR XpmCreateImageFromBuffer(__libmansuffix__) , +.BR XpmCreateImageFromData(__libmansuffix__) , +.BR XpmCreateImageFromXpmImage(__libmansuffix__) diff --git a/man/XpmCreatePixmap.man b/man/XpmCreatePixmap.man new file mode 100644 index 0000000..80dded1 --- /dev/null +++ b/man/XpmCreatePixmap.man @@ -0,0 +1,79 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmCreatePixmap __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmCreatePixmap \- create a pixmap +.SH SYNOPSIS +.HP +int XpmCreatePixmapFromData( Display *display, Drawable d, char **data, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes ); +.HP +int XpmCreatePixmapFromBuffer( Display *display, Drawable d, char *buffer, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes; +.HP +int XpmCreatePixmapFromXpmImage( Display *display, Drawable d, XpmImage *image, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes; + +.SH ARGUMENTS + +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fId\fP li +Specifies which screen the pixmap is created on. +.IP \fIbuffer\fP li +Specifies the location of the buffer. +.IP \fIpixmap_return\fP li +Returns the pixmap which is created if the color None. +.IP \fIshapemask_return\fP li +Returns the shape mask pixmap which is created if the color None is used. +.IP \fIattributes\fP li +Specifies the location of a structure to get and store information. +.IP \fIimage\fP li +Specifies the XpmImage. + +.SH DESCRIPTION +.SS XpmCreatePixmapFromData +To create a Pixmap from an XPM data, use XpmCreatePixmapFromData. +The XpmCreatePixmapFromData function creates X images using XpmCreateImageFromData() and +thus returns the same errors. In addition on success it then creates the related pixmaps, using XPutImage, +which are returned to pixmap_return and shapemask_return if not NULL, and finally destroys the created images using XDestroyImage. +Do not forget to free the returned pixmaps, the colors, and possibly the data returned into the XpmAttributes structure when done. + +.SS XpmCreatePixmapFromBuffer +To create a Pixmap from an XPM buffer, use XpmCreatePixmapFromBuffer. +The XpmCreatePixmapFromBuffer function works the same way as XpmReadFileToPixmap (), +it just calls XpmCreateImageFromBuffer instead of XpmReadFileToImage. + +.SS XpmCreatePixmapFromXpmImage +XpmCreatePixmapFromXpmImage creates X images calling XpmCreateImageFromXpmImage () with +the given XpmImage and XpmAttributes, then it creates the related pixmaps which are returned topixmap_return +and shapemask_return using XPutImage. +Finally it destroys the X images with XDestroyImage. +When finished the caller must free the pixmaps using XFreePixmap, the colors using XFreeColors or the application +equivalent function when the standard Xlib functions are not used, and possibly the data returned into the +XpmAttributes using XpmFreeAttributes. + +.SH "SEE ALSO" +.BR XpmCreatePixmapFromBuffer(__libmansuffix__) , +.BR XpmCreatePixmapFromData(__libmansuffix__) , +.BR XpmCreatePixmapFromXpmImage(__libmansuffix__) diff --git a/man/XpmCreateXpmImage.man b/man/XpmCreateXpmImage.man new file mode 100644 index 0000000..cd810fe --- /dev/null +++ b/man/XpmCreateXpmImage.man @@ -0,0 +1,108 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmCreateXpmImage __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmCreateXpmImage \- create an Xpm image +.SH SYNOPSIS + +.HP +int XpmCreateXpmImageFromData( char **data, XpmImage *image, XpmInfo*info ); +.HP +int XpmCreateXpmImageFromBuffer( char *buffer, XpmImage *image, XpmInfo *info ); +.HP +int XpmCreateXpmImageFromImage( Display *display, XImage *image, XImage *shapeimage, XpmImage *xpmimage, XpmAttributes *attributes; +.HP +int XpmCreateXpmImageFromPixmap( Display *display, Pixmap *pixmap, Pixmap *shapemask, XpmImage *xpmimage, XpmAttributes *attributes ); + +.SH ARGUMENTS + +.IP \fIdata\fP li +Specifies the location of the data. +.IP \fIimage\fP li +Specifies the image structure location. +.IP \fIinfo\fP li +Specifies the location of an XpmInfo structure to get and store information (or NULL). +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fIimage\fP li +Specifies the image which is created. +.IP \fIshapeimage\fP li +Specifies the shape mask image which is created if any. +.IP \fIxpmimage\fP li +Specifies the location of an XpmImage structure. +.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 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. +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. +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. + +.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 returnsXpmFileInvalid. 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: +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. +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. + +.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. + +.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. + + +.SH "SEE ALSO" +.BR XpmCreateXpmImageFromBuffer(__libmansuffix__) , +.BR XpmCreateXpmImageFromData(__libmansuffix__) , +.BR XpmCreateXpmImageFromImage(__libmansuffix__) , +.BR XpmCreateXpmImageFromPixmap(__libmansuffix__) diff --git a/man/XpmMisc.man b/man/XpmMisc.man new file mode 100644 index 0000000..9d66feb --- /dev/null +++ b/man/XpmMisc.man @@ -0,0 +1,108 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmMisc __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmMisc \- xpm misc functions to free used memory and handle errors +.SH SYNOPSIS + +.HP +int XpmFreeXpmImage( XpmImage *image ); +.HP +int XpmFreeXpmInfo( XpmInfo *info ); +.HP +int XpmFreeAttributes( XpmAttributes *attributes ); +.HP +int XpmAttributesSize() +.HP +int XpmFreeExtensions( XpmExtension *extensions, int nextensions ); +.HP +int XpmFree( char *ptr ); +.HP +char *XpmGetErrorString( int errorcode ); +.HP +int XpmLibraryVersion() + +.SH ARGUMENTS + +.IP \fIimage\fP li +Specifies the structure to free +.IP \fIinfo\fP li +Specifies the structure to free +.IP \fIptr\fP li +Specifies the data to free +.IP \fIerrorcode\fP li +Specifies the XPM error +.IP \fIextensions\fP li +Specifies the array to free +.IP \fInextensions\fP li +Specifies the number of extensions +.IP \fIattributes\fP li +Specifies the structure to free + +.SH DESCRIPTION + +To free possible data stored into an XpmImage structure use XpmFreeXpmImage. +The XpmFreeXpmImagefrees the structure members which are not NULL, but not the structure itself. +To free possible data stored into an XpmInfo structure use XpmFreeXpmInfo. + +To free data possibly stored into an array of XpmExtension use XpmFreeExtensions. + +To free any data allocated by an XPM function use the XpmFree function. +The current distribution of the XPM library uses the standard memory allocation functions and thus +XpmFree is nothing else than a define to the standard free. +However since these functions may be redefined in specific environments it is wise to use XpmFree. + +To free possible data stored into an XpmAttributes structure use XpmFreeAtatributes. +The XpmFreeAttributes frees the structure members which have been malloc’ed such as the pixels list. + +To dynamically allocate an XpmAttributes structure use the XpmAttributesSize function. +The XpmAttributesSize function provides application using dynamic libraries with a safe way to allocate and then +refer to an XpmAttributesstructure, disregarding whether the XpmAttributes structure size has changed or not since +compiled. +To get data when building an error message, one can use XpmGetErrorString. +XpmGetErrorString returns a string related to the given XPM error code. + +The XpmLibraryVersion can be used when one needs to figure out which version of the library is in use. +The value returned by XpmLibraryVersion can be compared to the value of XpmIncludeVersion which is defined +in the header file "xpm.h". These numbers are computed with the following formula: +.nf + (XpmFormat * 100 + XpmVersion) * 100 + XpmRevision +.fi +Where XpmFormat is the version number of the format, XpmVersion is the library version number (which changes +only if the API changes), and XpmRevision is the library minor version number. + +The XpmFreeExtensions function frees all data stored in every extension and the array itself. +Note that XpmFreeAttributes call this function and thus most of the time it should not need to be explicitly called. + +.SH "SEE ALSO" +.BR XpmLibraryVersion(__libmansuffix__) , +.BR XpmGetErrorString(__libmansuffix__) , +.BR XpmFree(__libmansuffix__) , +.BR XpmFreeExtensions(__libmansuffix__) , +.BR XpmAttributesSize(__libmansuffix__) , +.BR XpmFreeAttributes(__libmansuffix__) , +.BR XpmFreeXpmImage(__libmansuffix__) , +.BR XpmFreeXpmInfo(__libmansuffix__) diff --git a/man/XpmRead.man b/man/XpmRead.man new file mode 100644 index 0000000..8b264d2 --- /dev/null +++ b/man/XpmRead.man @@ -0,0 +1,163 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmRead __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmRead \- read an XPM file + +.SH SYNOPSIS +.HP +int XpmReadFileToImage( Display *display, char *filename, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes ); +.HP +int XpmReadFileToPixmap( Display *display, Drawable d, char *filename, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes ); +.HP +int XpmReadFileToXpmImage( char *filename, XpmImage *image, XpmInfo *info ); +.HP +int XpmReadFileToBuffer( char *filename, char **buffer_return ); +.HP +int XpmReadFileToData( char *filename, char ***data_return ); + +.SH ARGUMENTS +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fIfilename\fP li +Specifies the file name to use. +.IP \fIimage_return\fP li +Returns the image which is created. +.IP \fIshapeimage_return\fP li +Returns the shape mask image which is created if the color None is used. +.IP \fIattributes\fP li +Specifies the location of a structure to get and store information (or NULL). +.IP \fIbuffer_return\fP li +Returns the buffer created. +.IP \fIdata_return\fP li +Returns the data array created. +.IP \fIimage\fP li +Specifies the image structure location. +.IP \fIinfo\fP li +Specifies the location of a structure to store possible information (or NULL). + +.SH DESCRIPTION +.SS XpmReadFileToImage +The XpmReadFileToImage function reads in a file in the XPM format. +If the file cannot be opened it returns XpmOpenFailed. +If the file can be opened but does not contain valid XPM data, it returns XpmFileInvalid. +If insufficient working storage is allocated, it returns XpmNoMemory. +If the passedXpmAttributes structure pointer is not NULL, XpmReadFileToImage looks for the following attributes: +XpmVisual, XpmColormap, XpmDepth, XpmColorSymbols, XpmExactColors, XpmCloseness, +XpmRGBCloseness, XpmAllocCloseColors ,XpmReturnPixels, XpmReturnAllocPixels, XpmAllocColor, +XpmFreeColors, XpmColorClosure, XpmReturnExtensions, XpmReturnColorTable, XpmBitmapFormat, +sets the XpmSize, the XpmCharsPerPixel, and possibly the XpmHotspot attributes when returning. +As a backward compatibility feature, XpmReadFileToImage also looks for the XpmReturnInfos attributes. +As specified in the table (page 12), if the data related to the attributes XpmReturnExtensions, +XpmReturnColorTable, and XpmReturnInfos cannot be returned as requested because of insufficient +memory storage, XpmReadFileToImage will change the valuemask to +mention this and will try to continue. +So the caller should check on this before accessing this data. + +Note: The valuemask of the passed XpmAttributes must be set to some valid value, at least zero, otherwise +unpredictable errors can occur. +XpmReadFileToImage allocates colors, as read from the file or possibly overridden as specified in the +XpmColorSymbols attributes. +The colors are allocated using the color settings for the visual specified by the XpmColorKey +attribute, which has the value XPM_MONO, XPM_GRAY4, XPM_GRAY,or XPM_COLOR. +If the XpmColor-Key attribute is not set it is determined by examining the type of visual. +If no default value exists for the specified visual, it first looks for other defaults nearer to the monochrome visual type +and secondly nearer to the color visual type. +If the color which is found is not valid (cannot be parsed), it looks for +another default one according to the same algorithm. +If allocating a color fails, and the closeness attribute is set, it tries to find a color already in the colormap that is closest +to the desired color, and uses that. +If the alloc_close_colors attribute is set to False, the found close color is not allocated but it is used anyway. +This is especially useful for applications which use a private colormap containing read/write cells and have +complete control over the colormap. +On the other hand, since in such a case there is no guarantee that the color pixel will not change any time, +this should be avoided when using the default colormap. +If no color can be found that is within closeness of the Red, Green and Blue components of the desired color, +it reverts to trying other default values as explained above. +For finer control over the closeness requirements of a particular icon, +the red_closeness, green_closeness, and blue_closeness attributes may be used instead of the more general +closeness attribute. + +The RGB components are integers within the range 0 (black) to 65535 (white). A closeness of less than 10000, +for example, will cause only quite close colors to be matched, while a closeness of more than 50000 will +allow quite dissimilar colors to match. +Specifying a closeness of more than 65535 will allow any color to match, thus forcing the icon +to be drawn in color no matter how bad the colormap is. +The value 40000 seems to be about right for many situations +requiring reasonable but not perfect matches. With this setting the color must only be within the same general area of +the RGB cube as the desired color. +If the exactColors attribute is set it then returns XpmColorError, otherwise it creates the images and returns XpmSuccess. +If no color is found, and no close color exists or is wanted, and all visuals have been exhausted, +XpmColorFailed is returned. + +XpmReadFileToImage returns the created image to image_return if not NULL and possibly the +created shapemask to shapeimage_return if not NULL and the color None is used. +If required it stores into the XpmAttributes structure the list of the used pixels. +When the image depth is one, the image format is either as specified by the bitmap_format attribute if set or ZPixmap. +When the depth is different from one the imagae format is always ZPixmap. +When finished the caller must free the images using XDestroyImage, the allocated colors using +XFreeColors or the application equivalent function when the standard Xlib functions are not used, +and possibly the data returned into the XpmAttributes using XpmFreeAttributes (page 25). +In addition, on systems which support such features XpmReadFileToImage deals with compressed files by forking +an uncompress orgzip process and reading from the piped result. It assumes that the specified file is +compressed if the given file name ends by ’.Z’ or ’.gz’. +In case the file name does not end so, XpmReadFileToImage looks for the given file name assuming it is not a compressed file. +And if instead of a file name NULL is passed to XpmReadFile ToImage, it reads from the standard input. + +.SS XpmReadFileToPixmap +The XpmReadFileToPixmap function creates X images using XpmReadFileToImage and thus returns the same errors. +In addition on success it then creates the related pixmaps, using XPutImage, +which are returned to pixmap_return and shapemask_return if not NULL, and finally destroys the created images using XDestroyImage. +When finished the caller must free the pixmaps using XFreePixmap, the allocated colors using XFreeColors or the +application equivalent function when the standard Xlib functions are not used, and possibly the data returned into the +XpmAttributes using XpmFreeAttributes. + +.SS XpmReadFileToBuffer +XpmReadFileToBuffer allocates and fills a buffer from a file. +XpmReadFileToBuffer returns XpmOpenFailed if it cannot open the file, returns XpmNoMemory if insufficient +working storage is allocated, andXpmSuccess otherwise. The allocated buffer returned by XpmReadFileToBuffer +should be freed with XpmFree when done. + +.SS XpmReadFileToData +XpmReadFileToData returns XpmOpenFailed if it cannot open the file, +XpmNoMemory if insufficient working storage is allocated, +XpmFileInvalid if this is not a validXPM file, and XpmSuccess otherwise. +The allocated data returned by XpmReadFileToData should be freed with XpmFree when done. + +.SS XpmReadFileToXpmImage +The XpmReadFileToXpmImage function reads in a file in the XPM format. +If the file cannot be opened it returns XpmOpenFailed. +If the file can be opened but does not contain valid XPMdata, +it returns XpmFileInvalid. +If insufficient working storage is allocated, it returnsXpmNoMemory. +On success it fills in the given XpmImage structure and returns XpmSuccess. + +.SH "SEE ALSO" +.BR XpmReadFileToImage(__libmansuffix__) , +.BR XpmReadFileToPixmap(__libmansuffix__) , +.BR XpmReadFileToBuffer(__libmansuffix__) , +.BR XpmReadFileToData(__libmansuffix__) +.BR XpmReadFileToXpmImage(__libmansuffix__) diff --git a/man/XpmWrite.man b/man/XpmWrite.man new file mode 100644 index 0000000..b840e97 --- /dev/null +++ b/man/XpmWrite.man @@ -0,0 +1,128 @@ +.\" Copyright (c) 2019 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software furnished to do so, subject to +.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealing in this Software without prior written authorization +.\" from the X Consortium. +.\" +.hw XImage +.TH XpmWrite __libmansuffix__ __xorgversion__ "libXpm functions" +.SH NAME +XpmWrite \- write an XPM file + +.SH SYNOPSIS +.HP +int XpmWriteFileFromPixmap( Display *display, char *filename, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes ); +.HP +int XpmWriteFileFromImage( Display *display, char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes ); +.HP +int XpmWriteFileFromData( char *filename, char **data ); +.HP +int XpmWriteFileFromXpmImage( char *filename, XpmImage *image, XImage *shapeimage, XpmInfo *info ); +.HP +int XpmWriteFileFromBuffer( char *filename, char *buffer ); + +.SH ARGUMENTS + +.IP \fIdisplay\fP li +Specifies the connection to the X server. +.IP \fIfilename\fP li +Specifies the file name to use. +.IP \fIpixmap\fP li +Specifies the pixmap. +.IP \fIshapemask\fP li +Specifies the shape mask pixmap. +.IP \fIattributes\fP li +Specifies the location of a structure containing information (or NULL). +.IP \fIdata\fP li +Specifies the data array to read. +.IP \fIimage\fP li +Specifies the image. +.IP \fIinfo\fP li +Specifies the location of a structure to get information from (or NULL). +.IP \fIbuffer\fP li +Specifies the buffer to read. + +.SH DESCRIPTION +.SS XpmWriteFileFromImage + +The XpmWriteFileFromImage function writes an image and its possible shapeimage out to a file in the XPM format. +If the file cannot be opened, it returnsXpmOpenFailed. +If insufficient working storage is allocated, it returns XpmNoMemory. +If no error occurs then it returns XpmSuccess. +If the passed XpmAttributes structure pointer is not NULL, +XpmWriteFileFromImage looks for the following attributes: +XpmColormap, XpmHotspot, XpmCharsPerPixel, XpmRgbFilename, and XpmExtensions. +As a backward compatibility feature, XpmWriteFileFromImage also looks for the XpmInfos attributes. +If the filename contains an extension such as “.xpm”, in order to get a valid C variable name, the dot character is +replaced by an underscore ’_’ when writing out. +As a backward compatibility feature, if the XpmInfos attributes are defined it writes out possible stored +information such as comments, color defaults and symbol. +Finally, if the XpmRgbFilenameattribute is defined, XpmWriteFileFromImage searches for color names in +this file and if found writes them out instead of the rgb values. + +In addition on systems which support such features if the given file name ends by ’.Z’ or ’.gz’ +it is assumed to be a compressed file. Then,XpmWriteFileFromImage writes to a pipedcompress or gzip process. +And if instead of a file name NULL is passed to XpmWriteFileFromImage, it writes to the standard output. + +.SS XpmWriteFileFromPixmap +To write out a Pixmap to an XPM file, use XpmWriteFileFromPixmap. + +If the passed XpmAttributes structure pointer is not NULL, +XpmWriteFileFromPixmap looks for the following attributes: XpmSize. +If they are not defined it performs an XGetGeometry operation. +Then it uses XGetImage to get from the given pixmaps the related X images which are passed to XpmWriteFileFromImage. +Finally XpmWriteFileFromPixmap destroys the created images using XDestroyImage. +The XpmWriteFileFromPixmap function returns the same errors as XpmWriteFileFromImage. + +.SS XpmWriteFileFromData +XpmWriteFileFromData writes an XPM data array to an XPM file. + +XpmWriteFileToData returns XpmOpenFailed if it cannot open the file, +XpmFileInvalid if this is not a valid XPM data, and XpmSuccess otherwise. + +.SS XpmWriteFileFromXpmImage +To write out an XpmImage to an XPM file, use XpmWriteFileFromXpmImage. +The XpmWriteFileFromXpmImage function writes an image out to a file in the XPM format. +If the file cannot be opened, it returns XpmOpenFailed. +If insufficient working storage is allocated, it returns XpmNoMemory. +If no error occurs then it returns XpmSuccess. +If the passed XpmInfo structure pointer is not NULL, XpmWriteFileFromXpmImage looks for the following attributes: +XpmComments, XpmExtensions, and XpmHotspot, and writes the related information out as well. +In addition on systems which support such features if the given file name ends by ’.Z’ or ’.gz’ it is assumed to be a +compressed file. Then, XpmWriteFileFromXpmImage writes to a piped compress or gzip process. And if instead +of a file name NULL is passed to XpmWriteFileFromXpmImage, it writes to the standard output. + +.SS XpmWriteFileFromBuffer +XpmWriteFileFromBuffer writes a XPM-buffer to a file. +XpmWriteFileFromBuffer returns XpmOpenFailed if it cannot open the file, and XpmSuccess otherwise. + +As a convenience, the XpmReadFileToBuffer and XpmWriteFileFromBuffer are provided to copy a +file to a buffer and to write a file from a buffer. +Thus for instance one may decide to use XpmReadFileToBuffer, XpmCreatePixmapFromBuffer, and XpmFree +instead of XpmReadFileToPixmap. On some systems this may lead to a performance improvement, +since the parsing will be performed in memory, but it uses more memory. + +.SH "SEE ALSO" +.BR XpmWriteFileFromData(__libmansuffix__) , +.BR XpmWriteFileFromPixmap(__libmansuffix__) , +.BR XpmWriteFileFromImage(__libmansuffix__) , +.BR XpmWriteFileFromXpmImage(__libmansuffix__) , +.BR XpmWriteFileFromBuffer(__libmansuffix__) diff --git a/man/xpmcreatebuffer.man b/man/xpmcreatebuffer.man deleted file mode 100644 index 56afd67..0000000 --- a/man/xpmcreatebuffer.man +++ /dev/null @@ -1,81 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmCreateBuffer __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmCreateBuffer \- create an Xpm-Buffer - -.SH SYNOPSIS -.HP -int XpmCreateBufferFromImage( Display *display, char **buffer_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes ); -.HP -int XpmCreateBufferFromPixmap( Display *display, char **buffer_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes ); -.HP -int XpmCreateBufferFromXpmImage( char **buffer_return, XpmImage *image, XpmInfo *info ); - -.SH ARGUMENTS - -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fIbuffer_return\fP li -Returns the buffer which is created. -.IP \fIimage\fP li -Specifies the image. -.IP \fIshapeimage\fP li -Specifies the shape mask image. -.IP \fIattributes\fP li -Specifies the location of a structure containing information (or NULL). -.IP \fIinfo\fP li -Specifies the location of a structure to get possible information (or NULL). - -.SH DESCRIPTION - -.SS XpmCreateBufferFromPixmap -XpmCreateBufferFromPixmap creates an XPM buffer from a Pixmap. -The XpmCreateBufferFromPixmap function works as XpmWriteFileFromPixmap(), it just calls -XpmCreateBufferFromImage instead of XpmWriteFileFromImage. Once again, the caller should free the buffer using -XpmFree when finished. - -As a convenience, the XpmReadFileToBuffer and XpmWriteFileFromBuffer are provided to copy a file to a buffer -and to write a file from a buffer. Thus for instance one may decide to use XpmReadFileToBuffer, -XpmCreatePixmapFromBuffer, and XpmFree instead of XpmReadFileToPixmap. On some systems this may lead to a -performance improvement, since the parsing will be performed in memory, but it uses more memory. - -.SS XpmCreateBufferFromImage -The XpmCreateBufferFromImage works as XpmWriteFileFromImage(), it just writes to a malloc’ed buffer instead of to a file. -The caller should free the buffer using XpmFree when finished. - -.SS XpmCreateBufferFromXpmImage. -To create an XPM buffer from an XpmImage, use XpmCreateBufferFromXpmImage. -The XpmCreateBufferFromXpmImage writes out the givenimage to a single block malloc’ed buffer inXPM format. -If insufficient working storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on success. -If the passed XpmInfo structure pointer is not NULL, XpmCreateBufferFromXpmImage looks for the following -attributes: XpmComments, XpmExtensions, and XpmHotspot, and writes the related information out as well. -The caller should free the buffer using XpmFree when finished. - -.SH "SEE ALSO" -.BR XpmCreateBufferFromImage(__libmansuffix__) , -.BR XpmCreateBufferFromPixmap(__libmansuffix__) , -.BR XpmCreateBufferFromXpmImage(__libmansuffix__) diff --git a/man/xpmcreatedata.man b/man/xpmcreatedata.man deleted file mode 100644 index 384a95d..0000000 --- a/man/xpmcreatedata.man +++ /dev/null @@ -1,80 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmCreateData __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmCreateData \- create an Data structure - -.SH SYNOPSIS -.HP -int XpmCreateDataFromImage( Display *display, char ***data_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes ); -.HP -int XpmCreateDataFromPixmap( Display *display, char ***data_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes ); -.HP -int XpmCreateDataFromXpmImage( char ***data_return, XpmImage *image, XpmInfo *info); - -.SH ARGUMENTS - -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fIdata_return\fP li -Returns the data which is created. -.IP \fIpixmap\fP li -Specifies the pixmap. -.IP \fIshapemask\fP li -Specifies the shape mask pixmap. -.IP \fIattributes\fP li -Specifies the location of a structure containing information (or NULL). -.IP \fIinfo\fP li -Specifies the location of a structure to get information. -.IP \fIimage\fP li -Specifies the image - -.SH DESCRIPTION -.SS XpmCreateDataFromImage -In some cases, one may want to create an XPM data from an XImage, to do so use XpmCreateDataFromImage. -The XpmCreateDataFromImage function exactly works asXpmWriteFileFromImage() does and returns the same way. -It just writes to a single block malloc’ed data instead of to a file. -It is the caller’s responsibility to free the data, using XpmFree when finished. - -.SS XpmCreateDataFromPixmap -XpmCreateDataFromPixmap creates an XPM data from a Pixmap. -The XpmCreateDataFromPixmap function uses XGetImage to get from the given pixmaps -the related X images which are passed to XpmCreateDataFromImage. -Then it destroys the created images using XDestroyImage. -XpmCreateDataFromPixmap returns the same errors as XpmCreateDataFromImage. - -.SS XpmCreateDataFromXpmImage -XpmCreateDataFromXpmImage creates an XPM data from an XmImage. -The XpmCreateDataFromXpmImage function writes out the given image to a single block malloc’ed data in XPM format. -If insufficient working storage is allocated, it returns XpmNoMemory, and returns XpmSuccess on success. -If the passed XpmInfo structure pointer is not NULL, XpmCreateDataFromXpmImage looks for the following attributes: -XpmExtensions, and XpmHotspot, and writes the related information out as well. -It is the caller’s responsibility to free the data, using XpmFree when finished. - -.SH "SEE ALSO" -.BR XpmCreateDataFromImage(__libmansuffix__) , -.BR XpmCreateDataFromPixmap(__libmansuffix__) , -.BR XpmCreateDataFromXpmImage(__libmansuffix__) diff --git a/man/xpmcreateimage.man b/man/xpmcreateimage.man deleted file mode 100644 index f614ea7..0000000 --- a/man/xpmcreateimage.man +++ /dev/null @@ -1,82 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmCreateImage __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmCreateImage \- create an Xpm-image -.SH SYNOPSIS -.HP -int XpmCreateImageFromData( Display *display, char **data, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes ); -.HP -int XpmCreateImageFromBuffer( Display *display, char *buffer, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes ); -.HP -int XpmCreateImageFromXpmImage( Display *display, XpmImage *image, XImage *image_return, XImage *shapeimage_return, XpmAttributes *attributes; - -.SH ARGUMENTS - -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fIdata\fP li -Specifies the location of the data. -.IP \fIimage_return\fP li -Returns the image which is created. -.IP \fIshapeimage_return\fP li -Returns the shape mask image which is created if the color None is used. -.IP \fIattributes\fP li -Specifies the location of a structure to get and store information (or NULL). -.IP \fIshapeimage\fP li -Specifies the shape mask image which is created if any. - -.SH DESCRIPTION - -.SS XpmCreateImageFromData -To create an XImage from an XPM data, use XpmCreateImageFromData. - -The XpmCreateImageFromData function allows you to include in your C program an XPM file which was -written out by functions such as XpmWriteFileFromImage or XpmWriteFileFromPixmap without reading in the file. -XpmCreateImageFromData exactly works as XpmReadFileToImage() does and returns the same way. -It just reads data instead of a file. -Here again, it is the caller’s responsibeility to free the returned images, the colors -and possibly the data returned into the XpmAttributes structure. - -.SS XpmCreateImageFromBuffer -To create an XImage from an XPM buffer, use XpmCreateImageFromBuffer. -The XpmCreateImageFromBuffer works the same way as XpmReadFileToImage(), -it just parses the buffer instead of the file. -Be aware that the feature provided on some systems by XpmReadFileToImage -to deal with compressed files is not available here. - -.SS XpmCreateImageFromXpmImage -To create an XImage from an XpmImage, use XpmCreateImageFromXpmImage. -From the given XpmImage and XpmAttributes if not NULL, XpmCreateImageFromXpmImage allocates colors -and creates X images following the same mechanism as XpmReadFileToImage(). -When finished the caller must free the images using XDestroyImage, -the colors using XFreeColors, and possibly the -data returned into the XpmAttributes using XpmFreeAttributes(). - -.SH "SEE ALSO" -.BR XpmCreateImageFromBuffer(__libmansuffix__) , -.BR XpmCreateImageFromData(__libmansuffix__) , -.BR XpmCreateImageFromXpmImage(__libmansuffix__) diff --git a/man/xpmcreatepixmap.man b/man/xpmcreatepixmap.man deleted file mode 100644 index 80dded1..0000000 --- a/man/xpmcreatepixmap.man +++ /dev/null @@ -1,79 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmCreatePixmap __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmCreatePixmap \- create a pixmap -.SH SYNOPSIS -.HP -int XpmCreatePixmapFromData( Display *display, Drawable d, char **data, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes ); -.HP -int XpmCreatePixmapFromBuffer( Display *display, Drawable d, char *buffer, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes; -.HP -int XpmCreatePixmapFromXpmImage( Display *display, Drawable d, XpmImage *image, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes; - -.SH ARGUMENTS - -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fId\fP li -Specifies which screen the pixmap is created on. -.IP \fIbuffer\fP li -Specifies the location of the buffer. -.IP \fIpixmap_return\fP li -Returns the pixmap which is created if the color None. -.IP \fIshapemask_return\fP li -Returns the shape mask pixmap which is created if the color None is used. -.IP \fIattributes\fP li -Specifies the location of a structure to get and store information. -.IP \fIimage\fP li -Specifies the XpmImage. - -.SH DESCRIPTION -.SS XpmCreatePixmapFromData -To create a Pixmap from an XPM data, use XpmCreatePixmapFromData. -The XpmCreatePixmapFromData function creates X images using XpmCreateImageFromData() and -thus returns the same errors. In addition on success it then creates the related pixmaps, using XPutImage, -which are returned to pixmap_return and shapemask_return if not NULL, and finally destroys the created images using XDestroyImage. -Do not forget to free the returned pixmaps, the colors, and possibly the data returned into the XpmAttributes structure when done. - -.SS XpmCreatePixmapFromBuffer -To create a Pixmap from an XPM buffer, use XpmCreatePixmapFromBuffer. -The XpmCreatePixmapFromBuffer function works the same way as XpmReadFileToPixmap (), -it just calls XpmCreateImageFromBuffer instead of XpmReadFileToImage. - -.SS XpmCreatePixmapFromXpmImage -XpmCreatePixmapFromXpmImage creates X images calling XpmCreateImageFromXpmImage () with -the given XpmImage and XpmAttributes, then it creates the related pixmaps which are returned topixmap_return -and shapemask_return using XPutImage. -Finally it destroys the X images with XDestroyImage. -When finished the caller must free the pixmaps using XFreePixmap, the colors using XFreeColors or the application -equivalent function when the standard Xlib functions are not used, and possibly the data returned into the -XpmAttributes using XpmFreeAttributes. - -.SH "SEE ALSO" -.BR XpmCreatePixmapFromBuffer(__libmansuffix__) , -.BR XpmCreatePixmapFromData(__libmansuffix__) , -.BR XpmCreatePixmapFromXpmImage(__libmansuffix__) diff --git a/man/xpmcreatexpmimage.man b/man/xpmcreatexpmimage.man deleted file mode 100644 index cd810fe..0000000 --- a/man/xpmcreatexpmimage.man +++ /dev/null @@ -1,108 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmCreateXpmImage __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmCreateXpmImage \- create an Xpm image -.SH SYNOPSIS - -.HP -int XpmCreateXpmImageFromData( char **data, XpmImage *image, XpmInfo*info ); -.HP -int XpmCreateXpmImageFromBuffer( char *buffer, XpmImage *image, XpmInfo *info ); -.HP -int XpmCreateXpmImageFromImage( Display *display, XImage *image, XImage *shapeimage, XpmImage *xpmimage, XpmAttributes *attributes; -.HP -int XpmCreateXpmImageFromPixmap( Display *display, Pixmap *pixmap, Pixmap *shapemask, XpmImage *xpmimage, XpmAttributes *attributes ); - -.SH ARGUMENTS - -.IP \fIdata\fP li -Specifies the location of the data. -.IP \fIimage\fP li -Specifies the image structure location. -.IP \fIinfo\fP li -Specifies the location of an XpmInfo structure to get and store information (or NULL). -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fIimage\fP li -Specifies the image which is created. -.IP \fIshapeimage\fP li -Specifies the shape mask image which is created if any. -.IP \fIxpmimage\fP li -Specifies the location of an XpmImage structure. -.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 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. -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. -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. - -.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 returnsXpmFileInvalid. 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: -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. -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. - -.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. - -.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. - - -.SH "SEE ALSO" -.BR XpmCreateXpmImageFromBuffer(__libmansuffix__) , -.BR XpmCreateXpmImageFromData(__libmansuffix__) , -.BR XpmCreateXpmImageFromImage(__libmansuffix__) , -.BR XpmCreateXpmImageFromPixmap(__libmansuffix__) diff --git a/man/xpmmisc.man b/man/xpmmisc.man deleted file mode 100644 index a5444d1..0000000 --- a/man/xpmmisc.man +++ /dev/null @@ -1,108 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH xpmmisc __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -Xpmmisc \- xpm misc functions to free used memory and handle errors -.SH SYNOPSIS - -.HP -int XpmFreeXpmImage( XpmImage *image ); -.HP -int XpmFreeXpmInfo( XpmInfo *info ); -.HP -int XpmFreeAttributes( XpmAttributes *attributes ); -.HP -int XpmAttributesSize() -.HP -int XpmFreeExtensions( XpmExtension *extensions, int nextensions ); -.HP -int XpmFree( char *ptr ); -.HP -char *XpmGetErrorString( int errorcode ); -.HP -int XpmLibraryVersion() - -.SH ARGUMENTS - -.IP \fIimage\fP li -Specifies the structure to free -.IP \fIinfo\fP li -Specifies the structure to free -.IP \fIptr\fP li -Specifies the data to free -.IP \fIerrorcode\fP li -Specifies the XPM error -.IP \fIextensions\fP li -Specifies the array to free -.IP \fInextensions\fP li -Specifies the number of extensions -.IP \fIattributes\fP li -Specifies the structure to free - -.SH DESCRIPTION - -To free possible data stored into an XpmImage structure use XpmFreeXpmImage. -The XpmFreeXpmImagefrees the structure members which are not NULL, but not the structure itself. -To free possible data stored into an XpmInfo structure use XpmFreeXpmInfo. - -To free data possibly stored into an array of XpmExtension use XpmFreeExtensions. - -To free any data allocated by an XPM function use the XpmFree function. -The current distribution of the XPM library uses the standard memory allocation functions and thus -XpmFree is nothing else than a define to the standard free. -However since these functions may be redefined in specific environments it is wise to use XpmFree. - -To free possible data stored into an XpmAttributes structure use XpmFreeAtatributes. -The XpmFreeAttributes frees the structure members which have been malloc’ed such as the pixels list. - -To dynamically allocate an XpmAttributes structure use the XpmAttributesSize function. -The XpmAttributesSize function provides application using dynamic libraries with a safe way to allocate and then -refer to an XpmAttributesstructure, disregarding whether the XpmAttributes structure size has changed or not since -compiled. -To get data when building an error message, one can use XpmGetErrorString. -XpmGetErrorString returns a string related to the given XPM error code. - -The XpmLibraryVersion can be used when one needs to figure out which version of the library is in use. -The value returned by XpmLibraryVersion can be compared to the value of XpmIncludeVersion which is defined -in the header file "xpm.h". These numbers are computed with the following formula: -.nf - (XpmFormat * 100 + XpmVersion) * 100 + XpmRevision -.fi -Where XpmFormat is the version number of the format, XpmVersion is the library version number (which changes -only if the API changes), and XpmRevision is the library minor version number. - -The XpmFreeExtensions function frees all data stored in every extension and the array itself. -Note that XpmFreeAttributes call this function and thus most of the time it should not need to be explicitly called. - -.SH "SEE ALSO" -.BR XpmLibraryVersion(__libmansuffix__) , -.BR XpmGetErrorString(__libmansuffix__) , -.BR XpmFree(__libmansuffix__) , -.BR XpmFreeExtensions(__libmansuffix__) , -.BR XpmAttributesSize(__libmansuffix__) , -.BR XpmFreeAttributes(__libmansuffix__) , -.BR XpmFreeXpmImage(__libmansuffix__) , -.BR XpmFreeXpmInfo(__libmansuffix__) diff --git a/man/xpmread.man b/man/xpmread.man deleted file mode 100644 index 8b264d2..0000000 --- a/man/xpmread.man +++ /dev/null @@ -1,163 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmRead __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmRead \- read an XPM file - -.SH SYNOPSIS -.HP -int XpmReadFileToImage( Display *display, char *filename, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes ); -.HP -int XpmReadFileToPixmap( Display *display, Drawable d, char *filename, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes ); -.HP -int XpmReadFileToXpmImage( char *filename, XpmImage *image, XpmInfo *info ); -.HP -int XpmReadFileToBuffer( char *filename, char **buffer_return ); -.HP -int XpmReadFileToData( char *filename, char ***data_return ); - -.SH ARGUMENTS -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fIfilename\fP li -Specifies the file name to use. -.IP \fIimage_return\fP li -Returns the image which is created. -.IP \fIshapeimage_return\fP li -Returns the shape mask image which is created if the color None is used. -.IP \fIattributes\fP li -Specifies the location of a structure to get and store information (or NULL). -.IP \fIbuffer_return\fP li -Returns the buffer created. -.IP \fIdata_return\fP li -Returns the data array created. -.IP \fIimage\fP li -Specifies the image structure location. -.IP \fIinfo\fP li -Specifies the location of a structure to store possible information (or NULL). - -.SH DESCRIPTION -.SS XpmReadFileToImage -The XpmReadFileToImage function reads in a file in the XPM format. -If the file cannot be opened it returns XpmOpenFailed. -If the file can be opened but does not contain valid XPM data, it returns XpmFileInvalid. -If insufficient working storage is allocated, it returns XpmNoMemory. -If the passedXpmAttributes structure pointer is not NULL, XpmReadFileToImage looks for the following attributes: -XpmVisual, XpmColormap, XpmDepth, XpmColorSymbols, XpmExactColors, XpmCloseness, -XpmRGBCloseness, XpmAllocCloseColors ,XpmReturnPixels, XpmReturnAllocPixels, XpmAllocColor, -XpmFreeColors, XpmColorClosure, XpmReturnExtensions, XpmReturnColorTable, XpmBitmapFormat, -sets the XpmSize, the XpmCharsPerPixel, and possibly the XpmHotspot attributes when returning. -As a backward compatibility feature, XpmReadFileToImage also looks for the XpmReturnInfos attributes. -As specified in the table (page 12), if the data related to the attributes XpmReturnExtensions, -XpmReturnColorTable, and XpmReturnInfos cannot be returned as requested because of insufficient -memory storage, XpmReadFileToImage will change the valuemask to -mention this and will try to continue. -So the caller should check on this before accessing this data. - -Note: The valuemask of the passed XpmAttributes must be set to some valid value, at least zero, otherwise -unpredictable errors can occur. -XpmReadFileToImage allocates colors, as read from the file or possibly overridden as specified in the -XpmColorSymbols attributes. -The colors are allocated using the color settings for the visual specified by the XpmColorKey -attribute, which has the value XPM_MONO, XPM_GRAY4, XPM_GRAY,or XPM_COLOR. -If the XpmColor-Key attribute is not set it is determined by examining the type of visual. -If no default value exists for the specified visual, it first looks for other defaults nearer to the monochrome visual type -and secondly nearer to the color visual type. -If the color which is found is not valid (cannot be parsed), it looks for -another default one according to the same algorithm. -If allocating a color fails, and the closeness attribute is set, it tries to find a color already in the colormap that is closest -to the desired color, and uses that. -If the alloc_close_colors attribute is set to False, the found close color is not allocated but it is used anyway. -This is especially useful for applications which use a private colormap containing read/write cells and have -complete control over the colormap. -On the other hand, since in such a case there is no guarantee that the color pixel will not change any time, -this should be avoided when using the default colormap. -If no color can be found that is within closeness of the Red, Green and Blue components of the desired color, -it reverts to trying other default values as explained above. -For finer control over the closeness requirements of a particular icon, -the red_closeness, green_closeness, and blue_closeness attributes may be used instead of the more general -closeness attribute. - -The RGB components are integers within the range 0 (black) to 65535 (white). A closeness of less than 10000, -for example, will cause only quite close colors to be matched, while a closeness of more than 50000 will -allow quite dissimilar colors to match. -Specifying a closeness of more than 65535 will allow any color to match, thus forcing the icon -to be drawn in color no matter how bad the colormap is. -The value 40000 seems to be about right for many situations -requiring reasonable but not perfect matches. With this setting the color must only be within the same general area of -the RGB cube as the desired color. -If the exactColors attribute is set it then returns XpmColorError, otherwise it creates the images and returns XpmSuccess. -If no color is found, and no close color exists or is wanted, and all visuals have been exhausted, -XpmColorFailed is returned. - -XpmReadFileToImage returns the created image to image_return if not NULL and possibly the -created shapemask to shapeimage_return if not NULL and the color None is used. -If required it stores into the XpmAttributes structure the list of the used pixels. -When the image depth is one, the image format is either as specified by the bitmap_format attribute if set or ZPixmap. -When the depth is different from one the imagae format is always ZPixmap. -When finished the caller must free the images using XDestroyImage, the allocated colors using -XFreeColors or the application equivalent function when the standard Xlib functions are not used, -and possibly the data returned into the XpmAttributes using XpmFreeAttributes (page 25). -In addition, on systems which support such features XpmReadFileToImage deals with compressed files by forking -an uncompress orgzip process and reading from the piped result. It assumes that the specified file is -compressed if the given file name ends by ’.Z’ or ’.gz’. -In case the file name does not end so, XpmReadFileToImage looks for the given file name assuming it is not a compressed file. -And if instead of a file name NULL is passed to XpmReadFile ToImage, it reads from the standard input. - -.SS XpmReadFileToPixmap -The XpmReadFileToPixmap function creates X images using XpmReadFileToImage and thus returns the same errors. -In addition on success it then creates the related pixmaps, using XPutImage, -which are returned to pixmap_return and shapemask_return if not NULL, and finally destroys the created images using XDestroyImage. -When finished the caller must free the pixmaps using XFreePixmap, the allocated colors using XFreeColors or the -application equivalent function when the standard Xlib functions are not used, and possibly the data returned into the -XpmAttributes using XpmFreeAttributes. - -.SS XpmReadFileToBuffer -XpmReadFileToBuffer allocates and fills a buffer from a file. -XpmReadFileToBuffer returns XpmOpenFailed if it cannot open the file, returns XpmNoMemory if insufficient -working storage is allocated, andXpmSuccess otherwise. The allocated buffer returned by XpmReadFileToBuffer -should be freed with XpmFree when done. - -.SS XpmReadFileToData -XpmReadFileToData returns XpmOpenFailed if it cannot open the file, -XpmNoMemory if insufficient working storage is allocated, -XpmFileInvalid if this is not a validXPM file, and XpmSuccess otherwise. -The allocated data returned by XpmReadFileToData should be freed with XpmFree when done. - -.SS XpmReadFileToXpmImage -The XpmReadFileToXpmImage function reads in a file in the XPM format. -If the file cannot be opened it returns XpmOpenFailed. -If the file can be opened but does not contain valid XPMdata, -it returns XpmFileInvalid. -If insufficient working storage is allocated, it returnsXpmNoMemory. -On success it fills in the given XpmImage structure and returns XpmSuccess. - -.SH "SEE ALSO" -.BR XpmReadFileToImage(__libmansuffix__) , -.BR XpmReadFileToPixmap(__libmansuffix__) , -.BR XpmReadFileToBuffer(__libmansuffix__) , -.BR XpmReadFileToData(__libmansuffix__) -.BR XpmReadFileToXpmImage(__libmansuffix__) diff --git a/man/xpmwrite.man b/man/xpmwrite.man deleted file mode 100644 index b840e97..0000000 --- a/man/xpmwrite.man +++ /dev/null @@ -1,128 +0,0 @@ -.\" Copyright (c) 2019 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software furnished to do so, subject to -.\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealing in this Software without prior written authorization -.\" from the X Consortium. -.\" -.hw XImage -.TH XpmWrite __libmansuffix__ __xorgversion__ "libXpm functions" -.SH NAME -XpmWrite \- write an XPM file - -.SH SYNOPSIS -.HP -int XpmWriteFileFromPixmap( Display *display, char *filename, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes ); -.HP -int XpmWriteFileFromImage( Display *display, char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes ); -.HP -int XpmWriteFileFromData( char *filename, char **data ); -.HP -int XpmWriteFileFromXpmImage( char *filename, XpmImage *image, XImage *shapeimage, XpmInfo *info ); -.HP -int XpmWriteFileFromBuffer( char *filename, char *buffer ); - -.SH ARGUMENTS - -.IP \fIdisplay\fP li -Specifies the connection to the X server. -.IP \fIfilename\fP li -Specifies the file name to use. -.IP \fIpixmap\fP li -Specifies the pixmap. -.IP \fIshapemask\fP li -Specifies the shape mask pixmap. -.IP \fIattributes\fP li -Specifies the location of a structure containing information (or NULL). -.IP \fIdata\fP li -Specifies the data array to read. -.IP \fIimage\fP li -Specifies the image. -.IP \fIinfo\fP li -Specifies the location of a structure to get information from (or NULL). -.IP \fIbuffer\fP li -Specifies the buffer to read. - -.SH DESCRIPTION -.SS XpmWriteFileFromImage - -The XpmWriteFileFromImage function writes an image and its possible shapeimage out to a file in the XPM format. -If the file cannot be opened, it returnsXpmOpenFailed. -If insufficient working storage is allocated, it returns XpmNoMemory. -If no error occurs then it returns XpmSuccess. -If the passed XpmAttributes structure pointer is not NULL, -XpmWriteFileFromImage looks for the following attributes: -XpmColormap, XpmHotspot, XpmCharsPerPixel, XpmRgbFilename, and XpmExtensions. -As a backward compatibility feature, XpmWriteFileFromImage also looks for the XpmInfos attributes. -If the filename contains an extension such as “.xpm”, in order to get a valid C variable name, the dot character is -replaced by an underscore ’_’ when writing out. -As a backward compatibility feature, if the XpmInfos attributes are defined it writes out possible stored -information such as comments, color defaults and symbol. -Finally, if the XpmRgbFilenameattribute is defined, XpmWriteFileFromImage searches for color names in -this file and if found writes them out instead of the rgb values. - -In addition on systems which support such features if the given file name ends by ’.Z’ or ’.gz’ -it is assumed to be a compressed file. Then,XpmWriteFileFromImage writes to a pipedcompress or gzip process. -And if instead of a file name NULL is passed to XpmWriteFileFromImage, it writes to the standard output. - -.SS XpmWriteFileFromPixmap -To write out a Pixmap to an XPM file, use XpmWriteFileFromPixmap. - -If the passed XpmAttributes structure pointer is not NULL, -XpmWriteFileFromPixmap looks for the following attributes: XpmSize. -If they are not defined it performs an XGetGeometry operation. -Then it uses XGetImage to get from the given pixmaps the related X images which are passed to XpmWriteFileFromImage. -Finally XpmWriteFileFromPixmap destroys the created images using XDestroyImage. -The XpmWriteFileFromPixmap function returns the same errors as XpmWriteFileFromImage. - -.SS XpmWriteFileFromData -XpmWriteFileFromData writes an XPM data array to an XPM file. - -XpmWriteFileToData returns XpmOpenFailed if it cannot open the file, -XpmFileInvalid if this is not a valid XPM data, and XpmSuccess otherwise. - -.SS XpmWriteFileFromXpmImage -To write out an XpmImage to an XPM file, use XpmWriteFileFromXpmImage. -The XpmWriteFileFromXpmImage function writes an image out to a file in the XPM format. -If the file cannot be opened, it returns XpmOpenFailed. -If insufficient working storage is allocated, it returns XpmNoMemory. -If no error occurs then it returns XpmSuccess. -If the passed XpmInfo structure pointer is not NULL, XpmWriteFileFromXpmImage looks for the following attributes: -XpmComments, XpmExtensions, and XpmHotspot, and writes the related information out as well. -In addition on systems which support such features if the given file name ends by ’.Z’ or ’.gz’ it is assumed to be a -compressed file. Then, XpmWriteFileFromXpmImage writes to a piped compress or gzip process. And if instead -of a file name NULL is passed to XpmWriteFileFromXpmImage, it writes to the standard output. - -.SS XpmWriteFileFromBuffer -XpmWriteFileFromBuffer writes a XPM-buffer to a file. -XpmWriteFileFromBuffer returns XpmOpenFailed if it cannot open the file, and XpmSuccess otherwise. - -As a convenience, the XpmReadFileToBuffer and XpmWriteFileFromBuffer are provided to copy a -file to a buffer and to write a file from a buffer. -Thus for instance one may decide to use XpmReadFileToBuffer, XpmCreatePixmapFromBuffer, and XpmFree -instead of XpmReadFileToPixmap. On some systems this may lead to a performance improvement, -since the parsing will be performed in memory, but it uses more memory. - -.SH "SEE ALSO" -.BR XpmWriteFileFromData(__libmansuffix__) , -.BR XpmWriteFileFromPixmap(__libmansuffix__) , -.BR XpmWriteFileFromImage(__libmansuffix__) , -.BR XpmWriteFileFromXpmImage(__libmansuffix__) , -.BR XpmWriteFileFromBuffer(__libmansuffix__) -- cgit v1.2.1