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));
168 colors =
info->bmiHeader.biClrUsed;
171 if (!colors && (
info->bmiHeader.biBitCount <= 8))
172 colors = 1 <<
info->bmiHeader.biBitCount;
185 #define HighBitDetect 0x89
199 header->biSize ==
sizeof(BITMAPV5HEADER))
209 ERR(
"Cannot yet display PNG icons\n");
214 ERR(
"Unknown/wrong size for header of 0x%x\n",
header->biSize );
238 info->bmiHeader.biWidth = bm.bmWidth;
239 info->bmiHeader.biHeight = bm.bmHeight;
244 info->bmiHeader.biXPelsPerMeter = 0;
245 info->bmiHeader.biYPelsPerMeter = 0;
246 info->bmiHeader.biClrUsed = 0;
247 info->bmiHeader.biClrImportant = 0;
258 StretchBlt( hdc_dst, 0, 0, dst_width, dst_height,
hdc, 0, 0, bm.bmWidth, bm.bmHeight,
SRCCOPY );
272 const unsigned char *
ptr =
bits;
274 if (
info->bmiHeader.biBitCount != 32)
return FALSE;
275 for (
i = 0;
i <
info->bmiHeader.biWidth *
abs(
info->bmiHeader.biHeight);
i++,
ptr += 4)
276 if ((has_alpha = (
ptr[3] != 0)))
break;
315 TRACE(
"Creating alpha bitmap from existing bitmap.\n");
319 if (bm.bmBitsPixel != 32)
328 info->bmiHeader.biWidth = bm.bmWidth;
329 info->bmiHeader.biHeight = -bm.bmHeight;
330 info->bmiHeader.biPlanes = 1;
331 info->bmiHeader.biBitCount = 32;
334 info->bmiHeader.biXPelsPerMeter = 0;
335 info->bmiHeader.biYPelsPerMeter = 0;
336 info->bmiHeader.biClrUsed = 0;
337 info->bmiHeader.biClrImportant = 0;
374 LONG orig_width, orig_height;
376 TRACE(
"Creating alpha bitmap from bitmap info.\n");
408 src_info->bmiHeader.biWidth =
width;
409 src_info->bmiHeader.biHeight =
height;
421 src_info->bmiHeader.biWidth = orig_width;
422 src_info->bmiHeader.biHeight = orig_height;
434 0, 0, orig_width, orig_height,
516 for(
i = 0;
i<
dir->idCount;
i++)
524 ERR(
"Corrupted icon file?.\n");
558 WARN(
"Unable to get a fit entry index.\n");
563 return &
dir->idEntries[
i-1];
583 ptHotSpot->x =
entry->xHotspot;
584 ptHotSpot->y =
entry->yHotspot;
588 return entry->dwDIBOffset;
612 const VOID *pvColor, *pvMask;
663 pvColor = (
const char*)
pbmi + ubmiSize;
664 pvMask = (
const char*)pvColor +
711 rgb[0].rgbBlue =
rgb[0].rgbGreen =
rgb[0].rgbRed = 0x00;
712 rgb[1].rgbBlue =
rgb[1].rgbGreen =
rgb[1].rgbRed = 0xff;
713 rgb[0].rgbReserved =
rgb[1].rgbReserved = 0;
721 rgb[1].rgbtBlue =
rgb[1].rgbtGreen =
rgb[1].rgbtRed = 0xff;
754 ZeroMemory(pCursorData,
sizeof(*pCursorData));
755 if(pIconInfo->hbmColor)
762 if (!
GetObject(pIconInfo->hbmMask,
sizeof(bm), &bm))
775 if (!pCursorData->hbmColor)
792 if(!pCursorData->hbmMask)
797 if(pCursorData->hbmColor)
799 GetObject(pCursorData->hbmColor,
sizeof(bm), &bm);
800 pCursorData->bpp = bm.bmBitsPixel;
801 pCursorData->cx = bm.bmWidth;
802 pCursorData->cy = bm.bmHeight;
803 if(pCursorData->bpp == 32)
808 GetObject(pCursorData->hbmMask,
sizeof(bm), &bm);
809 pCursorData->bpp = 1;
810 pCursorData->cx = bm.bmWidth;
811 pCursorData->cy = bm.bmHeight/2;
816 pCursorData->xHotspot = pCursorData->cx/2;
817 pCursorData->yHotspot = pCursorData->cy/2;
821 pCursorData->xHotspot = pIconInfo->xHotspot;
822 pCursorData->yHotspot = pIconInfo->yHotspot;
829#define RIFF_FOURCC( c0, c1, c2, c3 ) \
830 ( (DWORD)(BYTE)(c0) | ( (DWORD)(BYTE)(c1) << 8 ) | \
831 ( (DWORD)(BYTE)(c2) << 16 ) | ( (DWORD)(BYTE)(c3) << 24 ) )
833#define ANI_RIFF_ID RIFF_FOURCC('R', 'I', 'F', 'F')
834#define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T')
835#define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N')
836#define ANI_anih_ID RIFF_FOURCC('a', 'n', 'i', 'h')
837#define ANI_seq__ID RIFF_FOURCC('s', 'e', 'q', ' ')
838#define ANI_fram_ID RIFF_FOURCC('f', 'r', 'a', 'm')
839#define ANI_rate_ID RIFF_FOURCC('r', 'a', 't', 'e')
841#define ANI_FLAG_ICON 0x1
842#define ANI_FLAG_SEQUENCE 0x2
872 TRACE(
" display rate: %d\n",
header->display_rate);
879 const unsigned char *
ptr = parent_chunk->
data;
886 if ((!chunk_type && *(
const DWORD *)
ptr == chunk_id )
887 || (chunk_type && *(
const DWORD *)
ptr == chunk_type && *((
const DWORD *)
ptr + 2) == chunk_id ))
919 const unsigned char *icon_chunk;
920 const unsigned char *icon_data;
924 if (!ACON_chunk.
data)
926 ERR(
"Failed to get root chunk.\n");
932 if (!ACON_chunk.
data)
934 ERR(
"Failed to get header chunk.\n");
942 pCurData->cpcur =
pHeader->num_frames;
943 pCurData->cicur =
pHeader->num_steps;
944 pCurData->iicur =
pHeader->display_rate;
952 ERR(
"No sequence data although the flag is set!\n");
960 pCurData->ajifRate = (
INT*)rate_chunk.
data;
964 if (!fram_chunk.
data)
966 ERR(
"Failed to get icon list.\n");
969 icon_chunk = fram_chunk.
data;
970 icon_data = fram_chunk.
data + (2 *
sizeof(
DWORD));
977 if(!pCurData->aspcur)
982 pCurData->aicur = (
DWORD*)(pCurData->aspcur +
pHeader->num_frames);
983 pCurData->ajifRate = (
INT*)(pCurData->aicur +
pHeader->num_steps);
993 pFrameData = &pCurData->
aspcur[
i];
995 pFrameData = pCurData;
997 pFrameData->
rt = pCurData->rt;
1011 ERR(
"Unable to find the right file entry for frame %d.\n",
i);
1018 pFrameData->
cx = pDirEntry->
bWidth;
1045 icon_chunk += chunk_size + (2 *
sizeof(
DWORD));
1046 icon_data = icon_chunk + (2 *
sizeof(
DWORD));
1057 pCurData->ajifRate[
i] =
pHeader->display_rate;
1067 pCurData->aicur[
i] =
i;
1113 if (pbmfh->
bfType != 0x4d42 )
1115 WARN(
"Invalid/unsupported bitmap format!\n");
1152 cyDesired = -cyDesired;
1171 COLORREF crWindow, cr3DShadow, cr3DFace, cr3DLight;
1178 numColors = 1 <<
bpp;
1188 if(numColors > 256) numColors = 256;
1189 if (!numColors && (
bpp <= 8)) numColors = 1 <<
bpp;
1208 case 1: pixel >>= 7;
break;
1209 case 4: pixel >>= 4;
break;
1212 FIXME(
"Unhandled bit depth %d.\n",
bpp);
1216 if(pixel >= numColors)
1218 ERR(
"Wrong pixel passed in.\n");
1234 for(
i = 0;
i<numColors;
i++)
1237 if((
ptr->rgbtBlue ==
ptr->rgbtRed) && (
ptr->rgbtBlue ==
ptr->rgbtGreen))
1239 if(
ptr->rgbtBlue == 128)
1245 if(
ptr->rgbtBlue == 192)
1251 if(
ptr->rgbtBlue == 223)
1287 if(cyDesired < 0) cyDesired = -cyDesired;
1318 ERR(
"StretchDIBits failed!.\n");
1381 if(!cxDesired) cxDesired =
entry->bWidth;
1382 if(!cyDesired) cyDesired =
entry->bHeight;
1395 ERR(
"Failing File is \n '%S'.\n", lpszName);
1478 LPCWSTR fakeNameFmt =
sizeof(
void*) > 4 ?
L"\x01%016IX" :
L"\x01%08IX";
1527 TRACE(
"Checking for an LR_SHARED cursor/icon.\n");
1529 param.bIcon = bIcon;
1530 param.cx = cxDesired;
1531 param.cy = cyDesired;
1536 TRACE(
"MATCH! %p\n",hCurIcon);
1587 if(
dir->idType == 2)
1595 cursorData.
cx = cxDesired;
1596 cursorData.
cy = cyDesired;
1660 if (!objSize)
return 0;
1661 if ((desiredx < 0) || (desiredy < 0))
return 0;
1665 FIXME(
"The flag LR_COPYFROMRESOURCE is not implemented for bitmaps\n");
1670 FIXME(
"The flag LR_COPYRETURNORG is not implemented for bitmaps\n");
1673 if (desiredx == 0) desiredx =
ds.dsBm.bmWidth;
1674 if (desiredy == 0) desiredy =
ds.dsBm.bmHeight;
1726 if (!monochrome &&
ds.dsBm.bmBitsPixel == 1)
1750 else if (!monochrome)
1752 monochrome =
ds.dsBm.bmBitsPixel == 1;
1775 copyContents =
TRUE;
1783 copyContents = (
ds.dsBm.bmBitsPixel == 1 ||
ds.dsBm.bmBitsPixel == screen_depth);
1816 0, 0,
ds.dsBm.bmWidth,
ds.dsBm.bmHeight,
1860 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
1883 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
1896 TRACE(
"Got module %wZ, resource %p (%S).\n", &ustrModule,
1933 FIXME(
"Unimplemented flags: 0x%08x\n", fuFlags);
1937 ERR(
"GetIconInfo failed.\n");
1995 TRACE(
"hImage=%p, uType=%u, cxDesired=%d, cyDesired=%d, fuFlags=%x\n",
1996 hImage, uType, cxDesired, cyDesired, fuFlags);
2036 _In_opt_ HBRUSH hbrFlickerFreeDraw,
2041 istepIfAniCur, hbrFlickerFreeDraw, diFlags,
2212 TRACE(
"hinst 0x%p, name %s, uType 0x%08x, cxDesired %d, cyDesired %d, fuLoad 0x%08x.\n",
2250 int i, numMatch = 0, iIndex = -1;
2253 ULONG bestScore = 0xFFFFFFFF, score;
2255 TRACE(
"%p, %x, %i, %i, %x.\n", presbits, fIcon, cxDesired, cyDesired,
Flags);
2257 if(!(
dir && !
dir->idReserved && (
dir->idType & 3)))
2259 WARN(
"Invalid resource.\n");
2282 for(
i = 0;
i <
dir->idCount;
i++)
2285 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2287 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2293 if( score > bestScore)
2296 if(
width > cxDesired)
2297 score -=
width - cxDesired;
2299 score -=
height - cyDesired;
2300 if(score > bestScore)
2302 if(score == bestScore)
2304 if(
entry->wBitCount > BitCount)
2305 BitCount =
entry->wBitCount;
2312 BitCount =
entry->wBitCount;
2318 return dir->idEntries[iIndex].wResId;
2322 if (bppDesired > 8 && BitCount > 8)
2328 for(
i = 0;
i <
dir->idCount;
i++)
2331 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2332 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2338 if(
width > cxDesired)
2339 score -=
width - cxDesired;
2341 score -=
height - cyDesired;
2342 if(score != bestScore)
2345 if(
entry->wBitCount == bppDesired)
2346 return entry->wResId;
2348 if((
entry->wBitCount > BitCount) && (
entry->wBitCount < bppDesired))
2351 if ((
entry->wBitCount <= 8) && notPaletted)
2354 BitCount =
entry->wBitCount;
2359 return dir->idEntries[iIndex].wResId;
2364 for(
i = 0;
i <
dir->idCount;
i++)
2367 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2368 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2374 if(
width > cxDesired)
2375 score -=
width - cxDesired;
2377 score -=
height - cyDesired;
2378 if(score != bestScore)
2381 if(
entry->wBitCount < BitCount)
2383 if((
entry->wBitCount <= 8) && notPaletted)
2386 BitCount =
entry->wBitCount;
2390 return dir->idEntries[iIndex].wResId;
2408 TRACE_(icon)(
"%dx%d, planes %d, bpp %d, xor %p, and %p\n",
2409 nWidth, nHeight, cPlanes, cBitsPixel, lpbXORbits, lpbANDbits);
2414 if (cPlanes * cBitsPixel > 1)
2457 TRACE(
"%p, %lu, %lu, %lu, %i, %i, %lu.\n", pbIconBits, cbIconBits, fIcon, dwVersion, cxDesired, cyDesired,
uFlags);
2466 cursorData.
cx = cxDesired;
2467 cursorData.
cy = cyDesired;
2471 if(!
memcmp(pbIconBits,
"RIFF", 4))
2475 ERR(
"Could not get cursor data from .ani.\n");
2495 TRACE(
"Pointer points to a directory structure.\n");
2498 if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
2506 if((fIcon && pCurIconDir->
idType == 2) || (!fIcon && pCurIconDir->
idType == 1))
2508 WARN(
"Got a %s directory pointer, but called for a %s\n", fIcon ?
"cursor" :
"icon", fIcon ?
"icon" :
"cursor");
2541 ERR(
"Couldn't fill the CURSORDATA structure.\n");
2560 ERR(
"NtUserSetCursorIconData failed.\n");
2589 TRACE(
"%p.\n", piconinfo);
2606 TRACE(
"Returning 0x%08x.\n", hiconRet);
2633 nWidth, nHeight, xHotSpot, yHotSpot, pvXORPlane, pvANDPlane);
2636 info.xHotspot = xHotSpot;
2637 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 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)
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::@5115 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)
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
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