1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
|
'\" t
...\" GetPixA.sgm /main/10 1996/10/29 16:10:26 cdedoc $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl \" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl \" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie !\\*(f4 \{\
. ft \\*(f4
. ds f4\"
' br \}
.el .ie !\\*(f3 \{\
. ft \\*(f3
. ds f3\"
' br \}
.el .ie !\\*(f2 \{\
. ft \\*(f2
. ds f2\"
' br \}
.el .ie !\\*(f1 \{\
. ft \\*(f1
. ds f1\"
' br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
.TH "XmGetPixmap" "library call"
.SH "NAME"
\fBXmGetPixmap\fP \(em A pixmap caching function that generates a pixmap, stores it in a pixmap cache, and returns the pixmap
.iX "XmGetPixmap"
.iX "pixmaps"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Xm\&.h>
\fBPixmap \fBXmGetPixmap\fP\fR(
\fBScreen *\fBscreen\fR\fR,
\fBchar *\fBimage_name\fR\fR,
\fBPixel \fBforeground\fR\fR,
\fBPixel \fBbackground\fR\fR);
.fi
.SH "DESCRIPTION"
.PP
\fBXmGetPixmap\fP
uses the parameter data to perform a lookup in the
pixmap cache to see if a pixmap has already been generated that
matches the data\&. If one is found, a reference count is incremented
and the pixmap is returned\&. Applications should use \fBXmDestroyPixmap\fP
when the pixmap is no longer needed\&.
.IP "\fIscreen\fP" 10
Specifies the display screen on which the pixmap is to
be drawn\&.
The depth of the pixmap is the default depth for this screen\&.
.IP "\fIimage_name\fP" 10
Specifies the name of the image to be used to
generate the pixmap
.IP "\fIforeground\fP" 10
Combines the image with the \fIforeground\fP color to create the pixmap
if the image referenced is a bit-per-pixel image
.IP "\fIbackground\fP" 10
Combines the image with the \fIbackground\fP color to create the pixmap
if the image referenced is a bit-per-pixel image
.PP
If a pixmap is not found, \fIimage_name\fP is used to perform a lookup in
the image cache\&. If an image is found, it is used to generate the pixmap,
which is then cached and returned\&.
.PP
If an image is not found, the
\fIimage_name\fP is used as a filename, and a search is made for
an \fBX10\fP or \fBX11\fP bitmap file\&. If it is found, the file is
read, converted into an image, and cached in the image cache\&. The image
is then used to generate a pixmap, which is cached and returned\&.
.PP
If \fIimage_name\fP has a leading slash (\fB/\fP), it specifies a full
pathname, and \fBXmGetPixmap\fP opens the file as specified\&.
Otherwise, \fIimage_name\fP specifies a filename\&.
In this case, \fBXmGetPixmap\fP looks for the file along a search path
specified by the \fBXBMLANGPATH\fP environment variable or by a default
search path, which varies depending on whether or not the
\fBXAPPLRESDIR\fP environment variable is set\&.
The default search path contains a lot of directories\&.
Therefore, \fBXmGetPixmap\fP will need a relatively
long time to search through all these directories for pixmaps
and bitmaps\&. Applications that use a lot of pixmaps and bitmaps
will probably run more quickly if
\fBXBMLANGPATH\fP is set to a short list of directories\&.
In addition to X bitmap files (XBM), Motif also supports XPM (X
Pixmap) file formats and, from version 2.3, JPEG and PNG image formats\&.
(Note that support of JPEG and PNG image format is an optional feature
of Motif, in order to check if current version supports PNG and JPEG
image formats the PNG_SUPPORT and JPEG_SUPPORT macros should be checked
correspondingly.)
The \fBXBMLANGPATH\fP specifies the path for
both XBM, XPM, PNG and JPEG files\&. Refer to the \fBXmGetPixmapByDepth\fP
reference page for further details\&.
.PP
The \fBXBMLANGPATH\fP environment variable specifies a search path
for X bitmap files\&.
It can contain the substitution field \fB%B\fP, where the \fIimage_name\fP
argument to \fBXmGetPixmap\fP is substituted for \fB%B\fP\&.
It can also contain the substitution fields accepted by
\fBXtResolvePathname\fP\&.
The substitution field \fB%T\fP is always mapped to \fIbitmaps\fP, and \fB%S\fP is
always mapped to NULL\&.
.PP
If \fBXBMLANGPATH\fP is not set but the environment variable
\fBXAPPLRESDIR\fP is set, the following pathnames are searched:
.IP " \(bu" 6
\fB%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/%L/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/%l_%t/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/%l/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/%L/bitmaps/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/%l_%t/bitmaps/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/%l/bitmaps/%B\fP
.IP " \(bu" 6
\fB$XAPPLRESDIR/bitmaps/%B\fP
.IP " \(bu" 6
\fB$HOME/bitmaps/%B\fP
.IP " \(bu" 6
\fB$HOME/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%L/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l_%t/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%L/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l_%t/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/include/X11/bitmaps/%B\fP
.PP
If neither \fBXBMLANGPATH\fP nor \fBXAPPLRESDIR\fP is set, the
following pathnames are searched:
.IP " \(bu" 6
\fB%B\fP
.IP " \(bu" 6
\fB$HOME/%L/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$HOME/%l_%t/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$HOME/%l/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$HOME/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB$HOME/%L/bitmaps/%B\fP
.IP " \(bu" 6
\fB$HOME/%l_%t/bitmaps/%B\fP
.IP " \(bu" 6
\fB$HOME/%l/bitmaps/%B\fP
.IP " \(bu" 6
\fB$HOME/bitmaps/%B\fP
.IP " \(bu" 6
\fB$HOME/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%L/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l_%t/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/bitmaps/%N/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%L/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l_%t/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/%l/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/lib/X11/bitmaps/%B\fP
.IP " \(bu" 6
\fB/usr/include/X11/bitmaps/%B\fP
.PP
These paths are defaults that vendors may change\&.
For example, a vendor may use different directories for
\fB/usr/lib/X11\fP and \fB/usr/include/X11\fP\&.
.PP
The following substitutions are used in these paths:
.IP "\fB%B\fP" 10
The image name, from the \fIimage_name\fP argument
.IP "\fB%N\fP" 10
The class name of the application
.IP "\fB%L\fP" 10
The display\&'s language string\&.
This string is influenced by \fBXtSetLanguageProc\fP\&.
The default string is determined by
calling setlocale(\fBLC_ALL, NULL\fP)\&.
.IP "\fB%l_%t\fP" 10
The language and territory component of the display\&'s language string
.IP "\fB%l\fP" 10
The language component of the display\&'s language string
.PP
The contents of the file must conform to the rules for
X11 bitmap files\&. In other words, Motif can read any X11
conformant bitmap file\&.
.SH "RETURN"
.PP
Returns a pixmap when successful; returns \fBXmUNSPECIFIED_PIXMAP\fP
if the image corresponding to \fIimage_name\fP cannot be found\&.
.SH "RELATED"
.PP
\fBXmDestroyPixmap\fP(3),
\fBXmGetPixmapByDepth\fP(3),
\fBXmInstallImage\fP(3), and
\fBXmUninstallImage\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:24
|