2 /* Copyright (C) 2002 Olivier Chapuis */
7 #include "PictureBase.h"
13 /* ---------------------------- global definitions ------------------------- */
15 /* ---------------------------- global macros ------------------------------ */
17 /* ---------------------------- type definitions --------------------------- */
20 typedef XpmColorSymbol FxpmColorSymbol
;
21 typedef XpmExtension FxpmExtension
;
22 typedef XpmColor FxpmColor
;
23 typedef XpmAttributes FxpmAttributes
;
24 typedef XpmImage FxpmImage
;
25 typedef XpmInfo FxpmInfo
;
45 typedef int (*FxpmAllocColorFunc
)(
47 Display
*,Colormap
,char*,XColor
*,void*
50 typedef int (*FxpmFreeColorsFunc
)(
52 Display
*,Colormap
,Pixel
*,int,void*
56 unsigned long valuemask
;
62 unsigned int x_hotspot
;
63 unsigned int y_hotspot
;
67 FxpmColorSymbol
*colorsymbols
;
68 unsigned int numsymbols
;
70 unsigned int nextensions
;
71 FxpmExtension
*extensions
;
73 FxpmColor
*colorTable
;
77 unsigned int mask_pixel
;
79 unsigned int closeness
;
80 unsigned int red_closeness
;
81 unsigned int green_closeness
;
82 unsigned int blue_closeness
;
86 Bool alloc_close_colors
;
88 FxpmAllocColorFunc alloc_color
;
89 FxpmFreeColorsFunc free_colors
;
97 FxpmColor
*colorTable
;
101 unsigned long valuemask
;
102 unsigned int x_hotspot
;
103 unsigned int y_hotspot
;
107 /* ---------------------------- global definitions ------------------------- */
111 #define FxpmReturnPixels XpmReturnPixels
112 #define FxpmSize XpmSize
113 #define FxpmReturnAllocPixels XpmReturnAllocPixels
114 #define FxpmCloseness XpmCloseness
115 #define FxpmVisual XpmVisual
116 #define FxpmColormap XpmColormap
117 #define FxpmDepth XpmDepth
118 #define FxpmHotspot XpmHotspot
119 #define FxpmExtensions XpmExtensions
120 #define FxpmCharsPerPixel XpmCharsPerPixel
121 #define FxpmColorSymbols XpmColorSymbols
122 #define FxpmRgbFilename XpmRgbFilename
123 #define FxpmInfos XpmInfos
124 #define FxpmReturnInfos XpmReturnInfos
125 #define FxpmReturnExtensions XpmReturnExtensions
126 #define FxpmRGBCloseness XpmRGBCloseness
127 #define FxpmColorKey XpmColorKey
128 #define FxpmAllocCloseColors XpmAllocCloseColors
129 #define FxpmBitmapFormat XpmBitmapFormat
130 #define FxpmAllocColor XpmAllocColor
131 #define FxpmFreeColors XpmFreeColors
132 #define FxpmColorClosure XpmColorClosure
133 #define FxpmComments XpmComments
134 #define FxpmReturnComments XpmReturnComments
136 #define FxpmUndefPixel XpmUndefPixel
138 #define FxpmColorError XpmColorError
139 #define FxpmSuccess XpmSuccess
140 #define FxpmOpenFailed XpmOpenFailed
141 #define FxpmFileInvalid XpmFileInvalid
142 #define FxpmNoMemory XpmNoMemory
143 #define FxpmColorFailed XpmColorFailed
145 #define FXPM_MONO XPM_MONO
146 #define FXPM_GREY4 XPM_GREY4
147 #define FXPM_GRAY4 XPM_GRAY4
148 #define FXPM_GREY XPM_GREY
149 #define FXPM_GRAY XPM_GRAY
150 #define FXPM_COLOR XPM_COLOR
152 #define FxpmReadFileToXpmImage(a,b,c) XpmReadFileToXpmImage(a,b,c)
153 #define FxpmCreatePixmapFromXpmImage(a,b,c,d,e,f) \
154 XpmCreatePixmapFromXpmImage(a,b,c,d,e,f)
155 #define FxpmFreeXpmImage(a) XpmFreeXpmImage(a)
156 #define FxpmFreeXpmInfo(a) XpmFreeXpmInfo(a)
157 #define FxpmReadFileToPixmap(a,b,c,d,e,f) XpmReadFileToPixmap(a,b,c,d,e,f)
158 #define FxpmReadFileToImage(a,b,c,d,e) XpmReadFileToImage(a,b,c,d,e)
159 #define FxpmCreatePixmapFromData(a,b,c,d,e,f) \
160 XpmCreatePixmapFromData(a,b,c,d,e,f)
162 #else /* !XpmSupport */
163 #define FxpmReturnPixels 0
165 #define FxpmReturnAllocPixels 0
166 #define FxpmCloseness 0
168 #define FxpmColormap 0
170 #define FxpmHotspot 0
171 #define FxpmExtensions 0
172 #define FxpmCharsPerPixel 0
173 #define FxpmColorSymbols 0
174 #define FxpmRgbFilename 0
176 #define FxpmReturnInfos 0
177 #define FxpmReturnExtensions 0
178 #define FxpmRGBCloseness 0
179 #define FxpmColorKey 0
180 #define FxpmAllocCloseColors 0
181 #define FxpmBitmapFormat 0
182 #define FxpmAllocColor 0
183 #define FxpmFreeColors 0
184 #define FxpmColorClosure 0
185 #define FxpmComments 0
186 #define FxpmReturnComments 0
188 #define FxpmUndefPixel 0
190 #define FxpmColorError 1
191 #define FxpmSuccess 0
192 #define FxpmOpenFailed -1
193 #define FxpmFileInvalid -2
194 #define FxpmNoMemory -3
195 #define FxpmColorFailed -4
204 #define FxpmReadFileToXpmImage(a,b,c) 0
205 #define FxpmCreatePixmapFromXpmImage(a,b,c,d,e,f) 0
206 #define FxpmFreeXpmImage(a)
207 #define FxpmFreeXpmInfo(a)
208 #define FxpmReadFileToPixmap(a,b,c,d,e,f) 0
209 #define FxpmCreatePixmapFromData(a,b,c,d,e,f) 0
211 #endif /* XpmSupport */