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;
193 header->biSize ==
sizeof(BITMAPV5HEADER))
201 ERR(
"(%d): unknown/wrong size for header\n",
header->biSize );
224 info->bmiHeader.biWidth = bm.bmWidth;
225 info->bmiHeader.biHeight = bm.bmHeight;
230 info->bmiHeader.biXPelsPerMeter = 0;
231 info->bmiHeader.biYPelsPerMeter = 0;
232 info->bmiHeader.biClrUsed = 0;
233 info->bmiHeader.biClrImportant = 0;
244 StretchBlt( hdc_dst, 0, 0, dst_width, dst_height,
hdc, 0, 0, bm.bmWidth, bm.bmHeight,
SRCCOPY );
258 const unsigned char *
ptr =
bits;
260 if (
info->bmiHeader.biBitCount != 32)
return FALSE;
261 for (
i = 0;
i <
info->bmiHeader.biWidth *
abs(
info->bmiHeader.biHeight);
i++,
ptr += 4)
262 if ((has_alpha = (
ptr[3] != 0)))
break;
301 TRACE(
"Creating alpha bitmap from existing bitmap.\n");
305 if (bm.bmBitsPixel != 32)
314 info->bmiHeader.biWidth = bm.bmWidth;
315 info->bmiHeader.biHeight = -bm.bmHeight;
316 info->bmiHeader.biPlanes = 1;
317 info->bmiHeader.biBitCount = 32;
320 info->bmiHeader.biXPelsPerMeter = 0;
321 info->bmiHeader.biYPelsPerMeter = 0;
322 info->bmiHeader.biClrUsed = 0;
323 info->bmiHeader.biClrImportant = 0;
360 LONG orig_width, orig_height;
362 TRACE(
"Creating alpha bitmap from bitmap info.\n");
394 src_info->bmiHeader.biWidth =
width;
395 src_info->bmiHeader.biHeight =
height;
407 src_info->bmiHeader.biWidth = orig_width;
408 src_info->bmiHeader.biHeight = orig_height;
420 0, 0, orig_width, orig_height,
502 for(
i = 0;
i<
dir->idCount;
i++)
510 ERR(
"Corrupted icon file?.\n");
544 WARN(
"Unable to get a fit entry index.\n");
549 return &
dir->idEntries[
i-1];
569 ptHotSpot->x =
entry->xHotspot;
570 ptHotSpot->y =
entry->yHotspot;
574 return entry->dwDIBOffset;
598 const VOID *pvColor, *pvMask;
649 pvColor = (
const char*)
pbmi + ubmiSize;
650 pvMask = (
const char*)pvColor +
697 rgb[0].rgbBlue =
rgb[0].rgbGreen =
rgb[0].rgbRed = 0x00;
698 rgb[1].rgbBlue =
rgb[1].rgbGreen =
rgb[1].rgbRed = 0xff;
699 rgb[0].rgbReserved =
rgb[1].rgbReserved = 0;
707 rgb[1].rgbtBlue =
rgb[1].rgbtGreen =
rgb[1].rgbtRed = 0xff;
740 ZeroMemory(pCursorData,
sizeof(*pCursorData));
741 if(pIconInfo->hbmColor)
748 if (!
GetObject(pIconInfo->hbmMask,
sizeof(bm), &bm))
761 if (!pCursorData->hbmColor)
778 if(!pCursorData->hbmMask)
783 if(pCursorData->hbmColor)
785 GetObject(pCursorData->hbmColor,
sizeof(bm), &bm);
786 pCursorData->bpp = bm.bmBitsPixel;
787 pCursorData->cx = bm.bmWidth;
788 pCursorData->cy = bm.bmHeight;
789 if(pCursorData->bpp == 32)
794 GetObject(pCursorData->hbmMask,
sizeof(bm), &bm);
795 pCursorData->bpp = 1;
796 pCursorData->cx = bm.bmWidth;
797 pCursorData->cy = bm.bmHeight/2;
802 pCursorData->xHotspot = pCursorData->cx/2;
803 pCursorData->yHotspot = pCursorData->cy/2;
807 pCursorData->xHotspot = pIconInfo->xHotspot;
808 pCursorData->yHotspot = pIconInfo->yHotspot;
815#define RIFF_FOURCC( c0, c1, c2, c3 ) \
816 ( (DWORD)(BYTE)(c0) | ( (DWORD)(BYTE)(c1) << 8 ) | \
817 ( (DWORD)(BYTE)(c2) << 16 ) | ( (DWORD)(BYTE)(c3) << 24 ) )
819#define ANI_RIFF_ID RIFF_FOURCC('R', 'I', 'F', 'F')
820#define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T')
821#define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N')
822#define ANI_anih_ID RIFF_FOURCC('a', 'n', 'i', 'h')
823#define ANI_seq__ID RIFF_FOURCC('s', 'e', 'q', ' ')
824#define ANI_fram_ID RIFF_FOURCC('f', 'r', 'a', 'm')
825#define ANI_rate_ID RIFF_FOURCC('r', 'a', 't', 'e')
827#define ANI_FLAG_ICON 0x1
828#define ANI_FLAG_SEQUENCE 0x2
858 TRACE(
" display rate: %d\n",
header->display_rate);
865 const unsigned char *
ptr = parent_chunk->
data;
872 if ((!chunk_type && *(
const DWORD *)
ptr == chunk_id )
873 || (chunk_type && *(
const DWORD *)
ptr == chunk_type && *((
const DWORD *)
ptr + 2) == chunk_id ))
905 const unsigned char *icon_chunk;
906 const unsigned char *icon_data;
910 if (!ACON_chunk.
data)
912 ERR(
"Failed to get root chunk.\n");
918 if (!ACON_chunk.
data)
920 ERR(
"Failed to get header chunk.\n");
928 pCurData->cpcur =
pHeader->num_frames;
929 pCurData->cicur =
pHeader->num_steps;
930 pCurData->iicur =
pHeader->display_rate;
938 ERR(
"No sequence data although the flag is set!\n");
946 pCurData->ajifRate = (
INT*)rate_chunk.
data;
950 if (!fram_chunk.
data)
952 ERR(
"Failed to get icon list.\n");
955 icon_chunk = fram_chunk.
data;
956 icon_data = fram_chunk.
data + (2 *
sizeof(
DWORD));
963 if(!pCurData->aspcur)
968 pCurData->aicur = (
DWORD*)(pCurData->aspcur +
pHeader->num_frames);
969 pCurData->ajifRate = (
INT*)(pCurData->aicur +
pHeader->num_steps);
979 pFrameData = &pCurData->
aspcur[
i];
981 pFrameData = pCurData;
983 pFrameData->
rt = pCurData->rt;
997 ERR(
"Unable to find the right file entry for frame %d.\n",
i);
1004 pFrameData->
cx = pDirEntry->
bWidth;
1031 icon_chunk += chunk_size + (2 *
sizeof(
DWORD));
1032 icon_data = icon_chunk + (2 *
sizeof(
DWORD));
1043 pCurData->ajifRate[
i] =
pHeader->display_rate;
1053 pCurData->aicur[
i] =
i;
1099 if (pbmfh->
bfType != 0x4d42 )
1101 WARN(
"Invalid/unsupported bitmap format!\n");
1138 cyDesired = -cyDesired;
1157 COLORREF crWindow, cr3DShadow, cr3DFace, cr3DLight;
1164 numColors = 1 <<
bpp;
1174 if(numColors > 256) numColors = 256;
1175 if (!numColors && (
bpp <= 8)) numColors = 1 <<
bpp;
1194 case 1: pixel >>= 7;
break;
1195 case 4: pixel >>= 4;
break;
1198 FIXME(
"Unhandled bit depth %d.\n",
bpp);
1202 if(pixel >= numColors)
1204 ERR(
"Wrong pixel passed in.\n");
1220 for(
i = 0;
i<numColors;
i++)
1223 if((
ptr->rgbtBlue ==
ptr->rgbtRed) && (
ptr->rgbtBlue ==
ptr->rgbtGreen))
1225 if(
ptr->rgbtBlue == 128)
1231 if(
ptr->rgbtBlue == 192)
1237 if(
ptr->rgbtBlue == 223)
1273 if(cyDesired < 0) cyDesired = -cyDesired;
1304 ERR(
"StretchDIBits failed!.\n");
1367 if(!cxDesired) cxDesired =
entry->bWidth;
1368 if(!cyDesired) cyDesired =
entry->bHeight;
1496 TRACE(
"Checking for an LR_SHARED cursor/icon.\n");
1498 param.bIcon = bIcon;
1499 param.cx = cxDesired;
1500 param.cy = cyDesired;
1505 TRACE(
"MATCH! %p\n",hCurIcon);
1556 if(
dir->idType == 2)
1564 cursorData.
cx = cxDesired;
1565 cursorData.
cy = cyDesired;
1629 if (!objSize)
return 0;
1630 if ((desiredx < 0) || (desiredy < 0))
return 0;
1634 FIXME(
"The flag LR_COPYFROMRESOURCE is not implemented for bitmaps\n");
1639 FIXME(
"The flag LR_COPYRETURNORG is not implemented for bitmaps\n");
1642 if (desiredx == 0) desiredx =
ds.dsBm.bmWidth;
1643 if (desiredy == 0) desiredy =
ds.dsBm.bmHeight;
1695 if (!monochrome &&
ds.dsBm.bmBitsPixel == 1)
1719 else if (!monochrome)
1721 monochrome =
ds.dsBm.bmBitsPixel == 1;
1744 copyContents =
TRUE;
1752 copyContents = (
ds.dsBm.bmBitsPixel == 1 ||
ds.dsBm.bmBitsPixel == screen_depth);
1785 0, 0,
ds.dsBm.bmWidth,
ds.dsBm.bmHeight,
1829 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
1852 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
1865 TRACE(
"Got module %wZ, resource %p (%S).\n", &ustrModule,
1902 FIXME(
"Unimplemented flags: 0x%08x\n", fuFlags);
1906 ERR(
"GetIconInfo failed.\n");
1964 TRACE(
"hImage=%p, uType=%u, cxDesired=%d, cyDesired=%d, fuFlags=%x\n",
1965 hImage, uType, cxDesired, cyDesired, fuFlags);
2005 _In_opt_ HBRUSH hbrFlickerFreeDraw,
2010 istepIfAniCur, hbrFlickerFreeDraw, diFlags,
2181 TRACE(
"hinst 0x%p, name %s, uType 0x%08x, cxDesired %d, cyDesired %d, fuLoad 0x%08x.\n",
2219 int i, numMatch = 0, iIndex = -1;
2222 ULONG bestScore = 0xFFFFFFFF, score;
2224 TRACE(
"%p, %x, %i, %i, %x.\n", presbits, fIcon, cxDesired, cyDesired,
Flags);
2226 if(!(
dir && !
dir->idReserved && (
dir->idType & 3)))
2228 WARN(
"Invalid resource.\n");
2251 for(
i = 0;
i <
dir->idCount;
i++)
2254 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2256 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2262 if( score > bestScore)
2265 if(
width > cxDesired)
2266 score -=
width - cxDesired;
2268 score -=
height - cyDesired;
2269 if(score > bestScore)
2271 if(score == bestScore)
2273 if(
entry->wBitCount > BitCount)
2274 BitCount =
entry->wBitCount;
2281 BitCount =
entry->wBitCount;
2287 return dir->idEntries[iIndex].wResId;
2291 if (bppDesired > 8 && BitCount > 8)
2297 for(
i = 0;
i <
dir->idCount;
i++)
2300 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2301 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2307 if(
width > cxDesired)
2308 score -=
width - cxDesired;
2310 score -=
height - cyDesired;
2311 if(score != bestScore)
2314 if(
entry->wBitCount == bppDesired)
2315 return entry->wResId;
2317 if((
entry->wBitCount > BitCount) && (
entry->wBitCount < bppDesired))
2320 if ((
entry->wBitCount <= 8) && notPaletted)
2323 BitCount =
entry->wBitCount;
2328 return dir->idEntries[iIndex].wResId;
2333 for(
i = 0;
i <
dir->idCount;
i++)
2336 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2337 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2343 if(
width > cxDesired)
2344 score -=
width - cxDesired;
2346 score -=
height - cyDesired;
2347 if(score != bestScore)
2350 if(
entry->wBitCount < BitCount)
2352 if((
entry->wBitCount <= 8) && notPaletted)
2355 BitCount =
entry->wBitCount;
2359 return dir->idEntries[iIndex].wResId;
2377 TRACE_(icon)(
"%dx%d, planes %d, bpp %d, xor %p, and %p\n",
2378 nWidth, nHeight, cPlanes, cBitsPixel, lpbXORbits, lpbANDbits);
2383 if (cPlanes * cBitsPixel > 1)
2426 TRACE(
"%p, %lu, %lu, %lu, %i, %i, %lu.\n", pbIconBits, cbIconBits, fIcon, dwVersion, cxDesired, cyDesired,
uFlags);
2435 cursorData.
cx = cxDesired;
2436 cursorData.
cy = cyDesired;
2440 if(!
memcmp(pbIconBits,
"RIFF", 4))
2444 ERR(
"Could not get cursor data from .ani.\n");
2464 TRACE(
"Pointer points to a directory structure.\n");
2467 if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
2475 if((fIcon && pCurIconDir->
idType == 2) || (!fIcon && pCurIconDir->
idType == 1))
2477 WARN(
"Got a %s directory pointer, but called for a %s\n", fIcon ?
"cursor" :
"icon", fIcon ?
"icon" :
"cursor");
2510 ERR(
"Couldn't fill the CURSORDATA structure.\n");
2529 ERR(
"NtUserSetCursorIconData failed.\n");
2558 TRACE(
"%p.\n", piconinfo);
2575 TRACE(
"Returning 0x%08x.\n", hiconRet);
2602 nWidth, nHeight, xHotSpot, yHotSpot, pvXORPlane, pvANDPlane);
2605 info.xHotspot = xHotSpot;
2606 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
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 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::@4914 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)
#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