2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS win32 subsystem
4 * PURPOSE: BRUSH class definition
5 * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org)
11 #include "baseobj.hpp"
13 __prefast_operator_new_null
15 class BRUSH : public BASEOBJECT, protected _BRUSHBODY
19 _Analysis_mode_(_Analysis_operator_new_null_)
25 _In_ size_t cjSize) throw()
27 return ExAllocatePoolWithTag(PagedPool, cjSize, GDITAG_HMGR_BRUSH_TYPE);
28 //return BASEOBJECT::pvAllocate(GDIObjType_BRUSH_TYPE, cjSize);
36 /// HACK! better would be to extract the exact object type's tag
38 //ExFreePoolWithTag(pvObject, GDITAG_HMGR_BRUSH_TYPE);
39 //BASEOBJECT::pvFree(GDIObjType_BRUSH_TYPE, cjSize);
44 _In_ COLORREF crColor,
46 _In_opt_ HBITMAP hbmPattern,
47 _In_opt_ PVOID pvClient,
48 _In_ GDILOOBJTYPE objtype);
63 _Ret_opt_bytecount_(sizeof(BRUSH))
70 return static_cast<PBRUSH>(
71 BASEOBJECT::LockShared(hbr,
72 GDILoObjType_LO_BRUSH_TYPE,
73 BASEOBJECT::OWNER::PUBLIC));
77 _Ret_opt_bytecount_(sizeof(BRUSH))
84 return static_cast<PBRUSH>(
85 BASEOBJECT::LockShared(hbr,
86 GDILoObjType_LO_BRUSH_TYPE,
87 BASEOBJECT::OWNER::POWNED));
91 _Ret_opt_bytecap_(sizeof(BRUSH))
98 return static_cast<PBRUSH>(
99 BASEOBJECT::LockShared(hbr,
100 GDILoObjType_LO_BRUSH_TYPE,
101 BASEOBJECT::OWNER::NONE));
107 _Out_bytecap_(cjBuffer) PLOGBRUSH plbBuffer) const;
111 _Out_ PUINT puUsage) const;
115 _In_ COLORREF crColor);
121 GetBrushAttrPool(VOID);