blob: 69b709845564f58b591e6a8cbe0e44de16191c74 (
plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
/* ncbiport.h
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information (NCBI)
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government do not place any restriction on its use or reproduction.
* We would, however, appreciate having the NCBI and the author cited in
* any work or product based on this material
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* ===========================================================================
*
* File Name: ncbiport.h
*
* Author: Jonathan Kans
*
* Version Creation Date: 1/1/91
*
* $Revision: 6.1 $
*
* File Description:
* Vibrant drawing port specification definitions
*
* Modifications:
* --------------------------------------------------------------------------
* Date Name Description of modification
* ------- ---------- -----------------------------------------------------
*
*
* $Log: ncbiport.h,v $
* Revision 6.1 2007/05/01 22:01:30 kans
* changes in preparation for supporing Quartz on Macintosh
*
* Revision 6.0 1997/08/25 18:56:09 madden
* Revision changed to 6.0
*
* Revision 5.2 1997/07/10 21:49:27 vakatov
* [WIN_X] Now able to manage windows having different depths(and
* different visuals and GC).
*
* Revision 5.1 1997/06/18 19:46:32 vakatov
* [WIN_GIF] Do not use WIN_MAC/MSWIN/MOTIF-specific fields of the
* Nlm_FontRec struct.
*
* Revision 5.0 1996/05/28 13:45:08 ostell
* Set to revision 5.0
*
* Revision 4.0 1995/07/26 13:51:04 ostell
* force revision to 4.0
*
* Revision 2.6 1995/05/17 15:15:14 kans
* added Log line
*
*
* ==========================================================================
*/
#ifndef _NCBIPORT_
#define _NCBIPORT_
#ifndef _NCBI_
#include <ncbi.h>
#endif
#ifndef _NCBIDRAW_
#include <ncbidraw.h>
#endif
#ifndef _NCBIWIN_
#include <ncbiwin.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef WIN_MAC
#define Nlm_PointTool Point
#define Nlm_RectTool Rect
#define Nlm_RgnTool RgnHandle
#ifdef WIN_MAC_ATSUI
#define Nlm_FontTool ATSUStyle
#else
#define Nlm_FontTool Nlm_Handle
#endif
#endif
#ifdef WIN_MSWIN
#define Nlm_PointTool POINT
#define Nlm_RectTool RECT
#define Nlm_RgnTool HRGN
#define Nlm_FontTool HFONT
#endif
#ifdef WIN_X
#define Nlm_PointTool XPoint
#define Nlm_RectTool XRectangle
#define Nlm_RgnTool Region
#define Nlm_FontTool XFontStruct*
#endif
/* The font structure is created using a handle. The FntPtr is
* returned by a call to Nlm_HandLock (font). Be sure to call
* Nlm_HandUnlock (font) after obtaining the font handle.
*/
/* esl: includes refcnt and fontspec instead of name/size/bld... */
typedef struct Nlm_fontrec {
Nlm_FonT next;
Nlm_Int4 refcnt;
Nlm_FontSpec fontspec;
#ifndef WIN_GIF
#if defined(WIN_MAC) && ! defined(WIN_MAC_ATSUI)
Nlm_Int2 number;
Nlm_Int2 size;
Nlm_Int2 style;
#elif defined(WIN_MSWIN) || defined(WIN_X) || defined(WIN_MAC_ATSUI)
Nlm_FontTool handle;
#endif
#endif
Nlm_FonT print;
} Nlm_FontRec, Nlm_FontData, PNTR Nlm_FntPtr;
extern Nlm_Boolean Nlm_nowPrinting;
#ifdef WIN_MAC
extern RGBColor Nlm_RGBforeColor;
extern RGBColor Nlm_RGBbackColor;
extern Nlm_Boolean Nlm_hasColorQD;
#endif
#ifdef WIN_MSWIN
extern HWND Nlm_currentHWnd;
extern HDC Nlm_currentHDC;
#endif
#ifdef WIN_X
extern Display *Nlm_currentXDisplay;
extern int Nlm_currentXScreen;
extern Window Nlm_currentXWindow;
extern GC Nlm_currentXGC;
extern Nlm_Uint4 Nlm_XbackColor;
extern Nlm_Uint4 Nlm_XforeColor;
extern Nlm_Int2 Nlm_XOffset;
extern Nlm_Int2 Nlm_YOffset;
extern Nlm_RegioN Nlm_clpRgn;
extern Nlm_Boolean Nlm_hasColor;
#endif
#ifdef WIN_MAC
void Nlm_SetPort PROTO((GrafPtr grafptr));
void Nlm_SetPortWindowPort PROTO((WindowPtr wptr));
#endif
#ifdef WIN_MSWIN
void Nlm_SetPort PROTO((HWND hwnd, HDC hdc));
extern void Nlm_FontSpecToLOGFONT PROTO((Nlm_FontSpecPtr fsp, LOGFONT *lfp)); /* esl */
#endif
#ifdef __cplusplus
}
#endif
#endif
|