4 * Copyright 1993 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #include "wine/winbase16.h"
37 #include "wine/debug.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(gdi
);
42 /* ### start build ### */
43 extern WORD CALLBACK
GDI_CallTo16_word_ll(GOBJENUMPROC16
,LONG
,LONG
);
44 /* ### stop build ### */
46 /***********************************************************************
50 static const LOGBRUSH WhiteBrush
= { BS_SOLID
, RGB(255,255,255), 0 };
51 static const LOGBRUSH BlackBrush
= { BS_SOLID
, RGB(0,0,0), 0 };
52 static const LOGBRUSH NullBrush
= { BS_NULL
, 0, 0 };
54 /* FIXME: these should perhaps be BS_HATCHED, at least for 1 bitperpixel */
55 static const LOGBRUSH LtGrayBrush
= { BS_SOLID
, RGB(192,192,192), 0 };
56 static const LOGBRUSH GrayBrush
= { BS_SOLID
, RGB(128,128,128), 0 };
58 /* This is BS_HATCHED, for 1 bitperpixel. This makes the spray work in pbrush */
59 /* See HatchBrushes in x11drv for the HS_DIAGCROSS+1 hack */
60 static const LOGBRUSH DkGrayBrush
= { BS_HATCHED
, RGB(0,0,0), (HS_DIAGCROSS
+1) };
62 static const LOGPEN WhitePen
= { PS_SOLID
, { 0, 0 }, RGB(255,255,255) };
63 static const LOGPEN BlackPen
= { PS_SOLID
, { 0, 0 }, RGB(0,0,0) };
64 static const LOGPEN NullPen
= { PS_NULL
, { 0, 0 }, 0 };
67 /* reserve one extra entry for the stock default bitmap */
68 /* this is what Windows does too */
69 #define NB_STOCK_OBJECTS (STOCK_LAST+2)
71 static HGDIOBJ stock_objects
[NB_STOCK_OBJECTS
];
73 static SYSLEVEL GDI_level
= { CRITICAL_SECTION_INIT("GDI_level"), 3 };
74 static WORD GDI_HeapSel
;
76 inline static BOOL
get_bool(char *buffer
)
78 return (buffer
[0] == 'y' || buffer
[0] == 'Y' ||
79 buffer
[0] == 't' || buffer
[0] == 'T' ||
84 /****************************************************************************
86 * language-independent stock fonts
90 static const LOGFONTW OEMFixedFont
=
91 { 12, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, OEM_CHARSET
,
92 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
, {'\0'} };
94 static const LOGFONTW AnsiFixedFont
=
95 { 12, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ANSI_CHARSET
,
96 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
, {'\0'} };
98 static const LOGFONTW AnsiVarFont
=
99 { 12, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ANSI_CHARSET
,
100 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
101 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'} };
103 /******************************************************************************
105 * language-dependent stock fonts
107 * 'ANSI' charset and 'DEFAULT' charset is not same.
108 * The chars in CP_ACP should be drawn with 'DEFAULT' charset.
109 * 'ANSI' charset seems to be identical with ISO-8859-1.
110 * 'DEFAULT' charset is a language-dependent charset.
112 * 'System' font seems to be an alias for language-dependent font.
116 * language-dependenet stock fonts for all known charsets
117 * please see TranslateCharsetInfo (objects/font.c) and
118 * CharsetBindingInfo (graphics/x11drv/xfont.c),
119 * and modify entries for your language if needed.
121 struct DefaultFontInfo
125 LOGFONTW DeviceDefaultFont
;
126 LOGFONTW SystemFixedFont
;
127 LOGFONTW DefaultGuiFont
;
130 static const struct DefaultFontInfo default_fonts
[] =
134 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ANSI_CHARSET
,
135 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
136 {'S','y','s','t','e','m','\0'}
138 { /* Device Default */
139 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ANSI_CHARSET
,
140 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
144 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ANSI_CHARSET
,
145 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
148 { /* DefaultGuiFont */
149 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ANSI_CHARSET
,
150 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
151 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
154 { EASTEUROPE_CHARSET
,
156 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, EASTEUROPE_CHARSET
,
157 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
158 {'S','y','s','t','e','m','\0'}
160 { /* Device Default */
161 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, EASTEUROPE_CHARSET
,
162 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
166 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, EASTEUROPE_CHARSET
,
167 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
170 { /* DefaultGuiFont */
171 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, EASTEUROPE_CHARSET
,
172 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
173 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
178 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, RUSSIAN_CHARSET
,
179 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
180 {'S','y','s','t','e','m','\0'}
182 { /* Device Default */
183 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, RUSSIAN_CHARSET
,
184 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
188 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, RUSSIAN_CHARSET
,
189 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
192 { /* DefaultGuiFont */
193 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, RUSSIAN_CHARSET
,
194 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
195 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
200 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GREEK_CHARSET
,
201 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
202 {'S','y','s','t','e','m','\0'}
204 { /* Device Default */
205 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GREEK_CHARSET
,
206 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
210 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GREEK_CHARSET
,
211 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
214 { /* DefaultGuiFont */
215 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GREEK_CHARSET
,
216 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
217 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
222 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, TURKISH_CHARSET
,
223 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
224 {'S','y','s','t','e','m','\0'}
226 { /* Device Default */
227 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, TURKISH_CHARSET
,
228 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
232 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, TURKISH_CHARSET
,
233 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
236 { /* DefaultGuiFont */
237 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, TURKISH_CHARSET
,
238 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
239 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
244 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HEBREW_CHARSET
,
245 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
246 {'S','y','s','t','e','m','\0'}
248 { /* Device Default */
249 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HEBREW_CHARSET
,
250 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
254 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HEBREW_CHARSET
,
255 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
258 { /* DefaultGuiFont */
259 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HEBREW_CHARSET
,
260 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
261 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
266 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ARABIC_CHARSET
,
267 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
268 {'S','y','s','t','e','m','\0'}
270 { /* Device Default */
271 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ARABIC_CHARSET
,
272 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
276 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ARABIC_CHARSET
,
277 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
280 { /* DefaultGuiFont */
281 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, ARABIC_CHARSET
,
282 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
283 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
288 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, BALTIC_CHARSET
,
289 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
290 {'S','y','s','t','e','m','\0'}
292 { /* Device Default */
293 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, BALTIC_CHARSET
,
294 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
298 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, BALTIC_CHARSET
,
299 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
302 { /* DefaultGuiFont */
303 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, BALTIC_CHARSET
,
304 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
305 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
310 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, THAI_CHARSET
,
311 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
312 {'S','y','s','t','e','m','\0'}
314 { /* Device Default */
315 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, THAI_CHARSET
,
316 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
320 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, THAI_CHARSET
,
321 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
324 { /* DefaultGuiFont */
325 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, THAI_CHARSET
,
326 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
327 {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}
332 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, SHIFTJIS_CHARSET
,
333 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
334 {'S','y','s','t','e','m','\0'}
336 { /* Device Default */
337 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, SHIFTJIS_CHARSET
,
338 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
342 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, SHIFTJIS_CHARSET
,
343 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
346 { /* DefaultGuiFont */
347 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, SHIFTJIS_CHARSET
,
348 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
349 {'M','S',' ','P',' ','g','o','t','h','i','c','\0'} /* FIXME: Is this correct? */
354 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GB2312_CHARSET
,
355 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
356 {'S','y','s','t','e','m','\0'}
358 { /* Device Default */
359 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GB2312_CHARSET
,
360 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
364 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GB2312_CHARSET
,
365 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
368 { /* DefaultGuiFont */
369 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, GB2312_CHARSET
,
370 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
371 {'M','S',' ','S','o','n','g','\0'} /* FIXME: Is this correct? */
376 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HANGEUL_CHARSET
,
377 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
378 {'S','y','s','t','e','m','\0'}
380 { /* Device Default */
381 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HANGEUL_CHARSET
,
382 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
386 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HANGEUL_CHARSET
,
387 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
390 { /* DefaultGuiFont */
391 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, HANGEUL_CHARSET
,
392 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
393 {'G','u','l','i','m'},
396 { CHINESEBIG5_CHARSET
,
398 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, CHINESEBIG5_CHARSET
,
399 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
400 {'S','y','s','t','e','m','\0'}
402 { /* Device Default */
403 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, CHINESEBIG5_CHARSET
,
404 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
408 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, CHINESEBIG5_CHARSET
,
409 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
412 { /* DefaultGuiFont */
413 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, CHINESEBIG5_CHARSET
,
414 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
415 {'\0'} /* FIXME - what is the native font??? */
420 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, JOHAB_CHARSET
,
421 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
422 {'S','y','s','t','e','m','\0'}
424 { /* Device Default */
425 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, JOHAB_CHARSET
,
426 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
430 16, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, JOHAB_CHARSET
,
431 0, 0, DEFAULT_QUALITY
, FIXED_PITCH
| FF_MODERN
,
434 { /* DefaultGuiFont */
435 -11, 0, 0, 0, FW_NORMAL
, FALSE
, FALSE
, FALSE
, JOHAB_CHARSET
,
436 0, 0, DEFAULT_QUALITY
, VARIABLE_PITCH
| FF_SWISS
,
437 {'M','S',' ','M','i','n','g','l','i','u','\0'} /* FIXME: Is this correct? */
443 /******************************************************************************
446 static const struct DefaultFontInfo
* get_default_fonts(UINT charset
)
450 for(n
=0;n
<(sizeof(default_fonts
)/sizeof(default_fonts
[0]));n
++)
452 if ( default_fonts
[n
].charset
== charset
)
453 return &default_fonts
[n
];
456 FIXME( "unhandled charset 0x%08x - use ANSI_CHARSET for default stock objects\n", charset
);
457 return &default_fonts
[0];
461 /******************************************************************************
462 * get_default_charset (internal)
464 * get the language-dependent charset that can handle CP_ACP correctly.
466 static UINT
get_default_charset( void )
472 csi
.ciCharset
= ANSI_CHARSET
;
473 if ( ! TranslateCharsetInfo( (LPDWORD
)uACP
, &csi
, TCI_SRCCODEPAGE
) )
475 FIXME( "unhandled codepage %u - use ANSI_CHARSET for default stock objects\n", uACP
);
479 return csi
.ciCharset
;
483 /******************************************************************************
486 static HFONT
create_stock_font( char const *fontName
, const LOGFONTW
*font
, HKEY hkey
)
490 char buffer
[MAX_PATH
];
493 if (!hkey
) return CreateFontIndirectW( font
);
496 sprintf(key
, "%s.Height", fontName
);
497 count
= sizeof(buffer
);
498 if(!RegQueryValueExA(hkey
, key
, 0, &type
, buffer
, &count
))
499 lf
.lfHeight
= atoi(buffer
);
501 sprintf(key
, "%s.Bold", fontName
);
502 count
= sizeof(buffer
);
503 if(!RegQueryValueExA(hkey
, key
, 0, &type
, buffer
, &count
))
504 lf
.lfWeight
= get_bool(buffer
) ? FW_BOLD
: FW_NORMAL
;
506 sprintf(key
, "%s.Italic", fontName
);
507 count
= sizeof(buffer
);
508 if(!RegQueryValueExA(hkey
, key
, 0, &type
, buffer
, &count
))
509 lf
.lfItalic
= get_bool(buffer
);
511 sprintf(key
, "%s.Underline", fontName
);
512 count
= sizeof(buffer
);
513 if(!RegQueryValueExA(hkey
, key
, 0, &type
, buffer
, &count
))
514 lf
.lfUnderline
= get_bool(buffer
);
516 sprintf(key
, "%s.StrikeOut", fontName
);
517 count
= sizeof(buffer
);
518 if(!RegQueryValueExA(hkey
, key
, 0, &type
, buffer
, &count
))
519 lf
.lfStrikeOut
= get_bool(buffer
);
520 return CreateFontIndirectW( &lf
);
524 #define TRACE_SEC(handle,text) \
525 TRACE("(%04x): " text " %ld\n", (handle), GDI_level.crst.RecursionCount)
528 /***********************************************************************
531 * Increment the reference count of a GDI object.
533 inline static void inc_ref_count( HGDIOBJ handle
)
537 if ((header
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
)))
540 GDI_ReleaseObj( handle
);
545 /***********************************************************************
548 * Decrement the reference count of a GDI object.
550 inline static void dec_ref_count( HGDIOBJ handle
)
554 if ((header
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
)))
556 if (header
->dwCount
) header
->dwCount
--;
557 if (header
->dwCount
!= 0x80000000) GDI_ReleaseObj( handle
);
560 /* handle delayed DeleteObject*/
562 GDI_ReleaseObj( handle
);
563 TRACE( "executing delayed DeleteObject for %04x\n", handle
);
564 DeleteObject( handle
);
570 /***********************************************************************
573 * GDI initialization.
577 HINSTANCE16 instance
;
580 const struct DefaultFontInfo
* deffonts
;
583 if (RegOpenKeyA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\Wine\\Config\\Tweak.Fonts", &hkey
))
586 /* create GDI heap */
587 if ((instance
= LoadLibrary16( "GDI.EXE" )) < 32) return FALSE
;
588 GDI_HeapSel
= instance
| 7;
590 /* create stock objects */
591 stock_objects
[WHITE_BRUSH
] = CreateBrushIndirect( &WhiteBrush
);
592 stock_objects
[LTGRAY_BRUSH
] = CreateBrushIndirect( &LtGrayBrush
);
593 stock_objects
[GRAY_BRUSH
] = CreateBrushIndirect( &GrayBrush
);
594 stock_objects
[DKGRAY_BRUSH
] = CreateBrushIndirect( &DkGrayBrush
);
595 stock_objects
[BLACK_BRUSH
] = CreateBrushIndirect( &BlackBrush
);
596 stock_objects
[NULL_BRUSH
] = CreateBrushIndirect( &NullBrush
);
598 stock_objects
[WHITE_PEN
] = CreatePenIndirect( &WhitePen
);
599 stock_objects
[BLACK_PEN
] = CreatePenIndirect( &BlackPen
);
600 stock_objects
[NULL_PEN
] = CreatePenIndirect( &NullPen
);
602 stock_objects
[DEFAULT_PALETTE
] = PALETTE_Init();
603 stock_objects
[DEFAULT_BITMAP
] = CreateBitmap( 1, 1, 1, 1, NULL
);
605 /* language-independent stock fonts */
606 stock_objects
[OEM_FIXED_FONT
] = create_stock_font( "OEMFixed", &OEMFixedFont
, hkey
);
607 stock_objects
[ANSI_FIXED_FONT
] = create_stock_font( "AnsiFixed", &AnsiFixedFont
, hkey
);
608 stock_objects
[ANSI_VAR_FONT
] = create_stock_font( "AnsiVar", &AnsiVarFont
, hkey
);
610 /* language-dependent stock fonts */
611 deffonts
= get_default_fonts(get_default_charset());
612 stock_objects
[SYSTEM_FONT
] = create_stock_font( "System", &deffonts
->SystemFont
, hkey
);
613 stock_objects
[DEVICE_DEFAULT_FONT
] = create_stock_font( "DeviceDefault", &deffonts
->DeviceDefaultFont
, hkey
);
614 stock_objects
[SYSTEM_FIXED_FONT
] = create_stock_font( "SystemFixed", &deffonts
->SystemFixedFont
, hkey
);
615 stock_objects
[DEFAULT_GUI_FONT
] = create_stock_font( "DefaultGui", &deffonts
->DefaultGuiFont
, hkey
);
618 /* clear the NOSYSTEM bit on all stock objects*/
619 for (i
= 0; i
< NB_STOCK_OBJECTS
; i
++)
621 if (!stock_objects
[i
])
623 if (i
== 9) continue; /* there's no stock object 9 */
624 ERR( "could not create stock object %d\n", i
);
627 ptr
= GDI_GetObjPtr( stock_objects
[i
], MAGIC_DONTCARE
);
628 ptr
->wMagic
&= ~OBJECT_NOSYSTEM
;
629 GDI_ReleaseObj( stock_objects
[i
] );
632 if (hkey
) RegCloseKey( hkey
);
639 #define FIRST_LARGE_HANDLE 16
640 #define MAX_LARGE_HANDLES ((GDI_HEAP_SIZE >> 2) - FIRST_LARGE_HANDLE)
641 static GDIOBJHDR
*large_handles
[MAX_LARGE_HANDLES
];
642 static int next_large_handle
;
644 /***********************************************************************
647 * Allocate a GDI handle from the large heap. Helper for GDI_AllocObject
649 inline static GDIOBJHDR
*alloc_large_heap( WORD size
, HGDIOBJ
*handle
)
654 for (i
= next_large_handle
+ 1; i
< MAX_LARGE_HANDLES
; i
++)
655 if (!large_handles
[i
]) goto found
;
656 for (i
= 0; i
<= next_large_handle
; i
++)
657 if (!large_handles
[i
]) goto found
;
662 if ((obj
= HeapAlloc( GetProcessHeap(), 0, size
)))
664 large_handles
[i
] = obj
;
665 *handle
= (HGDIOBJ
)(ULONG_PTR
)((i
+ FIRST_LARGE_HANDLE
) << 2);
666 next_large_handle
= i
;
672 /***********************************************************************
675 void *GDI_AllocObject( WORD size
, WORD magic
, HGDIOBJ
*handle
, const struct gdi_obj_funcs
*funcs
)
680 _EnterSysLevel( &GDI_level
);
683 /* allocate DCs on the larger heap */
685 case DISABLED_DC_MAGIC
:
688 case METAFILE_DC_MAGIC
:
689 case ENHMETAFILE_MAGIC
:
690 case ENHMETAFILE_DC_MAGIC
:
692 if (!(obj
= alloc_large_heap( size
, handle
))) goto error
;
695 if (!(hlocal
= LOCAL_Alloc( GDI_HeapSel
, LMEM_MOVEABLE
, size
))) goto error
;
696 assert( hlocal
& 2 );
697 obj
= (GDIOBJHDR
*)LOCAL_Lock( GDI_HeapSel
, hlocal
);
698 *handle
= (HGDIOBJ
)(ULONG_PTR
)hlocal
;
703 obj
->wMagic
= magic
|OBJECT_NOSYSTEM
;
707 TRACE_SEC( *handle
, "enter" );
711 _LeaveSysLevel( &GDI_level
);
717 /***********************************************************************
720 * The object ptr must have been obtained with GDI_GetObjPtr.
721 * The new pointer must be released with GDI_ReleaseObj.
723 void *GDI_ReallocObject( WORD size
, HGDIOBJ handle
, void *object
)
727 assert( handle
& 2 ); /* no realloc for large handles */
728 LOCAL_Unlock( GDI_HeapSel
, handle
);
729 if (!(new_handle
= LOCAL_ReAlloc( GDI_HeapSel
, handle
, size
, LMEM_MOVEABLE
)))
731 TRACE_SEC( handle
, "leave" );
732 _LeaveSysLevel( &GDI_level
);
735 assert( new_handle
== handle
); /* moveable handle cannot change */
736 return LOCAL_Lock( GDI_HeapSel
, handle
);
740 /***********************************************************************
743 BOOL
GDI_FreeObject( HGDIOBJ handle
, void *ptr
)
745 GDIOBJHDR
*object
= ptr
;
747 object
->wMagic
= 0; /* Mark it as invalid */
748 object
->funcs
= NULL
;
749 if (handle
& 2) /* GDI heap handle */
751 LOCAL_Unlock( GDI_HeapSel
, handle
);
752 LOCAL_Free( GDI_HeapSel
, handle
);
754 else /* large heap handle */
756 int i
= ((ULONG_PTR
)handle
>> 2) - FIRST_LARGE_HANDLE
;
757 if (i
>= 0 && i
< MAX_LARGE_HANDLES
&& large_handles
[i
])
759 HeapFree( GetProcessHeap(), 0, large_handles
[i
] );
760 large_handles
[i
] = NULL
;
762 else ERR( "Invalid handle %x\n", handle
);
764 TRACE_SEC( handle
, "leave" );
765 _LeaveSysLevel( &GDI_level
);
770 /***********************************************************************
773 * Return a pointer to the GDI object associated to the handle.
774 * Return NULL if the object has the wrong magic number.
775 * The object must be released with GDI_ReleaseObj.
777 void *GDI_GetObjPtr( HGDIOBJ handle
, WORD magic
)
779 GDIOBJHDR
*ptr
= NULL
;
781 _EnterSysLevel( &GDI_level
);
783 if (handle
& 2) /* GDI heap handle */
785 ptr
= (GDIOBJHDR
*)LOCAL_Lock( GDI_HeapSel
, handle
);
788 if (((magic
!= MAGIC_DONTCARE
) && (GDIMAGIC(ptr
->wMagic
) != magic
)) ||
789 (GDIMAGIC(ptr
->wMagic
) < FIRST_MAGIC
) ||
790 (GDIMAGIC(ptr
->wMagic
) > LAST_MAGIC
))
792 LOCAL_Unlock( GDI_HeapSel
, handle
);
797 else /* large heap handle */
799 int i
= (handle
>> 2) - FIRST_LARGE_HANDLE
;
800 if (i
>= 0 && i
< MAX_LARGE_HANDLES
)
802 ptr
= large_handles
[i
];
803 if (ptr
&& (magic
!= MAGIC_DONTCARE
) && (GDIMAGIC(ptr
->wMagic
) != magic
)) ptr
= NULL
;
809 _LeaveSysLevel( &GDI_level
);
810 SetLastError( ERROR_INVALID_HANDLE
);
811 WARN( "Invalid handle %x\n", handle
);
813 else TRACE_SEC( handle
, "enter" );
819 /***********************************************************************
823 void GDI_ReleaseObj( HGDIOBJ handle
)
825 if (handle
& 2) LOCAL_Unlock( GDI_HeapSel
, handle
);
826 TRACE_SEC( handle
, "leave" );
827 _LeaveSysLevel( &GDI_level
);
831 /***********************************************************************
834 void GDI_CheckNotLock(void)
836 _CheckNotSysLevel( &GDI_level
);
840 /***********************************************************************
841 * DeleteObject (GDI32.@)
843 BOOL WINAPI
DeleteObject( HGDIOBJ obj
)
845 /* Check if object is valid */
848 if (HIWORD(obj
)) return FALSE
;
850 if (!(header
= GDI_GetObjPtr( obj
, MAGIC_DONTCARE
))) return FALSE
;
852 if (!(header
->wMagic
& OBJECT_NOSYSTEM
)
853 && (header
->wMagic
>= FIRST_MAGIC
) && (header
->wMagic
<= LAST_MAGIC
))
855 TRACE("Preserving system object %04x\n", obj
);
856 GDI_ReleaseObj( obj
);
862 TRACE("delayed for %04x because object in use, count %ld\n", obj
, header
->dwCount
);
863 header
->dwCount
|= 0x80000000; /* mark for delete */
864 GDI_ReleaseObj( obj
);
868 TRACE("%04x\n", obj
);
872 if (header
->funcs
&& header
->funcs
->pDeleteObject
)
873 return header
->funcs
->pDeleteObject( obj
, header
);
875 GDI_ReleaseObj( obj
);
880 /***********************************************************************
881 * GetStockObject (GDI32.@)
883 HGDIOBJ WINAPI
GetStockObject( INT obj
)
886 if ((obj
< 0) || (obj
>= NB_STOCK_OBJECTS
)) return 0;
887 ret
= stock_objects
[obj
];
888 TRACE("returning %4x\n", ret
);
893 /***********************************************************************
896 INT16 WINAPI
GetObject16( HANDLE16 handle
, INT16 count
, LPVOID buffer
)
900 TRACE("%04x %d %p\n", handle
, count
, buffer
);
901 if (!count
) return 0;
903 if (!(ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
))) return 0;
905 if (ptr
->funcs
&& ptr
->funcs
->pGetObject16
)
906 result
= ptr
->funcs
->pGetObject16( handle
, ptr
, count
, buffer
);
908 SetLastError( ERROR_INVALID_HANDLE
);
910 GDI_ReleaseObj( handle
);
915 /***********************************************************************
916 * GetObjectA (GDI32.@)
918 INT WINAPI
GetObjectA( HANDLE handle
, INT count
, LPVOID buffer
)
922 TRACE("%08x %d %p\n", handle
, count
, buffer
);
923 if (!count
) return 0;
925 if (!(ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
))) return 0;
927 if (ptr
->funcs
&& ptr
->funcs
->pGetObjectA
)
928 result
= ptr
->funcs
->pGetObjectA( handle
, ptr
, count
, buffer
);
930 SetLastError( ERROR_INVALID_HANDLE
);
932 GDI_ReleaseObj( handle
);
936 /***********************************************************************
937 * GetObjectW (GDI32.@)
939 INT WINAPI
GetObjectW( HANDLE handle
, INT count
, LPVOID buffer
)
943 TRACE("%08x %d %p\n", handle
, count
, buffer
);
944 if (!count
) return 0;
946 if (!(ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
))) return 0;
948 if (ptr
->funcs
&& ptr
->funcs
->pGetObjectW
)
949 result
= ptr
->funcs
->pGetObjectW( handle
, ptr
, count
, buffer
);
951 SetLastError( ERROR_INVALID_HANDLE
);
953 GDI_ReleaseObj( handle
);
957 /***********************************************************************
958 * GetObjectType (GDI32.@)
960 DWORD WINAPI
GetObjectType( HANDLE handle
)
964 TRACE("%08x\n", handle
);
966 if (!(ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
))) return 0;
968 switch(GDIMAGIC(ptr
->wMagic
))
995 result
= OBJ_METAFILE
;
997 case METAFILE_DC_MAGIC
:
1000 case ENHMETAFILE_MAGIC
:
1001 result
= OBJ_ENHMETAFILE
;
1003 case ENHMETAFILE_DC_MAGIC
:
1004 result
= OBJ_ENHMETADC
;
1007 FIXME("Magic %04x not implemented\n", GDIMAGIC(ptr
->wMagic
) );
1010 GDI_ReleaseObj( handle
);
1014 /***********************************************************************
1015 * GetCurrentObject (GDI32.@)
1017 HANDLE WINAPI
GetCurrentObject(HDC hdc
,UINT type
)
1020 DC
* dc
= DC_GetDCPtr( hdc
);
1025 case OBJ_PEN
: ret
= dc
->hPen
; break;
1026 case OBJ_BRUSH
: ret
= dc
->hBrush
; break;
1027 case OBJ_PAL
: ret
= dc
->hPalette
; break;
1028 case OBJ_FONT
: ret
= dc
->hFont
; break;
1029 case OBJ_BITMAP
: ret
= dc
->hBitmap
; break;
1031 /* the SDK only mentions those above */
1032 FIXME("(%08x,%d): unknown type.\n",hdc
,type
);
1035 GDI_ReleaseObj( hdc
);
1041 /***********************************************************************
1042 * SelectObject (GDI32.@)
1044 HGDIOBJ WINAPI
SelectObject( HDC hdc
, HGDIOBJ handle
)
1047 GDIOBJHDR
*header
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
);
1048 if (!header
) return 0;
1050 TRACE("hdc=%04x %04x\n", hdc
, handle
);
1052 if (header
->funcs
&& header
->funcs
->pSelectObject
)
1054 ret
= header
->funcs
->pSelectObject( handle
, header
, hdc
);
1055 if (ret
&& ret
!= handle
&& (INT
)ret
> COMPLEXREGION
)
1057 inc_ref_count( handle
);
1058 dec_ref_count( ret
);
1061 GDI_ReleaseObj( handle
);
1066 /***********************************************************************
1067 * UnrealizeObject (GDI32.@)
1069 BOOL WINAPI
UnrealizeObject( HGDIOBJ obj
)
1072 /* Check if object is valid */
1074 GDIOBJHDR
* header
= GDI_GetObjPtr( obj
, MAGIC_DONTCARE
);
1075 if (!header
) return FALSE
;
1077 TRACE("%04x\n", obj
);
1079 /* Unrealize object */
1081 if (header
->funcs
&& header
->funcs
->pUnrealizeObject
)
1082 result
= header
->funcs
->pUnrealizeObject( obj
, header
);
1084 GDI_ReleaseObj( obj
);
1089 /* Solid colors to enumerate */
1090 static const COLORREF solid_colors
[] =
1091 { RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xff),
1092 RGB(0xff,0x00,0x00), RGB(0x00,0xff,0x00),
1093 RGB(0x00,0x00,0xff), RGB(0xff,0xff,0x00),
1094 RGB(0xff,0x00,0xff), RGB(0x00,0xff,0xff),
1095 RGB(0x80,0x00,0x00), RGB(0x00,0x80,0x00),
1096 RGB(0x80,0x80,0x00), RGB(0x00,0x00,0x80),
1097 RGB(0x80,0x00,0x80), RGB(0x00,0x80,0x80),
1098 RGB(0x80,0x80,0x80), RGB(0xc0,0xc0,0xc0)
1101 /***********************************************************************
1102 * EnumObjects (GDI.71)
1104 INT16 WINAPI
EnumObjects16( HDC16 hdc
, INT16 nObjType
,
1105 GOBJENUMPROC16 lpEnumFunc
, LPARAM lParam
)
1107 INT16 i
, retval
= 0;
1112 TRACE("%04x %d %08lx %08lx\n",
1113 hdc
, nObjType
, (DWORD
)lpEnumFunc
, lParam
);
1117 /* Enumerate solid pens */
1118 segptr
= MapLS( &pen
);
1119 for (i
= 0; i
< sizeof(solid_colors
)/sizeof(solid_colors
[0]); i
++)
1121 pen
.lopnStyle
= PS_SOLID
;
1122 pen
.lopnWidth
.x
= 1;
1123 pen
.lopnWidth
.y
= 0;
1124 pen
.lopnColor
= solid_colors
[i
];
1125 retval
= GDI_CallTo16_word_ll( lpEnumFunc
, segptr
, lParam
);
1126 TRACE("solid pen %08lx, ret=%d\n", solid_colors
[i
], retval
);
1133 /* Enumerate solid brushes */
1134 segptr
= MapLS( &brush
);
1135 for (i
= 0; i
< sizeof(solid_colors
)/sizeof(solid_colors
[0]); i
++)
1137 brush
.lbStyle
= BS_SOLID
;
1138 brush
.lbColor
= solid_colors
[i
];
1140 retval
= GDI_CallTo16_word_ll( lpEnumFunc
, segptr
, lParam
);
1141 TRACE("solid brush %08lx, ret=%d\n", solid_colors
[i
], retval
);
1145 /* Now enumerate hatched brushes */
1146 if (retval
) for (i
= HS_HORIZONTAL
; i
<= HS_DIAGCROSS
; i
++)
1148 brush
.lbStyle
= BS_HATCHED
;
1149 brush
.lbColor
= RGB(0,0,0);
1151 retval
= GDI_CallTo16_word_ll( lpEnumFunc
, segptr
, lParam
);
1152 TRACE("hatched brush %d, ret=%d\n", i
, retval
);
1159 WARN("(%d): Invalid type\n", nObjType
);
1166 /***********************************************************************
1167 * EnumObjects (GDI32.@)
1169 INT WINAPI
EnumObjects( HDC hdc
, INT nObjType
,
1170 GOBJENUMPROC lpEnumFunc
, LPARAM lParam
)
1176 TRACE("%04x %d %08lx %08lx\n",
1177 hdc
, nObjType
, (DWORD
)lpEnumFunc
, lParam
);
1181 /* Enumerate solid pens */
1182 for (i
= 0; i
< sizeof(solid_colors
)/sizeof(solid_colors
[0]); i
++)
1184 pen
.lopnStyle
= PS_SOLID
;
1185 pen
.lopnWidth
.x
= 1;
1186 pen
.lopnWidth
.y
= 0;
1187 pen
.lopnColor
= solid_colors
[i
];
1188 retval
= lpEnumFunc( &pen
, lParam
);
1189 TRACE("solid pen %08lx, ret=%d\n",
1190 solid_colors
[i
], retval
);
1196 /* Enumerate solid brushes */
1197 for (i
= 0; i
< sizeof(solid_colors
)/sizeof(solid_colors
[0]); i
++)
1199 brush
.lbStyle
= BS_SOLID
;
1200 brush
.lbColor
= solid_colors
[i
];
1202 retval
= lpEnumFunc( &brush
, lParam
);
1203 TRACE("solid brush %08lx, ret=%d\n",
1204 solid_colors
[i
], retval
);
1208 /* Now enumerate hatched brushes */
1209 if (retval
) for (i
= HS_HORIZONTAL
; i
<= HS_DIAGCROSS
; i
++)
1211 brush
.lbStyle
= BS_HATCHED
;
1212 brush
.lbColor
= RGB(0,0,0);
1214 retval
= lpEnumFunc( &brush
, lParam
);
1215 TRACE("hatched brush %d, ret=%d\n",
1222 /* FIXME: implement Win32 types */
1223 WARN("(%d): Invalid type\n", nObjType
);
1230 /***********************************************************************
1231 * IsGDIObject (GDI.462)
1233 * returns type of object if valid (W95 system programming secrets p. 264-5)
1235 BOOL16 WINAPI
IsGDIObject16( HGDIOBJ16 handle
)
1239 GDIOBJHDR
*object
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
);
1242 magic
= GDIMAGIC(object
->wMagic
) - PEN_MAGIC
+ 1;
1243 GDI_ReleaseObj( handle
);
1249 /***********************************************************************
1250 * SetObjectOwner (GDI32.@)
1252 void WINAPI
SetObjectOwner( HGDIOBJ handle
, HANDLE owner
)
1258 /***********************************************************************
1259 * MakeObjectPrivate (GDI.463)
1261 * What does that mean ?
1262 * Some little docu can be found in "Undocumented Windows",
1263 * but this is basically useless.
1264 * At least we know that this flags the GDI object's wMagic
1265 * with 0x2000 (OBJECT_PRIVATE), so we just do it.
1266 * But Wine doesn't react on that yet.
1268 void WINAPI
MakeObjectPrivate16( HGDIOBJ16 handle
, BOOL16
private )
1270 GDIOBJHDR
*ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
);
1273 ERR("invalid GDI object %04x !\n", handle
);
1276 ptr
->wMagic
|= OBJECT_PRIVATE
;
1277 GDI_ReleaseObj( handle
);
1281 /***********************************************************************
1282 * GdiFlush (GDI32.@)
1284 BOOL WINAPI
GdiFlush(void)
1286 return TRUE
; /* FIXME */
1290 /***********************************************************************
1291 * GdiGetBatchLimit (GDI32.@)
1293 DWORD WINAPI
GdiGetBatchLimit(void)
1295 return 1; /* FIXME */
1299 /***********************************************************************
1300 * GdiSetBatchLimit (GDI32.@)
1302 DWORD WINAPI
GdiSetBatchLimit( DWORD limit
)
1304 return 1; /* FIXME */
1308 /***********************************************************************
1309 * GdiSeeGdiDo (GDI.452)
1311 DWORD WINAPI
GdiSeeGdiDo16( WORD wReqType
, WORD wParam1
, WORD wParam2
,
1316 case 0x0001: /* LocalAlloc */
1317 return LOCAL_Alloc( GDI_HeapSel
, wParam1
, wParam3
);
1318 case 0x0002: /* LocalFree */
1319 return LOCAL_Free( GDI_HeapSel
, wParam1
);
1320 case 0x0003: /* LocalCompact */
1321 return LOCAL_Compact( GDI_HeapSel
, wParam3
, 0 );
1322 case 0x0103: /* LocalHeap */
1325 WARN("(wReqType=%04x): Unknown\n", wReqType
);
1330 /***********************************************************************
1331 * GdiSignalProc32 (GDI.610)
1333 WORD WINAPI
GdiSignalProc( UINT uCode
, DWORD dwThreadOrProcessID
,
1334 DWORD dwFlags
, HMODULE16 hModule
)
1339 /***********************************************************************
1340 * GdiInit2 (GDI.403)
1342 * See "Undocumented Windows"
1344 HANDLE16 WINAPI
GdiInit216(
1345 HANDLE16 h1
, /* [in] GDI object */
1346 HANDLE16 h2
/* [in] global data */
1349 FIXME("(%04x, %04x), stub.\n", h1
, h2
);
1351 return 0xffff; /* undefined return value */
1352 return h1
; /* FIXME: should be the memory handle of h1 */
1355 /***********************************************************************
1356 * FinalGdiInit (GDI.405)
1358 void WINAPI
FinalGdiInit16( HBRUSH16 hPattern
/* [in] fill pattern of desktop */ )
1362 /***********************************************************************
1363 * GdiFreeResources (GDI.609)
1365 WORD WINAPI
GdiFreeResources16( DWORD reserve
)
1367 return (WORD
)( (int)LOCAL_CountFree( GDI_HeapSel
) * 100 /
1368 (int)LOCAL_HeapSize( GDI_HeapSel
) );
1372 /*******************************************************************
1373 * GetColorAdjustment [GDI32.@]
1377 BOOL WINAPI
GetColorAdjustment(HDC hdc
, LPCOLORADJUSTMENT lpca
)
1379 FIXME("GetColorAdjustment, stub\n");
1383 /*******************************************************************
1384 * GetMiterLimit [GDI32.@]
1388 BOOL WINAPI
GetMiterLimit(HDC hdc
, PFLOAT peLimit
)
1390 FIXME("GetMiterLimit, stub\n");
1394 /*******************************************************************
1395 * SetMiterLimit [GDI32.@]
1399 BOOL WINAPI
SetMiterLimit(HDC hdc
, FLOAT eNewLimit
, PFLOAT peOldLimit
)
1401 FIXME("SetMiterLimit, stub\n");
1405 /*******************************************************************
1406 * GdiComment [GDI32.@]
1410 BOOL WINAPI
GdiComment(HDC hdc
, UINT cbSize
, const BYTE
*lpData
)
1412 FIXME("GdiComment, stub\n");
1415 /*******************************************************************
1416 * SetColorAdjustment [GDI32.@]
1420 BOOL WINAPI
SetColorAdjustment(HDC hdc
, const COLORADJUSTMENT
* lpca
)
1422 FIXME("SetColorAdjustment, stub\n");