0
|
1 |
/* ************************************************************************** */
|
|
2 |
/* * For conditions of distribution and use, * */
|
|
3 |
/* * see copyright notice in libmng.h * */
|
|
4 |
/* ************************************************************************** */
|
|
5 |
/* * * */
|
|
6 |
/* * project : libmng * */
|
|
7 |
/* * file : libmng_prop_xs.c copyright (c) 2000-2006 G.Juyn * */
|
|
8 |
/* * version : 1.0.10 * */
|
|
9 |
/* * * */
|
|
10 |
/* * purpose : property get/set interface (implementation) * */
|
|
11 |
/* * * */
|
|
12 |
/* * author : G.Juyn * */
|
|
13 |
/* * * */
|
|
14 |
/* * comment : implementation of the property get/set functions * */
|
|
15 |
/* * * */
|
|
16 |
/* * changes : 0.5.1 - 05/08/2000 - G.Juyn * */
|
|
17 |
/* * - fixed calling convention * */
|
|
18 |
/* * - changed strict-ANSI stuff * */
|
|
19 |
/* * 0.5.1 - 05/11/2000 - G.Juyn * */
|
|
20 |
/* * - added set_outputprofile2 & set_srgbprofile2 * */
|
|
21 |
/* * 0.5.1 - 05/12/2000 - G.Juyn * */
|
|
22 |
/* * - changed trace to macro for callback error-reporting * */
|
|
23 |
/* * * */
|
|
24 |
/* * 0.5.2 - 05/23/2000 - G.Juyn * */
|
|
25 |
/* * - changed inclusion of cms-routines * */
|
|
26 |
/* * 0.5.2 - 05/24/2000 - G.Juyn * */
|
|
27 |
/* * - added support for get/set default zlib/IJG parms * */
|
|
28 |
/* * 0.5.2 - 05/31/2000 - G.Juyn * */
|
|
29 |
/* * - fixed up punctuation (contribution by Tim Rowley) * */
|
|
30 |
/* * 0.5.2 - 06/05/2000 - G.Juyn * */
|
|
31 |
/* * - added support for RGB8_A8 canvasstyle * */
|
|
32 |
/* * * */
|
|
33 |
/* * 0.5.3 - 06/21/2000 - G.Juyn * */
|
|
34 |
/* * - added get/set for speedtype to facilitate testing * */
|
|
35 |
/* * - added get for imagelevel during processtext callback * */
|
|
36 |
/* * 0.5.3 - 06/26/2000 - G.Juyn * */
|
|
37 |
/* * - changed userdata variable to mng_ptr * */
|
|
38 |
/* * 0.5.3 - 06/29/2000 - G.Juyn * */
|
|
39 |
/* * - fixed incompatible return-types * */
|
|
40 |
/* * * */
|
|
41 |
/* * 0.9.1 - 07/08/2000 - G.Juyn * */
|
|
42 |
/* * - added get routines for internal display variables * */
|
|
43 |
/* * - added get/set routines for suspensionmode variable * */
|
|
44 |
/* * 0.9.1 - 07/15/2000 - G.Juyn * */
|
|
45 |
/* * - added get/set routines for sectionbreak variable * */
|
|
46 |
/* * * */
|
|
47 |
/* * 0.9.2 - 07/31/2000 - G.Juyn * */
|
|
48 |
/* * - added status_xxxx functions * */
|
|
49 |
/* * 0.9.2 - 08/05/2000 - G.Juyn * */
|
|
50 |
/* * - changed file-prefixes * */
|
|
51 |
/* * * */
|
|
52 |
/* * 0.9.3 - 10/10/2000 - G.Juyn * */
|
|
53 |
/* * - added support for alpha-depth prediction * */
|
|
54 |
/* * 0.9.3 - 10/16/2000 - G.Juyn * */
|
|
55 |
/* * - added functions to retrieve PNG/JNG specific header-info * */
|
|
56 |
/* * 0.9.3 - 10/20/2000 - G.Juyn * */
|
|
57 |
/* * - added get/set for bKGD preference setting * */
|
|
58 |
/* * 0.9.3 - 10/21/2000 - G.Juyn * */
|
|
59 |
/* * - added get function for interlace/progressive display * */
|
|
60 |
/* * * */
|
|
61 |
/* * 1.0.1 - 04/21/2001 - G.Juyn (code by G.Kelly) * */
|
|
62 |
/* * - added BGRA8 canvas with premultiplied alpha * */
|
|
63 |
/* * 1.0.1 - 05/02/2001 - G.Juyn * */
|
|
64 |
/* * - added "default" sRGB generation (Thanks Marti!) * */
|
|
65 |
/* * * */
|
|
66 |
/* * 1.0.2 - 06/23/2001 - G.Juyn * */
|
|
67 |
/* * - added optimization option for MNG-video playback * */
|
|
68 |
/* * 1.0.2 - 06/25/2001 - G.Juyn * */
|
|
69 |
/* * - added option to turn off progressive refresh * */
|
|
70 |
/* * * */
|
|
71 |
/* * 1.0.3 - 08/06/2001 - G.Juyn * */
|
|
72 |
/* * - added get function for last processed BACK chunk * */
|
|
73 |
/* * * */
|
|
74 |
/* * 1.0.4 - 06/22/2002 - G.Juyn * */
|
|
75 |
/* * - B495442 - invalid returnvalue in mng_get_suspensionmode * */
|
|
76 |
/* * * */
|
|
77 |
/* * 1.0.5 - 09/14/2002 - G.Juyn * */
|
|
78 |
/* * - added event handling for dynamic MNG * */
|
|
79 |
/* * 1.0.5 - 09/22/2002 - G.Juyn * */
|
|
80 |
/* * - added bgrx8 canvas (filler byte) * */
|
|
81 |
/* * 1.0.5 - 11/07/2002 - G.Juyn * */
|
|
82 |
/* * - added support to get totals after mng_read() * */
|
|
83 |
/* * * */
|
|
84 |
/* * 1.0.6 - 05/11/2003 - G. Juyn * */
|
|
85 |
/* * - added conditionals around canvas update routines * */
|
|
86 |
/* * 1.0.6 - 07/07/2003 - G.R-P * */
|
|
87 |
/* * - added conditionals around some JNG-supporting code * */
|
|
88 |
/* * 1.0.6 - 07/11/2003 - G.R-P * */
|
|
89 |
/* * - added conditionals zlib and jpeg property accessors * */
|
|
90 |
/* * 1.0.6 - 07/14/2003 - G.R-P * */
|
|
91 |
/* * - added conditionals around various unused functions * */
|
|
92 |
/* * * */
|
|
93 |
/* * 1.0.7 - 11/27/2003 - R.A * */
|
|
94 |
/* * - added CANVAS_RGB565 and CANVAS_BGR565 * */
|
|
95 |
/* * 1.0.7 - 12/06/2003 - R.A * */
|
|
96 |
/* * - added CANVAS_RGBA565 and CANVAS_BGRA565 * */
|
|
97 |
/* * 1.0.7 - 01/25/2004 - J.S * */
|
|
98 |
/* * - added premultiplied alpha canvas' for RGBA, ARGB, ABGR * */
|
|
99 |
/* * 1.0.7 - 03/07/2004 - G.R-P. * */
|
|
100 |
/* * - put gamma, cms-related functions inside #ifdef * */
|
|
101 |
/* * * */
|
|
102 |
/* * 1.0.8 - 04/02/2004 - G.Juyn * */
|
|
103 |
/* * - added CRC existence & checking flags * */
|
|
104 |
/* * * */
|
|
105 |
/* * 1.0.9 - 09/18/2004 - G.R-P. * */
|
|
106 |
/* * - added some MNG_SUPPORT_WRITE conditionals * */
|
|
107 |
/* * 1.0.9 - 10/03/2004 - G.Juyn * */
|
|
108 |
/* * - added function to retrieve current FRAM delay * */
|
|
109 |
/* * 1.0.9 - 10/14/2004 - G.Juyn * */
|
|
110 |
/* * - added bgr565_a8 canvas-style (thanks to J. Elvander) * */
|
|
111 |
/* * 1.0.9 - 12/20/2004 - G.Juyn * */
|
|
112 |
/* * - cleaned up macro-invocations (thanks to D. Airlie) * */
|
|
113 |
/* * * */
|
|
114 |
/* * 1.0.10 - 03/07/2006 - (thanks to W. Manthey) * */
|
|
115 |
/* * - added CANVAS_RGB555 and CANVAS_BGR555 * */
|
|
116 |
/* * * */
|
|
117 |
/* ************************************************************************** */
|
|
118 |
|
|
119 |
#include "libmng.h"
|
|
120 |
#include "libmng_data.h"
|
|
121 |
#include "libmng_error.h"
|
|
122 |
#include "libmng_trace.h"
|
|
123 |
#ifdef __BORLANDC__
|
|
124 |
#pragma hdrstop
|
|
125 |
#endif
|
|
126 |
#include "libmng_objects.h"
|
|
127 |
#include "libmng_memory.h"
|
|
128 |
#include "libmng_cms.h"
|
|
129 |
|
|
130 |
#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
|
|
131 |
#pragma option -A /* force ANSI-C */
|
|
132 |
#endif
|
|
133 |
|
|
134 |
/* ************************************************************************** */
|
|
135 |
/* * * */
|
|
136 |
/* * Property set functions * */
|
|
137 |
/* * * */
|
|
138 |
/* ************************************************************************** */
|
|
139 |
|
|
140 |
mng_retcode MNG_DECL mng_set_userdata (mng_handle hHandle,
|
|
141 |
mng_ptr pUserdata)
|
|
142 |
{
|
|
143 |
#ifdef MNG_SUPPORT_TRACE
|
|
144 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_USERDATA, MNG_LC_START);
|
|
145 |
#endif
|
|
146 |
|
|
147 |
MNG_VALIDHANDLE (hHandle)
|
|
148 |
((mng_datap)hHandle)->pUserdata = pUserdata;
|
|
149 |
|
|
150 |
#ifdef MNG_SUPPORT_TRACE
|
|
151 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_USERDATA, MNG_LC_END);
|
|
152 |
#endif
|
|
153 |
|
|
154 |
return MNG_NOERROR;
|
|
155 |
}
|
|
156 |
|
|
157 |
/* ************************************************************************** */
|
|
158 |
|
|
159 |
mng_retcode MNG_DECL mng_set_canvasstyle (mng_handle hHandle,
|
|
160 |
mng_uint32 iStyle)
|
|
161 |
{
|
|
162 |
#ifdef MNG_SUPPORT_TRACE
|
|
163 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_CANVASSTYLE, MNG_LC_START);
|
|
164 |
#endif
|
|
165 |
|
|
166 |
MNG_VALIDHANDLE (hHandle)
|
|
167 |
|
|
168 |
switch (iStyle)
|
|
169 |
{
|
|
170 |
#ifndef MNG_SKIPCANVAS_RGB8
|
|
171 |
case MNG_CANVAS_RGB8 : break;
|
|
172 |
#endif
|
|
173 |
#ifndef MNG_SKIPCANVAS_RGBA8
|
|
174 |
case MNG_CANVAS_RGBA8 : break;
|
|
175 |
#endif
|
|
176 |
#ifndef MNG_SKIPCANVAS_RGBA8_PM
|
|
177 |
case MNG_CANVAS_RGBA8_PM: break;
|
|
178 |
#endif
|
|
179 |
#ifndef MNG_SKIPCANVAS_ARGB8
|
|
180 |
case MNG_CANVAS_ARGB8 : break;
|
|
181 |
#endif
|
|
182 |
#ifndef MNG_SKIPCANVAS_ARGB8_PM
|
|
183 |
case MNG_CANVAS_ARGB8_PM: break;
|
|
184 |
#endif
|
|
185 |
#ifndef MNG_SKIPCANVAS_RGB8_A8
|
|
186 |
case MNG_CANVAS_RGB8_A8 : break;
|
|
187 |
#endif
|
|
188 |
#ifndef MNG_SKIPCANVAS_BGR8
|
|
189 |
case MNG_CANVAS_BGR8 : break;
|
|
190 |
#endif
|
|
191 |
#ifndef MNG_SKIPCANVAS_BGRX8
|
|
192 |
case MNG_CANVAS_BGRX8 : break;
|
|
193 |
#endif
|
|
194 |
#ifndef MNG_SKIPCANVAS_BGRA8
|
|
195 |
case MNG_CANVAS_BGRA8 : break;
|
|
196 |
#endif
|
|
197 |
#ifndef MNG_SKIPCANVAS_BGRA8_PM
|
|
198 |
case MNG_CANVAS_BGRA8_PM: break;
|
|
199 |
#endif
|
|
200 |
#ifndef MNG_SKIPCANVAS_ABGR8
|
|
201 |
case MNG_CANVAS_ABGR8 : break;
|
|
202 |
#endif
|
|
203 |
#ifndef MNG_SKIPCANVAS_ABGR8_PM
|
|
204 |
case MNG_CANVAS_ABGR8_PM: break;
|
|
205 |
#endif
|
|
206 |
#ifndef MNG_SKIPCANVAS_RGB565
|
|
207 |
case MNG_CANVAS_RGB565 : break;
|
|
208 |
#endif
|
|
209 |
#ifndef MNG_SKIPCANVAS_RGBA565
|
|
210 |
case MNG_CANVAS_RGBA565 : break;
|
|
211 |
#endif
|
|
212 |
#ifndef MNG_SKIPCANVAS_BGR565
|
|
213 |
case MNG_CANVAS_BGR565 : break;
|
|
214 |
#endif
|
|
215 |
#ifndef MNG_SKIPCANVAS_BGRA565
|
|
216 |
case MNG_CANVAS_BGRA565 : break;
|
|
217 |
#endif
|
|
218 |
#ifndef MNG_SKIPCANVAS_BGR565_A8
|
|
219 |
case MNG_CANVAS_BGR565_A8 : break;
|
|
220 |
#endif
|
|
221 |
#ifndef MNG_SKIPCANVAS_RGB555
|
|
222 |
case MNG_CANVAS_RGB555 : break;
|
|
223 |
#endif
|
|
224 |
#ifndef MNG_SKIPCANVAS_BGR555
|
|
225 |
case MNG_CANVAS_BGR555 : break;
|
|
226 |
#endif
|
|
227 |
/* case MNG_CANVAS_RGB16 : break; */
|
|
228 |
/* case MNG_CANVAS_RGBA16 : break; */
|
|
229 |
/* case MNG_CANVAS_ARGB16 : break; */
|
|
230 |
/* case MNG_CANVAS_BGR16 : break; */
|
|
231 |
/* case MNG_CANVAS_BGRA16 : break; */
|
|
232 |
/* case MNG_CANVAS_ABGR16 : break; */
|
|
233 |
/* case MNG_CANVAS_INDEX8 : break; */
|
|
234 |
/* case MNG_CANVAS_INDEXA8 : break; */
|
|
235 |
/* case MNG_CANVAS_AINDEX8 : break; */
|
|
236 |
/* case MNG_CANVAS_GRAY8 : break; */
|
|
237 |
/* case MNG_CANVAS_GRAY16 : break; */
|
|
238 |
/* case MNG_CANVAS_GRAYA8 : break; */
|
|
239 |
/* case MNG_CANVAS_GRAYA16 : break; */
|
|
240 |
/* case MNG_CANVAS_AGRAY8 : break; */
|
|
241 |
/* case MNG_CANVAS_AGRAY16 : break; */
|
|
242 |
/* case MNG_CANVAS_DX15 : break; */
|
|
243 |
/* case MNG_CANVAS_DX16 : break; */
|
|
244 |
default : { MNG_ERROR (((mng_datap)hHandle), MNG_INVALIDCNVSTYLE) };
|
|
245 |
}
|
|
246 |
|
|
247 |
((mng_datap)hHandle)->iCanvasstyle = iStyle;
|
|
248 |
|
|
249 |
#ifdef MNG_SUPPORT_TRACE
|
|
250 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_CANVASSTYLE, MNG_LC_END);
|
|
251 |
#endif
|
|
252 |
|
|
253 |
return MNG_NOERROR;
|
|
254 |
}
|
|
255 |
|
|
256 |
/* ************************************************************************** */
|
|
257 |
|
|
258 |
mng_retcode MNG_DECL mng_set_bkgdstyle (mng_handle hHandle,
|
|
259 |
mng_uint32 iStyle)
|
|
260 |
{
|
|
261 |
#ifdef MNG_SUPPORT_TRACE
|
|
262 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_BKGDSTYLE, MNG_LC_START);
|
|
263 |
#endif
|
|
264 |
|
|
265 |
MNG_VALIDHANDLE (hHandle)
|
|
266 |
|
|
267 |
switch (iStyle) /* alpha-modes not supported */
|
|
268 |
{
|
|
269 |
#ifndef MNG_SKIPCANVAS_RGB8
|
|
270 |
case MNG_CANVAS_RGB8 : break;
|
|
271 |
#endif
|
|
272 |
#ifndef MNG_SKIPCANVAS_BGR8
|
|
273 |
case MNG_CANVAS_BGR8 : break;
|
|
274 |
#endif
|
|
275 |
#ifndef MNG_SKIPCANVAS_BGRX8
|
|
276 |
case MNG_CANVAS_BGRX8 : break;
|
|
277 |
#endif
|
|
278 |
#ifndef MNG_SKIPCANVAS_RGB565
|
|
279 |
case MNG_CANVAS_RGB565 : break;
|
|
280 |
#endif
|
|
281 |
#ifndef MNG_SKIPCANVAS_BGR565
|
|
282 |
case MNG_CANVAS_BGR565 : break;
|
|
283 |
#endif
|
|
284 |
/* case MNG_CANVAS_RGB16 : break; */
|
|
285 |
/* case MNG_CANVAS_BGR16 : break; */
|
|
286 |
/* case MNG_CANVAS_INDEX8 : break; */
|
|
287 |
/* case MNG_CANVAS_GRAY8 : break; */
|
|
288 |
/* case MNG_CANVAS_GRAY16 : break; */
|
|
289 |
/* case MNG_CANVAS_DX15 : break; */
|
|
290 |
/* case MNG_CANVAS_DX16 : break; */
|
|
291 |
default : MNG_ERROR (((mng_datap)hHandle), MNG_INVALIDCNVSTYLE);
|
|
292 |
}
|
|
293 |
|
|
294 |
((mng_datap)hHandle)->iBkgdstyle = iStyle;
|
|
295 |
|
|
296 |
#ifdef MNG_SUPPORT_TRACE
|
|
297 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_BKGDSTYLE, MNG_LC_END);
|
|
298 |
#endif
|
|
299 |
|
|
300 |
return MNG_NOERROR;
|
|
301 |
}
|
|
302 |
|
|
303 |
/* ************************************************************************** */
|
|
304 |
|
|
305 |
mng_retcode MNG_DECL mng_set_bgcolor (mng_handle hHandle,
|
|
306 |
mng_uint16 iRed,
|
|
307 |
mng_uint16 iGreen,
|
|
308 |
mng_uint16 iBlue)
|
|
309 |
{
|
|
310 |
#ifdef MNG_SUPPORT_TRACE
|
|
311 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_BGCOLOR, MNG_LC_START);
|
|
312 |
#endif
|
|
313 |
|
|
314 |
MNG_VALIDHANDLE (hHandle)
|
|
315 |
((mng_datap)hHandle)->iBGred = iRed;
|
|
316 |
((mng_datap)hHandle)->iBGgreen = iGreen;
|
|
317 |
((mng_datap)hHandle)->iBGblue = iBlue;
|
|
318 |
((mng_datap)hHandle)->bUseBKGD = MNG_FALSE;
|
|
319 |
|
|
320 |
#ifdef MNG_SUPPORT_TRACE
|
|
321 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_BGCOLOR, MNG_LC_END);
|
|
322 |
#endif
|
|
323 |
|
|
324 |
return MNG_NOERROR;
|
|
325 |
}
|
|
326 |
|
|
327 |
/* ************************************************************************** */
|
|
328 |
|
|
329 |
mng_retcode MNG_DECL mng_set_usebkgd (mng_handle hHandle,
|
|
330 |
mng_bool bUseBKGD)
|
|
331 |
{
|
|
332 |
#ifdef MNG_SUPPORT_TRACE
|
|
333 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_USEBKGD, MNG_LC_START);
|
|
334 |
#endif
|
|
335 |
|
|
336 |
MNG_VALIDHANDLE (hHandle)
|
|
337 |
((mng_datap)hHandle)->bUseBKGD = bUseBKGD;
|
|
338 |
|
|
339 |
#ifdef MNG_SUPPORT_TRACE
|
|
340 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_USEBKGD, MNG_LC_END);
|
|
341 |
#endif
|
|
342 |
|
|
343 |
return MNG_NOERROR;
|
|
344 |
}
|
|
345 |
|
|
346 |
/* ************************************************************************** */
|
|
347 |
|
|
348 |
mng_retcode MNG_DECL mng_set_storechunks (mng_handle hHandle,
|
|
349 |
mng_bool bStorechunks)
|
|
350 |
{
|
|
351 |
#ifdef MNG_SUPPORT_TRACE
|
|
352 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_STORECHUNKS, MNG_LC_START);
|
|
353 |
#endif
|
|
354 |
|
|
355 |
MNG_VALIDHANDLE (hHandle)
|
|
356 |
((mng_datap)hHandle)->bStorechunks = bStorechunks;
|
|
357 |
|
|
358 |
#ifdef MNG_SUPPORT_TRACE
|
|
359 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_STORECHUNKS, MNG_LC_END);
|
|
360 |
#endif
|
|
361 |
|
|
362 |
return MNG_NOERROR;
|
|
363 |
}
|
|
364 |
|
|
365 |
/* ************************************************************************** */
|
|
366 |
|
|
367 |
mng_retcode MNG_DECL mng_set_sectionbreaks (mng_handle hHandle,
|
|
368 |
mng_bool bSectionbreaks)
|
|
369 |
{
|
|
370 |
#ifdef MNG_SUPPORT_TRACE
|
|
371 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SECTIONBREAKS, MNG_LC_START);
|
|
372 |
#endif
|
|
373 |
|
|
374 |
MNG_VALIDHANDLE (hHandle)
|
|
375 |
((mng_datap)hHandle)->bSectionbreaks = bSectionbreaks;
|
|
376 |
|
|
377 |
#ifdef MNG_SUPPORT_TRACE
|
|
378 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SECTIONBREAKS, MNG_LC_END);
|
|
379 |
#endif
|
|
380 |
|
|
381 |
return MNG_NOERROR;
|
|
382 |
}
|
|
383 |
|
|
384 |
/* ************************************************************************** */
|
|
385 |
|
|
386 |
mng_retcode MNG_DECL mng_set_cacheplayback (mng_handle hHandle,
|
|
387 |
mng_bool bCacheplayback)
|
|
388 |
{
|
|
389 |
#ifdef MNG_SUPPORT_TRACE
|
|
390 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_CACHEPLAYBACK, MNG_LC_START);
|
|
391 |
#endif
|
|
392 |
|
|
393 |
MNG_VALIDHANDLE (hHandle)
|
|
394 |
|
|
395 |
if (((mng_datap)hHandle)->bHasheader)
|
|
396 |
MNG_ERROR (((mng_datap)hHandle), MNG_FUNCTIONINVALID);
|
|
397 |
|
|
398 |
((mng_datap)hHandle)->bCacheplayback = bCacheplayback;
|
|
399 |
|
|
400 |
#ifdef MNG_SUPPORT_TRACE
|
|
401 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_CACHEPLAYBACK, MNG_LC_END);
|
|
402 |
#endif
|
|
403 |
|
|
404 |
return MNG_NOERROR;
|
|
405 |
}
|
|
406 |
|
|
407 |
/* ************************************************************************** */
|
|
408 |
|
|
409 |
mng_retcode MNG_DECL mng_set_doprogressive (mng_handle hHandle,
|
|
410 |
mng_bool bDoProgressive)
|
|
411 |
{
|
|
412 |
#ifdef MNG_SUPPORT_TRACE
|
|
413 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DOPROGRESSIVE, MNG_LC_START);
|
|
414 |
#endif
|
|
415 |
|
|
416 |
MNG_VALIDHANDLE (hHandle)
|
|
417 |
|
|
418 |
((mng_datap)hHandle)->bDoProgressive = bDoProgressive;
|
|
419 |
|
|
420 |
#ifdef MNG_SUPPORT_TRACE
|
|
421 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DOPROGRESSIVE, MNG_LC_END);
|
|
422 |
#endif
|
|
423 |
|
|
424 |
return MNG_NOERROR;
|
|
425 |
}
|
|
426 |
|
|
427 |
/* ************************************************************************** */
|
|
428 |
|
|
429 |
mng_retcode MNG_DECL mng_set_crcmode (mng_handle hHandle,
|
|
430 |
mng_uint32 iCrcmode)
|
|
431 |
{
|
|
432 |
#ifdef MNG_SUPPORT_TRACE
|
|
433 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_CRCMODE, MNG_LC_START);
|
|
434 |
#endif
|
|
435 |
|
|
436 |
MNG_VALIDHANDLE (hHandle)
|
|
437 |
|
|
438 |
((mng_datap)hHandle)->iCrcmode = iCrcmode;
|
|
439 |
|
|
440 |
#ifdef MNG_SUPPORT_TRACE
|
|
441 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_CRCMODE, MNG_LC_END);
|
|
442 |
#endif
|
|
443 |
|
|
444 |
return MNG_NOERROR;
|
|
445 |
}
|
|
446 |
|
|
447 |
/* ************************************************************************** */
|
|
448 |
|
|
449 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
450 |
mng_retcode MNG_DECL mng_set_srgb (mng_handle hHandle,
|
|
451 |
mng_bool bIssRGB)
|
|
452 |
{
|
|
453 |
#ifdef MNG_SUPPORT_TRACE
|
|
454 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGB, MNG_LC_START);
|
|
455 |
#endif
|
|
456 |
|
|
457 |
MNG_VALIDHANDLE (hHandle)
|
|
458 |
((mng_datap)hHandle)->bIssRGB = bIssRGB;
|
|
459 |
|
|
460 |
#ifdef MNG_SUPPORT_TRACE
|
|
461 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGB, MNG_LC_END);
|
|
462 |
#endif
|
|
463 |
|
|
464 |
return MNG_NOERROR;
|
|
465 |
}
|
|
466 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
467 |
|
|
468 |
/* ************************************************************************** */
|
|
469 |
|
|
470 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
471 |
#ifndef MNG_SKIPCHUNK_iCCP
|
|
472 |
mng_retcode MNG_DECL mng_set_outputprofile (mng_handle hHandle,
|
|
473 |
mng_pchar zFilename)
|
|
474 |
{
|
|
475 |
#ifdef MNG_INCLUDE_LCMS
|
|
476 |
mng_datap pData;
|
|
477 |
#endif
|
|
478 |
|
|
479 |
#ifdef MNG_SUPPORT_TRACE
|
|
480 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_OUTPUTPROFILE, MNG_LC_START);
|
|
481 |
#endif
|
|
482 |
|
|
483 |
#ifdef MNG_INCLUDE_LCMS
|
|
484 |
MNG_VALIDHANDLE (hHandle)
|
|
485 |
|
|
486 |
pData = (mng_datap)hHandle; /* address the structure */
|
|
487 |
|
|
488 |
if (pData->hProf2) /* previously defined ? */
|
|
489 |
mnglcms_freeprofile (pData->hProf2);
|
|
490 |
/* allocate new CMS profile handle */
|
|
491 |
pData->hProf2 = mnglcms_createfileprofile (zFilename);
|
|
492 |
|
|
493 |
if (!pData->hProf2) /* handle error ? */
|
|
494 |
MNG_ERRORL (pData, MNG_LCMS_NOHANDLE);
|
|
495 |
#endif /* MNG_INCLUDE_LCMS */
|
|
496 |
|
|
497 |
#ifdef MNG_SUPPORT_TRACE
|
|
498 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_OUTPUTPROFILE, MNG_LC_END);
|
|
499 |
#endif
|
|
500 |
|
|
501 |
return MNG_NOERROR;
|
|
502 |
}
|
|
503 |
#endif
|
|
504 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
505 |
|
|
506 |
/* ************************************************************************** */
|
|
507 |
|
|
508 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
509 |
#ifndef MNG_SKIPCHUNK_iCCP
|
|
510 |
mng_retcode MNG_DECL mng_set_outputprofile2 (mng_handle hHandle,
|
|
511 |
mng_uint32 iProfilesize,
|
|
512 |
mng_ptr pProfile)
|
|
513 |
{
|
|
514 |
#ifdef MNG_INCLUDE_LCMS
|
|
515 |
mng_datap pData;
|
|
516 |
#endif
|
|
517 |
|
|
518 |
#ifdef MNG_SUPPORT_TRACE
|
|
519 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_OUTPUTPROFILE2, MNG_LC_START);
|
|
520 |
#endif
|
|
521 |
|
|
522 |
#ifdef MNG_INCLUDE_LCMS
|
|
523 |
MNG_VALIDHANDLE (hHandle)
|
|
524 |
|
|
525 |
pData = (mng_datap)hHandle; /* address the structure */
|
|
526 |
|
|
527 |
if (pData->hProf2) /* previously defined ? */
|
|
528 |
mnglcms_freeprofile (pData->hProf2);
|
|
529 |
/* allocate new CMS profile handle */
|
|
530 |
pData->hProf2 = mnglcms_creatememprofile (iProfilesize, pProfile);
|
|
531 |
|
|
532 |
if (!pData->hProf2) /* handle error ? */
|
|
533 |
MNG_ERRORL (pData, MNG_LCMS_NOHANDLE);
|
|
534 |
#endif /* MNG_INCLUDE_LCMS */
|
|
535 |
|
|
536 |
#ifdef MNG_SUPPORT_TRACE
|
|
537 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_OUTPUTPROFILE2, MNG_LC_END);
|
|
538 |
#endif
|
|
539 |
|
|
540 |
return MNG_NOERROR;
|
|
541 |
}
|
|
542 |
#endif
|
|
543 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
544 |
|
|
545 |
/* ************************************************************************** */
|
|
546 |
|
|
547 |
mng_retcode MNG_DECL mng_set_outputsrgb (mng_handle hHandle)
|
|
548 |
{
|
|
549 |
#ifdef MNG_INCLUDE_LCMS
|
|
550 |
mng_datap pData;
|
|
551 |
#endif
|
|
552 |
|
|
553 |
#ifdef MNG_SUPPORT_TRACE
|
|
554 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_OUTPUTSRGB, MNG_LC_START);
|
|
555 |
#endif
|
|
556 |
|
|
557 |
#ifdef MNG_INCLUDE_LCMS
|
|
558 |
MNG_VALIDHANDLE (hHandle)
|
|
559 |
|
|
560 |
pData = (mng_datap)hHandle; /* address the structure */
|
|
561 |
|
|
562 |
if (pData->hProf2) /* previously defined ? */
|
|
563 |
mnglcms_freeprofile (pData->hProf2);
|
|
564 |
/* allocate new CMS profile handle */
|
|
565 |
pData->hProf2 = mnglcms_createsrgbprofile ();
|
|
566 |
|
|
567 |
if (!pData->hProf2) /* handle error ? */
|
|
568 |
MNG_ERRORL (pData, MNG_LCMS_NOHANDLE);
|
|
569 |
#endif /* MNG_INCLUDE_LCMS */
|
|
570 |
|
|
571 |
#ifdef MNG_SUPPORT_TRACE
|
|
572 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_OUTPUTSRGB, MNG_LC_END);
|
|
573 |
#endif
|
|
574 |
|
|
575 |
return MNG_NOERROR;
|
|
576 |
}
|
|
577 |
|
|
578 |
/* ************************************************************************** */
|
|
579 |
|
|
580 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
581 |
mng_retcode MNG_DECL mng_set_srgbprofile (mng_handle hHandle,
|
|
582 |
mng_pchar zFilename)
|
|
583 |
{
|
|
584 |
#ifdef MNG_INCLUDE_LCMS
|
|
585 |
mng_datap pData;
|
|
586 |
#endif
|
|
587 |
|
|
588 |
#ifdef MNG_SUPPORT_TRACE
|
|
589 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGBPROFILE2, MNG_LC_START);
|
|
590 |
#endif
|
|
591 |
|
|
592 |
#ifdef MNG_INCLUDE_LCMS
|
|
593 |
MNG_VALIDHANDLE (hHandle)
|
|
594 |
|
|
595 |
pData = (mng_datap)hHandle; /* address the structure */
|
|
596 |
|
|
597 |
if (pData->hProf3) /* previously defined ? */
|
|
598 |
mnglcms_freeprofile (pData->hProf3);
|
|
599 |
/* allocate new CMS profile handle */
|
|
600 |
pData->hProf3 = mnglcms_createfileprofile (zFilename);
|
|
601 |
|
|
602 |
if (!pData->hProf3) /* handle error ? */
|
|
603 |
MNG_ERRORL (pData, MNG_LCMS_NOHANDLE);
|
|
604 |
#endif /* MNG_INCLUDE_LCMS */
|
|
605 |
|
|
606 |
#ifdef MNG_SUPPORT_TRACE
|
|
607 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGBPROFILE2, MNG_LC_END);
|
|
608 |
#endif
|
|
609 |
|
|
610 |
return MNG_NOERROR;
|
|
611 |
}
|
|
612 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
613 |
|
|
614 |
/* ************************************************************************** */
|
|
615 |
|
|
616 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
617 |
mng_retcode MNG_DECL mng_set_srgbprofile2 (mng_handle hHandle,
|
|
618 |
mng_uint32 iProfilesize,
|
|
619 |
mng_ptr pProfile)
|
|
620 |
{
|
|
621 |
#ifdef MNG_INCLUDE_LCMS
|
|
622 |
mng_datap pData;
|
|
623 |
#endif
|
|
624 |
|
|
625 |
#ifdef MNG_SUPPORT_TRACE
|
|
626 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGBPROFILE, MNG_LC_START);
|
|
627 |
#endif
|
|
628 |
|
|
629 |
#ifdef MNG_INCLUDE_LCMS
|
|
630 |
MNG_VALIDHANDLE (hHandle)
|
|
631 |
|
|
632 |
pData = (mng_datap)hHandle; /* address the structure */
|
|
633 |
|
|
634 |
if (pData->hProf3) /* previously defined ? */
|
|
635 |
mnglcms_freeprofile (pData->hProf3);
|
|
636 |
/* allocate new CMS profile handle */
|
|
637 |
pData->hProf3 = mnglcms_creatememprofile (iProfilesize, pProfile);
|
|
638 |
|
|
639 |
if (!pData->hProf3) /* handle error ? */
|
|
640 |
MNG_ERRORL (pData, MNG_LCMS_NOHANDLE);
|
|
641 |
#endif /* MNG_INCLUDE_LCMS */
|
|
642 |
|
|
643 |
#ifdef MNG_SUPPORT_TRACE
|
|
644 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGBPROFILE, MNG_LC_END);
|
|
645 |
#endif
|
|
646 |
|
|
647 |
return MNG_NOERROR;
|
|
648 |
}
|
|
649 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
650 |
|
|
651 |
/* ************************************************************************** */
|
|
652 |
|
|
653 |
mng_retcode MNG_DECL mng_set_srgbimplicit (mng_handle hHandle)
|
|
654 |
{
|
|
655 |
#ifdef MNG_INCLUDE_LCMS
|
|
656 |
mng_datap pData;
|
|
657 |
#endif
|
|
658 |
|
|
659 |
#ifdef MNG_SUPPORT_TRACE
|
|
660 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGBIMPLICIT, MNG_LC_START);
|
|
661 |
#endif
|
|
662 |
|
|
663 |
#ifdef MNG_INCLUDE_LCMS
|
|
664 |
MNG_VALIDHANDLE (hHandle)
|
|
665 |
|
|
666 |
pData = (mng_datap)hHandle; /* address the structure */
|
|
667 |
|
|
668 |
if (pData->hProf3) /* previously defined ? */
|
|
669 |
mnglcms_freeprofile (pData->hProf3);
|
|
670 |
/* allocate new CMS profile handle */
|
|
671 |
pData->hProf3 = mnglcms_createsrgbprofile ();
|
|
672 |
|
|
673 |
if (!pData->hProf3) /* handle error ? */
|
|
674 |
MNG_ERRORL (pData, MNG_LCMS_NOHANDLE);
|
|
675 |
#endif /* MNG_INCLUDE_LCMS */
|
|
676 |
|
|
677 |
#ifdef MNG_SUPPORT_TRACE
|
|
678 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SRGBIMPLICIT, MNG_LC_END);
|
|
679 |
#endif
|
|
680 |
|
|
681 |
return MNG_NOERROR;
|
|
682 |
}
|
|
683 |
|
|
684 |
/* ************************************************************************** */
|
|
685 |
|
|
686 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
687 |
mng_retcode MNG_DECL mng_set_viewgamma (mng_handle hHandle,
|
|
688 |
mng_float dGamma)
|
|
689 |
{
|
|
690 |
#ifdef MNG_SUPPORT_TRACE
|
|
691 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_VIEWGAMMA, MNG_LC_START);
|
|
692 |
#endif
|
|
693 |
|
|
694 |
MNG_VALIDHANDLE (hHandle)
|
|
695 |
((mng_datap)hHandle)->dViewgamma = dGamma;
|
|
696 |
|
|
697 |
#ifdef MNG_SUPPORT_TRACE
|
|
698 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_VIEWGAMMA, MNG_LC_END);
|
|
699 |
#endif
|
|
700 |
|
|
701 |
return MNG_NOERROR;
|
|
702 |
}
|
|
703 |
#endif
|
|
704 |
|
|
705 |
/* ************************************************************************** */
|
|
706 |
|
|
707 |
mng_retcode MNG_DECL mng_set_displaygamma (mng_handle hHandle,
|
|
708 |
mng_float dGamma)
|
|
709 |
{
|
|
710 |
#ifdef MNG_SUPPORT_TRACE
|
|
711 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DISPLAYGAMMA, MNG_LC_START);
|
|
712 |
#endif
|
|
713 |
|
|
714 |
MNG_VALIDHANDLE (hHandle)
|
|
715 |
((mng_datap)hHandle)->dDisplaygamma = dGamma;
|
|
716 |
|
|
717 |
#ifdef MNG_SUPPORT_TRACE
|
|
718 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DISPLAYGAMMA, MNG_LC_END);
|
|
719 |
#endif
|
|
720 |
|
|
721 |
return MNG_NOERROR;
|
|
722 |
}
|
|
723 |
|
|
724 |
/* ************************************************************************** */
|
|
725 |
|
|
726 |
mng_retcode MNG_DECL mng_set_dfltimggamma (mng_handle hHandle,
|
|
727 |
mng_float dGamma)
|
|
728 |
{
|
|
729 |
#ifdef MNG_SUPPORT_TRACE
|
|
730 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DFLTIMGGAMMA, MNG_LC_START);
|
|
731 |
#endif
|
|
732 |
|
|
733 |
MNG_VALIDHANDLE (hHandle)
|
|
734 |
((mng_datap)hHandle)->dDfltimggamma = dGamma;
|
|
735 |
|
|
736 |
#ifdef MNG_SUPPORT_TRACE
|
|
737 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DFLTIMGGAMMA, MNG_LC_END);
|
|
738 |
#endif
|
|
739 |
|
|
740 |
return MNG_NOERROR;
|
|
741 |
}
|
|
742 |
|
|
743 |
/* ************************************************************************** */
|
|
744 |
|
|
745 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
746 |
mng_retcode MNG_DECL mng_set_viewgammaint (mng_handle hHandle,
|
|
747 |
mng_uint32 iGamma)
|
|
748 |
{
|
|
749 |
#ifdef MNG_SUPPORT_TRACE
|
|
750 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_VIEWGAMMA, MNG_LC_START);
|
|
751 |
#endif
|
|
752 |
|
|
753 |
MNG_VALIDHANDLE (hHandle)
|
|
754 |
((mng_datap)hHandle)->dViewgamma = (mng_float)iGamma / 100000;
|
|
755 |
|
|
756 |
#ifdef MNG_SUPPORT_TRACE
|
|
757 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_VIEWGAMMA, MNG_LC_END);
|
|
758 |
#endif
|
|
759 |
|
|
760 |
return MNG_NOERROR;
|
|
761 |
}
|
|
762 |
#endif
|
|
763 |
|
|
764 |
/* ************************************************************************** */
|
|
765 |
|
|
766 |
mng_retcode MNG_DECL mng_set_displaygammaint (mng_handle hHandle,
|
|
767 |
mng_uint32 iGamma)
|
|
768 |
{
|
|
769 |
#ifdef MNG_SUPPORT_TRACE
|
|
770 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DISPLAYGAMMA, MNG_LC_START);
|
|
771 |
#endif
|
|
772 |
|
|
773 |
MNG_VALIDHANDLE (hHandle)
|
|
774 |
((mng_datap)hHandle)->dDisplaygamma = (mng_float)iGamma / 100000;
|
|
775 |
|
|
776 |
#ifdef MNG_SUPPORT_TRACE
|
|
777 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DISPLAYGAMMA, MNG_LC_END);
|
|
778 |
#endif
|
|
779 |
|
|
780 |
return MNG_NOERROR;
|
|
781 |
}
|
|
782 |
|
|
783 |
/* ************************************************************************** */
|
|
784 |
|
|
785 |
#ifndef MNG_NO_DFLT_INFO
|
|
786 |
mng_retcode MNG_DECL mng_set_dfltimggammaint (mng_handle hHandle,
|
|
787 |
mng_uint32 iGamma)
|
|
788 |
{
|
|
789 |
#ifdef MNG_SUPPORT_TRACE
|
|
790 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DFLTIMGGAMMA, MNG_LC_START);
|
|
791 |
#endif
|
|
792 |
|
|
793 |
MNG_VALIDHANDLE (hHandle)
|
|
794 |
((mng_datap)hHandle)->dDfltimggamma = (mng_float)iGamma / 100000;
|
|
795 |
|
|
796 |
#ifdef MNG_SUPPORT_TRACE
|
|
797 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_DFLTIMGGAMMA, MNG_LC_END);
|
|
798 |
#endif
|
|
799 |
|
|
800 |
return MNG_NOERROR;
|
|
801 |
}
|
|
802 |
#endif
|
|
803 |
|
|
804 |
/* ************************************************************************** */
|
|
805 |
|
|
806 |
#ifndef MNG_SKIP_MAXCANVAS
|
|
807 |
mng_retcode MNG_DECL mng_set_maxcanvaswidth (mng_handle hHandle,
|
|
808 |
mng_uint32 iMaxwidth)
|
|
809 |
{
|
|
810 |
#ifdef MNG_SUPPORT_TRACE
|
|
811 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_MAXCANVASWIDTH, MNG_LC_START);
|
|
812 |
#endif
|
|
813 |
|
|
814 |
MNG_VALIDHANDLE (hHandle)
|
|
815 |
((mng_datap)hHandle)->iMaxwidth = iMaxwidth;
|
|
816 |
|
|
817 |
#ifdef MNG_SUPPORT_TRACE
|
|
818 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_MAXCANVASWIDTH, MNG_LC_END);
|
|
819 |
#endif
|
|
820 |
|
|
821 |
return MNG_NOERROR;
|
|
822 |
}
|
|
823 |
|
|
824 |
/* ************************************************************************** */
|
|
825 |
|
|
826 |
mng_retcode MNG_DECL mng_set_maxcanvasheight (mng_handle hHandle,
|
|
827 |
mng_uint32 iMaxheight)
|
|
828 |
{
|
|
829 |
#ifdef MNG_SUPPORT_TRACE
|
|
830 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_MAXCANVASHEIGHT, MNG_LC_START);
|
|
831 |
#endif
|
|
832 |
|
|
833 |
MNG_VALIDHANDLE (hHandle)
|
|
834 |
((mng_datap)hHandle)->iMaxheight = iMaxheight;
|
|
835 |
|
|
836 |
#ifdef MNG_SUPPORT_TRACE
|
|
837 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_MAXCANVASHEIGHT, MNG_LC_END);
|
|
838 |
#endif
|
|
839 |
|
|
840 |
return MNG_NOERROR;
|
|
841 |
}
|
|
842 |
|
|
843 |
/* ************************************************************************** */
|
|
844 |
|
|
845 |
mng_retcode MNG_DECL mng_set_maxcanvassize (mng_handle hHandle,
|
|
846 |
mng_uint32 iMaxwidth,
|
|
847 |
mng_uint32 iMaxheight)
|
|
848 |
{
|
|
849 |
#ifdef MNG_SUPPORT_TRACE
|
|
850 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_MAXCANVASSIZE, MNG_LC_START);
|
|
851 |
#endif
|
|
852 |
|
|
853 |
MNG_VALIDHANDLE (hHandle)
|
|
854 |
((mng_datap)hHandle)->iMaxwidth = iMaxwidth;
|
|
855 |
((mng_datap)hHandle)->iMaxheight = iMaxheight;
|
|
856 |
|
|
857 |
#ifdef MNG_SUPPORT_TRACE
|
|
858 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_MAXCANVASSIZE, MNG_LC_END);
|
|
859 |
#endif
|
|
860 |
|
|
861 |
return MNG_NOERROR;
|
|
862 |
}
|
|
863 |
#endif
|
|
864 |
|
|
865 |
/* ************************************************************************** */
|
|
866 |
|
|
867 |
#ifdef MNG_INCLUDE_ZLIB
|
|
868 |
#ifdef MNG_ACCESS_ZLIB
|
|
869 |
#ifdef MNG_SUPPORT_WRITE
|
|
870 |
mng_retcode MNG_DECL mng_set_zlib_level (mng_handle hHandle,
|
|
871 |
mng_int32 iZlevel)
|
|
872 |
{
|
|
873 |
#ifdef MNG_SUPPORT_TRACE
|
|
874 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_LEVEL, MNG_LC_START);
|
|
875 |
#endif
|
|
876 |
|
|
877 |
MNG_VALIDHANDLE (hHandle)
|
|
878 |
((mng_datap)hHandle)->iZlevel = iZlevel;
|
|
879 |
|
|
880 |
#ifdef MNG_SUPPORT_TRACE
|
|
881 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_LEVEL, MNG_LC_END);
|
|
882 |
#endif
|
|
883 |
|
|
884 |
return MNG_NOERROR;
|
|
885 |
}
|
|
886 |
#endif /* MNG_SUPPORT_WRITE */
|
|
887 |
#endif /* MNG_ACCESS_ZLIB */
|
|
888 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
889 |
|
|
890 |
/* ************************************************************************** */
|
|
891 |
|
|
892 |
#ifdef MNG_INCLUDE_ZLIB
|
|
893 |
#ifdef MNG_ACCESS_ZLIB
|
|
894 |
#ifdef MNG_SUPPORT_WRITE
|
|
895 |
mng_retcode MNG_DECL mng_set_zlib_method (mng_handle hHandle,
|
|
896 |
mng_int32 iZmethod)
|
|
897 |
{
|
|
898 |
#ifdef MNG_SUPPORT_TRACE
|
|
899 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_METHOD, MNG_LC_START);
|
|
900 |
#endif
|
|
901 |
|
|
902 |
MNG_VALIDHANDLE (hHandle)
|
|
903 |
((mng_datap)hHandle)->iZmethod = iZmethod;
|
|
904 |
|
|
905 |
#ifdef MNG_SUPPORT_TRACE
|
|
906 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_METHOD, MNG_LC_END);
|
|
907 |
#endif
|
|
908 |
|
|
909 |
return MNG_NOERROR;
|
|
910 |
}
|
|
911 |
#endif /* MNG_SUPPORT_WRITE */
|
|
912 |
#endif /* MNG_ACCESS_ZLIB */
|
|
913 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
914 |
|
|
915 |
/* ************************************************************************** */
|
|
916 |
|
|
917 |
#ifdef MNG_INCLUDE_ZLIB
|
|
918 |
#ifdef MNG_ACCESS_ZLIB
|
|
919 |
#ifdef MNG_SUPPORT_WRITE
|
|
920 |
mng_retcode MNG_DECL mng_set_zlib_windowbits (mng_handle hHandle,
|
|
921 |
mng_int32 iZwindowbits)
|
|
922 |
{
|
|
923 |
#ifdef MNG_SUPPORT_TRACE
|
|
924 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_WINDOWBITS, MNG_LC_START);
|
|
925 |
#endif
|
|
926 |
|
|
927 |
MNG_VALIDHANDLE (hHandle)
|
|
928 |
((mng_datap)hHandle)->iZwindowbits = iZwindowbits;
|
|
929 |
|
|
930 |
#ifdef MNG_SUPPORT_TRACE
|
|
931 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_WINDOWBITS, MNG_LC_END);
|
|
932 |
#endif
|
|
933 |
|
|
934 |
return MNG_NOERROR;
|
|
935 |
}
|
|
936 |
#endif /* MNG_SUPPORT_WRITE */
|
|
937 |
#endif /* MNG_ACCESS_ZLIB */
|
|
938 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
939 |
|
|
940 |
/* ************************************************************************** */
|
|
941 |
|
|
942 |
#ifdef MNG_INCLUDE_ZLIB
|
|
943 |
#ifdef MNG_ACCESS_ZLIB
|
|
944 |
#ifdef MNG_SUPPORT_WRITE
|
|
945 |
mng_retcode MNG_DECL mng_set_zlib_memlevel (mng_handle hHandle,
|
|
946 |
mng_int32 iZmemlevel)
|
|
947 |
{
|
|
948 |
#ifdef MNG_SUPPORT_TRACE
|
|
949 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_MEMLEVEL, MNG_LC_START);
|
|
950 |
#endif
|
|
951 |
|
|
952 |
MNG_VALIDHANDLE (hHandle)
|
|
953 |
((mng_datap)hHandle)->iZmemlevel = iZmemlevel;
|
|
954 |
|
|
955 |
#ifdef MNG_SUPPORT_TRACE
|
|
956 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_MEMLEVEL, MNG_LC_END);
|
|
957 |
#endif
|
|
958 |
|
|
959 |
return MNG_NOERROR;
|
|
960 |
}
|
|
961 |
#endif /* MNG_SUPPORT_WRITE */
|
|
962 |
#endif /* MNG_ACCESS_ZLIB */
|
|
963 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
964 |
|
|
965 |
/* ************************************************************************** */
|
|
966 |
|
|
967 |
#ifdef MNG_INCLUDE_ZLIB
|
|
968 |
#ifdef MNG_ACCESS_ZLIB
|
|
969 |
#ifdef MNG_SUPPORT_WRITE
|
|
970 |
mng_retcode MNG_DECL mng_set_zlib_strategy (mng_handle hHandle,
|
|
971 |
mng_int32 iZstrategy)
|
|
972 |
{
|
|
973 |
#ifdef MNG_SUPPORT_TRACE
|
|
974 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_STRATEGY, MNG_LC_START);
|
|
975 |
#endif
|
|
976 |
|
|
977 |
MNG_VALIDHANDLE (hHandle)
|
|
978 |
((mng_datap)hHandle)->iZstrategy = iZstrategy;
|
|
979 |
|
|
980 |
#ifdef MNG_SUPPORT_TRACE
|
|
981 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_STRATEGY, MNG_LC_END);
|
|
982 |
#endif
|
|
983 |
|
|
984 |
return MNG_NOERROR;
|
|
985 |
}
|
|
986 |
#endif /* MNG_SUPPORT_WRITE */
|
|
987 |
#endif /* MNG_ACCESS_ZLIB */
|
|
988 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
989 |
|
|
990 |
/* ************************************************************************** */
|
|
991 |
|
|
992 |
#ifdef MNG_INCLUDE_ZLIB
|
|
993 |
#ifdef MNG_ACCESS_ZLIB
|
|
994 |
#ifdef MNG_SUPPORT_WRITE
|
|
995 |
mng_retcode MNG_DECL mng_set_zlib_maxidat (mng_handle hHandle,
|
|
996 |
mng_uint32 iMaxIDAT)
|
|
997 |
{
|
|
998 |
#ifdef MNG_SUPPORT_TRACE
|
|
999 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_MAXIDAT, MNG_LC_START);
|
|
1000 |
#endif
|
|
1001 |
|
|
1002 |
MNG_VALIDHANDLE (hHandle)
|
|
1003 |
((mng_datap)hHandle)->iMaxIDAT = iMaxIDAT;
|
|
1004 |
|
|
1005 |
#ifdef MNG_SUPPORT_TRACE
|
|
1006 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_ZLIB_MAXIDAT, MNG_LC_END);
|
|
1007 |
#endif
|
|
1008 |
|
|
1009 |
return MNG_NOERROR;
|
|
1010 |
}
|
|
1011 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1012 |
#endif /* MNG_ACCESS_ZLIB */
|
|
1013 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
1014 |
|
|
1015 |
/* ************************************************************************** */
|
|
1016 |
|
|
1017 |
#ifdef MNG_INCLUDE_JNG
|
|
1018 |
#ifdef MNG_ACCESS_JPEG
|
|
1019 |
#ifdef MNG_SUPPORT_WRITE
|
|
1020 |
mng_retcode MNG_DECL mng_set_jpeg_dctmethod (mng_handle hHandle,
|
|
1021 |
mngjpeg_dctmethod eJPEGdctmethod)
|
|
1022 |
{
|
|
1023 |
#ifdef MNG_SUPPORT_TRACE
|
|
1024 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_DCTMETHOD, MNG_LC_START);
|
|
1025 |
#endif
|
|
1026 |
|
|
1027 |
MNG_VALIDHANDLE (hHandle)
|
|
1028 |
((mng_datap)hHandle)->eJPEGdctmethod = eJPEGdctmethod;
|
|
1029 |
|
|
1030 |
#ifdef MNG_SUPPORT_TRACE
|
|
1031 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_DCTMETHOD, MNG_LC_END);
|
|
1032 |
#endif
|
|
1033 |
|
|
1034 |
return MNG_NOERROR;
|
|
1035 |
}
|
|
1036 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1037 |
#endif /* MNG_ACCESS_JPEG */
|
|
1038 |
#endif /* MNG_INCLUDE_JNG */
|
|
1039 |
|
|
1040 |
/* ************************************************************************** */
|
|
1041 |
|
|
1042 |
#ifdef MNG_INCLUDE_JNG
|
|
1043 |
#ifdef MNG_ACCESS_JPEG
|
|
1044 |
#ifdef MNG_SUPPORT_WRITE
|
|
1045 |
mng_retcode MNG_DECL mng_set_jpeg_quality (mng_handle hHandle,
|
|
1046 |
mng_int32 iJPEGquality)
|
|
1047 |
{
|
|
1048 |
#ifdef MNG_SUPPORT_TRACE
|
|
1049 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_QUALITY, MNG_LC_START);
|
|
1050 |
#endif
|
|
1051 |
|
|
1052 |
MNG_VALIDHANDLE (hHandle)
|
|
1053 |
((mng_datap)hHandle)->iJPEGquality = iJPEGquality;
|
|
1054 |
|
|
1055 |
#ifdef MNG_SUPPORT_TRACE
|
|
1056 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_QUALITY, MNG_LC_END);
|
|
1057 |
#endif
|
|
1058 |
|
|
1059 |
return MNG_NOERROR;
|
|
1060 |
}
|
|
1061 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1062 |
#endif /* MNG_ACCESS_JPEG */
|
|
1063 |
#endif /* MNG_INCLUDE_JNG */
|
|
1064 |
|
|
1065 |
/* ************************************************************************** */
|
|
1066 |
|
|
1067 |
#ifdef MNG_INCLUDE_JNG
|
|
1068 |
#ifdef MNG_ACCESS_JPEG
|
|
1069 |
#ifdef MNG_SUPPORT_WRITE
|
|
1070 |
mng_retcode MNG_DECL mng_set_jpeg_smoothing (mng_handle hHandle,
|
|
1071 |
mng_int32 iJPEGsmoothing)
|
|
1072 |
{
|
|
1073 |
#ifdef MNG_SUPPORT_TRACE
|
|
1074 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_SMOOTHING, MNG_LC_START);
|
|
1075 |
#endif
|
|
1076 |
|
|
1077 |
MNG_VALIDHANDLE (hHandle)
|
|
1078 |
((mng_datap)hHandle)->iJPEGsmoothing = iJPEGsmoothing;
|
|
1079 |
|
|
1080 |
#ifdef MNG_SUPPORT_TRACE
|
|
1081 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_SMOOTHING, MNG_LC_END);
|
|
1082 |
#endif
|
|
1083 |
|
|
1084 |
return MNG_NOERROR;
|
|
1085 |
}
|
|
1086 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1087 |
#endif /* MNG_ACCESS_JPEG */
|
|
1088 |
#endif /* MNG_INCLUDE_JNG */
|
|
1089 |
|
|
1090 |
/* ************************************************************************** */
|
|
1091 |
|
|
1092 |
#ifdef MNG_INCLUDE_JNG
|
|
1093 |
#ifdef MNG_ACCESS_JPEG
|
|
1094 |
#ifdef MNG_SUPPORT_WRITE
|
|
1095 |
mng_retcode MNG_DECL mng_set_jpeg_progressive (mng_handle hHandle,
|
|
1096 |
mng_bool bJPEGprogressive)
|
|
1097 |
{
|
|
1098 |
#ifdef MNG_SUPPORT_TRACE
|
|
1099 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_PROGRESSIVE, MNG_LC_START);
|
|
1100 |
#endif
|
|
1101 |
|
|
1102 |
MNG_VALIDHANDLE (hHandle)
|
|
1103 |
((mng_datap)hHandle)->bJPEGcompressprogr = bJPEGprogressive;
|
|
1104 |
|
|
1105 |
#ifdef MNG_SUPPORT_TRACE
|
|
1106 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_PROGRESSIVE, MNG_LC_END);
|
|
1107 |
#endif
|
|
1108 |
|
|
1109 |
return MNG_NOERROR;
|
|
1110 |
}
|
|
1111 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1112 |
#endif /* MNG_ACCESS_JPEG */
|
|
1113 |
#endif /* MNG_INCLUDE_JNG */
|
|
1114 |
|
|
1115 |
/* ************************************************************************** */
|
|
1116 |
|
|
1117 |
#ifdef MNG_INCLUDE_JNG
|
|
1118 |
#ifdef MNG_ACCESS_JPEG
|
|
1119 |
#ifdef MNG_SUPPORT_WRITE
|
|
1120 |
mng_retcode MNG_DECL mng_set_jpeg_optimized (mng_handle hHandle,
|
|
1121 |
mng_bool bJPEGoptimized)
|
|
1122 |
{
|
|
1123 |
#ifdef MNG_SUPPORT_TRACE
|
|
1124 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_OPTIMIZED, MNG_LC_START);
|
|
1125 |
#endif
|
|
1126 |
|
|
1127 |
MNG_VALIDHANDLE (hHandle)
|
|
1128 |
((mng_datap)hHandle)->bJPEGcompressopt = bJPEGoptimized;
|
|
1129 |
|
|
1130 |
#ifdef MNG_SUPPORT_TRACE
|
|
1131 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_OPTIMIZED, MNG_LC_END);
|
|
1132 |
#endif
|
|
1133 |
|
|
1134 |
return MNG_NOERROR;
|
|
1135 |
}
|
|
1136 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1137 |
#endif /* MNG_ACCESS_JPEG */
|
|
1138 |
#endif /* MNG_INCLUDE_JNG */
|
|
1139 |
|
|
1140 |
/* ************************************************************************** */
|
|
1141 |
|
|
1142 |
#ifdef MNG_INCLUDE_JNG
|
|
1143 |
#ifdef MNG_ACCESS_JPEG
|
|
1144 |
#ifdef MNG_SUPPORT_WRITE
|
|
1145 |
mng_retcode MNG_DECL mng_set_jpeg_maxjdat (mng_handle hHandle,
|
|
1146 |
mng_uint32 iMaxJDAT)
|
|
1147 |
{
|
|
1148 |
#ifdef MNG_SUPPORT_TRACE
|
|
1149 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_MAXJDAT, MNG_LC_START);
|
|
1150 |
#endif
|
|
1151 |
|
|
1152 |
MNG_VALIDHANDLE (hHandle)
|
|
1153 |
((mng_datap)hHandle)->iMaxJDAT = iMaxJDAT;
|
|
1154 |
|
|
1155 |
#ifdef MNG_SUPPORT_TRACE
|
|
1156 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_JPEG_MAXJDAT, MNG_LC_END);
|
|
1157 |
#endif
|
|
1158 |
|
|
1159 |
return MNG_NOERROR;
|
|
1160 |
}
|
|
1161 |
#endif /* MNG_SUPPORT_WRITE */
|
|
1162 |
#endif /* MNG_ACCESS_JPEG */
|
|
1163 |
#endif /* MNG_INCLUDE_JNG */
|
|
1164 |
|
|
1165 |
/* ************************************************************************** */
|
|
1166 |
|
|
1167 |
#ifdef MNG_SUPPORT_READ
|
|
1168 |
mng_retcode MNG_DECL mng_set_suspensionmode (mng_handle hHandle,
|
|
1169 |
mng_bool bSuspensionmode)
|
|
1170 |
{
|
|
1171 |
#ifdef MNG_SUPPORT_TRACE
|
|
1172 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SUSPENSIONMODE, MNG_LC_START);
|
|
1173 |
#endif
|
|
1174 |
|
|
1175 |
MNG_VALIDHANDLE (hHandle)
|
|
1176 |
|
|
1177 |
if (((mng_datap)hHandle)->bReading) /* we must NOT be reading !!! */
|
|
1178 |
MNG_ERROR ((mng_datap)hHandle, MNG_FUNCTIONINVALID);
|
|
1179 |
|
|
1180 |
((mng_datap)hHandle)->bSuspensionmode = bSuspensionmode;
|
|
1181 |
|
|
1182 |
#ifdef MNG_SUPPORT_TRACE
|
|
1183 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SUSPENSIONMODE, MNG_LC_END);
|
|
1184 |
#endif
|
|
1185 |
|
|
1186 |
return MNG_NOERROR;
|
|
1187 |
}
|
|
1188 |
#endif /* MNG_SUPPORT_READ */
|
|
1189 |
|
|
1190 |
/* ************************************************************************** */
|
|
1191 |
|
|
1192 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
1193 |
mng_retcode MNG_DECL mng_set_speed (mng_handle hHandle,
|
|
1194 |
mng_speedtype iSpeed)
|
|
1195 |
{
|
|
1196 |
#ifdef MNG_SUPPORT_TRACE
|
|
1197 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SPEED, MNG_LC_START);
|
|
1198 |
#endif
|
|
1199 |
|
|
1200 |
MNG_VALIDHANDLE (hHandle)
|
|
1201 |
((mng_datap)hHandle)->iSpeed = iSpeed;
|
|
1202 |
|
|
1203 |
#ifdef MNG_SUPPORT_TRACE
|
|
1204 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_SET_SPEED, MNG_LC_END);
|
|
1205 |
#endif
|
|
1206 |
|
|
1207 |
return MNG_NOERROR;
|
|
1208 |
}
|
|
1209 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
1210 |
|
|
1211 |
/* ************************************************************************** */
|
|
1212 |
/* * * */
|
|
1213 |
/* * Property get functions * */
|
|
1214 |
/* * * */
|
|
1215 |
/* ************************************************************************** */
|
|
1216 |
|
|
1217 |
mng_ptr MNG_DECL mng_get_userdata (mng_handle hHandle)
|
|
1218 |
{ /* no tracing in here to prevent recursive calls */
|
|
1219 |
MNG_VALIDHANDLEX (hHandle)
|
|
1220 |
return ((mng_datap)hHandle)->pUserdata;
|
|
1221 |
}
|
|
1222 |
|
|
1223 |
/* ************************************************************************** */
|
|
1224 |
|
|
1225 |
mng_imgtype MNG_DECL mng_get_sigtype (mng_handle hHandle)
|
|
1226 |
{
|
|
1227 |
#ifdef MNG_SUPPORT_TRACE
|
|
1228 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SIGTYPE, MNG_LC_START);
|
|
1229 |
#endif
|
|
1230 |
|
|
1231 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
1232 |
return mng_it_unknown;
|
|
1233 |
|
|
1234 |
#ifdef MNG_SUPPORT_TRACE
|
|
1235 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SIGTYPE, MNG_LC_END);
|
|
1236 |
#endif
|
|
1237 |
|
|
1238 |
return ((mng_datap)hHandle)->eSigtype;
|
|
1239 |
}
|
|
1240 |
|
|
1241 |
/* ************************************************************************** */
|
|
1242 |
|
|
1243 |
mng_imgtype MNG_DECL mng_get_imagetype (mng_handle hHandle)
|
|
1244 |
{
|
|
1245 |
#ifdef MNG_SUPPORT_TRACE
|
|
1246 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGETYPE, MNG_LC_START);
|
|
1247 |
#endif
|
|
1248 |
|
|
1249 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
1250 |
return mng_it_unknown;
|
|
1251 |
|
|
1252 |
#ifdef MNG_SUPPORT_TRACE
|
|
1253 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGETYPE, MNG_LC_END);
|
|
1254 |
#endif
|
|
1255 |
|
|
1256 |
return ((mng_datap)hHandle)->eImagetype;
|
|
1257 |
}
|
|
1258 |
|
|
1259 |
/* ************************************************************************** */
|
|
1260 |
|
|
1261 |
mng_uint32 MNG_DECL mng_get_imagewidth (mng_handle hHandle)
|
|
1262 |
{
|
|
1263 |
#ifdef MNG_SUPPORT_TRACE
|
|
1264 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGEWIDTH, MNG_LC_START);
|
|
1265 |
#endif
|
|
1266 |
|
|
1267 |
MNG_VALIDHANDLEX (hHandle)
|
|
1268 |
|
|
1269 |
#ifdef MNG_SUPPORT_TRACE
|
|
1270 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGEWIDTH, MNG_LC_END);
|
|
1271 |
#endif
|
|
1272 |
|
|
1273 |
return ((mng_datap)hHandle)->iWidth;
|
|
1274 |
}
|
|
1275 |
|
|
1276 |
/* ************************************************************************** */
|
|
1277 |
|
|
1278 |
mng_uint32 MNG_DECL mng_get_imageheight (mng_handle hHandle)
|
|
1279 |
{
|
|
1280 |
#ifdef MNG_SUPPORT_TRACE
|
|
1281 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGEWIDTH, MNG_LC_START);
|
|
1282 |
#endif
|
|
1283 |
|
|
1284 |
MNG_VALIDHANDLEX (hHandle)
|
|
1285 |
|
|
1286 |
#ifdef MNG_SUPPORT_TRACE
|
|
1287 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGEHEIGHT, MNG_LC_END);
|
|
1288 |
#endif
|
|
1289 |
|
|
1290 |
return ((mng_datap)hHandle)->iHeight;
|
|
1291 |
}
|
|
1292 |
|
|
1293 |
/* ************************************************************************** */
|
|
1294 |
|
|
1295 |
mng_uint32 MNG_DECL mng_get_ticks (mng_handle hHandle)
|
|
1296 |
{
|
|
1297 |
#ifdef MNG_SUPPORT_TRACE
|
|
1298 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TICKS, MNG_LC_START);
|
|
1299 |
#endif
|
|
1300 |
|
|
1301 |
MNG_VALIDHANDLEX (hHandle)
|
|
1302 |
|
|
1303 |
#ifdef MNG_SUPPORT_TRACE
|
|
1304 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TICKS, MNG_LC_END);
|
|
1305 |
#endif
|
|
1306 |
|
|
1307 |
return ((mng_datap)hHandle)->iTicks;
|
|
1308 |
}
|
|
1309 |
|
|
1310 |
/* ************************************************************************** */
|
|
1311 |
|
|
1312 |
mng_uint32 MNG_DECL mng_get_framecount (mng_handle hHandle)
|
|
1313 |
{
|
|
1314 |
#ifdef MNG_SUPPORT_TRACE
|
|
1315 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_FRAMECOUNT, MNG_LC_START);
|
|
1316 |
#endif
|
|
1317 |
|
|
1318 |
MNG_VALIDHANDLEX (hHandle)
|
|
1319 |
|
|
1320 |
#ifdef MNG_SUPPORT_TRACE
|
|
1321 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_FRAMECOUNT, MNG_LC_END);
|
|
1322 |
#endif
|
|
1323 |
|
|
1324 |
return ((mng_datap)hHandle)->iFramecount;
|
|
1325 |
}
|
|
1326 |
|
|
1327 |
/* ************************************************************************** */
|
|
1328 |
|
|
1329 |
mng_uint32 MNG_DECL mng_get_layercount (mng_handle hHandle)
|
|
1330 |
{
|
|
1331 |
#ifdef MNG_SUPPORT_TRACE
|
|
1332 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_LAYERCOUNT, MNG_LC_START);
|
|
1333 |
#endif
|
|
1334 |
|
|
1335 |
MNG_VALIDHANDLEX (hHandle)
|
|
1336 |
|
|
1337 |
#ifdef MNG_SUPPORT_TRACE
|
|
1338 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_LAYERCOUNT, MNG_LC_END);
|
|
1339 |
#endif
|
|
1340 |
|
|
1341 |
return ((mng_datap)hHandle)->iLayercount;
|
|
1342 |
}
|
|
1343 |
|
|
1344 |
/* ************************************************************************** */
|
|
1345 |
|
|
1346 |
mng_uint32 MNG_DECL mng_get_playtime (mng_handle hHandle)
|
|
1347 |
{
|
|
1348 |
#ifdef MNG_SUPPORT_TRACE
|
|
1349 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_PLAYTIME, MNG_LC_START);
|
|
1350 |
#endif
|
|
1351 |
|
|
1352 |
MNG_VALIDHANDLEX (hHandle)
|
|
1353 |
|
|
1354 |
#ifdef MNG_SUPPORT_TRACE
|
|
1355 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_PLAYTIME, MNG_LC_END);
|
|
1356 |
#endif
|
|
1357 |
|
|
1358 |
return ((mng_datap)hHandle)->iPlaytime;
|
|
1359 |
}
|
|
1360 |
|
|
1361 |
/* ************************************************************************** */
|
|
1362 |
|
|
1363 |
mng_uint32 MNG_DECL mng_get_simplicity (mng_handle hHandle)
|
|
1364 |
{
|
|
1365 |
#ifdef MNG_SUPPORT_TRACE
|
|
1366 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SIMPLICITY, MNG_LC_START);
|
|
1367 |
#endif
|
|
1368 |
|
|
1369 |
MNG_VALIDHANDLEX (hHandle)
|
|
1370 |
|
|
1371 |
#ifdef MNG_SUPPORT_TRACE
|
|
1372 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SIMPLICITY, MNG_LC_END);
|
|
1373 |
#endif
|
|
1374 |
|
|
1375 |
return ((mng_datap)hHandle)->iSimplicity;
|
|
1376 |
}
|
|
1377 |
|
|
1378 |
/* ************************************************************************** */
|
|
1379 |
|
|
1380 |
mng_uint8 MNG_DECL mng_get_bitdepth (mng_handle hHandle)
|
|
1381 |
{
|
|
1382 |
mng_uint8 iRslt;
|
|
1383 |
|
|
1384 |
#ifdef MNG_SUPPORT_TRACE
|
|
1385 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_BITDEPTH, MNG_LC_START);
|
|
1386 |
#endif
|
|
1387 |
|
|
1388 |
MNG_VALIDHANDLEX (hHandle)
|
|
1389 |
|
|
1390 |
if (((mng_datap)hHandle)->eImagetype == mng_it_png)
|
|
1391 |
iRslt = ((mng_datap)hHandle)->iBitdepth;
|
|
1392 |
else
|
|
1393 |
#ifdef MNG_INCLUDE_JNG
|
|
1394 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1395 |
iRslt = ((mng_datap)hHandle)->iJHDRimgbitdepth;
|
|
1396 |
else
|
|
1397 |
#endif
|
|
1398 |
iRslt = 0;
|
|
1399 |
|
|
1400 |
#ifdef MNG_SUPPORT_TRACE
|
|
1401 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_BITDEPTH, MNG_LC_END);
|
|
1402 |
#endif
|
|
1403 |
|
|
1404 |
return iRslt;
|
|
1405 |
}
|
|
1406 |
|
|
1407 |
/* ************************************************************************** */
|
|
1408 |
|
|
1409 |
mng_uint8 MNG_DECL mng_get_colortype (mng_handle hHandle)
|
|
1410 |
{
|
|
1411 |
mng_uint8 iRslt;
|
|
1412 |
|
|
1413 |
#ifdef MNG_SUPPORT_TRACE
|
|
1414 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_COLORTYPE, MNG_LC_START);
|
|
1415 |
#endif
|
|
1416 |
|
|
1417 |
MNG_VALIDHANDLEX (hHandle)
|
|
1418 |
|
|
1419 |
if (((mng_datap)hHandle)->eImagetype == mng_it_png)
|
|
1420 |
iRslt = ((mng_datap)hHandle)->iColortype;
|
|
1421 |
else
|
|
1422 |
#ifdef MNG_INCLUDE_JNG
|
|
1423 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1424 |
iRslt = ((mng_datap)hHandle)->iJHDRcolortype;
|
|
1425 |
else
|
|
1426 |
#endif
|
|
1427 |
iRslt = 0;
|
|
1428 |
|
|
1429 |
#ifdef MNG_SUPPORT_TRACE
|
|
1430 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_COLORTYPE, MNG_LC_END);
|
|
1431 |
#endif
|
|
1432 |
|
|
1433 |
return iRslt;
|
|
1434 |
}
|
|
1435 |
|
|
1436 |
/* ************************************************************************** */
|
|
1437 |
|
|
1438 |
mng_uint8 MNG_DECL mng_get_compression (mng_handle hHandle)
|
|
1439 |
{
|
|
1440 |
mng_uint8 iRslt;
|
|
1441 |
|
|
1442 |
#ifdef MNG_SUPPORT_TRACE
|
|
1443 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_COMPRESSION, MNG_LC_START);
|
|
1444 |
#endif
|
|
1445 |
|
|
1446 |
MNG_VALIDHANDLEX (hHandle)
|
|
1447 |
|
|
1448 |
if (((mng_datap)hHandle)->eImagetype == mng_it_png)
|
|
1449 |
iRslt = ((mng_datap)hHandle)->iCompression;
|
|
1450 |
else
|
|
1451 |
#ifdef MNG_INCLUDE_JNG
|
|
1452 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1453 |
iRslt = ((mng_datap)hHandle)->iJHDRimgcompression;
|
|
1454 |
else
|
|
1455 |
#endif
|
|
1456 |
iRslt = 0;
|
|
1457 |
|
|
1458 |
#ifdef MNG_SUPPORT_TRACE
|
|
1459 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_COMPRESSION, MNG_LC_END);
|
|
1460 |
#endif
|
|
1461 |
|
|
1462 |
return iRslt;
|
|
1463 |
}
|
|
1464 |
|
|
1465 |
/* ************************************************************************** */
|
|
1466 |
|
|
1467 |
mng_uint8 MNG_DECL mng_get_filter (mng_handle hHandle)
|
|
1468 |
{
|
|
1469 |
mng_uint8 iRslt;
|
|
1470 |
|
|
1471 |
#ifdef MNG_SUPPORT_TRACE
|
|
1472 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_FILTER, MNG_LC_START);
|
|
1473 |
#endif
|
|
1474 |
|
|
1475 |
MNG_VALIDHANDLEX (hHandle)
|
|
1476 |
|
|
1477 |
if (((mng_datap)hHandle)->eImagetype == mng_it_png)
|
|
1478 |
iRslt = ((mng_datap)hHandle)->iFilter;
|
|
1479 |
else
|
|
1480 |
iRslt = 0;
|
|
1481 |
|
|
1482 |
#ifdef MNG_SUPPORT_TRACE
|
|
1483 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_FILTER, MNG_LC_END);
|
|
1484 |
#endif
|
|
1485 |
|
|
1486 |
return iRslt;
|
|
1487 |
}
|
|
1488 |
|
|
1489 |
/* ************************************************************************** */
|
|
1490 |
|
|
1491 |
mng_uint8 MNG_DECL mng_get_interlace (mng_handle hHandle)
|
|
1492 |
{
|
|
1493 |
mng_uint8 iRslt;
|
|
1494 |
|
|
1495 |
#ifdef MNG_SUPPORT_TRACE
|
|
1496 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_INTERLACE, MNG_LC_START);
|
|
1497 |
#endif
|
|
1498 |
|
|
1499 |
MNG_VALIDHANDLEX (hHandle)
|
|
1500 |
|
|
1501 |
if (((mng_datap)hHandle)->eImagetype == mng_it_png)
|
|
1502 |
iRslt = ((mng_datap)hHandle)->iInterlace;
|
|
1503 |
else
|
|
1504 |
#ifdef MNG_INCLUDE_JNG
|
|
1505 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1506 |
iRslt = ((mng_datap)hHandle)->iJHDRimginterlace;
|
|
1507 |
else
|
|
1508 |
#endif
|
|
1509 |
iRslt = 0;
|
|
1510 |
|
|
1511 |
#ifdef MNG_SUPPORT_TRACE
|
|
1512 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_INTERLACE, MNG_LC_END);
|
|
1513 |
#endif
|
|
1514 |
|
|
1515 |
return iRslt;
|
|
1516 |
}
|
|
1517 |
|
|
1518 |
/* ************************************************************************** */
|
|
1519 |
|
|
1520 |
mng_uint8 MNG_DECL mng_get_alphabitdepth (mng_handle hHandle)
|
|
1521 |
{
|
|
1522 |
mng_uint8 iRslt;
|
|
1523 |
|
|
1524 |
#ifdef MNG_SUPPORT_TRACE
|
|
1525 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHABITDEPTH, MNG_LC_START);
|
|
1526 |
#endif
|
|
1527 |
|
|
1528 |
MNG_VALIDHANDLEX (hHandle)
|
|
1529 |
|
|
1530 |
#ifdef MNG_INCLUDE_JNG
|
|
1531 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1532 |
iRslt = ((mng_datap)hHandle)->iJHDRalphabitdepth;
|
|
1533 |
else
|
|
1534 |
#endif
|
|
1535 |
iRslt = 0;
|
|
1536 |
|
|
1537 |
#ifdef MNG_SUPPORT_TRACE
|
|
1538 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHABITDEPTH, MNG_LC_END);
|
|
1539 |
#endif
|
|
1540 |
|
|
1541 |
return iRslt;
|
|
1542 |
}
|
|
1543 |
|
|
1544 |
/* ************************************************************************** */
|
|
1545 |
|
|
1546 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
1547 |
mng_uint8 MNG_DECL mng_get_refreshpass (mng_handle hHandle)
|
|
1548 |
{
|
|
1549 |
mng_uint8 iRslt;
|
|
1550 |
mng_datap pData;
|
|
1551 |
|
|
1552 |
#ifdef MNG_SUPPORT_TRACE
|
|
1553 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_REFRESHPASS, MNG_LC_START);
|
|
1554 |
#endif
|
|
1555 |
|
|
1556 |
MNG_VALIDHANDLEX (hHandle)
|
|
1557 |
|
|
1558 |
pData = (mng_datap)hHandle;
|
|
1559 |
/* for PNG we know the exact pass */
|
|
1560 |
if ((pData->eImagetype == mng_it_png) && (pData->iPass >= 0))
|
|
1561 |
iRslt = pData->iPass;
|
|
1562 |
#ifdef MNG_INCLUDE_JNG
|
|
1563 |
else /* for JNG we'll fake it... */
|
|
1564 |
if ((pData->eImagetype == mng_it_jng) &&
|
|
1565 |
(pData->bJPEGhasheader) && (pData->bJPEGdecostarted) &&
|
|
1566 |
(pData->bJPEGprogressive))
|
|
1567 |
{
|
|
1568 |
if (pData->pJPEGdinfo->input_scan_number <= 1)
|
|
1569 |
iRslt = 0; /* first pass (I think...) */
|
|
1570 |
else
|
|
1571 |
if (jpeg_input_complete (pData->pJPEGdinfo))
|
|
1572 |
iRslt = 7; /* input complete; aka final pass */
|
|
1573 |
else
|
|
1574 |
iRslt = 3; /* anything between 0 and 7 will do */
|
|
1575 |
|
|
1576 |
}
|
|
1577 |
#endif
|
|
1578 |
else
|
|
1579 |
iRslt = 0;
|
|
1580 |
|
|
1581 |
#ifdef MNG_SUPPORT_TRACE
|
|
1582 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_REFRESHPASS, MNG_LC_END);
|
|
1583 |
#endif
|
|
1584 |
|
|
1585 |
return iRslt;
|
|
1586 |
}
|
|
1587 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
1588 |
|
|
1589 |
/* ************************************************************************** */
|
|
1590 |
mng_uint8 MNG_DECL mng_get_alphacompression (mng_handle hHandle)
|
|
1591 |
{
|
|
1592 |
mng_uint8 iRslt;
|
|
1593 |
|
|
1594 |
#ifdef MNG_SUPPORT_TRACE
|
|
1595 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHACOMPRESSION, MNG_LC_START);
|
|
1596 |
#endif
|
|
1597 |
|
|
1598 |
MNG_VALIDHANDLEX (hHandle)
|
|
1599 |
|
|
1600 |
#ifdef MNG_INCLUDE_JNG
|
|
1601 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1602 |
iRslt = ((mng_datap)hHandle)->iJHDRalphacompression;
|
|
1603 |
else
|
|
1604 |
#endif
|
|
1605 |
iRslt = 0;
|
|
1606 |
|
|
1607 |
#ifdef MNG_SUPPORT_TRACE
|
|
1608 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHACOMPRESSION, MNG_LC_END);
|
|
1609 |
#endif
|
|
1610 |
|
|
1611 |
return iRslt;
|
|
1612 |
}
|
|
1613 |
|
|
1614 |
/* ************************************************************************** */
|
|
1615 |
|
|
1616 |
mng_uint8 MNG_DECL mng_get_alphafilter (mng_handle hHandle)
|
|
1617 |
{
|
|
1618 |
mng_uint8 iRslt;
|
|
1619 |
|
|
1620 |
#ifdef MNG_SUPPORT_TRACE
|
|
1621 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHAFILTER, MNG_LC_START);
|
|
1622 |
#endif
|
|
1623 |
|
|
1624 |
MNG_VALIDHANDLEX (hHandle)
|
|
1625 |
|
|
1626 |
#ifdef MNG_INCLUDE_JNG
|
|
1627 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1628 |
iRslt = ((mng_datap)hHandle)->iJHDRalphafilter;
|
|
1629 |
else
|
|
1630 |
#endif
|
|
1631 |
iRslt = 0;
|
|
1632 |
|
|
1633 |
#ifdef MNG_SUPPORT_TRACE
|
|
1634 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHAFILTER, MNG_LC_END);
|
|
1635 |
#endif
|
|
1636 |
|
|
1637 |
return iRslt;
|
|
1638 |
}
|
|
1639 |
|
|
1640 |
/* ************************************************************************** */
|
|
1641 |
|
|
1642 |
mng_uint8 MNG_DECL mng_get_alphainterlace (mng_handle hHandle)
|
|
1643 |
{
|
|
1644 |
mng_uint8 iRslt;
|
|
1645 |
|
|
1646 |
#ifdef MNG_SUPPORT_TRACE
|
|
1647 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHAINTERLACE, MNG_LC_START);
|
|
1648 |
#endif
|
|
1649 |
|
|
1650 |
MNG_VALIDHANDLEX (hHandle)
|
|
1651 |
|
|
1652 |
#ifdef MNG_INCLUDE_JNG
|
|
1653 |
if (((mng_datap)hHandle)->eImagetype == mng_it_jng)
|
|
1654 |
iRslt = ((mng_datap)hHandle)->iJHDRalphainterlace;
|
|
1655 |
else
|
|
1656 |
#endif
|
|
1657 |
iRslt = 0;
|
|
1658 |
|
|
1659 |
#ifdef MNG_SUPPORT_TRACE
|
|
1660 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHAINTERLACE, MNG_LC_END);
|
|
1661 |
#endif
|
|
1662 |
|
|
1663 |
return iRslt;
|
|
1664 |
}
|
|
1665 |
|
|
1666 |
/* ************************************************************************** */
|
|
1667 |
|
|
1668 |
mng_uint8 MNG_DECL mng_get_alphadepth (mng_handle hHandle)
|
|
1669 |
{
|
|
1670 |
#ifdef MNG_SUPPORT_TRACE
|
|
1671 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHADEPTH, MNG_LC_START);
|
|
1672 |
#endif
|
|
1673 |
|
|
1674 |
MNG_VALIDHANDLEX (hHandle)
|
|
1675 |
|
|
1676 |
#ifdef MNG_SUPPORT_TRACE
|
|
1677 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ALPHADEPTH, MNG_LC_END);
|
|
1678 |
#endif
|
|
1679 |
|
|
1680 |
return ((mng_datap)hHandle)->iAlphadepth;
|
|
1681 |
}
|
|
1682 |
|
|
1683 |
/* ************************************************************************** */
|
|
1684 |
|
|
1685 |
mng_uint32 MNG_DECL mng_get_canvasstyle (mng_handle hHandle)
|
|
1686 |
{
|
|
1687 |
#ifdef MNG_SUPPORT_TRACE
|
|
1688 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CANVASSTYLE, MNG_LC_START);
|
|
1689 |
#endif
|
|
1690 |
|
|
1691 |
MNG_VALIDHANDLEX (hHandle)
|
|
1692 |
|
|
1693 |
#ifdef MNG_SUPPORT_TRACE
|
|
1694 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CANVASSTYLE, MNG_LC_END);
|
|
1695 |
#endif
|
|
1696 |
|
|
1697 |
return ((mng_datap)hHandle)->iCanvasstyle;
|
|
1698 |
}
|
|
1699 |
|
|
1700 |
/* ************************************************************************** */
|
|
1701 |
|
|
1702 |
mng_uint32 MNG_DECL mng_get_bkgdstyle (mng_handle hHandle)
|
|
1703 |
{
|
|
1704 |
#ifdef MNG_SUPPORT_TRACE
|
|
1705 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_BKGDSTYLE, MNG_LC_START);
|
|
1706 |
#endif
|
|
1707 |
|
|
1708 |
MNG_VALIDHANDLEX (hHandle)
|
|
1709 |
|
|
1710 |
#ifdef MNG_SUPPORT_TRACE
|
|
1711 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_BKGDSTYLE, MNG_LC_END);
|
|
1712 |
#endif
|
|
1713 |
|
|
1714 |
return ((mng_datap)hHandle)->iBkgdstyle;
|
|
1715 |
}
|
|
1716 |
|
|
1717 |
/* ************************************************************************** */
|
|
1718 |
|
|
1719 |
mng_retcode MNG_DECL mng_get_bgcolor (mng_handle hHandle,
|
|
1720 |
mng_uint16* iRed,
|
|
1721 |
mng_uint16* iGreen,
|
|
1722 |
mng_uint16* iBlue)
|
|
1723 |
{
|
|
1724 |
#ifdef MNG_SUPPORT_TRACE
|
|
1725 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GET_BGCOLOR, MNG_LC_START);
|
|
1726 |
#endif
|
|
1727 |
|
|
1728 |
MNG_VALIDHANDLE (hHandle)
|
|
1729 |
*iRed = ((mng_datap)hHandle)->iBGred;
|
|
1730 |
*iGreen = ((mng_datap)hHandle)->iBGgreen;
|
|
1731 |
*iBlue = ((mng_datap)hHandle)->iBGblue;
|
|
1732 |
|
|
1733 |
#ifdef MNG_SUPPORT_TRACE
|
|
1734 |
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GET_BGCOLOR, MNG_LC_END);
|
|
1735 |
#endif
|
|
1736 |
|
|
1737 |
return MNG_NOERROR;
|
|
1738 |
}
|
|
1739 |
|
|
1740 |
/* ************************************************************************** */
|
|
1741 |
|
|
1742 |
mng_bool MNG_DECL mng_get_usebkgd (mng_handle hHandle)
|
|
1743 |
{
|
|
1744 |
#ifdef MNG_SUPPORT_TRACE
|
|
1745 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_USEBKGD, MNG_LC_START);
|
|
1746 |
#endif
|
|
1747 |
|
|
1748 |
MNG_VALIDHANDLEX (hHandle)
|
|
1749 |
|
|
1750 |
#ifdef MNG_SUPPORT_TRACE
|
|
1751 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_USEBKGD, MNG_LC_END);
|
|
1752 |
#endif
|
|
1753 |
|
|
1754 |
return ((mng_datap)hHandle)->bUseBKGD;
|
|
1755 |
}
|
|
1756 |
|
|
1757 |
/* ************************************************************************** */
|
|
1758 |
|
|
1759 |
mng_bool MNG_DECL mng_get_storechunks (mng_handle hHandle)
|
|
1760 |
{
|
|
1761 |
#ifdef MNG_SUPPORT_TRACE
|
|
1762 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_STORECHUNKS, MNG_LC_START);
|
|
1763 |
#endif
|
|
1764 |
|
|
1765 |
MNG_VALIDHANDLEX (hHandle)
|
|
1766 |
|
|
1767 |
#ifdef MNG_SUPPORT_TRACE
|
|
1768 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_STORECHUNKS, MNG_LC_END);
|
|
1769 |
#endif
|
|
1770 |
|
|
1771 |
return ((mng_datap)hHandle)->bStorechunks;
|
|
1772 |
}
|
|
1773 |
|
|
1774 |
/* ************************************************************************** */
|
|
1775 |
|
|
1776 |
mng_bool MNG_DECL mng_get_sectionbreaks (mng_handle hHandle)
|
|
1777 |
{
|
|
1778 |
#ifdef MNG_SUPPORT_TRACE
|
|
1779 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_SECTIONBREAKS, MNG_LC_START);
|
|
1780 |
#endif
|
|
1781 |
|
|
1782 |
MNG_VALIDHANDLEX (hHandle)
|
|
1783 |
|
|
1784 |
#ifdef MNG_SUPPORT_TRACE
|
|
1785 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_SECTIONBREAKS, MNG_LC_END);
|
|
1786 |
#endif
|
|
1787 |
|
|
1788 |
return ((mng_datap)hHandle)->bSectionbreaks;
|
|
1789 |
}
|
|
1790 |
|
|
1791 |
/* ************************************************************************** */
|
|
1792 |
|
|
1793 |
mng_bool MNG_DECL mng_get_cacheplayback (mng_handle hHandle)
|
|
1794 |
{
|
|
1795 |
#ifdef MNG_SUPPORT_TRACE
|
|
1796 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_CACHEPLAYBACK, MNG_LC_START);
|
|
1797 |
#endif
|
|
1798 |
|
|
1799 |
MNG_VALIDHANDLEX (hHandle)
|
|
1800 |
|
|
1801 |
#ifdef MNG_SUPPORT_TRACE
|
|
1802 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_CACHEPLAYBACK, MNG_LC_END);
|
|
1803 |
#endif
|
|
1804 |
|
|
1805 |
return ((mng_datap)hHandle)->bCacheplayback;
|
|
1806 |
}
|
|
1807 |
|
|
1808 |
/* ************************************************************************** */
|
|
1809 |
|
|
1810 |
mng_bool MNG_DECL mng_get_doprogressive (mng_handle hHandle)
|
|
1811 |
{
|
|
1812 |
#ifdef MNG_SUPPORT_TRACE
|
|
1813 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_DOPROGRESSIVE, MNG_LC_START);
|
|
1814 |
#endif
|
|
1815 |
|
|
1816 |
MNG_VALIDHANDLEX (hHandle)
|
|
1817 |
|
|
1818 |
#ifdef MNG_SUPPORT_TRACE
|
|
1819 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_DOPROGRESSIVE, MNG_LC_END);
|
|
1820 |
#endif
|
|
1821 |
|
|
1822 |
return ((mng_datap)hHandle)->bDoProgressive;
|
|
1823 |
}
|
|
1824 |
|
|
1825 |
/* ************************************************************************** */
|
|
1826 |
|
|
1827 |
mng_uint32 MNG_DECL mng_get_crcmode (mng_handle hHandle)
|
|
1828 |
{
|
|
1829 |
#ifdef MNG_SUPPORT_TRACE
|
|
1830 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_CRCMODE, MNG_LC_START);
|
|
1831 |
#endif
|
|
1832 |
|
|
1833 |
MNG_VALIDHANDLEX (hHandle)
|
|
1834 |
|
|
1835 |
#ifdef MNG_SUPPORT_TRACE
|
|
1836 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_CRCMODE, MNG_LC_END);
|
|
1837 |
#endif
|
|
1838 |
|
|
1839 |
return ((mng_datap)hHandle)->iCrcmode;
|
|
1840 |
}
|
|
1841 |
|
|
1842 |
/* ************************************************************************** */
|
|
1843 |
|
|
1844 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
1845 |
mng_bool MNG_DECL mng_get_srgb (mng_handle hHandle)
|
|
1846 |
{
|
|
1847 |
#ifdef MNG_SUPPORT_TRACE
|
|
1848 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_SRGB, MNG_LC_START);
|
|
1849 |
#endif
|
|
1850 |
|
|
1851 |
MNG_VALIDHANDLEX (hHandle)
|
|
1852 |
|
|
1853 |
#ifdef MNG_SUPPORT_TRACE
|
|
1854 |
MNG_TRACEB (((mng_datap)hHandle), MNG_FN_GET_SRGB, MNG_LC_END);
|
|
1855 |
#endif
|
|
1856 |
|
|
1857 |
return ((mng_datap)hHandle)->bIssRGB;
|
|
1858 |
}
|
|
1859 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
1860 |
|
|
1861 |
/* ************************************************************************** */
|
|
1862 |
|
|
1863 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
1864 |
mng_float MNG_DECL mng_get_viewgamma (mng_handle hHandle)
|
|
1865 |
{
|
|
1866 |
#ifdef MNG_SUPPORT_TRACE
|
|
1867 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_VIEWGAMMA, MNG_LC_START);
|
|
1868 |
#endif
|
|
1869 |
|
|
1870 |
MNG_VALIDHANDLEX (hHandle)
|
|
1871 |
|
|
1872 |
#ifdef MNG_SUPPORT_TRACE
|
|
1873 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_VIEWGAMMA, MNG_LC_END);
|
|
1874 |
#endif
|
|
1875 |
|
|
1876 |
return ((mng_datap)hHandle)->dViewgamma;
|
|
1877 |
}
|
|
1878 |
#endif
|
|
1879 |
|
|
1880 |
/* ************************************************************************** */
|
|
1881 |
|
|
1882 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
1883 |
mng_float MNG_DECL mng_get_displaygamma (mng_handle hHandle)
|
|
1884 |
{
|
|
1885 |
#ifdef MNG_SUPPORT_TRACE
|
|
1886 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DISPLAYGAMMA, MNG_LC_START);
|
|
1887 |
#endif
|
|
1888 |
|
|
1889 |
MNG_VALIDHANDLEX (hHandle)
|
|
1890 |
|
|
1891 |
#ifdef MNG_SUPPORT_TRACE
|
|
1892 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DISPLAYGAMMA, MNG_LC_END);
|
|
1893 |
#endif
|
|
1894 |
|
|
1895 |
return ((mng_datap)hHandle)->dDisplaygamma;
|
|
1896 |
}
|
|
1897 |
#endif
|
|
1898 |
|
|
1899 |
/* ************************************************************************** */
|
|
1900 |
|
|
1901 |
#ifndef MNG_NO_DFLT_INFO
|
|
1902 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
1903 |
mng_float MNG_DECL mng_get_dfltimggamma (mng_handle hHandle)
|
|
1904 |
{
|
|
1905 |
#ifdef MNG_SUPPORT_TRACE
|
|
1906 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DFLTIMGGAMMA, MNG_LC_START);
|
|
1907 |
#endif
|
|
1908 |
|
|
1909 |
MNG_VALIDHANDLEX (hHandle)
|
|
1910 |
|
|
1911 |
#ifdef MNG_SUPPORT_TRACE
|
|
1912 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DFLTIMGGAMMA, MNG_LC_END);
|
|
1913 |
#endif
|
|
1914 |
|
|
1915 |
return ((mng_datap)hHandle)->dDfltimggamma;
|
|
1916 |
}
|
|
1917 |
#endif
|
|
1918 |
#endif
|
|
1919 |
|
|
1920 |
/* ************************************************************************** */
|
|
1921 |
|
|
1922 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
1923 |
mng_uint32 MNG_DECL mng_get_viewgammaint (mng_handle hHandle)
|
|
1924 |
{
|
|
1925 |
#ifdef MNG_SUPPORT_TRACE
|
|
1926 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_VIEWGAMMA, MNG_LC_START);
|
|
1927 |
#endif
|
|
1928 |
|
|
1929 |
MNG_VALIDHANDLEX (hHandle)
|
|
1930 |
|
|
1931 |
#ifdef MNG_SUPPORT_TRACE
|
|
1932 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_VIEWGAMMA, MNG_LC_END);
|
|
1933 |
#endif
|
|
1934 |
|
|
1935 |
return (mng_uint32)(((mng_datap)hHandle)->dViewgamma * 100000);
|
|
1936 |
}
|
|
1937 |
#endif
|
|
1938 |
|
|
1939 |
/* ************************************************************************** */
|
|
1940 |
|
|
1941 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
1942 |
mng_uint32 MNG_DECL mng_get_displaygammaint (mng_handle hHandle)
|
|
1943 |
{
|
|
1944 |
#ifdef MNG_SUPPORT_TRACE
|
|
1945 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DISPLAYGAMMA, MNG_LC_START);
|
|
1946 |
#endif
|
|
1947 |
|
|
1948 |
MNG_VALIDHANDLEX (hHandle)
|
|
1949 |
|
|
1950 |
#ifdef MNG_SUPPORT_TRACE
|
|
1951 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DISPLAYGAMMA, MNG_LC_END);
|
|
1952 |
#endif
|
|
1953 |
|
|
1954 |
return (mng_uint32)(((mng_datap)hHandle)->dDisplaygamma * 100000);
|
|
1955 |
}
|
|
1956 |
#endif
|
|
1957 |
|
|
1958 |
/* ************************************************************************** */
|
|
1959 |
|
|
1960 |
#ifndef MNG_NO_DFLT_INFO
|
|
1961 |
#if defined(MNG_FULL_CMS) || defined(MNG_GAMMA_ONLY) || defined(MNG_APP_CMS)
|
|
1962 |
mng_uint32 MNG_DECL mng_get_dfltimggammaint (mng_handle hHandle)
|
|
1963 |
{
|
|
1964 |
#ifdef MNG_SUPPORT_TRACE
|
|
1965 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DFLTIMGGAMMA, MNG_LC_START);
|
|
1966 |
#endif
|
|
1967 |
|
|
1968 |
MNG_VALIDHANDLEX (hHandle)
|
|
1969 |
|
|
1970 |
#ifdef MNG_SUPPORT_TRACE
|
|
1971 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_DFLTIMGGAMMA, MNG_LC_END);
|
|
1972 |
#endif
|
|
1973 |
|
|
1974 |
return (mng_uint32)(((mng_datap)hHandle)->dDfltimggamma * 100000);
|
|
1975 |
}
|
|
1976 |
#endif
|
|
1977 |
#endif
|
|
1978 |
|
|
1979 |
/* ************************************************************************** */
|
|
1980 |
|
|
1981 |
#ifndef MNG_SKIP_MAXCANVAS
|
|
1982 |
mng_uint32 MNG_DECL mng_get_maxcanvaswidth (mng_handle hHandle)
|
|
1983 |
{
|
|
1984 |
#ifdef MNG_SUPPORT_TRACE
|
|
1985 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_MAXCANVASWIDTH, MNG_LC_START);
|
|
1986 |
#endif
|
|
1987 |
|
|
1988 |
MNG_VALIDHANDLEX (hHandle)
|
|
1989 |
|
|
1990 |
#ifdef MNG_SUPPORT_TRACE
|
|
1991 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_MAXCANVASWIDTH, MNG_LC_END);
|
|
1992 |
#endif
|
|
1993 |
|
|
1994 |
return ((mng_datap)hHandle)->iMaxwidth;
|
|
1995 |
}
|
|
1996 |
|
|
1997 |
/* ************************************************************************** */
|
|
1998 |
|
|
1999 |
mng_uint32 MNG_DECL mng_get_maxcanvasheight (mng_handle hHandle)
|
|
2000 |
{
|
|
2001 |
#ifdef MNG_SUPPORT_TRACE
|
|
2002 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_MAXCANVASHEIGHT, MNG_LC_START);
|
|
2003 |
#endif
|
|
2004 |
|
|
2005 |
MNG_VALIDHANDLEX (hHandle)
|
|
2006 |
|
|
2007 |
#ifdef MNG_SUPPORT_TRACE
|
|
2008 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_MAXCANVASHEIGHT, MNG_LC_END);
|
|
2009 |
#endif
|
|
2010 |
|
|
2011 |
return ((mng_datap)hHandle)->iMaxheight;
|
|
2012 |
}
|
|
2013 |
#endif
|
|
2014 |
|
|
2015 |
/* ************************************************************************** */
|
|
2016 |
|
|
2017 |
#ifdef MNG_INCLUDE_ZLIB
|
|
2018 |
#ifdef MNG_ACCESS_ZLIB
|
|
2019 |
mng_int32 MNG_DECL mng_get_zlib_level (mng_handle hHandle)
|
|
2020 |
{
|
|
2021 |
#ifdef MNG_SUPPORT_TRACE
|
|
2022 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_LEVEL, MNG_LC_START);
|
|
2023 |
#endif
|
|
2024 |
|
|
2025 |
MNG_VALIDHANDLEX (hHandle)
|
|
2026 |
|
|
2027 |
#ifdef MNG_SUPPORT_TRACE
|
|
2028 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_LEVEL, MNG_LC_END);
|
|
2029 |
#endif
|
|
2030 |
|
|
2031 |
return ((mng_datap)hHandle)->iZlevel;
|
|
2032 |
}
|
|
2033 |
#endif /* MNG_ACCESS_ZLIB */
|
|
2034 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
2035 |
|
|
2036 |
/* ************************************************************************** */
|
|
2037 |
#ifdef MNG_INCLUDE_ZLIB
|
|
2038 |
#ifdef MNG_ACCESS_ZLIB
|
|
2039 |
mng_int32 MNG_DECL mng_get_zlib_method (mng_handle hHandle)
|
|
2040 |
{
|
|
2041 |
#ifdef MNG_SUPPORT_TRACE
|
|
2042 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_METHOD, MNG_LC_START);
|
|
2043 |
#endif
|
|
2044 |
|
|
2045 |
MNG_VALIDHANDLEX (hHandle)
|
|
2046 |
|
|
2047 |
#ifdef MNG_SUPPORT_TRACE
|
|
2048 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_METHOD, MNG_LC_END);
|
|
2049 |
#endif
|
|
2050 |
|
|
2051 |
return ((mng_datap)hHandle)->iZmethod;
|
|
2052 |
}
|
|
2053 |
|
|
2054 |
#endif /* MNG_ACCESS_ZLIB */
|
|
2055 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
2056 |
|
|
2057 |
/* ************************************************************************** */
|
|
2058 |
|
|
2059 |
#ifdef MNG_INCLUDE_ZLIB
|
|
2060 |
#ifdef MNG_ACCESS_ZLIB
|
|
2061 |
mng_int32 MNG_DECL mng_get_zlib_windowbits (mng_handle hHandle)
|
|
2062 |
{
|
|
2063 |
#ifdef MNG_SUPPORT_TRACE
|
|
2064 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_WINDOWBITS, MNG_LC_START);
|
|
2065 |
#endif
|
|
2066 |
|
|
2067 |
MNG_VALIDHANDLEX (hHandle)
|
|
2068 |
|
|
2069 |
#ifdef MNG_SUPPORT_TRACE
|
|
2070 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_WINDOWBITS, MNG_LC_END);
|
|
2071 |
#endif
|
|
2072 |
|
|
2073 |
return ((mng_datap)hHandle)->iZwindowbits;
|
|
2074 |
}
|
|
2075 |
#endif /* MNG_ACCESS_ZLIB */
|
|
2076 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
2077 |
|
|
2078 |
/* ************************************************************************** */
|
|
2079 |
|
|
2080 |
#ifdef MNG_INCLUDE_ZLIB
|
|
2081 |
#ifdef MNG_ACCESS_ZLIB
|
|
2082 |
mng_int32 MNG_DECL mng_get_zlib_memlevel (mng_handle hHandle)
|
|
2083 |
{
|
|
2084 |
#ifdef MNG_SUPPORT_TRACE
|
|
2085 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_MEMLEVEL, MNG_LC_START);
|
|
2086 |
#endif
|
|
2087 |
|
|
2088 |
MNG_VALIDHANDLEX (hHandle)
|
|
2089 |
|
|
2090 |
#ifdef MNG_SUPPORT_TRACE
|
|
2091 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_MEMLEVEL, MNG_LC_END);
|
|
2092 |
#endif
|
|
2093 |
|
|
2094 |
return ((mng_datap)hHandle)->iZmemlevel;
|
|
2095 |
}
|
|
2096 |
#endif /* MNG_ACCESS_ZLIB */
|
|
2097 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
2098 |
|
|
2099 |
/* ************************************************************************** */
|
|
2100 |
|
|
2101 |
#ifdef MNG_INCLUDE_ZLIB
|
|
2102 |
#ifdef MNG_ACCESS_ZLIB
|
|
2103 |
mng_int32 MNG_DECL mng_get_zlib_strategy (mng_handle hHandle)
|
|
2104 |
{
|
|
2105 |
#ifdef MNG_SUPPORT_TRACE
|
|
2106 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_STRATEGY, MNG_LC_START);
|
|
2107 |
#endif
|
|
2108 |
|
|
2109 |
MNG_VALIDHANDLEX (hHandle)
|
|
2110 |
|
|
2111 |
#ifdef MNG_SUPPORT_TRACE
|
|
2112 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_STRATEGY, MNG_LC_END);
|
|
2113 |
#endif
|
|
2114 |
|
|
2115 |
return ((mng_datap)hHandle)->iZstrategy;
|
|
2116 |
}
|
|
2117 |
#endif /* MNG_ACCESS_ZLIB */
|
|
2118 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
2119 |
|
|
2120 |
/* ************************************************************************** */
|
|
2121 |
|
|
2122 |
#ifdef MNG_INCLUDE_ZLIB
|
|
2123 |
#ifdef MNG_ACCESS_ZLIB
|
|
2124 |
mng_uint32 MNG_DECL mng_get_zlib_maxidat (mng_handle hHandle)
|
|
2125 |
{
|
|
2126 |
#ifdef MNG_SUPPORT_TRACE
|
|
2127 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_MAXIDAT, MNG_LC_START);
|
|
2128 |
#endif
|
|
2129 |
|
|
2130 |
MNG_VALIDHANDLEX (hHandle)
|
|
2131 |
|
|
2132 |
#ifdef MNG_SUPPORT_TRACE
|
|
2133 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_ZLIB_MAXIDAT, MNG_LC_END);
|
|
2134 |
#endif
|
|
2135 |
|
|
2136 |
return ((mng_datap)hHandle)->iMaxIDAT;
|
|
2137 |
}
|
|
2138 |
#endif /* MNG_ACCESS_ZLIB */
|
|
2139 |
#endif /* MNG_INCLUDE_ZLIB */
|
|
2140 |
|
|
2141 |
/* ************************************************************************** */
|
|
2142 |
|
|
2143 |
#ifdef MNG_INCLUDE_JNG
|
|
2144 |
#ifdef MNG_ACCESS_JPEG
|
|
2145 |
mngjpeg_dctmethod MNG_DECL mng_get_jpeg_dctmethod (mng_handle hHandle)
|
|
2146 |
{
|
|
2147 |
#ifdef MNG_SUPPORT_TRACE
|
|
2148 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_DCTMETHOD, MNG_LC_START);
|
|
2149 |
#endif
|
|
2150 |
|
|
2151 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2152 |
return JDCT_ISLOW;
|
|
2153 |
|
|
2154 |
#ifdef MNG_SUPPORT_TRACE
|
|
2155 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_DCTMETHOD, MNG_LC_END);
|
|
2156 |
#endif
|
|
2157 |
|
|
2158 |
return ((mng_datap)hHandle)->eJPEGdctmethod;
|
|
2159 |
}
|
|
2160 |
#endif /* MNG_ACCESS_JPEG */
|
|
2161 |
#endif /* MNG_INCLUDE_JNG */
|
|
2162 |
|
|
2163 |
/* ************************************************************************** */
|
|
2164 |
|
|
2165 |
#ifdef MNG_INCLUDE_JNG
|
|
2166 |
#ifdef MNG_ACCESS_JPEG
|
|
2167 |
mng_int32 MNG_DECL mng_get_jpeg_quality (mng_handle hHandle)
|
|
2168 |
{
|
|
2169 |
#ifdef MNG_SUPPORT_TRACE
|
|
2170 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_QUALITY, MNG_LC_START);
|
|
2171 |
#endif
|
|
2172 |
|
|
2173 |
MNG_VALIDHANDLEX (hHandle)
|
|
2174 |
|
|
2175 |
#ifdef MNG_SUPPORT_TRACE
|
|
2176 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_QUALITY, MNG_LC_END);
|
|
2177 |
#endif
|
|
2178 |
|
|
2179 |
return ((mng_datap)hHandle)->iJPEGquality;
|
|
2180 |
}
|
|
2181 |
#endif /* MNG_ACCESS_JPEG */
|
|
2182 |
#endif /* MNG_INCLUDE_JNG */
|
|
2183 |
|
|
2184 |
/* ************************************************************************** */
|
|
2185 |
|
|
2186 |
#ifdef MNG_INCLUDE_JNG
|
|
2187 |
#ifdef MNG_ACCESS_JPEG
|
|
2188 |
mng_int32 MNG_DECL mng_get_jpeg_smoothing (mng_handle hHandle)
|
|
2189 |
{
|
|
2190 |
#ifdef MNG_SUPPORT_TRACE
|
|
2191 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_SMOOTHING, MNG_LC_START);
|
|
2192 |
#endif
|
|
2193 |
|
|
2194 |
MNG_VALIDHANDLEX (hHandle)
|
|
2195 |
|
|
2196 |
#ifdef MNG_SUPPORT_TRACE
|
|
2197 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_SMOOTHING, MNG_LC_END);
|
|
2198 |
#endif
|
|
2199 |
|
|
2200 |
return ((mng_datap)hHandle)->iJPEGsmoothing;
|
|
2201 |
}
|
|
2202 |
#endif /* MNG_ACCESS_JPEG */
|
|
2203 |
#endif /* MNG_INCLUDE_JNG */
|
|
2204 |
|
|
2205 |
/* ************************************************************************** */
|
|
2206 |
|
|
2207 |
#ifdef MNG_INCLUDE_JNG
|
|
2208 |
#ifdef MNG_ACCESS_JPEG
|
|
2209 |
mng_bool MNG_DECL mng_get_jpeg_progressive (mng_handle hHandle)
|
|
2210 |
{
|
|
2211 |
#ifdef MNG_SUPPORT_TRACE
|
|
2212 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_PROGRESSIVE, MNG_LC_START);
|
|
2213 |
#endif
|
|
2214 |
|
|
2215 |
MNG_VALIDHANDLEX (hHandle)
|
|
2216 |
|
|
2217 |
#ifdef MNG_SUPPORT_TRACE
|
|
2218 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_PROGRESSIVE, MNG_LC_END);
|
|
2219 |
#endif
|
|
2220 |
|
|
2221 |
return ((mng_datap)hHandle)->bJPEGcompressprogr;
|
|
2222 |
}
|
|
2223 |
#endif /* MNG_ACCESS_JPEG */
|
|
2224 |
#endif /* MNG_INCLUDE_JNG */
|
|
2225 |
|
|
2226 |
/* ************************************************************************** */
|
|
2227 |
|
|
2228 |
#ifdef MNG_INCLUDE_JNG
|
|
2229 |
#ifdef MNG_ACCESS_JPEG
|
|
2230 |
mng_bool MNG_DECL mng_get_jpeg_optimized (mng_handle hHandle)
|
|
2231 |
{
|
|
2232 |
#ifdef MNG_SUPPORT_TRACE
|
|
2233 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_OPTIMIZED, MNG_LC_START);
|
|
2234 |
#endif
|
|
2235 |
|
|
2236 |
MNG_VALIDHANDLEX (hHandle)
|
|
2237 |
|
|
2238 |
#ifdef MNG_SUPPORT_TRACE
|
|
2239 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_OPTIMIZED, MNG_LC_END);
|
|
2240 |
#endif
|
|
2241 |
|
|
2242 |
return ((mng_datap)hHandle)->bJPEGcompressopt;
|
|
2243 |
}
|
|
2244 |
#endif /* MNG_ACCESS_JPEG */
|
|
2245 |
#endif /* MNG_INCLUDE_JNG */
|
|
2246 |
|
|
2247 |
/* ************************************************************************** */
|
|
2248 |
|
|
2249 |
#ifdef MNG_INCLUDE_JNG
|
|
2250 |
#ifdef MNG_ACCESS_JPEG
|
|
2251 |
mng_uint32 MNG_DECL mng_get_jpeg_maxjdat (mng_handle hHandle)
|
|
2252 |
{
|
|
2253 |
#ifdef MNG_SUPPORT_TRACE
|
|
2254 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_MAXJDAT, MNG_LC_START);
|
|
2255 |
#endif
|
|
2256 |
|
|
2257 |
MNG_VALIDHANDLEX (hHandle)
|
|
2258 |
|
|
2259 |
#ifdef MNG_SUPPORT_TRACE
|
|
2260 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_JPEG_MAXJDAT, MNG_LC_END);
|
|
2261 |
#endif
|
|
2262 |
|
|
2263 |
return ((mng_datap)hHandle)->iMaxJDAT;
|
|
2264 |
}
|
|
2265 |
#endif /* MNG_ACCESS_JPEG */
|
|
2266 |
#endif /* MNG_INCLUDE_JNG */
|
|
2267 |
|
|
2268 |
/* ************************************************************************** */
|
|
2269 |
|
|
2270 |
#ifdef MNG_SUPPORT_READ
|
|
2271 |
mng_bool MNG_DECL mng_get_suspensionmode (mng_handle hHandle)
|
|
2272 |
{
|
|
2273 |
#ifdef MNG_SUPPORT_TRACE
|
|
2274 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SUSPENSIONMODE, MNG_LC_START);
|
|
2275 |
#endif
|
|
2276 |
|
|
2277 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2278 |
return MNG_FALSE;
|
|
2279 |
|
|
2280 |
#ifdef MNG_SUPPORT_TRACE
|
|
2281 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SUSPENSIONMODE, MNG_LC_END);
|
|
2282 |
#endif
|
|
2283 |
|
|
2284 |
return ((mng_datap)hHandle)->bSuspensionmode;
|
|
2285 |
}
|
|
2286 |
#endif /* MNG_SUPPORT_READ */
|
|
2287 |
|
|
2288 |
/* ************************************************************************** */
|
|
2289 |
|
|
2290 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2291 |
mng_speedtype MNG_DECL mng_get_speed (mng_handle hHandle)
|
|
2292 |
{
|
|
2293 |
#ifdef MNG_SUPPORT_TRACE
|
|
2294 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SPEED, MNG_LC_START);
|
|
2295 |
#endif
|
|
2296 |
|
|
2297 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2298 |
return mng_st_normal;
|
|
2299 |
|
|
2300 |
#ifdef MNG_SUPPORT_TRACE
|
|
2301 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_SPEED, MNG_LC_END);
|
|
2302 |
#endif
|
|
2303 |
|
|
2304 |
return ((mng_datap)hHandle)->iSpeed;
|
|
2305 |
}
|
|
2306 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2307 |
|
|
2308 |
/* ************************************************************************** */
|
|
2309 |
|
|
2310 |
mng_uint32 MNG_DECL mng_get_imagelevel (mng_handle hHandle)
|
|
2311 |
{
|
|
2312 |
#ifdef MNG_SUPPORT_TRACE
|
|
2313 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGELEVEL, MNG_LC_START);
|
|
2314 |
#endif
|
|
2315 |
|
|
2316 |
MNG_VALIDHANDLEX (hHandle)
|
|
2317 |
|
|
2318 |
#ifdef MNG_SUPPORT_TRACE
|
|
2319 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_IMAGELEVEL, MNG_LC_END);
|
|
2320 |
#endif
|
|
2321 |
|
|
2322 |
return ((mng_datap)hHandle)->iImagelevel;
|
|
2323 |
}
|
|
2324 |
|
|
2325 |
/* ************************************************************************** */
|
|
2326 |
|
|
2327 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2328 |
mng_retcode MNG_DECL mng_get_lastbackchunk (mng_handle hHandle,
|
|
2329 |
mng_uint16* iRed,
|
|
2330 |
mng_uint16* iGreen,
|
|
2331 |
mng_uint16* iBlue,
|
|
2332 |
mng_uint8* iMandatory)
|
|
2333 |
{
|
|
2334 |
#ifdef MNG_SUPPORT_TRACE
|
|
2335 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_LASTBACKCHUNK, MNG_LC_START);
|
|
2336 |
#endif
|
|
2337 |
|
|
2338 |
MNG_VALIDHANDLE (hHandle)
|
|
2339 |
|
|
2340 |
if (((mng_datap)hHandle)->eImagetype != mng_it_mng)
|
|
2341 |
MNG_ERROR (((mng_datap)hHandle), MNG_FUNCTIONINVALID);
|
|
2342 |
|
|
2343 |
*iRed = ((mng_datap)hHandle)->iBACKred;
|
|
2344 |
*iGreen = ((mng_datap)hHandle)->iBACKgreen;
|
|
2345 |
*iBlue = ((mng_datap)hHandle)->iBACKblue;
|
|
2346 |
*iMandatory = ((mng_datap)hHandle)->iBACKmandatory;
|
|
2347 |
|
|
2348 |
#ifdef MNG_SUPPORT_TRACE
|
|
2349 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_LASTBACKCHUNK, MNG_LC_END);
|
|
2350 |
#endif
|
|
2351 |
|
|
2352 |
return MNG_NOERROR;
|
|
2353 |
}
|
|
2354 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2355 |
|
|
2356 |
/* ************************************************************************** */
|
|
2357 |
|
|
2358 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2359 |
mng_retcode MNG_DECL mng_get_lastseekname (mng_handle hHandle,
|
|
2360 |
mng_pchar zSegmentname)
|
|
2361 |
{
|
|
2362 |
mng_datap pData;
|
|
2363 |
|
|
2364 |
#ifdef MNG_SUPPORT_TRACE
|
|
2365 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_LASTSEEKNAME, MNG_LC_START);
|
|
2366 |
#endif
|
|
2367 |
|
|
2368 |
MNG_VALIDHANDLE (hHandle)
|
|
2369 |
|
|
2370 |
pData = (mng_datap)hHandle;
|
|
2371 |
/* only allowed for MNG ! */
|
|
2372 |
if (pData->eImagetype != mng_it_mng)
|
|
2373 |
MNG_ERROR (pData, MNG_FUNCTIONINVALID);
|
|
2374 |
|
|
2375 |
if (pData->pLastseek) /* is there a last SEEK ? */
|
|
2376 |
{
|
|
2377 |
mng_ani_seekp pSEEK = (mng_ani_seekp)pData->pLastseek;
|
|
2378 |
|
|
2379 |
if (pSEEK->iSegmentnamesize) /* copy the name if there is one */
|
|
2380 |
MNG_COPY (zSegmentname, pSEEK->zSegmentname, pSEEK->iSegmentnamesize);
|
|
2381 |
|
|
2382 |
*(((mng_uint8p)zSegmentname) + pSEEK->iSegmentnamesize) = 0;
|
|
2383 |
}
|
|
2384 |
else
|
|
2385 |
{ /* return an empty string */
|
|
2386 |
*((mng_uint8p)zSegmentname) = 0;
|
|
2387 |
}
|
|
2388 |
|
|
2389 |
#ifdef MNG_SUPPORT_TRACE
|
|
2390 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_LASTSEEKNAME, MNG_LC_END);
|
|
2391 |
#endif
|
|
2392 |
|
|
2393 |
return MNG_NOERROR;
|
|
2394 |
}
|
|
2395 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2396 |
|
|
2397 |
/* ************************************************************************** */
|
|
2398 |
|
|
2399 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2400 |
mng_uint32 MNG_DECL mng_get_currframdelay (mng_handle hHandle)
|
|
2401 |
{
|
|
2402 |
mng_datap pData;
|
|
2403 |
mng_uint32 iRslt;
|
|
2404 |
|
|
2405 |
#ifdef MNG_SUPPORT_TRACE
|
|
2406 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRFRAMDELAY, MNG_LC_START);
|
|
2407 |
#endif
|
|
2408 |
|
|
2409 |
MNG_VALIDHANDLE (hHandle)
|
|
2410 |
|
|
2411 |
pData = (mng_datap)hHandle;
|
|
2412 |
/* only allowed for MNG ! */
|
|
2413 |
if (pData->eImagetype != mng_it_mng)
|
|
2414 |
MNG_ERROR (pData, MNG_FUNCTIONINVALID);
|
|
2415 |
|
|
2416 |
iRslt = pData->iFramedelay;
|
|
2417 |
|
|
2418 |
#ifdef MNG_SUPPORT_TRACE
|
|
2419 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRFRAMDELAY, MNG_LC_END);
|
|
2420 |
#endif
|
|
2421 |
|
|
2422 |
return iRslt;
|
|
2423 |
}
|
|
2424 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2425 |
|
|
2426 |
/* ************************************************************************** */
|
|
2427 |
|
|
2428 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2429 |
mng_uint32 MNG_DECL mng_get_starttime (mng_handle hHandle)
|
|
2430 |
{
|
|
2431 |
#ifdef MNG_SUPPORT_TRACE
|
|
2432 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_STARTTIME, MNG_LC_START);
|
|
2433 |
#endif
|
|
2434 |
|
|
2435 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2436 |
return mng_st_normal;
|
|
2437 |
|
|
2438 |
#ifdef MNG_SUPPORT_TRACE
|
|
2439 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_STARTTIME, MNG_LC_END);
|
|
2440 |
#endif
|
|
2441 |
|
|
2442 |
return ((mng_datap)hHandle)->iStarttime;
|
|
2443 |
}
|
|
2444 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2445 |
|
|
2446 |
/* ************************************************************************** */
|
|
2447 |
|
|
2448 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2449 |
mng_uint32 MNG_DECL mng_get_runtime (mng_handle hHandle)
|
|
2450 |
{
|
|
2451 |
#ifdef MNG_SUPPORT_TRACE
|
|
2452 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_RUNTIME, MNG_LC_START);
|
|
2453 |
#endif
|
|
2454 |
|
|
2455 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2456 |
return mng_st_normal;
|
|
2457 |
|
|
2458 |
#ifdef MNG_SUPPORT_TRACE
|
|
2459 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_RUNTIME, MNG_LC_END);
|
|
2460 |
#endif
|
|
2461 |
|
|
2462 |
return ((mng_datap)hHandle)->iRuntime;
|
|
2463 |
}
|
|
2464 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2465 |
|
|
2466 |
/* ************************************************************************** */
|
|
2467 |
|
|
2468 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2469 |
#ifndef MNG_NO_CURRENT_INFO
|
|
2470 |
mng_uint32 MNG_DECL mng_get_currentframe (mng_handle hHandle)
|
|
2471 |
{
|
|
2472 |
#ifdef MNG_SUPPORT_TRACE
|
|
2473 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRENTFRAME, MNG_LC_START);
|
|
2474 |
#endif
|
|
2475 |
|
|
2476 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2477 |
return mng_st_normal;
|
|
2478 |
|
|
2479 |
#ifdef MNG_SUPPORT_TRACE
|
|
2480 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRENTFRAME, MNG_LC_END);
|
|
2481 |
#endif
|
|
2482 |
|
|
2483 |
return ((mng_datap)hHandle)->iFrameseq;
|
|
2484 |
}
|
|
2485 |
#endif
|
|
2486 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2487 |
|
|
2488 |
/* ************************************************************************** */
|
|
2489 |
|
|
2490 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2491 |
#ifndef MNG_NO_CURRENT_INFO
|
|
2492 |
mng_uint32 MNG_DECL mng_get_currentlayer (mng_handle hHandle)
|
|
2493 |
{
|
|
2494 |
#ifdef MNG_SUPPORT_TRACE
|
|
2495 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRENTLAYER, MNG_LC_START);
|
|
2496 |
#endif
|
|
2497 |
|
|
2498 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2499 |
return mng_st_normal;
|
|
2500 |
|
|
2501 |
#ifdef MNG_SUPPORT_TRACE
|
|
2502 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRENTLAYER, MNG_LC_END);
|
|
2503 |
#endif
|
|
2504 |
|
|
2505 |
return ((mng_datap)hHandle)->iLayerseq;
|
|
2506 |
}
|
|
2507 |
#endif
|
|
2508 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2509 |
|
|
2510 |
/* ************************************************************************** */
|
|
2511 |
|
|
2512 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2513 |
#ifndef MNG_NO_CURRENT_INFO
|
|
2514 |
mng_uint32 MNG_DECL mng_get_currentplaytime (mng_handle hHandle)
|
|
2515 |
{
|
|
2516 |
#ifdef MNG_SUPPORT_TRACE
|
|
2517 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRENTPLAYTIME, MNG_LC_START);
|
|
2518 |
#endif
|
|
2519 |
|
|
2520 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2521 |
return mng_st_normal;
|
|
2522 |
|
|
2523 |
#ifdef MNG_SUPPORT_TRACE
|
|
2524 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_CURRENTPLAYTIME, MNG_LC_END);
|
|
2525 |
#endif
|
|
2526 |
|
|
2527 |
return ((mng_datap)hHandle)->iFrametime;
|
|
2528 |
}
|
|
2529 |
#endif
|
|
2530 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2531 |
|
|
2532 |
/* ************************************************************************** */
|
|
2533 |
|
|
2534 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2535 |
#ifndef MNG_NO_CURRENT_INFO
|
|
2536 |
mng_uint32 MNG_DECL mng_get_totalframes (mng_handle hHandle)
|
|
2537 |
{
|
|
2538 |
#ifdef MNG_SUPPORT_TRACE
|
|
2539 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TOTALFRAMES, MNG_LC_START);
|
|
2540 |
#endif
|
|
2541 |
|
|
2542 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2543 |
return mng_st_normal;
|
|
2544 |
|
|
2545 |
#ifdef MNG_SUPPORT_TRACE
|
|
2546 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TOTALFRAMES, MNG_LC_END);
|
|
2547 |
#endif
|
|
2548 |
|
|
2549 |
return ((mng_datap)hHandle)->iTotalframes;
|
|
2550 |
}
|
|
2551 |
#endif
|
|
2552 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2553 |
|
|
2554 |
/* ************************************************************************** */
|
|
2555 |
|
|
2556 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2557 |
#ifndef MNG_NO_CURRENT_INFO
|
|
2558 |
mng_uint32 MNG_DECL mng_get_totallayers (mng_handle hHandle)
|
|
2559 |
{
|
|
2560 |
#ifdef MNG_SUPPORT_TRACE
|
|
2561 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TOTALLAYERS, MNG_LC_START);
|
|
2562 |
#endif
|
|
2563 |
|
|
2564 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2565 |
return mng_st_normal;
|
|
2566 |
|
|
2567 |
#ifdef MNG_SUPPORT_TRACE
|
|
2568 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TOTALLAYERS, MNG_LC_END);
|
|
2569 |
#endif
|
|
2570 |
|
|
2571 |
return ((mng_datap)hHandle)->iTotallayers;
|
|
2572 |
}
|
|
2573 |
#endif
|
|
2574 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2575 |
|
|
2576 |
/* ************************************************************************** */
|
|
2577 |
|
|
2578 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2579 |
#ifndef MNG_NO_CURRENT_INFO
|
|
2580 |
mng_uint32 MNG_DECL mng_get_totalplaytime (mng_handle hHandle)
|
|
2581 |
{
|
|
2582 |
#ifdef MNG_SUPPORT_TRACE
|
|
2583 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TOTALPLAYTIME, MNG_LC_START);
|
|
2584 |
#endif
|
|
2585 |
|
|
2586 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2587 |
return mng_st_normal;
|
|
2588 |
|
|
2589 |
#ifdef MNG_SUPPORT_TRACE
|
|
2590 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_GET_TOTALPLAYTIME, MNG_LC_END);
|
|
2591 |
#endif
|
|
2592 |
|
|
2593 |
return ((mng_datap)hHandle)->iTotalplaytime;
|
|
2594 |
}
|
|
2595 |
#endif
|
|
2596 |
#endif /* MNG_SUPPORT_DISPLAY */
|
|
2597 |
|
|
2598 |
/* ************************************************************************** */
|
|
2599 |
|
|
2600 |
mng_bool MNG_DECL mng_status_error (mng_handle hHandle)
|
|
2601 |
{
|
|
2602 |
#ifdef MNG_SUPPORT_TRACE
|
|
2603 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_ERROR, MNG_LC_START);
|
|
2604 |
#endif
|
|
2605 |
|
|
2606 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2607 |
return MNG_FALSE;
|
|
2608 |
|
|
2609 |
#ifdef MNG_SUPPORT_TRACE
|
|
2610 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_ERROR, MNG_LC_END);
|
|
2611 |
#endif
|
|
2612 |
|
|
2613 |
return (mng_bool)((mng_datap)hHandle)->iErrorcode;
|
|
2614 |
}
|
|
2615 |
|
|
2616 |
/* ************************************************************************** */
|
|
2617 |
|
|
2618 |
#ifdef MNG_SUPPORT_READ
|
|
2619 |
mng_bool MNG_DECL mng_status_reading (mng_handle hHandle)
|
|
2620 |
{
|
|
2621 |
#ifdef MNG_SUPPORT_TRACE
|
|
2622 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_READING, MNG_LC_START);
|
|
2623 |
#endif
|
|
2624 |
|
|
2625 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2626 |
return MNG_FALSE;
|
|
2627 |
|
|
2628 |
#ifdef MNG_SUPPORT_TRACE
|
|
2629 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_READING, MNG_LC_END);
|
|
2630 |
#endif
|
|
2631 |
|
|
2632 |
return ((mng_datap)hHandle)->bReading;
|
|
2633 |
}
|
|
2634 |
#endif
|
|
2635 |
|
|
2636 |
/* ************************************************************************** */
|
|
2637 |
|
|
2638 |
#ifdef MNG_SUPPORT_READ
|
|
2639 |
mng_bool MNG_DECL mng_status_suspendbreak (mng_handle hHandle)
|
|
2640 |
{
|
|
2641 |
#ifdef MNG_SUPPORT_TRACE
|
|
2642 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_SUSPENDBREAK, MNG_LC_START);
|
|
2643 |
#endif
|
|
2644 |
|
|
2645 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2646 |
return MNG_FALSE;
|
|
2647 |
|
|
2648 |
#ifdef MNG_SUPPORT_TRACE
|
|
2649 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_SUSPENDBREAK, MNG_LC_END);
|
|
2650 |
#endif
|
|
2651 |
|
|
2652 |
return ((mng_datap)hHandle)->bSuspended;
|
|
2653 |
}
|
|
2654 |
#endif
|
|
2655 |
|
|
2656 |
/* ************************************************************************** */
|
|
2657 |
|
|
2658 |
#ifdef MNG_SUPPORT_WRITE
|
|
2659 |
mng_bool MNG_DECL mng_status_creating (mng_handle hHandle)
|
|
2660 |
{
|
|
2661 |
#ifdef MNG_SUPPORT_TRACE
|
|
2662 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_CREATING, MNG_LC_START);
|
|
2663 |
#endif
|
|
2664 |
|
|
2665 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2666 |
return MNG_FALSE;
|
|
2667 |
|
|
2668 |
#ifdef MNG_SUPPORT_TRACE
|
|
2669 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_CREATING, MNG_LC_END);
|
|
2670 |
#endif
|
|
2671 |
|
|
2672 |
return ((mng_datap)hHandle)->bCreating;
|
|
2673 |
}
|
|
2674 |
#endif
|
|
2675 |
|
|
2676 |
/* ************************************************************************** */
|
|
2677 |
|
|
2678 |
#ifdef MNG_SUPPORT_WRITE
|
|
2679 |
mng_bool MNG_DECL mng_status_writing (mng_handle hHandle)
|
|
2680 |
{
|
|
2681 |
#ifdef MNG_SUPPORT_TRACE
|
|
2682 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_WRITING, MNG_LC_START);
|
|
2683 |
#endif
|
|
2684 |
|
|
2685 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2686 |
return MNG_FALSE;
|
|
2687 |
|
|
2688 |
#ifdef MNG_SUPPORT_TRACE
|
|
2689 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_WRITING, MNG_LC_END);
|
|
2690 |
#endif
|
|
2691 |
|
|
2692 |
return ((mng_datap)hHandle)->bWriting;
|
|
2693 |
}
|
|
2694 |
#endif
|
|
2695 |
|
|
2696 |
/* ************************************************************************** */
|
|
2697 |
|
|
2698 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2699 |
mng_bool MNG_DECL mng_status_displaying (mng_handle hHandle)
|
|
2700 |
{
|
|
2701 |
#ifdef MNG_SUPPORT_TRACE
|
|
2702 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_DISPLAYING, MNG_LC_START);
|
|
2703 |
#endif
|
|
2704 |
|
|
2705 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2706 |
return MNG_FALSE;
|
|
2707 |
|
|
2708 |
#ifdef MNG_SUPPORT_TRACE
|
|
2709 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_DISPLAYING, MNG_LC_END);
|
|
2710 |
#endif
|
|
2711 |
|
|
2712 |
return ((mng_datap)hHandle)->bDisplaying;
|
|
2713 |
}
|
|
2714 |
#endif
|
|
2715 |
|
|
2716 |
/* ************************************************************************** */
|
|
2717 |
|
|
2718 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2719 |
mng_bool MNG_DECL mng_status_running (mng_handle hHandle)
|
|
2720 |
{
|
|
2721 |
#ifdef MNG_SUPPORT_TRACE
|
|
2722 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_RUNNING, MNG_LC_START);
|
|
2723 |
#endif
|
|
2724 |
|
|
2725 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2726 |
return MNG_FALSE;
|
|
2727 |
|
|
2728 |
#ifdef MNG_SUPPORT_TRACE
|
|
2729 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_RUNNING, MNG_LC_END);
|
|
2730 |
#endif
|
|
2731 |
|
|
2732 |
return ((mng_datap)hHandle)->bRunning;
|
|
2733 |
}
|
|
2734 |
#endif
|
|
2735 |
|
|
2736 |
/* ************************************************************************** */
|
|
2737 |
|
|
2738 |
#ifdef MNG_SUPPORT_DISPLAY
|
|
2739 |
mng_bool MNG_DECL mng_status_timerbreak (mng_handle hHandle)
|
|
2740 |
{
|
|
2741 |
#ifdef MNG_SUPPORT_TRACE
|
|
2742 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_TIMERBREAK, MNG_LC_START);
|
|
2743 |
#endif
|
|
2744 |
|
|
2745 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2746 |
return MNG_FALSE;
|
|
2747 |
|
|
2748 |
#ifdef MNG_SUPPORT_TRACE
|
|
2749 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_TIMERBREAK, MNG_LC_END);
|
|
2750 |
#endif
|
|
2751 |
|
|
2752 |
return ((mng_datap)hHandle)->bTimerset;
|
|
2753 |
}
|
|
2754 |
#endif
|
|
2755 |
|
|
2756 |
/* ************************************************************************** */
|
|
2757 |
|
|
2758 |
#ifdef MNG_SUPPORT_DYNAMICMNG
|
|
2759 |
mng_bool MNG_DECL mng_status_dynamic (mng_handle hHandle)
|
|
2760 |
{
|
|
2761 |
#ifdef MNG_SUPPORT_TRACE
|
|
2762 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_DYNAMIC, MNG_LC_START);
|
|
2763 |
#endif
|
|
2764 |
|
|
2765 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2766 |
return MNG_FALSE;
|
|
2767 |
|
|
2768 |
#ifdef MNG_SUPPORT_TRACE
|
|
2769 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_DYNAMIC, MNG_LC_END);
|
|
2770 |
#endif
|
|
2771 |
|
|
2772 |
return ((mng_datap)hHandle)->bDynamic;
|
|
2773 |
}
|
|
2774 |
#endif
|
|
2775 |
|
|
2776 |
/* ************************************************************************** */
|
|
2777 |
|
|
2778 |
#ifdef MNG_SUPPORT_DYNAMICMNG
|
|
2779 |
mng_bool MNG_DECL mng_status_runningevent (mng_handle hHandle)
|
|
2780 |
{
|
|
2781 |
#ifdef MNG_SUPPORT_TRACE
|
|
2782 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_RUNNINGEVENT, MNG_LC_START);
|
|
2783 |
#endif
|
|
2784 |
|
|
2785 |
if ((hHandle == 0) || (((mng_datap)hHandle)->iMagic != MNG_MAGIC))
|
|
2786 |
return MNG_FALSE;
|
|
2787 |
|
|
2788 |
#ifdef MNG_SUPPORT_TRACE
|
|
2789 |
MNG_TRACEX (((mng_datap)hHandle), MNG_FN_STATUS_RUNNINGEVENT, MNG_LC_END);
|
|
2790 |
#endif
|
|
2791 |
|
|
2792 |
return ((mng_datap)hHandle)->bRunningevent;
|
|
2793 |
}
|
|
2794 |
#endif
|
|
2795 |
|
|
2796 |
/* ************************************************************************** */
|
|
2797 |
/* * end of file * */
|
|
2798 |
/* ************************************************************************** */
|
|
2799 |
|