File: tixPort.h

package info (click to toggle)
tix 8.4.3-10
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 9,080 kB
  • ctags: 7,129
  • sloc: ansic: 28,082; tcl: 22,774; python: 7,577; makefile: 331; cs: 253; sh: 210; perl: 128
file content (101 lines) | stat: -rw-r--r-- 2,359 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

/*	$Id: tixPort.h,v 1.6 2005/03/25 20:15:53 hobbs Exp $	*/

/*
 * tixPort.h --
 *
 *	This header file handles porting issues that occur because of
 *	differences between systems.  It reads in platform specific
 *	portability files.
 *
 * Copyright (c) 1996, Expert Interface Technologies
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 */

#ifndef _TIX_PORT_H_
#define _TIX_PORT_H_

#ifndef _TCL
#define USE_INTERP_RESULT 1
#include "tcl.h"
#endif

#ifndef _TK
#include "tk.h"
#endif

#if (!defined(__WIN32__)) && (!defined(_WIN32)) && (!defined(MAC_TCL))
    /*
     * The Tcl/Tk porting stuff is needed only in Unix.
     */
#if !defined(_TCLPORT) && !defined(_TKPORT)
#  ifdef _TKINT
#    include "tkPort.h"
#  else
#    include "tclPort.h"
#  endif
#endif
#endif

#ifndef _TIX_H_
#include <tix.h>
#endif

#if defined(__WIN32__) || defined(_WIN32)
#   include "tixWinPort.h"
#else
#   if defined(MAC_TCL)
#	include "tixMacPort.h"
#   else
#   if defined(MAC_OSX_TK)
#	include <X11/X.h>
#	define Cursor XCursor
#	define Region XRegion
#	include "../unix/tixUnixPort.h"
#   else
#	include "../unix/tixUnixPort.h"
#   endif
#   endif
#endif

EXTERN Tcl_HashTable *	TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp,
			    char * name, Tcl_InterpDeleteProc *deleteProc,
                            int keyType));

/*
 * Some pre-Tk8.0 style font handling. Should be updated to new Tk
 * font functions soon.
 */

typedef Tk_Font TixFont;
#define TixFontId(font) Tk_FontId(font)

EXTERN void		TixComputeTextGeometry _ANSI_ARGS_((
			    TixFont fontStructPtr, CONST84 char *string,
			    int numChars, int wrapLength, int *widthPtr,
			    int *heightPtr));
EXTERN void		TixDisplayText _ANSI_ARGS_((Display *display,
			    Drawable drawable, TixFont font,
			    CONST84 char *string, int numChars, int x, int y,
			    int length, Tk_Justify justify, int underline,
			    GC gc));

#define TixFreeFont Tk_FreeFont
#define TixNameOfFont Tk_NameOfFont
#define TixGetFont Tk_GetFont

/*
 * Tcl 8.4.a2 defines this macro that causes Tix compiled with
 * Tcl 8.4 to break in Tcl 8.3
 */

#if defined(Tcl_InitHashTable) && defined(USE_TCL_STUBS)
#undef Tcl_InitHashTable
#define Tcl_InitHashTable \
    (tclStubsPtr->tcl_InitHashTable)
#endif

#endif /* _TIX_PORT_H_ */