source: trunk/src/gdi32/oslibgpi.h@ 3315

Last change on this file since 3315 was 3315, checked in by sandervl, 25 years ago

header update

File size: 5.9 KB
Line 
1/* $Id: oslibgpi.h,v 1.5 2000-04-03 18:29:05 sandervl Exp $ */
2
3/*
4 * GPI interface code
5 *
6 * Copyright 1999 Christoph Bratschi (cbratschi@datacomm.ch)
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11#ifndef __OSLIBGPI_H__
12#define __OSLIBGPI_H__
13
14/* DC Graphics Mode */
15#define GM_COMPATIBLE_W 1
16#define GM_ADVANCED_W 2
17
18#define APIENTRYOS2 _System
19
20PVOID APIENTRYOS2 _GpiQueryDCData(ULONG hps);
21
22inline PVOID OSLibGpiQueryDCData(ULONG hps)
23{
24 PVOID yyrc;
25 USHORT sel = RestoreOS2FS();
26
27 yyrc = _GpiQueryDCData(hps);
28 SetFS(sel);
29
30 return yyrc;
31}
32
33BOOL APIENTRYOS2 _GpiEnableYInversion(ULONG hps, LONG lHeight);
34
35inline BOOL GpiEnableYInversion(ULONG hps, LONG lHeight)
36{
37 BOOL yyrc;
38 USHORT sel = RestoreOS2FS();
39
40 yyrc = _GpiEnableYInversion(hps, lHeight);
41 SetFS(sel);
42
43 return yyrc;
44}
45
46BOOL APIENTRYOS2 _GpiQueryYInversion(ULONG hps);
47
48inline BOOL GpiQueryYInversion(ULONG hps)
49{
50 BOOL yyrc;
51 USHORT sel = RestoreOS2FS();
52
53 yyrc = _GpiQueryYInversion(hps);
54 SetFS(sel);
55
56 return yyrc;
57}
58
59typedef struct
60{
61 LONG xLeft;
62 LONG yBottom;
63 LONG xRight;
64 LONG yTop;
65} RECTLOS2, *PRECTLOS2;
66
67typedef struct //same as Win32 POINT
68{
69 LONG x;
70 LONG y;
71} POINTLOS2, *PPOINTLOS2;
72
73#define MapWin32ToOS2Rect(rectWin32,rectOS2) \
74{ \
75 (rectOS2).xLeft = (rectWin32).left; \
76 (rectOS2).yBottom = (rectWin32).bottom; \
77 (rectOS2).xRight = (rectWin32).right; \
78 (rectOS2).yTop = (rectWin32).top; \
79}
80
81#define MapOS2ToWin32Rect(rectOS2,rectWin32) \
82{ \
83 (rectWin32).left = (rectOS2).xLeft; \
84 (rectWin32).bottom = (rectOS2).yBottom; \
85 (rectWin32).right = (rectOS2).xRight; \
86 (rectWin32).top = (rectOS2).yTop; \
87}
88
89BOOL excludeBottomRightPoint(PVOID pHps,PPOINTLOS2 pptl);
90BOOL getAlignUpdateCP(PVOID pHps);
91INT getWorldYDeltaFor1Pixel(PVOID pHps);
92INT getWorldXDeltaFor1Pixel(PVOID pHps);
93BOOL getInPath(PVOID pHps);
94VOID setInPath(PVOID pHps,BOOL inPath);
95BOOL getIsWideLine(PVOID pHps);
96BOOL getIsTopTop(PVOID pHps);
97ULONG getMapMode(PVOID pHps);
98
99BOOL OSLibGpiQueryCurrentPosition(PVOID pHps,PPOINTLOS2 ptl);
100BOOL OSLibGpiSetCurrentPosition(PVOID pHps,PPOINTLOS2 ptl);
101
102#define CHSOS_OPAQUE 0x0001L
103#define CHSOS_VECTOR 0x0002L
104#define CHSOS_LEAVEPOS 0x0008L
105#define CHSOS_CLIP 0x0010L
106#define CHSOS_UNDERSCORE 0x0200L
107#define CHSOS_STRIKEOUT 0x0400L
108
109#define GPIOS_ERROR 0L
110#define GPIOS_OK 1L
111#define GPIOS_ALTERROR (-1L)
112
113BOOL OSLibGpiCharStringPosAt(PVOID pHps,PPOINTLOS2 ptl,PRECTLOS2 rct,ULONG flOptions,LONG lCount,LPCSTR pchString,CONST INT *alAdx);
114BOOL OSLibGpiQueryCharStringPosAt(PVOID pHps,PPOINTLOS2 ptl,ULONG flOptions,LONG lCount,LPCSTR pchString,CONST INT *alAdx,PPOINTLOS2 aptlPos);
115
116#define TAOS_NORMAL_HORIZ 0x0001
117#define TAOS_LEFT 0x0002
118#define TAOS_CENTER 0x0003
119#define TAOS_RIGHT 0x0004
120#define TAOS_STANDARD_HORIZ 0x0005
121#define TAOS_NORMAL_VERT 0x0100
122#define TAOS_TOP 0x0200
123#define TAOS_HALF 0x0300
124#define TAOS_BASE 0x0400
125#define TAOS_BOTTOM 0x0500
126#define TAOS_STANDARD_VERT 0x0600
127
128BOOL OSLibGpiSetTextAlignment(PVOID pHps,LONG lHoriz,LONG lVert);
129BOOL OSLibGpiQueryTextAlignment(PVOID pHps,PLONG plHoriz,PLONG plVert);
130
131LONG OSLibGpiQueryTabbedTextExtent(PVOID pHps,INT lCount,LPCSTR pchString,INT lTabCount,PINT puTabStops);
132LONG OSLibGpiTabbedCharStringAt(PVOID pHps,PPOINTLOS2 pPtStart,PRECTLOS2 prclRect,ULONG flOptions,INT lCount,LPCSTR pchString,INT lTabCount,PINT puTabStops,INT lTabOrigin);
133
134#define TXTBOXOS_TOPLEFT 0L
135#define TXTBOXOS_BOTTOMLEFT 1L
136#define TXTBOXOS_TOPRIGHT 2L
137#define TXTBOXOS_BOTTOMRIGHT 3L
138#define TXTBOXOS_CONCAT 4L
139#define TXTBOXOS_COUNT 5L
140
141BOOL OSLibGpiQueryTextBox(PVOID pHps,LONG lCount1,LPCSTR pchString,LONG lCount2,PPOINTLOS2 aptlPoints);
142
143VOID calcDimensions(POINTLOS2 box[],PPOINTLOS2 point);
144
145#define DTOS_LEFT 0x00000000
146#define DTOS_QUERYEXTENT 0x00000002
147#define DTOS_UNDERSCORE 0x00000010
148#define DTOS_STRIKEOUT 0x00000020
149#define DTOS_TEXTATTRS 0x00000040
150#define DTOS_EXTERNALLEADING 0x00000080
151#define DTOS_CENTER 0x00000100
152#define DTOS_RIGHT 0x00000200
153#define DTOS_TOP 0x00000000
154#define DTOS_VCENTER 0x00000400
155#define DTOS_BOTTOM 0x00000800
156#define DTOS_HALFTONE 0x00001000
157#define DTOS_MNEMONIC 0x00002000
158#define DTOS_WORDBREAK 0x00004000
159#define DTOS_ERASERECT 0x00008000
160
161#define BMOS_ERROR (-1L)
162#define BMOS_DEFAULT 0L
163#define BMOS_OR 1L
164#define BMOS_OVERPAINT 2L
165#define BMOS_LEAVEALONE 5L
166
167LONG OSLibGpiQueryBackMix(PVOID pHps);
168
169#define MMOS_TEXT 1
170#define MMOS_LOMETRIC 2
171#define MMOS_HIMETRIC 3
172#define MMOS_LOENGLISH 4
173#define MMOS_HIENGLISH 5
174#define MMOS_TWIPS 6
175#define MMOS_ISOTROPIC 7
176#define MMOS_ANISOTROPIC 8
177
178BOOL doesYAxisGrowNorth(PVOID pHps);
179
180LONG OSLibWinDrawTabbedText(PVOID pHps,LONG cchText,LONG lTabs,LPCSTR lpchText,PVOID prcl,LONG clrFore,LONG clrBack,ULONG flCmd);
181
182
183BOOL OSLibGpiMove(PVOID pHps,PPOINTLOS2 pptlPoint);
184LONG OSLibGpiLine(PVOID pHps,PPOINTLOS2 pptlEndPoint);
185
186BOOL OSLibGpiEndPath(PVOID pHps);
187
188BOOL drawLinePointCircle(PVOID pHps,INT width,INT height,LONG color);
189BOOL drawLinePoint(PVOID pHps,PPOINTLOS2 pt,LONG color);
190
191ULONG OSLibGpiQueryCp(HDC hdc);
192BOOL OSLibGpiSetCp(HDC hdc, ULONG codepage);
193
194#endif
Note: See TracBrowser for help on using the repository browser.