1 | /* $Id: oslibgpi.h,v 1.1 1999-12-09 16:49:45 cbratschi 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 | PVOID APIENTRY _GpiQueryDCData(ULONG hps);
|
---|
19 |
|
---|
20 | inline PVOID OSLibGpiQueryDCData(ULONG hps)
|
---|
21 | {
|
---|
22 | PVOID yyrc;
|
---|
23 | USHORT sel = RestoreOS2FS();
|
---|
24 |
|
---|
25 | yyrc = _GpiQueryDCData(hps);
|
---|
26 | SetFS(sel);
|
---|
27 |
|
---|
28 | return yyrc;
|
---|
29 | }
|
---|
30 |
|
---|
31 | typedef struct
|
---|
32 | {
|
---|
33 | LONG xLeft;
|
---|
34 | LONG yBottom;
|
---|
35 | LONG xRight;
|
---|
36 | LONG yTop;
|
---|
37 | } RECTLOS2, *PRECTLOS2;
|
---|
38 |
|
---|
39 | typedef struct
|
---|
40 | {
|
---|
41 | LONG x;
|
---|
42 | LONG y;
|
---|
43 | } POINTLOS2, *PPOINTLOS2;
|
---|
44 |
|
---|
45 | #define MapWin32ToOS2Rect(rectWin32,rectOS2) \
|
---|
46 | { \
|
---|
47 | (rectOS2).xLeft = (rectWin32).left; \
|
---|
48 | (rectOS2).yBottom = (rectWin32).bottom; \
|
---|
49 | (rectOS2).xRight = (rectWin32).right; \
|
---|
50 | (rectOS2).yTop = (rectWin32).top; \
|
---|
51 | }
|
---|
52 |
|
---|
53 | #define MapOS2ToWin32Rect(rectOS2,rectWin32) \
|
---|
54 | { \
|
---|
55 | (rectWin32).left = (rectOS2).xLeft; \
|
---|
56 | (rectWin32).bottom = (rectOS2).yBottom; \
|
---|
57 | (rectWin32).right = (rectOS2).xRight; \
|
---|
58 | (rectWin32).top = (rectOS2).yTop; \
|
---|
59 | }
|
---|
60 |
|
---|
61 | BOOL excludeBottomRightPoint(PVOID pHps,PPOINTLOS2 pptl);
|
---|
62 | BOOL getAlignUpdateCP(PVOID pHps);
|
---|
63 | INT getWorldYDeltaFor1Pixel(PVOID pHps);
|
---|
64 | INT getWorldXDeltaFor1Pixel(PVOID pHps);
|
---|
65 |
|
---|
66 | BOOL OSLibGpiQueryCurrentPosition(PVOID pHps,PPOINTLOS2 ptl);
|
---|
67 | BOOL OSLibGpiSetCurrentPosition(PVOID pHps,PPOINTLOS2 ptl);
|
---|
68 |
|
---|
69 | #define CHSOS_OPAQUE 0x0001L
|
---|
70 | #define CHSOS_VECTOR 0x0002L
|
---|
71 | #define CHSOS_LEAVEPOS 0x0008L
|
---|
72 | #define CHSOS_CLIP 0x0010L
|
---|
73 | #define CHSOS_UNDERSCORE 0x0200L
|
---|
74 | #define CHSOS_STRIKEOUT 0x0400L
|
---|
75 |
|
---|
76 | #define GPIOS_ERROR 0L
|
---|
77 | #define GPIOS_OK 1L
|
---|
78 | #define GPIOS_ALTERROR (-1L)
|
---|
79 |
|
---|
80 | BOOL OSLibGpiCharStringPosAt(PVOID pHps,PPOINTLOS2 ptl,PRECTLOS2 rct,ULONG flOptions,LONG lCount,LPCSTR pchString,CONST INT *alAdx);
|
---|
81 | BOOL OSLibGpiQueryCharStringPosAt(PVOID pHps,PPOINTLOS2 ptl,ULONG flOptions,LONG lCount,LPCSTR pchString,CONST INT *alAdx,PPOINTLOS2 aptlPos);
|
---|
82 |
|
---|
83 | #define TAOS_NORMAL_HORIZ 0x0001
|
---|
84 | #define TAOS_LEFT 0x0002
|
---|
85 | #define TAOS_CENTER 0x0003
|
---|
86 | #define TAOS_RIGHT 0x0004
|
---|
87 | #define TAOS_STANDARD_HORIZ 0x0005
|
---|
88 | #define TAOS_NORMAL_VERT 0x0100
|
---|
89 | #define TAOS_TOP 0x0200
|
---|
90 | #define TAOS_HALF 0x0300
|
---|
91 | #define TAOS_BASE 0x0400
|
---|
92 | #define TAOS_BOTTOM 0x0500
|
---|
93 | #define TAOS_STANDARD_VERT 0x0600
|
---|
94 |
|
---|
95 | BOOL OSLibGpiSetTextAlignment(PVOID pHps,LONG lHoriz,LONG lVert);
|
---|
96 | BOOL OSLibGpiQueryTextAlignment(PVOID pHps,PLONG plHoriz,PLONG plVert);
|
---|
97 |
|
---|
98 | #endif
|
---|