source: trunk/include/helpers/gpih.h@ 23

Last change on this file since 23 was 23, checked in by umoeller, 25 years ago

Fixes for V0.9.7.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 6.4 KB
Line 
1/* $Id: gpih.h 23 2001-01-16 19:49:10Z umoeller $ */
2
3
4/*
5 *@@sourcefile gpih.h:
6 * header file for gpih.c (GPI helper functions). See remarks there.
7 *
8 * Note: Version numbering in this file relates to XWorkplace version
9 * numbering.
10 *
11 *@@include #define INCL_GPILOGCOLORTABLE // for some funcs
12 *@@include #include <os2.h>
13 *@@include #include "gpih.h"
14 */
15
16/*
17 * Copyright (C) 1997-2000 Ulrich M”ller.
18 * This file is part of the "XWorkplace helpers" source package.
19 * This is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published
21 * by the Free Software Foundation, in version 2 as it comes in the
22 * "COPYING" file of the XWorkplace main distribution.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 */
28
29#if __cplusplus
30extern "C" {
31#endif
32
33#ifndef GPIH_HEADER_INCLUDED
34 #define GPIH_HEADER_INCLUDED
35
36 /* ******************************************************************
37 *
38 * Device helpers
39 *
40 ********************************************************************/
41
42 ULONG gpihQueryDisplayCaps(ULONG ulIndex);
43
44 /* ******************************************************************
45 *
46 * Color helpers
47 *
48 ********************************************************************/
49
50 // common RGB colors
51 #define RGBCOL_BLACK 0x00000000
52 #define RGBCOL_WHITE 0x00FFFFFF
53
54 #define RGBCOL_RED 0x00FF0000
55 #define RGBCOL_PINK 0x00FF00FF
56 #define RGBCOL_BLUE 0x000000FF
57 #define RGBCOL_CYAN 0x0000FFFF
58 #define RGBCOL_GREEN 0x0000FF00
59 #define RGBCOL_YELLOW 0x00FFFF00
60 #define RGBCOL_GRAY 0x00CCCCCC
61
62 #define RGBCOL_DARKRED 0x00800000
63 #define RGBCOL_DARKPINK 0x00800080
64 #define RGBCOL_DARKBLUE 0x00000080
65 #define RGBCOL_DARKCYAN 0x00008080
66 #define RGBCOL_DARKGREEN 0x00008000
67 #define RGBCOL_DARKYELLOW 0x00808000
68 #define RGBCOL_DARKGRAY 0x00808080
69
70 VOID gpihManipulateRGB(PLONG plColor,
71 BYTE bMultiplier,
72 BYTE bDivisor);
73
74 BOOL gpihSwitchToRGB(HPS hps);
75 typedef BOOL XWPENTRY GPIHSWITCHTORGB(HPS hps);
76 typedef GPIHSWITCHTORGB *PGPIHSWITCHTORGB;
77
78 /* ******************************************************************
79 *
80 * Drawing primitives helpers
81 *
82 ********************************************************************/
83
84 VOID gpihDrawRect(HPS hps, PRECTL prcl);
85
86 VOID gpihBox(HPS hps,
87 LONG lControl,
88 PRECTL prcl,
89 LONG lColor);
90
91 VOID gpihMarker(HPS hps,
92 LONG x,
93 LONG y,
94 ULONG ulWidth,
95 LONG lColor);
96
97 VOID gpihDrawThickFrame(HPS hps,
98 PRECTL prcl,
99 ULONG ulWidth);
100
101 VOID XWPENTRY gpihDraw3DFrame(HPS hps,
102 PRECTL prcl,
103 USHORT usWidth,
104 LONG lColorLeft,
105 LONG lColorRight);
106 typedef VOID XWPENTRY GPIHDRAW3DFRAME(HPS hps,
107 PRECTL prcl,
108 USHORT usWidth,
109 LONG lColorLeft,
110 LONG lColorRight);
111 typedef GPIHDRAW3DFRAME *PGPIHDRAW3DFRAME;
112
113 LONG gpihCharStringPosAt(HPS hps,
114 PPOINTL pptlStart,
115 PRECTL prclRect,
116 ULONG flOptions,
117 LONG lCount,
118 PCH pchString);
119
120 /* ******************************************************************
121 *
122 * Font helpers
123 *
124 ********************************************************************/
125
126 BOOL gpihSplitPresFont(PSZ pszFontNameSize,
127 PULONG pulSize,
128 PSZ *ppszFaceName);
129
130 LONG gpihFindFont(HPS hps,
131 LONG lSize,
132 BOOL fFamily,
133 PSZ pszName,
134 USHORT usFormat,
135 PFONTMETRICS pFontMetrics);
136
137 LONG gpihFindPresFont(HWND hwnd,
138 BOOL fInherit,
139 HPS hps,
140 PSZ pszDefaultFont,
141 PFONTMETRICS pFontMetrics,
142 PLONG plSize);
143
144 BOOL gpihSetPointSize(HPS hps,
145 LONG lPointSize);
146
147 LONG gpihQueryLineSpacing(HPS hps);
148
149 /* ******************************************************************
150 *
151 * Bitmap helpers
152 *
153 ********************************************************************/
154
155 BOOL gpihCreateMemPS(HAB hab,
156 PSIZEL psizlPage,
157 HDC *hdcMem,
158 HPS *hpsMem);
159
160 HBITMAP gpihCreateBitmap(HPS hpsMem,
161 ULONG cx,
162 ULONG cy);
163
164 HBITMAP gpihCreateBmpFromPS(HAB hab,
165 HPS hpsScreen,
166 PRECTL prcl);
167
168 HBITMAP gpihCreateHalftonedBitmap(HAB hab,
169 HBITMAP hbmSource,
170 LONG lColorGray);
171
172 HBITMAP gpihLoadBitmapFile(HPS hps,
173 PSZ pszBmpFile,
174 PULONG pulError);
175
176 LONG gpihStretchBitmap(HPS hpsTarget,
177 HBITMAP hbmSource,
178 PRECTL prclSource,
179 PRECTL prclTarget,
180 BOOL fProportional);
181
182 BOOL gpihIcon2Bitmap(HPS hpsMem,
183 HPOINTER hptr,
184 LONG lBkgndColor,
185 ULONG ulIconSize);
186
187#endif
188
189#if __cplusplus
190}
191#endif
192
Note: See TracBrowser for help on using the repository browser.