ReactOS 0.4.15-dev-7942-gd23573b
brush.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS win32 subsystem
4 * PURPOSE: BRUSH class implementation
5 * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 *
7 * REFERENCES: http://support.microsoft.com/kb/kbview/108497
8 */
9
10#include "brush.hpp"
11
13
15 _In_ FLONG flAttrs,
16 _In_ COLORREF crColor,
18 _In_opt_ HBITMAP hbmPattern,
19 _In_opt_ PVOID pvClient,
21 : BASEOBJECT(loobjtype)
22{
23 static ULONG ulGlobalBrushUnique = 0;
24
25 /* Get a unique value */
26 this->ulBrushUnique = InterlockedIncrementUL(&ulGlobalBrushUnique);
27
28 /* Start with kmode brush attribute */
29 this->pBrushAttr = &this->BrushAttr;
30
31 /* Set parameters */
32 this->flAttrs = flAttrs;
33 this->iHatch = iHatch;
34 this->hbmPattern = hbmPattern;
35 this->hbmClient = (HBITMAP)pvClient;
36 this->pBrushAttr->lbColor = crColor;
37
38 /* Initialize the other fields */
39 this->ptOrigin.x = 0;
40 this->ptOrigin.y = 0;
41 this->bCacheGrabbed = FALSE;
42 this->crBack = 0;
43 this->crFore = 0;
44 this->ulPalTime = 0;
45 this->ulSurfTime = 0;
46 this->pvRBrush = NULL;
47 this->hdev = NULL;
48
49 /* FIXME: should be done only in PEN constructor,
50 but our destructor needs it! */
51 this->dwStyleCount = 0;
52 this->pStyle = NULL;
53}
54
56 VOID)
57{
58 /* Check if we have a user mode brush attribute */
59 if (this->pBrushAttr != &this->BrushAttr)
60 {
61 /* Free memory to the process GDI pool */
63 }
64
65 /* Delete the pattern bitmap (may have already been deleted during gdi cleanup) */
66 if (this->hbmPattern != NULL && GreIsHandleValid(this->hbmPattern))
67 {
68 GreSetBitmapOwner(this->hbmPattern, BASEOBJECT::OWNER::POWNED);
70 }
71
72 /* Delete styles */
73 if ((this->pStyle != NULL) && !(this->flAttrs & BR_IS_DEFAULTSTYLE))
74 {
76 }
77}
78
79VOID
81{
82 if (this->pBrushAttr != &this->BrushAttr)
83 {
84 this->BrushAttr = *this->pBrushAttr;
86 this->pBrushAttr = &this->BrushAttr;
87 }
88}
89
90VOID
92 _In_ PVOID pvObject)
93{
94 PBRUSH pbr = static_cast<PBRUSH>(pvObject);
98 delete pbr;
99}
100
101BOOL
103 VOID)
104{
106 NT_ASSERT(this->pBrushAttr == &this->BrushAttr);
107
108 /* Allocate a brush attribute from the pool */
109 pBrushAttr = static_cast<PBRUSH_ATTR>(GdiPoolAllocate(GetBrushAttrPool()));
110 if (pBrushAttr == NULL)
111 {
112 ERR("Could not allocate brush attr\n");
113 return FALSE;
114 }
115
116 /* Copy the content from the kernel mode brush attribute */
117 this->pBrushAttr = pBrushAttr;
118 *this->pBrushAttr = this->BrushAttr;
119
120 /* Set the object attribute in the handle table */
121 vSetObjectAttr(pBrushAttr);
122
123 return TRUE;
124}
125
126VOID
128 _In_ COLORREF crColor)
129{
131
132 /* Set new color and reset the pal times */
133 this->pBrushAttr->lbColor = crColor & 0xFFFFFF;
134 this->ulPalTime = -1;
135 this->ulSurfTime = -1;
136}
137
140 _Out_ PUINT puUsage) const
141{
142 /* Return the color usage based on flags */
143 *puUsage = (this->flAttrs & BR_IS_DIBPALCOLORS) ? DIB_PAL_COLORS :
146
147 return this->hbmPattern;
148}
149
150UINT
153 _Out_bytecap_(cjSize) PLOGBRUSH plb) const
154{
155 /* Check if only size is requested */
156 if (plb == NULL)
157 return sizeof(LOGBRUSH);
158
159 /* Check if size is ok */
160 if (cjSize == 0)
161 return 0;
162
163 /* Set color */
164 plb->lbColor = this->BrushAttr.lbColor;
165
166 /* Set style and hatch based on the attribute flags */
167 if (this->flAttrs & BR_IS_SOLID)
168 {
169 plb->lbStyle = BS_SOLID;
170 plb->lbHatch = 0;
171 }
172 else if (this->flAttrs & BR_IS_HATCH)
173 {
174 plb->lbStyle = BS_HATCHED;
175 plb->lbHatch = this->iHatch;
176 }
177 else if (this->flAttrs & BR_IS_DIB)
178 {
179 plb->lbStyle = BS_DIBPATTERN;
180 plb->lbHatch = (ULONG_PTR)this->hbmClient;
181 }
182 else if (this->flAttrs & BR_IS_BITMAP)
183 {
184 plb->lbStyle = BS_PATTERN;
185 plb->lbHatch = (ULONG_PTR)this->hbmClient;
186 }
187 else if (this->flAttrs & BR_IS_NULL)
188 {
189 plb->lbStyle = BS_NULL;
190 plb->lbHatch = 0;
191 }
192 else
193 {
195 }
196
197 return sizeof(LOGBRUSH);
198}
199
200static
201HBRUSH
203 _In_ ULONG flAttrs,
204 _In_ COLORREF crColor,
206 _In_opt_ HBITMAP hbmPattern,
207 _In_opt_ PVOID pvClient)
208{
209 BASEOBJECT::OWNER owner;
210 PBRUSH pbr;
211 HBRUSH hbr;
212
213 NT_ASSERT(((flAttrs & BR_IS_BITMAP) == 0) || (hbmPattern != NULL));
214
215 /* Create the brush (brush takes ownership of the bitmap) */
216 pbr = new BRUSH(flAttrs, crColor, iHatch, hbmPattern, pvClient);
217 if (pbr == NULL)
218 {
219 ERR("Failed to allocate a brush\n");
220 GreSetBitmapOwner(hbmPattern, BASEOBJECT::OWNER::POWNED);
221 GreDeleteObject(hbmPattern);
222 return NULL;
223 }
224
225 /* Check if this is a global brush */
226 if (!(flAttrs & BR_IS_GLOBAL))
227 {
228 /* Not a global brush, so allocate a user mode brush attribute */
229 if (!pbr->bAllocateBrushAttr())
230 {
231 ERR("Failed to allocate brush attribute\n");
232 delete pbr;
233 return NULL;
234 }
235 }
236
237 /* Set the owner, either public or process owned */
238 owner = (flAttrs & BR_IS_GLOBAL) ? BASEOBJECT::OWNER::PUBLIC :
239 BASEOBJECT::OWNER::POWNED;
240
241 /* Insert the object into the GDI handle table */
242 hbr = static_cast<HBRUSH>(pbr->hInsertObject(owner));
243 if (hbr == NULL)
244 {
245 ERR("Failed to insert brush\n");
246 delete pbr;
247 return NULL;
248 }
249
250 /* Unlock the brush */
251 pbr->vUnlock();
252
253 return hbr;
254}
255
256
257/* C interface ***************************************************************/
258
259extern "C" {
260
261VOID
262NTAPI
264 PVOID pvObject)
265{
266 BRUSH::vDeleteObject(pvObject);
267}
268
269INT
272 PBRUSH pbr,
274 LPLOGBRUSH plbBuffer)
275{
276 return pbr->cjGetObject(cjBuffer, plbBuffer);
277}
278
279HBRUSH
280NTAPI
282 VOID)
283{
284 /* Call the internal function */
286}
287
288HBRUSH
291 COLORREF crColor)
292{
293 /* Call the internal function */
295 crColor,
296 0,
297 NULL,
298 NULL);
299}
300
301HBRUSH
302NTAPI
304 HBITMAP hbmPattern)
305{
306 NT_ASSERT(hbmPattern != NULL);
307 GreSetBitmapOwner(hbmPattern, BASEOBJECT::OWNER::PUBLIC);
309 0,
310 0,
311 hbmPattern,
312 NULL);
313}
314
315VOID
316NTAPI
318 _In_ HBRUSH hbr,
319 _In_ COLORREF crColor)
320{
321 PBRUSH pbr;
322
323 /* Lock the brush */
324 pbr = BRUSH::LockAny(hbr);
325 if (pbr == NULL)
326 {
327 ERR("Failed to lock brush %p\n", hbr);
328 return;
329 }
330
331 /* Call the member function */
332 pbr->vSetSolidColor(crColor);
333
334 /* Unlock the brush */
335 pbr->vUnlock();
336}
337
339HBRUSH
342 _In_ COLORREF crColor,
343 _In_opt_ HBRUSH hbr)
344{
345 if (hbr != NULL)
346 {
347 WARN("hbr is not supported, ignoring\n");
348 }
349
350 /* Call the internal function */
351 return CreateBrushInternal(BR_IS_SOLID, crColor, 0, NULL, NULL);
352}
353
355HBRUSH
359 _In_ COLORREF crColor,
360 _In_ BOOL bPen)
361{
362 FLONG flAttr;
363
364 if (bPen)
365 {
366 WARN("bPen is not supported, ignoring\n");
367 }
368
369 /* Check what kind if hatch style this is */
370 if (iHatch < HS_DDI_MAX)
371 {
372 flAttr = BR_IS_HATCH;
373 }
374 else if (iHatch < HS_API_MAX)
375 {
376 flAttr = BR_IS_SOLID;
377 }
378 else
379 {
380 ERR("Invalid iHatch: %lu\n", iHatch);
381 return NULL;
382 }
383
384 /* Call the internal function */
385 return CreateBrushInternal(flAttr, crColor, iHatch, NULL, NULL);
386}
387
389HBRUSH
392 _In_ HBITMAP hbmClient,
393 _In_ BOOL bPen,
394 _In_ BOOL b8X8)
395{
396 HBITMAP hbmPattern;
397
398 if (b8X8)
399 {
400 WARN("b8X8 is not supported, ignoring\n");
401 }
402
403 if (bPen)
404 {
405 WARN("bPen is not supported, ignoring\n");
406 }
407
408 /* Copy the bitmap */
409 hbmPattern = BITMAP_CopyBitmap(hbmClient);
410 if (hbmPattern == NULL)
411 {
412 ERR("Failed to copy the bitmap %p\n", hbmPattern);
413 return NULL;
414 }
415
416 /* Call the internal function (will delete hbmPattern on failure) */
417 return CreateBrushInternal(BR_IS_BITMAP, 0, 0, hbmPattern, hbmClient);
418}
419
421HBRUSH
425 _In_ FLONG uUsage,
426 _In_ UINT cj,
427 _In_ BOOL b8X8,
428 _In_ BOOL bPen,
429 _In_ PVOID pvClient)
430{
431 PVOID pvPackedDIB;
432 FLONG flAttrs;
433 HBITMAP hbm;
434 HBRUSH hbr = NULL;
435
436 if (b8X8)
437 {
438 WARN("b8X8 is not supported, ignoring\n");
439 }
440
441 if (bPen)
442 {
443 WARN("bPen is not supported, ignoring\n");
444 }
445
446 if (uUsage > DIB_PAL_INDICES)
447 {
448 ERR("Invalid uUsage value: %lu\n", uUsage);
450 return NULL;
451 }
452
453 /* Allocate a buffer for the packed DIB */
455 if (pvPackedDIB == NULL)
456 {
457 ERR("Failed to allocate temp buffer of %u bytes\n", cj);
458 return NULL;
459 }
460
461 /* Probe and copy the packed DIB */
463 {
464 ProbeForRead(pv, cj, 1);
465 RtlCopyMemory(pvPackedDIB, pv, cj);
466 }
468 {
469 ERR("Got exception, pv = %p, cj = %lu\n", pv, cj);
470 goto cleanup;
471 }
472 _SEH2_END;
473
474 flAttrs = BR_IS_BITMAP | BR_IS_DIB;
475
476 /* Check what kind of color table we have */
477 if (uUsage == DIB_PAL_COLORS)
478 {
479 /* Remember it and use DIB_PAL_BRUSHHACK to create a "special" palette */
480 flAttrs |= BR_IS_DIBPALCOLORS;
481 uUsage = DIB_PAL_BRUSHHACK;
482 }
483 else if (uUsage == DIB_PAL_INDICES)
484 {
485 /* No color table, bitmap contains device palette indices */
486 flAttrs |= BR_IS_DIBPALINDICES;
487
488 /* FIXME: This makes tests pass, but needs investigation. */
489 flAttrs |= BR_IS_NULL;
490 }
491
492 /* Create a bitmap from the DIB */
493 hbm = GreCreateDIBitmapFromPackedDIB(pvPackedDIB, cj, uUsage);
494 if (hbm == NULL)
495 {
496 ERR("Failed to create bitmap from DIB\n");
497 goto cleanup;
498 }
499
500 /* Call the internal function (will delete hbm on failure) */
501 hbr = CreateBrushInternal(flAttrs, 0, 0, hbm, pvClient);
502
503cleanup:
504
505 ExFreePoolWithTag(pvPackedDIB, GDITAG_TEMP);
506
507 return hbr;
508}
509
514 _In_ HBRUSH hbr,
515 _Out_ UINT *piUsage)
516{
517 PBRUSH pbr;
518 HBITMAP hbm;
519 UINT uUsage;
520
521 /* Lock the brush */
522 pbr = BRUSH::LockForRead(hbr);
523 if (pbr == NULL)
524 {
525 ERR("Failed to lock brush %p\n", hbr);
526 return NULL;
527 }
528
529 /* Call the member function */
530 hbm = pbr->hbmGetBitmapHandle(&uUsage);
531
532 /* Unlock the brush */
533 pbr->vUnlock();
534
536 {
537 ProbeForWrite(piUsage, sizeof(*piUsage), 1);
538 *piUsage = uUsage;
539 }
541 {
542 ERR("Got exception! piUsage = %p\n", piUsage);
543 hbm = NULL;
544 }
545 _SEH2_END;
546
547 return hbm;
548}
549
551HBRUSH
554 _In_ HBRUSH hbr,
556{
557 PBRUSH pbr;
558 if ( dwFlags & SC_BB_STOCKOBJ )
559 {
561 {
562 pbr = BRUSH::LockAny(hbr);
563 if (pbr == NULL)
564 {
565 ERR("Failed to lock brush %p\n", hbr);
566 return NULL;
567 }
568 pbr->vReleaseAttribute();
569 pbr->vUnlock();
570 return hbr;
571 }
572 }
573 return NULL;
574}
575
577HBRUSH
580 _In_ HBRUSH hbr,
582{
583 PBRUSH pbr;
584 if ( dwFlags & SC_BB_STOCKOBJ )
585 {
587 {
588 pbr = BRUSH::LockAny(hbr);
589 if (pbr == NULL)
590 {
591 ERR("Failed to lock brush %p\n", hbr);
592 return NULL;
593 }
594 if (!pbr->bAllocateBrushAttr())
595 {
596 ERR("Failed to allocate brush attribute\n");
597 }
598 pbr->vUnlock();
599 return hbr;
600 }
601 }
602 return NULL;
603}
604
605} /* extern "C" */
#define DIB_PAL_INDICES
HBITMAP FASTCALL BITMAP_CopyBitmap(HBITMAP hBitmap)
Definition: bitmaps.c:714
BOOL NTAPI GreSetBitmapOwner(_In_ HBITMAP hbmp, _In_ ULONG ulOwner)
Definition: bitmaps.c:17
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:103
HBRUSH APIENTRY IntGdiCreateSolidBrush(COLORREF crColor)
Definition: brush.cpp:290
HBRUSH NTAPI IntGdiCreateNullBrush(VOID)
Definition: brush.cpp:281
__kernel_entry HBRUSH APIENTRY NtGdiSetBrushAttributes(_In_ HBRUSH hbr, _In_ DWORD dwFlags)
Definition: brush.cpp:553
VOID NTAPI BRUSH_vDeleteObject(PVOID pvObject)
Definition: brush.cpp:263
__kernel_entry HBRUSH APIENTRY NtGdiCreatePatternBrushInternal(_In_ HBITMAP hbmClient, _In_ BOOL bPen, _In_ BOOL b8X8)
Definition: brush.cpp:391
__kernel_entry HBRUSH APIENTRY NtGdiCreateSolidBrush(_In_ COLORREF crColor, _In_opt_ HBRUSH hbr)
Definition: brush.cpp:341
static HBRUSH CreateBrushInternal(_In_ ULONG flAttrs, _In_ COLORREF crColor, _In_ ULONG iHatch, _In_opt_ HBITMAP hbmPattern, _In_opt_ PVOID pvClient)
Definition: brush.cpp:202
INT FASTCALL BRUSH_GetObject(PBRUSH pbr, INT cjBuffer, LPLOGBRUSH plbBuffer)
Definition: brush.cpp:271
__kernel_entry HBITMAP APIENTRY NtGdiGetObjectBitmapHandle(_In_ HBRUSH hbr, _Out_ UINT *piUsage)
Definition: brush.cpp:513
HBRUSH NTAPI IntGdiCreatePatternBrush(HBITMAP hbmPattern)
Definition: brush.cpp:303
__kernel_entry HBRUSH APIENTRY NtGdiCreateDIBBrush(_In_reads_bytes_(cj) PVOID pv, _In_ FLONG uUsage, _In_ UINT cj, _In_ BOOL b8X8, _In_ BOOL bPen, _In_ PVOID pvClient)
Definition: brush.cpp:423
__kernel_entry HBRUSH APIENTRY NtGdiCreateHatchBrushInternal(_In_ ULONG iHatch, _In_ COLORREF crColor, _In_ BOOL bPen)
Definition: brush.cpp:357
VOID NTAPI IntGdiSetSolidBrushColor(_In_ HBRUSH hbr, _In_ COLORREF crColor)
Definition: brush.cpp:317
__kernel_entry HBRUSH APIENTRY NtGdiClearBrushAttributes(_In_ HBRUSH hbr, _In_ DWORD dwFlags)
Definition: brush.cpp:579
PGDI_POOL GetBrushAttrPool(VOID)
VOID vSetObjectAttr(_In_opt_ PVOID pvUserAttr)
Definition: baseobj.hpp:60
Definition: brush.hpp:16
VOID vReleaseAttribute(VOID)
Definition: brush.cpp:80
BRUSH(_In_ FLONG flAttrs, _In_ COLORREF crColor, _In_ ULONG iHatch, _In_opt_ HBITMAP hbmPattern, _In_opt_ PVOID pvClient, _In_ GDILOOBJTYPE objtype)
Definition: brush.cpp:14
BOOL bAllocateBrushAttr(VOID)
Definition: brush.cpp:102
UINT cjGetObject(_In_ UINT cjBuffer, _Out_bytecap_(cjBuffer) PLOGBRUSH plbBuffer) const
Definition: brush.cpp:151
HBITMAP hbmGetBitmapHandle(_Out_ PUINT puUsage) const
Definition: brush.cpp:139
static VOID vDeleteObject(_In_ PVOID pvObject)
Definition: brush.cpp:91
VOID vSetSolidColor(_In_ COLORREF crColor)
Definition: brush.cpp:127
~BRUSH(VOID)
Definition: brush.cpp:55
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
static void cleanup(void)
Definition: main.c:1335
#define ULONG_PTR
Definition: config.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
#define InterlockedIncrementUL(Addend)
Definition: ex.h:1527
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BR_IS_SOLID
Definition: brush.h:101
#define BR_IS_GLOBAL
Definition: brush.h:106
#define BR_IS_DIB
Definition: brush.h:104
#define BR_IS_DIBPALINDICES
Definition: brush.h:110
#define BR_IS_DEFAULTSTYLE
Definition: brush.h:111
#define BR_IS_NULL
Definition: brush.h:105
#define BR_IS_BITMAP
Definition: brush.h:103
#define BR_IS_HATCH
Definition: brush.h:102
#define BR_IS_DIBPALCOLORS
Definition: brush.h:109
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
@ GDILoObjType_LO_BRUSH_TYPE
Definition: gdi_private.h:33
@ GDILoObjType_LO_EXTPEN_TYPE
Definition: gdi_private.h:45
@ GDILoObjType_LO_PEN_TYPE
Definition: gdi_private.h:44
enum GDILoObjType GDILOOBJTYPE
VOID NTAPI GdiPoolFree(PGDI_POOL pPool, PVOID pvAlloc)
Definition: gdipool.c:233
PVOID NTAPI GdiPoolAllocate(PGDI_POOL pPool)
Definition: gdipool.c:122
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
static HBITMAP
Definition: button.c:44
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Out_bytecap_(size)
Definition: ms_sal.h:854
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define FASTCALL
Definition: nt_native.h:50
unsigned long FLONG
Definition: ntbasedef.h:366
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
_In_ ULONG cjBuffer
Definition: ntgdi.h:2860
#define SC_BB_STOCKOBJ
Definition: ntgdihdl.h:199
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
#define __kernel_entry
Definition: specstrings.h:355
ULONG bCacheGrabbed
Definition: brush.h:25
HBITMAP hbmClient
Definition: brush.h:18
HBITMAP hbmPattern
Definition: brush.h:17
ULONG ulPalTime
Definition: brush.h:28
DWORD * pStyle
Definition: brush.h:38
COLORREF crBack
Definition: brush.h:26
PVOID pvRBrush
Definition: brush.h:30
ULONG dwStyleCount
Definition: brush.h:39
ULONG flAttrs
Definition: brush.h:19
ULONG ulBrushUnique
Definition: brush.h:21
BRUSH_ATTR BrushAttr
Definition: brush.h:23
ULONG iHatch
Definition: brush.h:16
COLORREF crFore
Definition: brush.h:27
POINT ptOrigin
Definition: brush.h:24
BRUSH_ATTR * pBrushAttr
Definition: brush.h:22
ULONG ulSurfTime
Definition: brush.h:29
COLORREF lbColor
Definition: ntgdihdl.h:356
Definition: types.h:101
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define NTAPI
Definition: typedefs.h:36
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG
Definition: typedefs.h:59
HBITMAP NTAPI GreCreateDIBitmapFromPackedDIB(_In_reads_(cjPackedDIB) PVOID pvPackedDIB, _In_ UINT cjPackedDIB, _In_ ULONG uUsage)
Definition: dibobj.c:1794
#define DIB_PAL_BRUSHHACK
Definition: dib.h:36
BOOL NTAPI GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
Definition: gdiobj.c:1455
BOOL NTAPI GDIOBJ_ConvertFromStockObj(HGDIOBJ *phObj)
Definition: gdiobj.c:1489
BOOL NTAPI GreDeleteObject(HGDIOBJ hobj)
Definition: gdiobj.c:1158
BOOL NTAPI GreIsHandleValid(HGDIOBJ hobj)
Definition: gdiobj.c:1146
#define GDITAG_TEMP
Definition: tags.h:167
#define GDITAG_PENSTYLE
Definition: tags.h:165
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ HDEV hdev
Definition: winddi.h:3449
_In_ ULONG cj
Definition: winddi.h:3540
#define HS_DDI_MAX
Definition: winddi.h:3954
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22
_Inout_ SURFOBJ _In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_opt_ XLATEOBJ _In_ ULONG iHatch
Definition: winddi.h:3963
_In_ ULONG cjSize
Definition: winddi.h:3634
DWORD COLORREF
Definition: windef.h:300
#define HS_API_MAX
Definition: wingdi.h:582
#define DIB_RGB_COLORS
Definition: wingdi.h:367
#define BS_HATCHED
Definition: wingdi.h:1089
#define BS_PATTERN
Definition: wingdi.h:1090
#define DIB_PAL_COLORS
Definition: wingdi.h:366
#define BS_DIBPATTERN
Definition: wingdi.h:1092
#define BS_NULL
Definition: wingdi.h:1087
#define BS_SOLID
Definition: wingdi.h:1086
struct tagLOGBRUSH LOGBRUSH
#define NT_ASSERT
Definition: rtlfuncs.h:3310