1 #ifndef __WIN32K_BITMAPS_H
2 #define __WIN32K_BITMAPS_H
4 /* GDI logical bitmap object */
5 typedef struct _BITMAPOBJ
10 SIZE dimension
; /* For SetBitmapDimension(), do NOT use
11 to get width/height of bitmap, use
12 bitmap.bmWidth/bitmap.bmHeight for
17 PFAST_MUTEX BitsLock
; /* You need to hold this lock before you touch
18 the actual bits in the bitmap */
21 /* For device-independent bitmaps: */
24 } BITMAPOBJ
, *PBITMAPOBJ
;
26 #define BITMAPOBJ_IS_APIBITMAP 0x1
28 /* Internal interface */
30 #define BITMAPOBJ_AllocBitmap() \
31 ((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP))
32 #define BITMAPOBJ_FreeBitmap(hBMObj) \
33 GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
34 /* NOTE: Use shared locks! */
35 #define BITMAPOBJ_LockBitmap(hBMObj) (PBITMAPOBJ)EngLockSurface((HSURF)hBMObj)
36 #define BITMAPOBJ_UnlockBitmap(pBMObj) EngUnlockSurface(&pBMObj->SurfObj)
37 BOOL INTERNAL_CALL
BITMAP_Cleanup(PVOID ObjectBody
);
39 BOOL INTERNAL_CALL
BITMAPOBJ_InitBitsLock(BITMAPOBJ
*pBMObj
);
40 #define BITMAPOBJ_LockBitmapBits(pBMObj) ExEnterCriticalRegionAndAcquireFastMutexUnsafe((pBMObj)->BitsLock)
41 #define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutexUnsafeAndLeaveCriticalRegion((pBMObj)->BitsLock)
42 void INTERNAL_CALL
BITMAPOBJ_CleanupBitsLock(BITMAPOBJ
*pBMObj
);
44 INT FASTCALL
BITMAPOBJ_GetWidthBytes (INT bmWidth
, INT bpp
);
45 HBITMAP FASTCALL
BITMAPOBJ_CopyBitmap (HBITMAP hBitmap
);
46 INT FASTCALL
DIB_GetDIBWidthBytes (INT width
, INT depth
);
47 int STDCALL
DIB_GetDIBImageBytes (INT width
, INT height
, INT depth
);
48 INT FASTCALL
DIB_BitmapInfoSize (const BITMAPINFO
* info
, WORD coloruse
);
49 INT STDCALL
BITMAP_GetObject(BITMAPOBJ
* bmp
, INT count
, LPVOID buffer
);
50 HBITMAP FASTCALL
BitmapToSurf(PBITMAPOBJ BitmapObj
, HDEV GDIDevice
);
52 HBITMAP FASTCALL
IntCreateCompatibleBitmap(PDC Dc
, INT Width
, INT Height
);
54 /* User Entry Points */
68 BLENDFUNCTION BlendFunc
);
94 NtGdiCreateCompatibleBitmap (
101 NtGdiCreateBitmapIndirect (
106 NtGdiCreateDIBitmap (
108 CONST BITMAPINFOHEADER
* bmih
,
111 CONST BITMAPINFO
* bmi
,
116 NtGdiCreateDIBSection (
118 CONST BITMAPINFO
* bmi
,
126 NtGdiCreateDiscardableBitmap (
157 NtGdiGetBitmapDimensionEx (
163 NtGdiGetDIBColorTable (
236 NtGdiSetBitmapDimensionEx (
244 NtGdiSetDIBColorTable (
248 CONST RGBQUAD
* Colors
258 CONST BITMAPINFO
* bmi
,
263 NtGdiSetDIBitsToDevice (
274 CONST BITMAPINFO
* bmi
,
321 CONST BITMAPINFO
* BitsInfo
,