]> www.wagner.pp.ru Git - oss/fgis.git/blob - dll/fgisInt.h
First checked in version
[oss/fgis.git] / dll / fgisInt.h
1 #ifndef FGISINT_H
2 #define FGISINT_H
3 #include <epp.h>
4 #include <tcl.h>
5 #include <reclass.h>
6 typedef int *PALETTE;
7 extern PALETTE default_palette;
8
9 /* raster related types and variables*/
10
11
12 typedef struct XEPP { int linkcount; /*Count of links */
13                       char *filename; /* name of raster file */
14                       struct XEPP* next; /* to chain all open rasters 
15                                            into list*/
16                       EPP *e;
17                       int editable;
18                       } XEPP;
19 typedef struct RASTER_OBJECT { XEPP *file;
20                                 RECLASS reclass;
21                                 struct RASTER_OBJECT *next;
22                               } *RASTER_OBJECT ;
23
24 extern XEPP *first_raster; /* This pointer intentionally made global.
25                               even if there are serveral Tcl interpreters,
26                               they all should share same list of open rasters*/
27 extern RASTER_OBJECT firstobject;
28
29 #define MAX_PATTERN_SIZE (32*256)
30
31
32 typedef struct PATTERNS { struct PATTERNS *next; /* patterns are linked in order
33                                                     to be re-used */
34                           char *name;
35                           int width,height;
36                           unsigned int bits[MAX_PATTERN_SIZE];
37                         } *PATTERNS;
38 #define patternSize(width,height) ((height*256)*sizeof(int)+sizeof (struct PATTERNS)-MAX_PATTERN_SIZE*sizeof(int)) 
39
40
41 extern PATTERNS def_patterns;
42
43 int Fgis_RasterMin(RASTER_OBJECT handle);
44
45 int Fgis_RasterMax(RASTER_OBJECT handle);
46
47 void Fgis_CloseXEPP(XEPP *file);
48
49 XEPP* Fgis_OpenXEPP(char *filename,EPP *(*openfunc)(char *));
50
51 XEPP* Fgis_NewXEPP(EPP* file, char *filename);
52
53
54 #define FGIS_INVALID_RECLASS ((RECLASS)0x1)
55 #define MAX_EPP_CLASS 65535
56
57 /* EXPORT macro to cope with ugly Win32 DDLs */
58 #ifdef WIN32
59 #   if defined(_MSC_VER)
60 #       define EXPORT(a,b) __declspec(dllexport) a b
61 #       define DllEntryPoint DllMain
62 #   else
63 #       if defined(__BORLANDC__)
64 #           define EXPORT(a,b) a _export b
65 #       else
66 #           define EXPORT(a,b) a b
67 #       endif
68 #   endif
69 #else   /* ! WIN32 */
70 #   define EXPORT(a,b) a b
71 #endif  /* WIN32 */
72 #endif