870
|
1 /* Define prototypes for graphics library interface functions.
|
|
2 Copyright (C) 2002 Ben Wing.
|
|
3
|
|
4 This file is part of XEmacs.
|
|
5
|
|
6 XEmacs is free software; you can redistribute it and/or modify it
|
|
7 under the terms of the GNU General Public License as published by the
|
|
8 Free Software Foundation; either version 2, or (at your option) any
|
|
9 later version.
|
|
10
|
|
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 for more details.
|
|
15
|
|
16 You should have received a copy of the GNU General Public License
|
|
17 along with XEmacs; see the file COPYING. If not, write to
|
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
19 Boston, MA 02111-1307, USA. */
|
|
20
|
|
21 /* Synched up with: Not in FSF. */
|
|
22
|
|
23 #ifndef INCLUDED_libinterface_h_
|
|
24 #define INCLUDED_libinterface_h_
|
|
25
|
|
26 #ifdef HAVE_GIF
|
|
27 #include "gifrlib.h"
|
|
28 #endif /* HAVE_GIF */
|
|
29
|
|
30 #ifdef HAVE_PNG
|
|
31 #ifdef __cplusplus
|
|
32 extern "C" {
|
|
33 #endif
|
|
34 #define message message_ /* Yuck */
|
|
35 /* See comment in libinterface.c for the following */
|
|
36 #define PNG_EXPORT(type, symbol) type XCDECL symbol
|
|
37 #define ZEXPORT XCDECL
|
|
38 #define ZEXPORTVA XCDECL
|
|
39 #include <png.h>
|
|
40 #undef message
|
|
41 #ifdef __cplusplus
|
|
42 }
|
|
43 #endif
|
|
44 #endif /* HAVE_PNG */
|
|
45
|
|
46 /* #### WARNING: Utterly random magic here to prevent namespace conflicts
|
|
47 when no one bothers to be the least bit namespace-clean. Potential
|
|
48 problems: INT32, FAR. DONT_NEED_JPEG avoids the problem with FAR in
|
|
49 glyphs-msw.c. For some reason, putting the XPM code after this fixes
|
|
50 other problems; don't move it before. --ben */
|
|
51 #if defined (HAVE_JPEG) && !defined (DONT_NEED_JPEG)
|
|
52 #ifdef __cplusplus
|
|
53 extern "C" {
|
|
54 #endif
|
|
55 #ifdef _MSC_VER
|
|
56 # ifndef XMD_H
|
|
57 /* Yuck! This tricks jpeglib.h into not defining INT32, which is defined
|
|
58 in VC98/INCLUDE/basetsd.h */
|
|
59 # define UNDEF_XMD_H_ME_HARDER
|
|
60 # define XMD_H
|
|
61 # endif
|
|
62 #endif /* _MSC_VER */
|
|
63 #include <jpeglib.h>
|
|
64 #ifdef UNDEF_XMD_H_ME_HARDER
|
|
65 # undef XMD_H
|
|
66 #endif
|
|
67 #include <jerror.h>
|
|
68 #ifdef __cplusplus
|
|
69 }
|
|
70 #endif
|
|
71
|
|
72 boolean XCDECL qxe_jpeg_finish_decompress (j_decompress_ptr cinfo);
|
|
73 boolean XCDECL qxe_jpeg_start_decompress (j_decompress_ptr cinfo);
|
|
74 JDIMENSION XCDECL qxe_jpeg_read_scanlines (j_decompress_ptr cinfo,
|
|
75 JSAMPARRAY scanlines,
|
|
76 JDIMENSION max_lines);
|
|
77 int XCDECL qxe_jpeg_read_header (j_decompress_ptr cinfo, boolean require_image);
|
|
78 #define qxe_jpeg_create_decompress(cinfo) \
|
|
79 qxe_jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
|
|
80 (size_t) sizeof(struct jpeg_decompress_struct))
|
|
81 void XCDECL qxe_jpeg_CreateDecompress (j_decompress_ptr cinfo, int version,
|
|
82 size_t structsize);
|
|
83 struct jpeg_error_mgr * XCDECL qxe_jpeg_std_error (struct jpeg_error_mgr *err);
|
|
84 void XCDECL qxe_jpeg_destroy_decompress (j_decompress_ptr cinfo);
|
|
85 boolean XCDECL qxe_jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired);
|
|
86
|
|
87 #endif /* defined (HAVE_JPEG) && !defined (DONT_NEED_JPEG) */
|
|
88
|
|
89 #ifdef HAVE_XPM
|
|
90
|
|
91 #ifndef HAVE_GTK /* #### ????????????????????? No comprendo ni un poco.
|
|
92 This was here before, in a different file. --ben */
|
|
93 #include <X11/xpm.h>
|
|
94 #endif
|
|
95
|
|
96 void XCDECL qxe_XpmFreeXpmImage (XpmImage *image);
|
|
97 void XCDECL qxe_XpmFreeXpmInfo (XpmInfo *info);
|
|
98 int XCDECL qxe_XpmCreateXpmImageFromBuffer (char *buffer, XpmImage *image,
|
|
99 XpmInfo *info);
|
|
100 void XCDECL qxe_XpmFree (void *ptr);
|
|
101 int XCDECL qxe_XpmReadFileToData (char *filename, char ***data_return);
|
|
102
|
|
103 #endif /* HAVE_XPM */
|
|
104
|
|
105 #ifdef HAVE_TIFF
|
|
106 #include "tiffio.h"
|
|
107
|
|
108 tdata_t XCDECL qxe_TIFFmalloc (tsize_t x1);
|
|
109 void XCDECL qxe_TIFFfree (tdata_t x1);
|
|
110 void XCDECL qxe_TIFFClose (TIFF *x1);
|
|
111 int XCDECL qxe_TIFFGetField (TIFF *x1, ttag_t x2, uint32 *x3);
|
|
112 TIFF * XCDECL qxe_TIFFClientOpen (const char *x1, const char *x2,
|
|
113 thandle_t x3, TIFFReadWriteProc x4,
|
|
114 TIFFReadWriteProc x5, TIFFSeekProc x6,
|
|
115 TIFFCloseProc x7, TIFFSizeProc x8,
|
|
116 TIFFMapFileProc x9, TIFFUnmapFileProc x10);
|
|
117 TIFFErrorHandler XCDECL qxe_TIFFSetErrorHandler (TIFFErrorHandler x1);
|
|
118 TIFFErrorHandler XCDECL qxe_TIFFSetWarningHandler (TIFFErrorHandler x1);
|
|
119 int XCDECL qxe_TIFFReadRGBAImage (TIFF *x1, uint32 x2, uint32 x3, uint32 *x4,
|
|
120 int x5);
|
|
121
|
|
122 #endif /* HAVE_TIFF */
|
|
123
|
|
124 #endif /* INCLUDED_libinterface_h_ */
|