17#define MAKEINTRESOURCE MAKEINTRESOURCEW
23 if (!
gpsi->hIconSmWindows)
25 ERR(
"Loading System Cursors\n");
51 BOOL *DefaultCursor = (
BOOL*)Arguments;
125 if ((
rgb->rgbtRed == 0) && (
rgb->rgbtGreen == 0) && (
rgb->rgbtBlue == 0))
130 return ((
rgb->rgbtRed == 0xff) && (
rgb->rgbtGreen == 0xff)
131 && (
rgb->rgbtBlue == 0xff));
139 if (
info->bmiHeader.biBitCount != 1)
return FALSE;
142 if ((
rgb->rgbRed == 0) && (
rgb->rgbGreen == 0) &&
143 (
rgb->rgbBlue == 0) && (
rgb->rgbReserved == 0))
148 return ((
rgb->rgbRed == 0xff) && (
rgb->rgbGreen == 0xff)
149 && (
rgb->rgbBlue == 0xff) && (
rgb->rgbReserved == 0));
170 colors =
info->bmiHeader.biClrUsed;
173 if (!colors && (
info->bmiHeader.biBitCount <= 8))
174 colors = 1 <<
info->bmiHeader.biBitCount;
186 (
info->bmiHeader.biBitCount == 16 ||
info->bmiHeader.biBitCount == 32))
200 #define HighBitDetect 0x89
214 header->biSize ==
sizeof(BITMAPV5HEADER))
224 ERR(
"Cannot yet display PNG icons\n");
229 ERR(
"Unknown/wrong size for header of 0x%x\n",
header->biSize );
253 info->bmiHeader.biWidth = bm.bmWidth;
254 info->bmiHeader.biHeight = bm.bmHeight;
259 info->bmiHeader.biXPelsPerMeter = 0;
260 info->bmiHeader.biYPelsPerMeter = 0;
261 info->bmiHeader.biClrUsed = 0;
262 info->bmiHeader.biClrImportant = 0;
273 StretchBlt( hdc_dst, 0, 0, dst_width, dst_height,
hdc, 0, 0, bm.bmWidth, bm.bmHeight,
SRCCOPY );
287 const unsigned char *
ptr =
bits;
289 if (
info->bmiHeader.biBitCount != 32)
return FALSE;
290 for (
i = 0;
i <
info->bmiHeader.biWidth *
abs(
info->bmiHeader.biHeight);
i++,
ptr += 4)
291 if ((has_alpha = (
ptr[3] != 0)))
break;
330 TRACE(
"Creating alpha bitmap from existing bitmap.\n");
334 if (bm.bmBitsPixel != 32)
343 info->bmiHeader.biWidth = bm.bmWidth;
344 info->bmiHeader.biHeight = -bm.bmHeight;
345 info->bmiHeader.biPlanes = 1;
346 info->bmiHeader.biBitCount = 32;
349 info->bmiHeader.biXPelsPerMeter = 0;
350 info->bmiHeader.biYPelsPerMeter = 0;
351 info->bmiHeader.biClrUsed = 0;
352 info->bmiHeader.biClrImportant = 0;
389 LONG orig_width, orig_height;
391 TRACE(
"Creating alpha bitmap from bitmap info.\n");
423 src_info->bmiHeader.biWidth =
width;
424 src_info->bmiHeader.biHeight =
height;
436 src_info->bmiHeader.biWidth = orig_width;
437 src_info->bmiHeader.biHeight = orig_height;
449 0, 0, orig_width, orig_height,
531 for(
i = 0;
i<
dir->idCount;
i++)
539 ERR(
"Corrupted icon file?.\n");
573 WARN(
"Unable to get a fit entry index.\n");
578 return &
dir->idEntries[
i-1];
598 ptHotSpot->x =
entry->xHotspot;
599 ptHotSpot->y =
entry->yHotspot;
603 return entry->dwDIBOffset;
627 const VOID *pvColor, *pvMask;
678 pvColor = (
const char*)
pbmi + ubmiSize;
679 pvMask = (
const char*)pvColor +
726 rgb[0].rgbBlue =
rgb[0].rgbGreen =
rgb[0].rgbRed = 0x00;
727 rgb[1].rgbBlue =
rgb[1].rgbGreen =
rgb[1].rgbRed = 0xff;
728 rgb[0].rgbReserved =
rgb[1].rgbReserved = 0;
736 rgb[1].rgbtBlue =
rgb[1].rgbtGreen =
rgb[1].rgbtRed = 0xff;
769 ZeroMemory(pCursorData,
sizeof(*pCursorData));
770 if(pIconInfo->hbmColor)
777 if (!
GetObject(pIconInfo->hbmMask,
sizeof(bm), &bm))
790 if (!pCursorData->hbmColor)
807 if(!pCursorData->hbmMask)
812 if(pCursorData->hbmColor)
814 GetObject(pCursorData->hbmColor,
sizeof(bm), &bm);
815 pCursorData->bpp = bm.bmBitsPixel;
816 pCursorData->cx = bm.bmWidth;
817 pCursorData->cy = bm.bmHeight;
818 if(pCursorData->bpp == 32)
823 GetObject(pCursorData->hbmMask,
sizeof(bm), &bm);
824 pCursorData->bpp = 1;
825 pCursorData->cx = bm.bmWidth;
826 pCursorData->cy = bm.bmHeight/2;
831 pCursorData->xHotspot = pCursorData->cx/2;
832 pCursorData->yHotspot = pCursorData->cy/2;
836 pCursorData->xHotspot = pIconInfo->xHotspot;
837 pCursorData->yHotspot = pIconInfo->yHotspot;
844#define RIFF_FOURCC( c0, c1, c2, c3 ) \
845 ( (DWORD)(BYTE)(c0) | ( (DWORD)(BYTE)(c1) << 8 ) | \
846 ( (DWORD)(BYTE)(c2) << 16 ) | ( (DWORD)(BYTE)(c3) << 24 ) )
848#define ANI_RIFF_ID RIFF_FOURCC('R', 'I', 'F', 'F')
849#define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T')
850#define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N')
851#define ANI_anih_ID RIFF_FOURCC('a', 'n', 'i', 'h')
852#define ANI_seq__ID RIFF_FOURCC('s', 'e', 'q', ' ')
853#define ANI_fram_ID RIFF_FOURCC('f', 'r', 'a', 'm')
854#define ANI_rate_ID RIFF_FOURCC('r', 'a', 't', 'e')
856#define ANI_FLAG_ICON 0x1
857#define ANI_FLAG_SEQUENCE 0x2
887 TRACE(
" display rate: %d\n",
header->display_rate);
894 const unsigned char *
ptr = parent_chunk->
data;
901 if ((!chunk_type && *(
const DWORD *)
ptr == chunk_id )
902 || (chunk_type && *(
const DWORD *)
ptr == chunk_type && *((
const DWORD *)
ptr + 2) == chunk_id ))
934 const unsigned char *icon_chunk;
935 const unsigned char *icon_data;
939 if (!ACON_chunk.
data)
941 ERR(
"Failed to get root chunk.\n");
947 if (!ACON_chunk.
data)
949 ERR(
"Failed to get header chunk.\n");
957 pCurData->cpcur =
pHeader->num_frames;
958 pCurData->cicur =
pHeader->num_steps;
959 pCurData->iicur =
pHeader->display_rate;
967 ERR(
"No sequence data although the flag is set!\n");
975 pCurData->ajifRate = (
INT*)rate_chunk.
data;
979 if (!fram_chunk.
data)
981 ERR(
"Failed to get icon list.\n");
984 icon_chunk = fram_chunk.
data;
985 icon_data = fram_chunk.
data + (2 *
sizeof(
DWORD));
992 if(!pCurData->aspcur)
997 pCurData->aicur = (
DWORD*)(pCurData->aspcur +
pHeader->num_frames);
998 pCurData->ajifRate = (
INT*)(pCurData->aicur +
pHeader->num_steps);
1004 const DWORD chunk_size = *(
const DWORD *)(icon_chunk +
sizeof(
DWORD));
1008 pFrameData = &pCurData->
aspcur[
i];
1010 pFrameData = pCurData;
1012 pFrameData->
rt = pCurData->rt;
1026 ERR(
"Unable to find the right file entry for frame %d.\n",
i);
1033 pFrameData->
cx = pDirEntry->
bWidth;
1060 icon_chunk += chunk_size + (2 *
sizeof(
DWORD));
1061 icon_data = icon_chunk + (2 *
sizeof(
DWORD));
1072 pCurData->ajifRate[
i] =
pHeader->display_rate;
1082 pCurData->aicur[
i] =
i;
1128 if (pbmfh->
bfType != 0x4d42 )
1130 WARN(
"Invalid/unsupported bitmap format!\n");
1168 cyDesired = -cyDesired;
1181 TRACE(
"Size Image %d, Size Header %d, ResSize %d\n",
1192 pvBits = (
char*)pvBits - 12;
1193 WARN(
"Found GCC Resource Compiled 16-bpp or 32-bpp error\n");
1202 COLORREF crWindow, cr3DShadow, cr3DFace, cr3DLight;
1209 numColors = 1 <<
bpp;
1219 if(numColors > 256) numColors = 256;
1220 if (!numColors && (
bpp <= 8)) numColors = 1 <<
bpp;
1239 case 1: pixel >>= 7;
break;
1240 case 4: pixel >>= 4;
break;
1243 FIXME(
"Unhandled bit depth %d.\n",
bpp);
1247 if(pixel >= numColors)
1249 ERR(
"Wrong pixel passed in.\n");
1265 for(
i = 0;
i<numColors;
i++)
1268 if((
ptr->rgbtBlue ==
ptr->rgbtRed) && (
ptr->rgbtBlue ==
ptr->rgbtGreen))
1270 if(
ptr->rgbtBlue == 128)
1276 if(
ptr->rgbtBlue == 192)
1282 if(
ptr->rgbtBlue == 223)
1318 if(cyDesired < 0) cyDesired = -cyDesired;
1349 ERR(
"StretchDIBits failed!.\n");
1412 if(!cxDesired) cxDesired =
entry->bWidth;
1413 if(!cyDesired) cyDesired =
entry->bHeight;
1426 ERR(
"Failing File is \n '%S'.\n", lpszName);
1509 LPCWSTR fakeNameFmt =
sizeof(
void*) > 4 ?
L"\x01%016IX" :
L"\x01%08IX";
1558 TRACE(
"Checking for an LR_SHARED cursor/icon.\n");
1560 param.bIcon = bIcon;
1561 param.cx = cxDesired;
1562 param.cy = cyDesired;
1567 TRACE(
"MATCH! %p\n",hCurIcon);
1618 if(
dir->idType == 2)
1626 cursorData.
cx = cxDesired;
1627 cursorData.
cy = cyDesired;
1691 if (!objSize)
return 0;
1692 if ((desiredx < 0) || (desiredy < 0))
return 0;
1696 FIXME(
"The flag LR_COPYFROMRESOURCE is not implemented for bitmaps\n");
1701 FIXME(
"The flag LR_COPYRETURNORG is not implemented for bitmaps\n");
1704 if (desiredx == 0) desiredx =
ds.dsBm.bmWidth;
1705 if (desiredy == 0) desiredy =
ds.dsBm.bmHeight;
1757 if (!monochrome &&
ds.dsBm.bmBitsPixel == 1)
1781 else if (!monochrome)
1783 monochrome =
ds.dsBm.bmBitsPixel == 1;
1806 copyContents =
TRUE;
1814 copyContents = (
ds.dsBm.bmBitsPixel == 1 ||
ds.dsBm.bmBitsPixel == screen_depth);
1847 0, 0,
ds.dsBm.bmWidth,
ds.dsBm.bmHeight,
1891 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
1914 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
1927 TRACE(
"Got module %wZ, resource %p (%S).\n", &ustrModule,
1964 FIXME(
"Unimplemented flags: 0x%08x\n", fuFlags);
1968 ERR(
"GetIconInfo failed.\n");
2018#define COPYIMAGE_VALID_FLAGS ( \
2019 LR_SHARED | LR_COPYFROMRESOURCE | LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS | 0x800 | \
2020 LR_VGACOLOR | LR_LOADREALSIZE | LR_DEFAULTSIZE | LR_LOADTRANSPARENT | LR_LOADFROMFILE | \
2021 LR_COPYDELETEORG | LR_COPYRETURNORG | LR_COLOR | LR_MONOCHROME \
2032 TRACE(
"hImage=%p, uType=%u, cxDesired=%d, cyDesired=%d, fuFlags=%x\n",
2033 hImage, uType, cxDesired, cyDesired, fuFlags);
2069 ERR(
"GetIconInfo Failed. hImage %p\n", hImage);
2074 ERR(
"GetObject Failed. iconinfo %p\n", iconinfo);
2082 if (cxDesired == bm.bmWidth && cyDesired == bm.bmHeight)
2122 _In_opt_ HBRUSH hbrFlickerFreeDraw,
2127 istepIfAniCur, hbrFlickerFreeDraw, diFlags,
2298 TRACE(
"hinst 0x%p, name %s, uType 0x%08x, cxDesired %d, cyDesired %d, fuLoad 0x%08x.\n",
2336 int i, numMatch = 0, iIndex = -1;
2339 ULONG bestScore = 0xFFFFFFFF, score;
2341 TRACE(
"%p, %x, %i, %i, %x.\n", presbits, fIcon, cxDesired, cyDesired,
Flags);
2343 if(!(
dir && !
dir->idReserved && (
dir->idType & 3)))
2345 WARN(
"Invalid resource.\n");
2368 for(
i = 0;
i <
dir->idCount;
i++)
2371 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2373 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2379 if( score > bestScore)
2382 if(
width > cxDesired)
2383 score -=
width - cxDesired;
2385 score -=
height - cyDesired;
2386 if(score > bestScore)
2388 if(score == bestScore)
2390 if(
entry->wBitCount > BitCount)
2391 BitCount =
entry->wBitCount;
2398 BitCount =
entry->wBitCount;
2404 return dir->idEntries[iIndex].wResId;
2408 if (bppDesired > 8 && BitCount > 8)
2414 for(
i = 0;
i <
dir->idCount;
i++)
2417 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2418 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2424 if(
width > cxDesired)
2425 score -=
width - cxDesired;
2427 score -=
height - cyDesired;
2428 if(score != bestScore)
2431 if(
entry->wBitCount == bppDesired)
2432 return entry->wResId;
2434 if((
entry->wBitCount > BitCount) && (
entry->wBitCount < bppDesired))
2437 if ((
entry->wBitCount <= 8) && notPaletted)
2440 BitCount =
entry->wBitCount;
2445 return dir->idEntries[iIndex].wResId;
2450 for(
i = 0;
i <
dir->idCount;
i++)
2453 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2454 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2460 if(
width > cxDesired)
2461 score -=
width - cxDesired;
2463 score -=
height - cyDesired;
2464 if(score != bestScore)
2467 if(
entry->wBitCount < BitCount)
2469 if((
entry->wBitCount <= 8) && notPaletted)
2472 BitCount =
entry->wBitCount;
2476 return dir->idEntries[iIndex].wResId;
2494 TRACE_(icon)(
"%dx%d, planes %d, bpp %d, xor %p, and %p\n",
2495 nWidth, nHeight, cPlanes, cBitsPixel, lpbXORbits, lpbANDbits);
2500 if (cPlanes * cBitsPixel > 1)
2543 TRACE(
"%p, %lu, %lu, %lu, %i, %i, %lu.\n", pbIconBits, cbIconBits, fIcon,
dwVersion, cxDesired, cyDesired,
uFlags);
2552 cursorData.
cx = cxDesired;
2553 cursorData.
cy = cyDesired;
2557 if(!
memcmp(pbIconBits,
"RIFF", 4))
2561 ERR(
"Could not get cursor data from .ani.\n");
2581 TRACE(
"Pointer points to a directory structure.\n");
2584 if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
2592 if((fIcon && pCurIconDir->
idType == 2) || (!fIcon && pCurIconDir->
idType == 1))
2594 WARN(
"Got a %s directory pointer, but called for a %s\n", fIcon ?
"cursor" :
"icon", fIcon ?
"icon" :
"cursor");
2627 ERR(
"Couldn't fill the CURSORDATA structure.\n");
2646 ERR(
"NtUserSetCursorIconData failed.\n");
2675 TRACE(
"%p.\n", piconinfo);
2692 TRACE(
"Returning 0x%08x.\n", hiconRet);
2719 nWidth, nHeight, xHotSpot, yHotSpot, pvXORPlane, pvANDPlane);
2722 info.xHotspot = xHotSpot;
2723 info.yHotspot = yHotSpot;
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define WINE_DECLARE_DEBUG_CHANNEL(x)
#define MultiByteToWideChar
static const BYTE png_sig_pattern[]
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
BOOL WINAPI FreeResource(HGLOBAL handle)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
GLint GLint GLsizei GLsizei GLsizei depth
GLclampf GLclampf GLclampf alpha
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
FxContextHeader * pHeader
#define CURSORF_FROMRESOURCE
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
#define CURSORF_ACONFRAME
#define LDR_IS_RESOURCE(handle)
#define memcpy(s1, s2, n)
#define FILE_FLAG_RANDOM_ACCESS
static const BYTE masks[8]
static PROTOCOLDATA * pdata
static HBITMAP create_bitmap(void)
#define ANI_FLAG_SEQUENCE
NTSYSAPI NTSTATUS NTAPI ZwCallbackReturn(_In_ PVOID Result, _In_ ULONG ResultLength, _In_ NTSTATUS Status)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ DWORD _In_ DWORD dwOffset
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
EXTINLINE BOOL NtUserxSetCursorPos(INT x, INT y)
EXTINLINE BOOL NtUserxGetCursorPos(POINT *lpPoint)
EXTINLINE HICON NtUserxCreateEmptyCurObject(DWORD_PTR Param)
EXTINLINE INT NtUserxShowCursor(BOOL bShow)
union CURSORICONDIRENTRY::@5124 ResInfo
CURSORICONDIRENTRY idEntries[1]
const unsigned char * data
BITMAPINFOHEADER bmiHeader
struct tagCURSORDATA * aspcur
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
static int __cdecl compr(const void *a, const void *b)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
struct _COPYIMAGE_CALLBACK_ARGUMENTS * PCOPYIMAGE_CALLBACK_ARGUMENTS
BOOL APIENTRY NtUserDrawIconEx(HDC hdc, int xLeft, int yTop, HICON hIcon, int cxWidth, int cyHeight, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags, BOOL bMetaHDC, PVOID pDIXData)
BOOL APIENTRY NtUserGetIconSize(HANDLE hCurIcon, UINT istepIfAniCur, PLONG plcx, PLONG plcy)
HICON NTAPI NtUserFindExistingCursorIcon(_In_ PUNICODE_STRING pustrModule, _In_ PUNICODE_STRING pustrRsrc, _In_ FINDEXISTINGCURICONPARAM *param)
BOOL APIENTRY NtUserDestroyCursor(_In_ HANDLE hCurIcon, _In_ BOOL bForce)
__kernel_entry BOOL APIENTRY NtUserSetCursorIconData(_In_ HCURSOR hcursor, _In_opt_ PUNICODE_STRING pustrModule, _In_opt_ PUNICODE_STRING pustrRsrc, _In_ const CURSORDATA *pCursorData)
BOOL APIENTRY NtUserSetSystemCursor(HCURSOR hcur, DWORD id)
HCURSOR NTAPI NtUserGetCursorFrameInfo(HCURSOR hCursor, DWORD istep, INT *rate_jiffies, DWORD *num_steps)
static int bitmap_info_size(const BITMAPINFO *info, WORD coloruse)
HCURSOR WINAPI CreateCursor(_In_opt_ HINSTANCE hInst, _In_ int xHotSpot, _In_ int yHotSpot, _In_ int nWidth, _In_ int nHeight, _In_ const VOID *pvANDPlane, _In_ const VOID *pvXORPlane)
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpBitmapName)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hinst, _In_ LPCWSTR lpszName, _In_ UINT uType, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuLoad)
HCURSOR WINAPI LoadCursorFromFileW(_In_ LPCWSTR lpFileName)
static BOOL CURSORICON_GetCursorDataFromIconInfo(_Out_ CURSORDATA *pCursorData, _In_ ICONINFO *pIconInfo)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT lpPoint)
static BOOL CURSORICON_GetCursorDataFromBMI(_Inout_ CURSORDATA *pdata, _In_ const BITMAPINFO *pbmi)
static void * map_fileW(LPCWSTR name, LPDWORD filesize)
BOOL WINAPI SetSystemCursor(_In_ HCURSOR hcur, _In_ DWORD id)
BOOL get_icon_size(HICON hIcon, SIZE *size)
static void riff_find_chunk(DWORD chunk_id, DWORD chunk_type, const riff_chunk_t *parent_chunk, riff_chunk_t *chunk)
HCURSOR WINAPI LoadCursorFromFileA(_In_ LPCSTR lpFileName)
HCURSOR CursorIconToCursor(HICON hIcon, BOOL SemiTransparent)
NTSTATUS WINAPI User32SetupDefaultCursors(PVOID Arguments, ULONG ArgumentLength)
DWORD get_best_icon_file_offset(_In_ const LPBYTE dir, _In_ DWORD dwFileSize, _In_ int cxDesired, _In_ int cyDesired, _In_ BOOL bIcon, _In_ DWORD fuLoad, _Out_ POINT *ptHotSpot)
static int get_dib_image_size(int width, int height, int depth)
int WINAPI LookupIconIdFromDirectory(_In_ PBYTE presbits, _In_ BOOL fIcon)
#define COPYIMAGE_VALID_FLAGS
static BOOL bmi_has_alpha(const BITMAPINFO *info, const void *bits)
HICON WINAPI CreateIconFromResourceEx(_In_ PBYTE pbIconBits, _In_ DWORD cbIconBits, _In_ BOOL fIcon, _In_ DWORD dwVersion, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT uFlags)
static BOOL CURSORICON_GetCursorDataFromANI(_Inout_ CURSORDATA *pCurData, _In_ const BYTE *pData, _In_ DWORD dwDataSize, _In_ DWORD fuLoad)
BOOL WINAPI SetCursorPos(_In_ int X, _In_ int Y)
static void stretch_blt_icon(HDC hdc_dst, int dst_width, int dst_height, HBITMAP src)
static HANDLE CURSORICON_LoadImageW(_In_opt_ HINSTANCE hinst, _In_ LPCWSTR lpszName, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuLoad, _In_ BOOL bIcon)
static HBITMAP BITMAP_LoadImageW(_In_opt_ HINSTANCE hinst, _In_ LPCWSTR lpszName, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuLoad)
static HBITMAP create_alpha_bitmap(_In_opt_ HBITMAP color, _In_opt_ BITMAPINFO *src_info, _In_opt_ const void *color_bits, _In_ LONG width, _In_ LONG height)
static BOOL is_dib_monochrome(const BITMAPINFO *info)
const CURSORICONFILEDIRENTRY * get_best_icon_file_entry(_In_ const CURSORICONFILEDIR *dir, _In_ DWORD dwFileSize, _In_ int cxDesired, _In_ int cyDesired, _In_ BOOL bIcon, _In_ DWORD fuLoad)
static HBITMAP BITMAP_CopyImage(_In_ HBITMAP hnd, _In_ int desiredx, _In_ int desiredy, _In_ UINT flags)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpCursorName)
static HANDLE CURSORICON_LoadFromFileW(_In_ LPCWSTR lpszName, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuLoad, _In_ BOOL bIcon)
HCURSOR WINAPI GetCursorFrameInfo(HCURSOR hCursor, DWORD reserved, DWORD istep, PINT rate_jiffies, DWORD *num_steps)
static int DIB_GetBitmapInfo(const BITMAPINFOHEADER *header, LONG *width, LONG *height, WORD *bpp, DWORD *compr)
HBITMAP WINAPI LoadBitmapA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpBitmapName)
int WINAPI LookupIconIdFromDirectoryEx(_In_ PBYTE presbits, _In_ BOOL fIcon, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT Flags)
NTSTATUS WINAPI User32CallCopyImageFromKernel(PVOID Arguments, ULONG ArgumentLength)
VOID LoadSystemCursors(VOID)
static void dump_ani_header(const ani_header *header)
static const WCHAR DISPLAYW[]
HICON WINAPI CopyIcon(_In_ HICON hIcon)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
static HICON CURSORICON_CopyImage(_In_ HICON hicon, _In_ BOOL bIcon, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuFlags)
DWORD WINAPI GetLastError(void)
#define LOAD_LIBRARY_AS_DATAFILE
DWORD WINAPI GetCurrentProcessId(void)
_In_ ULONG _In_ ULONG rgb
#define ERROR_INVALID_CURSOR_HANDLE
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
HDC WINAPI CreateICW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ const DEVMODEW *)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HCURSOR WINAPI GetCursor(void)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI DeleteDC(_In_ HDC)
HBITMAP WINAPI CreateDIBitmap(_In_ HDC hdc, _In_opt_ const BITMAPINFOHEADER *pbmih, _In_ DWORD fdwInit, _In_opt_ const VOID *pvInit, _In_opt_ const BITMAPINFO *pbmi, _In_ UINT uUsage)
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HICON WINAPI CreateIconFromResource(_In_reads_bytes_(dwResSize) PBYTE presbits, _In_ DWORD dwResSize, _In_ BOOL fIcon, _In_ DWORD dwVer)
DWORD WINAPI GetSysColor(_In_ int)
#define LR_LOADTRANSPARENT
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
HICON WINAPI CreateIcon(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ BYTE, _In_ BYTE, _In_ const BYTE *, _In_ const BYTE *)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define LR_COPYFROMRESOURCE
#define LR_CREATEDIBSECTION
BOOL WINAPI DrawIcon(_In_ HDC, _In_ int, _In_ int, _In_ HICON)
#define IS_INTRESOURCE(i)
int WINAPI ShowCursor(_In_ BOOL)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
HDC WINAPI GetDC(_In_opt_ HWND)
HANDLE WINAPI LoadImageA(_In_opt_ HINSTANCE hInst, _In_ LPCSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
#define MAKEINTRESOURCEW(i)
#define LR_LOADMAP3DCOLORS
int WINAPI GetSystemMetrics(_In_ int)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags