1 | /* $Id: icm.cpp,v 1.2 2001-09-09 12:24:13 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * GDI32 Color Management apis
|
---|
5 | *
|
---|
6 | * Copyright 1998-2001 Patrick Haller
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 | #include <os2win.h>
|
---|
12 | #include <stdlib.h>
|
---|
13 | #include <stdarg.h>
|
---|
14 | #include <string.h>
|
---|
15 | #include <odinwrap.h>
|
---|
16 | #include <misc.h>
|
---|
17 | #include "callback.h"
|
---|
18 | #include "unicode.h"
|
---|
19 | #include "dibsect.h"
|
---|
20 | #include <codepage.h>
|
---|
21 | #include "oslibgpi.h"
|
---|
22 | #include "oslibgdi.h"
|
---|
23 | #include <dcdata.h>
|
---|
24 | #include <winuser32.h>
|
---|
25 |
|
---|
26 | #define DBG_LOCALLOG DBG_gdi32
|
---|
27 | #include "dbglocal.h"
|
---|
28 |
|
---|
29 | ODINDEBUGCHANNEL(GDI32-ICM)
|
---|
30 |
|
---|
31 |
|
---|
32 | //******************************************************************************
|
---|
33 | //******************************************************************************
|
---|
34 | BOOL WIN32API DeleteColorSpace(HCOLORSPACE hColorSpace)
|
---|
35 | {
|
---|
36 | dprintf(("GDI32: DeleteColorSpace - stub\n"));
|
---|
37 | return FALSE;
|
---|
38 | }
|
---|
39 | //******************************************************************************
|
---|
40 | //******************************************************************************
|
---|
41 | BOOL WIN32API SetColorSpace(HDC hdc, HCOLORSPACE hColorSpace)
|
---|
42 | {
|
---|
43 | dprintf(("GDI32: SetColorSpace - stub\n"));
|
---|
44 | return FALSE;
|
---|
45 | }
|
---|
46 | //******************************************************************************
|
---|
47 | //******************************************************************************
|
---|
48 | HCOLORSPACE WIN32API CreateColorSpaceA(LPLOGCOLORSPACEA lpLogColorSpace)
|
---|
49 | {
|
---|
50 | dprintf(("GDI32: CreateColorSpaceA - stub\n"));
|
---|
51 | return 0;
|
---|
52 | }
|
---|
53 | //******************************************************************************
|
---|
54 | //******************************************************************************
|
---|
55 | HCOLORSPACE WIN32API CreateColorSpaceW(LPLOGCOLORSPACEW lpwLogColorSpace)
|
---|
56 | {
|
---|
57 | dprintf(("GDI32: CreateColorSpaceW - stub\n"));
|
---|
58 | return 0;
|
---|
59 | }
|
---|
60 | //******************************************************************************
|
---|
61 | //******************************************************************************
|
---|
62 | HANDLE WIN32API GetColorSpace(HDC hdc)
|
---|
63 | {
|
---|
64 | dprintf(("GDI32: GetColorSpace - stub\n"));
|
---|
65 | return 0;
|
---|
66 | }
|
---|
67 | //******************************************************************************
|
---|
68 | //******************************************************************************
|
---|
69 | int WIN32API SetICMMode(HDC hdc, int mode)
|
---|
70 | {
|
---|
71 | dprintf(("GDI32: SetICMMode - stub\n"));
|
---|
72 | return 0;
|
---|
73 | }
|
---|
74 | //******************************************************************************
|
---|
75 |
|
---|
76 |
|
---|
77 |
|
---|
78 | /*****************************************************************************
|
---|
79 | * Name : BOOL CheckColorsInGamut
|
---|
80 | * Purpose : The CheckColorsInGamut function indicates whether the specified
|
---|
81 | * color values are within the gamut of the specified device.
|
---|
82 | * Parameters: HDC hdc handle of device context
|
---|
83 | * LPVOID lpaRGBQuad
|
---|
84 | * LPVOID lpResult
|
---|
85 | * DWORD dwResult
|
---|
86 | * Variables :
|
---|
87 | * Result : TRUE / FALSE
|
---|
88 | * Remark :
|
---|
89 | * Status : UNTESTED STUB
|
---|
90 | *
|
---|
91 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
92 | *****************************************************************************/
|
---|
93 |
|
---|
94 | BOOL WIN32API CheckColorsInGamut(HDC hdc,
|
---|
95 | LPVOID lpaRGBQuad,
|
---|
96 | LPVOID lpResult,
|
---|
97 | DWORD dwResult)
|
---|
98 | {
|
---|
99 | dprintf(("GDI32: CheckColorsInGamut(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
100 | hdc,
|
---|
101 | lpaRGBQuad,
|
---|
102 | lpResult,
|
---|
103 | dwResult));
|
---|
104 |
|
---|
105 | return (FALSE);
|
---|
106 | }
|
---|
107 |
|
---|
108 |
|
---|
109 | /*****************************************************************************
|
---|
110 | * Name : BOOL ColorMatchToTarget
|
---|
111 | * Purpose : The ColorMatchToTarget function enables or disables preview for
|
---|
112 | * the specified device context. When preview is enabled, colors
|
---|
113 | * in subsequent output to the specified device context are
|
---|
114 | * displayed as they would appear on the target device. This is
|
---|
115 | * useful for checking how well the target maps the specified
|
---|
116 | * colors in an image. To enable preview, image color matching
|
---|
117 | * must be enabled for both the target and the preview device context.
|
---|
118 | * Parameters: HDC hdc handle of device context
|
---|
119 | * HDC hdcTarget handle of target device context
|
---|
120 | * DWORD uiAction
|
---|
121 | * Variables :
|
---|
122 | * Result : TRUE / FALSE
|
---|
123 | * Remark :
|
---|
124 | * Status : UNTESTED STUB
|
---|
125 | *
|
---|
126 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
127 | *****************************************************************************/
|
---|
128 |
|
---|
129 | BOOL WIN32API ColorMatchToTarget(HDC hdc,
|
---|
130 | HDC hdcTarget,
|
---|
131 | DWORD uiAction)
|
---|
132 | {
|
---|
133 | dprintf(("GDI32: ColorMatchToTarget(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
134 | hdc,
|
---|
135 | hdcTarget,
|
---|
136 | uiAction));
|
---|
137 |
|
---|
138 | return (FALSE);
|
---|
139 | }
|
---|
140 |
|
---|
141 |
|
---|
142 | /*****************************************************************************
|
---|
143 | * Name : int EnumICMProfilesA
|
---|
144 | * Purpose : The EnumICMProfilesA function enumerates the different color
|
---|
145 | * profiles that the system supports for the specified device context.
|
---|
146 | * Parameters: HDC hdc
|
---|
147 | * ICMENUMPROC lpICMEnumFunc
|
---|
148 | * LPARAM lParam
|
---|
149 | * Variables :
|
---|
150 | * Result : TRUE / FALSE
|
---|
151 | * Remark :
|
---|
152 | * Status : UNTESTED STUB
|
---|
153 | *
|
---|
154 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
155 | *****************************************************************************/
|
---|
156 |
|
---|
157 | int WIN32API EnumICMProfilesA(HDC hdc,
|
---|
158 | ICMENUMPROCA lpICMEnumProc,
|
---|
159 | LPARAM lParam)
|
---|
160 | {
|
---|
161 | dprintf(("GDI32: EnumICMProfilesA(%08xh, %08xh, %08xh) not implemented(-1).\n",
|
---|
162 | hdc,
|
---|
163 | lpICMEnumProc,
|
---|
164 | lParam));
|
---|
165 |
|
---|
166 | return (-1);
|
---|
167 | }
|
---|
168 |
|
---|
169 |
|
---|
170 | /*****************************************************************************
|
---|
171 | * Name : int EnumICMProfilesW
|
---|
172 | * Purpose : The EnumICMProfilesW function enumerates the different color
|
---|
173 | * profiles that the system supports for the specified device context.
|
---|
174 | * Parameters: HDC hdc
|
---|
175 | * ICMENUMPROC lpICMEnumFunc
|
---|
176 | * LPARAM lParam
|
---|
177 | * Variables :
|
---|
178 | * Result : TRUE / FALSE
|
---|
179 | * Remark :
|
---|
180 | * Status : UNTESTED STUB
|
---|
181 | *
|
---|
182 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
183 | *****************************************************************************/
|
---|
184 |
|
---|
185 | int WIN32API EnumICMProfilesW(HDC hdc,
|
---|
186 | ICMENUMPROCW lpICMEnumProc,
|
---|
187 | LPARAM lParam)
|
---|
188 | {
|
---|
189 | dprintf(("GDI32: EnumICMProfilesW(%08xh, %08xh, %08xh) not implemented (-1).\n",
|
---|
190 | hdc,
|
---|
191 | lpICMEnumProc,
|
---|
192 | lParam));
|
---|
193 |
|
---|
194 | return (-1);
|
---|
195 | }
|
---|
196 |
|
---|
197 |
|
---|
198 |
|
---|
199 | /*****************************************************************************
|
---|
200 | * Name : DWORD GetDeviceGammaRamp
|
---|
201 | * Purpose : The GetDeviceGammaRamp function retrieves the gamma ramp on
|
---|
202 | * direct color display boards.
|
---|
203 | * Parameters: HDC hdc handle to device context
|
---|
204 | * LPVOID lpRamp Gamma ramp array
|
---|
205 | * Variables :
|
---|
206 | * Result :
|
---|
207 | * Remark :
|
---|
208 | * Status : UNTESTED STUB
|
---|
209 | *
|
---|
210 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
211 | *****************************************************************************/
|
---|
212 |
|
---|
213 | DWORD WIN32API GetDeviceGammaRamp(HDC hdc,
|
---|
214 | LPVOID lpRamp)
|
---|
215 | {
|
---|
216 | dprintf(("GDI32: GetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
|
---|
217 | hdc,
|
---|
218 | lpRamp));
|
---|
219 |
|
---|
220 | return (FALSE);
|
---|
221 | }
|
---|
222 |
|
---|
223 |
|
---|
224 |
|
---|
225 |
|
---|
226 | /*****************************************************************************
|
---|
227 | * Name : BOOL GetICMProfileA
|
---|
228 | * Purpose : The GetICMProfileA function retrieves the name of the color
|
---|
229 | * profile file for the device associated with the specified device
|
---|
230 | * context.
|
---|
231 | * Parameters: HDC hdc handle to device context
|
---|
232 | * DWORD cbName
|
---|
233 | * LPTSTR lpszFilename
|
---|
234 | * Variables :
|
---|
235 | * Result : TRUE / FALSE
|
---|
236 | * Remark :
|
---|
237 | * Status : UNTESTED STUB
|
---|
238 | *
|
---|
239 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
240 | *****************************************************************************/
|
---|
241 |
|
---|
242 | BOOL WIN32API GetICMProfileA(HDC hdc,
|
---|
243 | DWORD cbName,
|
---|
244 | LPTSTR lpszFilename)
|
---|
245 | {
|
---|
246 | dprintf(("GDI32: GetICMProfileA(%08xh, %08xh, %08xh) not implemented.\n",
|
---|
247 | hdc,
|
---|
248 | cbName,
|
---|
249 | lpszFilename));
|
---|
250 |
|
---|
251 | return (FALSE);
|
---|
252 | }
|
---|
253 |
|
---|
254 |
|
---|
255 | /*****************************************************************************
|
---|
256 | * Name : BOOL GetICMProfileW
|
---|
257 | * Purpose : The GetICMProfileW function retrieves the name of the color
|
---|
258 | * profile file for the device associated with the specified device
|
---|
259 | * context.
|
---|
260 | * Parameters: HDC hdc handle to device context
|
---|
261 | * DWORD cbName
|
---|
262 | * LPWSTR lpszFilename
|
---|
263 | * Variables :
|
---|
264 | * Result : TRUE / FALSE
|
---|
265 | * Remark :
|
---|
266 | * Status : UNTESTED STUB
|
---|
267 | *
|
---|
268 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
269 | *****************************************************************************/
|
---|
270 |
|
---|
271 | BOOL WIN32API GetICMProfileW(HDC hdc,
|
---|
272 | DWORD cbName,
|
---|
273 | LPTSTR lpszFilename)
|
---|
274 | {
|
---|
275 | dprintf(("GDI32: GetICMProfileW(%08xh, %08xh, %08xh) not implemented.\n",
|
---|
276 | hdc,
|
---|
277 | cbName,
|
---|
278 | lpszFilename));
|
---|
279 |
|
---|
280 | return (FALSE);
|
---|
281 | }
|
---|
282 |
|
---|
283 |
|
---|
284 | /*****************************************************************************
|
---|
285 | * Name : BOOL GetLogColorSpaceA
|
---|
286 | * Purpose : The GetLogColorSpace function retrieves information about the
|
---|
287 | * logical color space identified by the specified handle.
|
---|
288 | * Parameters: HCOLORSPACE hColorSpace
|
---|
289 | * LPLOGCOLORSPACE lpbuffer
|
---|
290 | * DWORD nSize
|
---|
291 | * Variables :
|
---|
292 | * Result : TRUE / FALSE
|
---|
293 | * Remark :
|
---|
294 | * Status : UNTESTED STUB
|
---|
295 | *
|
---|
296 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
297 | *****************************************************************************/
|
---|
298 |
|
---|
299 | #define LPLOGCOLORSPACE LPVOID
|
---|
300 | BOOL WIN32API GetLogColorSpaceA(HCOLORSPACE hColorSpace,
|
---|
301 | LPLOGCOLORSPACE lpBuffer,
|
---|
302 | DWORD nSize)
|
---|
303 | {
|
---|
304 | dprintf(("GDI32: GetLogColorSpaceA(%08xh, %08xh, %08xh) not implemented.\n",
|
---|
305 | hColorSpace,
|
---|
306 | lpBuffer,
|
---|
307 | nSize));
|
---|
308 |
|
---|
309 | return (FALSE);
|
---|
310 | }
|
---|
311 |
|
---|
312 |
|
---|
313 | /*****************************************************************************
|
---|
314 | * Name : BOOL GetLogColorSpaceW
|
---|
315 | * Purpose : The GetLogColorSpace function retrieves information about the
|
---|
316 | * logical color space identified by the specified handle.
|
---|
317 | * Parameters: HCOLORSPACE hColorSpace
|
---|
318 | * LPLOGCOLORSPACE lpbuffer
|
---|
319 | * DWORD nSize
|
---|
320 | * Variables :
|
---|
321 | * Result : TRUE / FALSE
|
---|
322 | * Remark :
|
---|
323 | * Status : UNTESTED STUB
|
---|
324 | *
|
---|
325 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
326 | *****************************************************************************/
|
---|
327 |
|
---|
328 | BOOL WIN32API GetLogColorSpaceW(HCOLORSPACE hColorSpace,
|
---|
329 | LPLOGCOLORSPACE lpBuffer,
|
---|
330 | DWORD nSize)
|
---|
331 | {
|
---|
332 | dprintf(("GDI32: GetLogColorSpaceW(%08xh, %08xh, %08xh) not implemented.\n",
|
---|
333 | hColorSpace,
|
---|
334 | lpBuffer,
|
---|
335 | nSize));
|
---|
336 |
|
---|
337 | return (FALSE);
|
---|
338 | }
|
---|
339 |
|
---|
340 |
|
---|
341 | /*****************************************************************************
|
---|
342 | * Name : BOOL SetDeviceGammaRamp
|
---|
343 | * Purpose : The SetDeviceGammaRamp function sets the gamma ramp on direct
|
---|
344 | * color display boards.
|
---|
345 | * Parameters: HDC hdc handle of device context
|
---|
346 | * LPVOID lpRamp
|
---|
347 | * Variables :
|
---|
348 | * Result : TRUE / FALSE
|
---|
349 | * Remark :
|
---|
350 | * Status : UNTESTED STUB
|
---|
351 | *
|
---|
352 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
353 | *****************************************************************************/
|
---|
354 |
|
---|
355 | BOOL WIN32API SetDeviceGammaRamp(HDC hdc,
|
---|
356 | LPVOID lpRamp)
|
---|
357 | {
|
---|
358 | dprintf(("GDI32: SetDeviceGammaRamp(%08xh, %08xh) not implemented.\n",
|
---|
359 | hdc,
|
---|
360 | lpRamp));
|
---|
361 |
|
---|
362 | return (FALSE);
|
---|
363 | }
|
---|
364 |
|
---|
365 |
|
---|
366 | /*****************************************************************************
|
---|
367 | * Name : BOOL SetICMProfileA
|
---|
368 | * Purpose : The SetICMProfileA function sets the color profile for the
|
---|
369 | * specified device context.
|
---|
370 | * Parameters: HDC hdc handle of device context
|
---|
371 | * LPTSTR lpFileName
|
---|
372 | * Variables :
|
---|
373 | * Result : TRUE / FALSE
|
---|
374 | * Remark :
|
---|
375 | * Status : UNTESTED STUB
|
---|
376 | *
|
---|
377 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
378 | *****************************************************************************/
|
---|
379 |
|
---|
380 | BOOL WIN32API SetICMProfileA(HDC hdc,
|
---|
381 | LPTSTR lpFileName)
|
---|
382 | {
|
---|
383 | dprintf(("GDI32: SetICMProfileA(%08xh, %s) not implemented.\n",
|
---|
384 | hdc,
|
---|
385 | lpFileName));
|
---|
386 |
|
---|
387 | return (FALSE);
|
---|
388 | }
|
---|
389 |
|
---|
390 |
|
---|
391 | /*****************************************************************************
|
---|
392 | * Name : BOOL SetICMProfileW
|
---|
393 | * Purpose : The SetICMProfileW function sets the color profile for the
|
---|
394 | * specified device context.
|
---|
395 | * Parameters: HDC hdc handle of device context
|
---|
396 | * LPTSTR lpFileName
|
---|
397 | * Variables :
|
---|
398 | * Result : TRUE / FALSE
|
---|
399 | * Remark :
|
---|
400 | * Status : UNTESTED STUB
|
---|
401 | *
|
---|
402 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
403 | *****************************************************************************/
|
---|
404 |
|
---|
405 | BOOL WIN32API SetICMProfileW(HDC hdc,
|
---|
406 | LPWSTR lpFileName)
|
---|
407 | {
|
---|
408 | dprintf(("GDI32: SetICMProfileW(%08xh, %s) not implemented.\n",
|
---|
409 | hdc,
|
---|
410 | lpFileName));
|
---|
411 |
|
---|
412 | return (FALSE);
|
---|
413 | }
|
---|
414 |
|
---|
415 |
|
---|
416 |
|
---|
417 | /*****************************************************************************
|
---|
418 | * Name : BOOL UpdateICMRegKeyA
|
---|
419 | * Purpose : The UpdateICMRegKeyA function installs, removes, or queries
|
---|
420 | * registry entries that identify ICC color profiles or color-matching
|
---|
421 | * DLLs. The function carries out the action specified by the nCommand
|
---|
422 | * parameter.
|
---|
423 | * Parameters: DWORD dwReserved
|
---|
424 | * DWORD CMID
|
---|
425 | * LPTSTR lpszFileName
|
---|
426 | * UINT nCommand
|
---|
427 | * Variables :
|
---|
428 | * Result : TRUE / FALSE
|
---|
429 | * Remark :
|
---|
430 | * Status : UNTESTED STUB
|
---|
431 | *
|
---|
432 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
433 | *****************************************************************************/
|
---|
434 |
|
---|
435 | BOOL WIN32API UpdateICMRegKeyA(DWORD dwReserved,
|
---|
436 | DWORD CMID,
|
---|
437 | LPTSTR lpszFileName,
|
---|
438 | UINT nCommand)
|
---|
439 | {
|
---|
440 | dprintf(("GDI32: UpdateICMRegKeyA(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
441 | dwReserved,
|
---|
442 | CMID,
|
---|
443 | lpszFileName,
|
---|
444 | nCommand));
|
---|
445 |
|
---|
446 | return (FALSE);
|
---|
447 | }
|
---|
448 |
|
---|
449 |
|
---|
450 | /*****************************************************************************
|
---|
451 | * Name : BOOL UpdateICMRegKeyW
|
---|
452 | * Purpose : The UpdateICMRegKeyW function installs, removes, or queries
|
---|
453 | * registry entries that identify ICC color profiles or color-matching
|
---|
454 | * DLLs. The function carries out the action specified by the nCommand
|
---|
455 | * parameter.
|
---|
456 | * Parameters: DWORD dwReserved
|
---|
457 | * DWORD CMID
|
---|
458 | * LPWSTR lpszFileName
|
---|
459 | * UINT nCommand
|
---|
460 | * Variables :
|
---|
461 | * Result : TRUE / FALSE
|
---|
462 | * Remark :
|
---|
463 | * Status : UNTESTED STUB
|
---|
464 | *
|
---|
465 | * Author : Patrick Haller [Mon, 1998/06/15 08:00]
|
---|
466 | *****************************************************************************/
|
---|
467 |
|
---|
468 | BOOL WIN32API UpdateICMRegKeyW(DWORD dwReserved,
|
---|
469 | DWORD CMID,
|
---|
470 | LPWSTR lpszFileName,
|
---|
471 | UINT nCommand)
|
---|
472 | {
|
---|
473 | dprintf(("GDI32: UpdateICMRegKeyW(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
474 | dwReserved,
|
---|
475 | CMID,
|
---|
476 | lpszFileName,
|
---|
477 | nCommand));
|
---|
478 |
|
---|
479 | return (FALSE);
|
---|
480 | }
|
---|
481 |
|
---|
482 |
|
---|
483 |
|
---|