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