Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtParseXpmData(3)	    Library Functions Manual	      XmtParseXpmData(3)

NAME
     XmtParseXpmData(),  XmtParseXpmFile(),  XmtFreeXmtImage()	-  parse  an XPM
     pixmap into the intermediate XmtImage format.

SYNOPSIS
     #include <Xmt/Xpm.h>

     XmtImage *XmtParseXpmData(String *data)

     XmtImage *XmtParseXpmFile(String filename)

     void XmtFreeXmtImage(XmtImage *image)

ARGUMENTS
     INPUTS

	  data	 An array of strings defined by an XPM file that  has  been  in-
		 cluded into an application.

	  filename
		 The name of a file containing pixmap data in XPM format.

	  image  An XmtImage to be freed.

     RETURNS

	  XmtParseXpmData()  and  XmtParseXpmFile() return an XmtImage, or NULL,
	  if the XPM data was invalid or the file could not be	found.	The  re-
	  turned XmtImage should be freed when no longer need with XmtFreeXmtIm-
	  age().

DESCRIPTION
     XmtParseXpmData()	parses	the  specified	array of strings (declared by an
     #included XPM file) into an XmtImage structure. On success,  it  returns  a
     pointer  to  the  allocated  XmtImage.  If the data was invalid, it returns
     NULL.

     XmtParseXpmFile() reads the contents of the specified file, and  parses  it
     into  an  XmtImage structure. It returns a pointer to an allocated XmtImage
     structure on success, or NULL if the file could not be read, or if the file
     contained invalid data.

     When the XmtImage returned by  either  of	these  functions  is  no  longer
     needed, they may be freed by calling XmtFreeXmtImage().

     An XmtImage structure is a parsed representation of an XPM pixmap file. The
     symbolic  color names it contains have not yet been looked up, nor have any
     pixel values been allocated for a specific display and colormap. An  XmtIm-
     age  may be converted to a Pixmap in an additional step, by calling XmtCre-
     atePixmapFromXmtImage(), or it may be cached for later lookup  and  conver-
     sion in the Xmt image cache by calling XmtRegisterImage().

SEE ALSO
     Chapter 5, Using Icons,
     XmtCreatePixmapFromXmtImage(), XmtCreateXImageFromXmtImage(),
     XmtGetPixmap(), XmtLookupPixmap(), XmtRegisterImage().

Xmt				   Motif Tools		      XmtParseXpmData(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtParseXpmFile&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help