Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * tixPort.h -- | |
3 | * | |
4 | * This header file handles porting issues that occur because of | |
5 | * differences between systems. It reads in platform specific | |
6 | * portability files. | |
7 | * | |
8 | * Copyright (c) 1996, Expert Interface Technologies | |
9 | * | |
10 | * See the file "license.terms" for information on usage and redistribution | |
11 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. | |
12 | * | |
13 | */ | |
14 | #ifndef _TIX_PORT_H_ | |
15 | #define _TIX_PORT_H_ | |
16 | ||
17 | #ifndef _TKPORT | |
18 | #include "tkPort.h" | |
19 | #endif | |
20 | ||
21 | #ifndef _LANG | |
22 | #include "Lang.h" | |
23 | #endif | |
24 | ||
25 | #ifndef _TK | |
26 | #include "tk.h" | |
27 | #endif | |
28 | ||
29 | #if (!defined(__WIN32__)) && (!defined(_WIN32)) && (!defined(MAC_TCL)) && (!defined(__PM__)) | |
30 | /* | |
31 | * The Tcl/Tk porting stuff is needed only in Unix. | |
32 | */ | |
33 | #if !defined(_TCLPORT) && !defined(_TKPORT) | |
34 | # if defined(_TKINT) || defined(_LANG) | |
35 | # include "tkPort.h" | |
36 | # else | |
37 | # include "tclPort.h" | |
38 | # endif | |
39 | #endif | |
40 | #endif | |
41 | ||
42 | ||
43 | #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__PM__) | |
44 | # include "tixWinPort.h" | |
45 | #else | |
46 | # if defined(MAC_TCL) | |
47 | # include "tixMacPort.h" | |
48 | # else | |
49 | # include "tixUnixPort.h" | |
50 | # endif | |
51 | #endif | |
52 | ||
53 | ||
54 | EXTERN Tcl_HashTable * TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp, | |
55 | char * name, Tcl_InterpDeleteProc *deleteProc)); | |
56 | #define _TixGetHashTable(i,n,p) TixGetHashTable(i,n,p) | |
57 | ||
58 | #if (TK_MAJOR_VERSION > 4) | |
59 | ||
60 | /* | |
61 | * The font handling is changed in Tk 8.0 and later | |
62 | */ | |
63 | ||
64 | typedef Tk_Font TixFont; | |
65 | #define TixFontId(font) Tk_FontId(font) | |
66 | ||
67 | EXTERN void TixComputeTextGeometry _ANSI_ARGS_(( | |
68 | TixFont fontStructPtr, char *string, | |
69 | int numChars, int wrapLength, int *widthPtr, | |
70 | int *heightPtr)); | |
71 | EXTERN void TixDisplayText _ANSI_ARGS_((Display *display, | |
72 | Drawable drawable, TixFont font, | |
73 | char *string, int numChars, int x, int y, | |
74 | int length, Tk_Justify justify, int underline, | |
75 | GC gc)); | |
76 | ||
77 | #define TixFreeFont Tk_FreeFont | |
78 | #define TixNameOfFont Tk_NameOfFont | |
79 | #define TixGetFont Tk_GetFont | |
80 | ||
81 | #else | |
82 | ||
83 | typedef XFontStruct* TixFont; | |
84 | #define TixFontId(font) ((font)->fid) | |
85 | #define TixComputeTextGeometry TkComputeTextGeometry | |
86 | #define TixDisplayText TkDisplayText | |
87 | #define TixFreeFont Tk_FreeFontStruct | |
88 | #define TixNameOfFont Tk_NameOfFontStruct | |
89 | #define TixGetFont Tk_GetFontStruct | |
90 | ||
91 | #ifndef TkDisplayText | |
92 | EXTERN void TkDisplayText _ANSI_ARGS_((Display *display, | |
93 | Drawable drawable, XFontStruct *fontStructPtr, | |
94 | char *string, int numChars, int x, int y, | |
95 | int length, Tk_Justify justify, int underline, | |
96 | GC gc)); | |
97 | #endif | |
98 | #ifndef TkComputeTextGeometry | |
99 | EXTERN void TkComputeTextGeometry _ANSI_ARGS_(( | |
100 | XFontStruct *fontStructPtr, char *string, | |
101 | int numChars, int wrapLength, int *widthPtr, | |
102 | int *heightPtr)); | |
103 | #endif | |
104 | ||
105 | #endif | |
106 | ||
107 | #endif /* _TIX_PORT_H_ */ |