OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tix/] [generic/] [tixPort.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
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
 
15
#ifndef _TIX_PORT_H_
16
#define _TIX_PORT_H_
17
 
18
#ifndef _TCL
19
#include "tcl.h"
20
#endif
21
 
22
#ifndef _TK
23
#include "tk.h"
24
#endif
25
 
26
#if (!defined(__WIN32__)) && (!defined(_WIN32)) && (!defined(MAC_TCL))
27
    /*
28
     * The Tcl/Tk porting stuff is needed only in Unix.
29
     */
30
#if !defined(_TCLPORT) && !defined(_TKPORT)
31
#  ifdef _TKINT
32
#    include "tkPort.h"
33
#  else
34
#    include "tclPort.h"
35
#  endif
36
#endif
37
#endif
38
 
39
#ifndef _TIX_H_
40
#include <tix.h>
41
#endif
42
 
43
#if defined(__WIN32__) || defined(_WIN32)
44
#   include "tixWinPort.h"
45
#else
46
#   if defined(MAC_TCL)
47
#       include "tixMacPort.h"
48
#   else
49
#       include "../unix/tixUnixPort.h"
50
#   endif
51
#endif
52
 
53
#ifdef BUILD_tix
54
# undef TCL_STORAGE_CLASS
55
# define TCL_STORAGE_CLASS DLLEXPORT
56
#endif
57
 
58
#ifdef TK_4_1_OR_LATER
59
 
60
EXTERN Tcl_HashTable *  TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp,
61
                            char * name, Tcl_InterpDeleteProc *deleteProc));
62
#define _TixGetHashTable(i,n,p) TixGetHashTable(i,n,p)
63
 
64
#else
65
 
66
EXTERN Tcl_HashTable *  TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp,
67
                            char * name));
68
#define _TixGetHashTable(i,n,p) TixGetHashTable(i,n)
69
 
70
#endif
71
 
72
#if (TK_MAJOR_VERSION > 4)
73
 
74
/*
75
 * The font handling is changed in Tk 8.0 and later
76
 */
77
 
78
typedef Tk_Font TixFont;
79
#define TixFontId(font) Tk_FontId(font)
80
 
81
EXTERN void             TixComputeTextGeometry _ANSI_ARGS_((
82
                            TixFont fontStructPtr, char *string,
83
                            int numChars, int wrapLength, int *widthPtr,
84
                            int *heightPtr));
85
EXTERN void             TixDisplayText _ANSI_ARGS_((Display *display,
86
                            Drawable drawable, TixFont font,
87
                            char *string, int numChars, int x, int y,
88
                            int length, Tk_Justify justify, int underline,
89
                            GC gc));
90
 
91
#define TixFreeFont Tk_FreeFont
92
#define TixNameOfFont Tk_NameOfFont
93
#define TixGetFont Tk_GetFont
94
 
95
#else
96
 
97
typedef XFontStruct* TixFont;
98
#define TixFontId(font) ((font)->fid)
99
#define TixComputeTextGeometry TkComputeTextGeometry
100
#define TixDisplayText TkDisplayText
101
#define TixFreeFont Tk_FreeFontStruct
102
#define TixNameOfFont Tk_NameOfFontStruct
103
#define TixGetFont Tk_GetFontStruct
104
 
105
EXTERN void             TkDisplayText _ANSI_ARGS_((Display *display,
106
                            Drawable drawable, XFontStruct *fontStructPtr,
107
                            char *string, int numChars, int x, int y,
108
                            int length, Tk_Justify justify, int underline,
109
                            GC gc));
110
EXTERN void             TkComputeTextGeometry _ANSI_ARGS_((
111
                            XFontStruct *fontStructPtr, char *string,
112
                            int numChars, int wrapLength, int *widthPtr,
113
                            int *heightPtr));
114
 
115
 
116
#endif
117
 
118
#undef TCL_STORAGE_CLASS
119
#define TCL_STORAGE_CLASS DLLIMPORT
120
 
121
#endif /* _TIX_PORT_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.