47#define PNG_CHECK_SIG_SIZE 8
67 ERR(
"png read error\n");
68 png_error(
png_ptr,
"read error in ReadMemoryPng");
79 static BOOL bLibPngFound = -1;
80 if (bLibPngFound == -1)
83 bLibPngFound = !!hLibPng;
98 TRACE(
"pngBits %p fileSize %d\n", pngBits, fileSize);
102 ERR(
"No libpng.dll\n");
112 ERR(
"png_create_read_struct error\n");
119 ERR(
"png_create_info_struct error\n");
135 png_set_palette_to_rgb(
png_ptr);
145 TRACE(
"width %d, height %d, bitDepth %d, colorType %d\n",
157 ERR(
"png_malloc failed\n");
164 rows[
i] = png_malloc(
png_ptr, rowbytes);
167 ERR(
"png_malloc failed\n");
188 PBYTE pb = imageBytes;
212 ERR(
"HeapAlloc failed\n");
245 ERR(
"HeapAlloc failed\n");
251 PBYTE pb = pbBmpIcon;
265#undef MAKEINTRESOURCE
266#define MAKEINTRESOURCE MAKEINTRESOURCEW
272 if (!
gpsi->hIconSmWindows)
274 ERR(
"Loading System Cursors\n");
298 ULONG ArgumentLength)
300 BOOL *DefaultCursor = (
BOOL*)Arguments;
374 if (
RGB(
rgb[0].rgbtRed,
rgb[0].rgbtGreen,
rgb[0].rgbtBlue) ==
378 return RGB(
rgb[1].rgbtRed,
rgb[1].rgbtGreen,
rgb[1].rgbtBlue) ==
379 RGB(0xff, 0xff, 0xff);
383 if (
RGB(
rgb[0].rgbtRed,
rgb[0].rgbtGreen,
rgb[0].rgbtBlue) ==
384 RGB(0xff, 0xff, 0xff))
387 return (
RGB(
rgb[1].rgbtRed,
rgb[1].rgbtGreen,
rgb[1].rgbtBlue) ==
397 if (
info->bmiHeader.biBitCount != 1)
return FALSE;
401 rgb[0].rgbReserved) ==
RGBA(0, 0, 0, 0))
405 rgb[1].rgbReserved) ==
RGBA(0xff, 0xff, 0xff, 0);
410 rgb[0].rgbReserved) ==
RGBA(0xff, 0xff, 0xff, 0))
414 rgb[1].rgbReserved) ==
RGBA(0, 0, 0, 0));
436 colors =
info->bmiHeader.biClrUsed;
439 if (!colors && (
info->bmiHeader.biBitCount <= 8))
440 colors = 1 <<
info->bmiHeader.biBitCount;
452 (
info->bmiHeader.biBitCount == 16 ||
info->bmiHeader.biBitCount == 32))
466 #define HighBitDetect 0x89
480 header->biSize ==
sizeof(BITMAPV5HEADER))
490 TRACE(
"We have a PNG icon\n");
495 ERR(
"Unknown/wrong size for header of 0x%x\n",
header->biSize );
525 info->bmiHeader.biXPelsPerMeter = 0;
526 info->bmiHeader.biYPelsPerMeter = 0;
527 info->bmiHeader.biClrUsed = 0;
528 info->bmiHeader.biClrImportant = 0;
539 StretchBlt( hdc_dst, 0, 0, dst_width, dst_height,
hdc, 0, 0, bm.
bmWidth, bm.
bmHeight,
SRCCOPY );
553 const unsigned char *
ptr =
bits;
555 if (
info->bmiHeader.biBitCount != 32)
return FALSE;
556 for (
i = 0;
i <
info->bmiHeader.biWidth *
abs(
info->bmiHeader.biHeight);
i++,
ptr += 4)
557 if ((has_alpha = (
ptr[3] != 0)))
break;
596 TRACE(
"Creating alpha bitmap from existing bitmap.\n");
611 info->bmiHeader.biPlanes = 1;
612 info->bmiHeader.biBitCount = 32;
615 info->bmiHeader.biXPelsPerMeter = 0;
616 info->bmiHeader.biYPelsPerMeter = 0;
617 info->bmiHeader.biClrUsed = 0;
618 info->bmiHeader.biClrImportant = 0;
655 LONG orig_width, orig_height;
657 TRACE(
"Creating alpha bitmap from bitmap info.\n");
689 src_info->bmiHeader.biWidth =
width;
690 src_info->bmiHeader.biHeight =
height;
702 src_info->bmiHeader.biWidth = orig_width;
703 src_info->bmiHeader.biHeight = orig_height;
715 0, 0, orig_width, orig_height,
774 for(
i = 0;
i<
dir->idCount;
i++)
782 ERR(
"Corrupted icon file?.\n");
816 WARN(
"Unable to get a fit entry index.\n");
821 return &
dir->idEntries[
i-1];
841 ptHotSpot->x =
entry->xHotspot;
842 ptHotSpot->y =
entry->yHotspot;
846 return entry->dwDIBOffset;
870 const VOID *pvColor, *pvMask;
921 pvColor = (
const char*)
pbmi + ubmiSize;
922 pvMask = (
const char*)pvColor +
969 rgb[0].rgbBlue =
rgb[0].rgbGreen =
rgb[0].rgbRed = 0x00;
970 rgb[1].rgbBlue =
rgb[1].rgbGreen =
rgb[1].rgbRed = 0xff;
971 rgb[0].rgbReserved =
rgb[1].rgbReserved = 0;
979 rgb[1].rgbtBlue =
rgb[1].rgbtGreen =
rgb[1].rgbtRed = 0xff;
1012 ZeroMemory(pCursorData,
sizeof(*pCursorData));
1013 if(pIconInfo->hbmColor)
1020 if (!
GetObject(pIconInfo->hbmMask,
sizeof(bm), &bm))
1033 if (!pCursorData->hbmColor)
1050 if(!pCursorData->hbmMask)
1055 if(pCursorData->hbmColor)
1057 GetObject(pCursorData->hbmColor,
sizeof(bm), &bm);
1061 if(pCursorData->bpp == 32)
1066 GetObject(pCursorData->hbmMask,
sizeof(bm), &bm);
1067 pCursorData->bpp = 1;
1072 if(pIconInfo->fIcon)
1074 pCursorData->xHotspot = pCursorData->cx/2;
1075 pCursorData->yHotspot = pCursorData->cy/2;
1079 pCursorData->xHotspot = pIconInfo->xHotspot;
1080 pCursorData->yHotspot = pIconInfo->yHotspot;
1087#define RIFF_FOURCC( c0, c1, c2, c3 ) \
1088 ( (DWORD)(BYTE)(c0) | ( (DWORD)(BYTE)(c1) << 8 ) | \
1089 ( (DWORD)(BYTE)(c2) << 16 ) | ( (DWORD)(BYTE)(c3) << 24 ) )
1091#define ANI_RIFF_ID RIFF_FOURCC('R', 'I', 'F', 'F')
1092#define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T')
1093#define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N')
1094#define ANI_anih_ID RIFF_FOURCC('a', 'n', 'i', 'h')
1095#define ANI_seq__ID RIFF_FOURCC('s', 'e', 'q', ' ')
1096#define ANI_fram_ID RIFF_FOURCC('f', 'r', 'a', 'm')
1097#define ANI_rate_ID RIFF_FOURCC('r', 'a', 't', 'e')
1099#define ANI_FLAG_ICON 0x1
1100#define ANI_FLAG_SEQUENCE 0x2
1102#include <pshpack1.h>
1130 TRACE(
" display rate: %d\n",
header->display_rate);
1137 const unsigned char *
ptr = parent_chunk->
data;
1144 if ((!chunk_type && *(
const DWORD *)
ptr == chunk_id )
1145 || (chunk_type && *(
const DWORD *)
ptr == chunk_type && *((
const DWORD *)
ptr + 2) == chunk_id ))
1177 const unsigned char *icon_chunk;
1178 const unsigned char *icon_data;
1182 if (!ACON_chunk.
data)
1184 ERR(
"Failed to get root chunk.\n");
1190 if (!ACON_chunk.
data)
1192 ERR(
"Failed to get header chunk.\n");
1200 pCurData->cpcur =
pHeader->num_frames;
1201 pCurData->cicur =
pHeader->num_steps;
1202 pCurData->iicur =
pHeader->display_rate;
1208 if (!seq_chunk.
data)
1210 ERR(
"No sequence data although the flag is set!\n");
1217 if (rate_chunk.
data)
1218 pCurData->ajifRate = (
INT*)rate_chunk.
data;
1222 if (!fram_chunk.
data)
1224 ERR(
"Failed to get icon list.\n");
1227 icon_chunk = fram_chunk.
data;
1228 icon_data = fram_chunk.
data + (2 *
sizeof(
DWORD));
1235 if(!pCurData->aspcur)
1240 pCurData->aicur = (
DWORD*)(pCurData->aspcur +
pHeader->num_frames);
1241 pCurData->ajifRate = (
INT*)(pCurData->aicur +
pHeader->num_steps);
1247 const DWORD chunk_size = *(
const DWORD *)(icon_chunk +
sizeof(
DWORD));
1251 pFrameData = &pCurData->
aspcur[
i];
1253 pFrameData = pCurData;
1255 pFrameData->
rt = pCurData->rt;
1269 ERR(
"Unable to find the right file entry for frame %d.\n",
i);
1276 pFrameData->
cx = pDirEntry->
bWidth;
1303 icon_chunk += chunk_size + (2 *
sizeof(
DWORD));
1304 icon_data = icon_chunk + (2 *
sizeof(
DWORD));
1315 pCurData->ajifRate[
i] =
pHeader->display_rate;
1325 pCurData->aicur[
i] =
i;
1371 if (pbmfh->
bfType != 0x4d42 )
1373 WARN(
"Invalid/unsupported bitmap format!\n");
1406 WARN(
"Possibly bad resource size provided\n");
1419 cyDesired = -cyDesired;
1432 TRACE(
"Size Image %d, Size Header %d, ResSize %d\n",
1443 pvBits = (
char*)pvBits - 12;
1444 WARN(
"Found GCC Resource Compiled 16-bpp or 32-bpp error\n");
1453 COLORREF crWindow, cr3DShadow, cr3DFace, cr3DLight;
1460 numColors = 1 <<
bpp;
1470 if(numColors > 256) numColors = 256;
1471 if (!numColors && (
bpp <= 8)) numColors = 1 <<
bpp;
1490 case 1: pixel >>= 7;
break;
1491 case 4: pixel >>= 4;
break;
1494 FIXME(
"Unhandled bit depth %d.\n",
bpp);
1498 if(pixel >= numColors)
1500 ERR(
"Wrong pixel passed in.\n");
1516 for(
i = 0;
i<numColors;
i++)
1519 if((
ptr->rgbtBlue ==
ptr->rgbtRed) && (
ptr->rgbtBlue ==
ptr->rgbtGreen))
1521 if(
ptr->rgbtBlue == 128)
1527 if(
ptr->rgbtBlue == 192)
1533 if(
ptr->rgbtBlue == 223)
1569 if(cyDesired < 0) cyDesired = -cyDesired;
1600 ERR(
"StretchDIBits failed!.\n");
1639 DWORD filesize = 0, BmpIconSize;
1663 if(!cxDesired) cxDesired =
entry->bWidth;
1664 if(!cyDesired) cyDesired =
entry->bHeight;
1693 ERR(
"Failing file: '%S'.\n", lpszName);
1697 TRACE(
"Processing PNG/Vista icon: '%S'\n", lpszName);
1760 #define IDI_SHIELD MAKEINTRESOURCE(32518)
1769 if ((
id | 2) == 103)
1792 LPCWSTR fakeNameFmt =
sizeof(
void*) > 4 ?
L"\x01%016IX" :
L"\x01%08IX";
1841 TRACE(
"Checking for an LR_SHARED cursor/icon.\n");
1843 param.bIcon = bIcon;
1844 param.cx = cxDesired;
1845 param.cy = cyDesired;
1850 TRACE(
"MATCH! %p\n",hCurIcon);
1901 if(
dir->idType == 2)
1909 cursorData.
cx = cxDesired;
1910 cursorData.
cy = cyDesired;
1974 if (!objSize)
return 0;
1975 if ((desiredx < 0) || (desiredy < 0))
return 0;
1979 FIXME(
"The flag LR_COPYFROMRESOURCE is not implemented for bitmaps\n");
1984 FIXME(
"The flag LR_COPYRETURNORG is not implemented for bitmaps\n");
1987 if (desiredx == 0) desiredx =
ds.dsBm.bmWidth;
1988 if (desiredy == 0) desiredy =
ds.dsBm.bmHeight;
2040 if (!monochrome &&
ds.dsBm.bmBitsPixel == 1)
2064 else if (!monochrome)
2066 monochrome =
ds.dsBm.bmBitsPixel == 1;
2089 copyContents =
TRUE;
2097 copyContents = (
ds.dsBm.bmBitsPixel == 1 ||
ds.dsBm.bmBitsPixel == screen_depth);
2130 0, 0,
ds.dsBm.bmWidth,
ds.dsBm.bmHeight,
2174 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
2197 if (!NtUserGetIconInfo(hicon,
NULL, &ustrModule, &ustrRsrc,
NULL,
FALSE))
2210 TRACE(
"Got module %wZ, resource %p (%S).\n", &ustrModule,
2247 FIXME(
"Unimplemented flags: 0x%08x\n", fuFlags);
2251 ERR(
"GetIconInfo failed.\n");
2301#define COPYIMAGE_VALID_FLAGS ( \
2302 LR_SHARED | LR_COPYFROMRESOURCE | LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS | 0x800 | \
2303 LR_VGACOLOR | LR_LOADREALSIZE | LR_DEFAULTSIZE | LR_LOADTRANSPARENT | LR_LOADFROMFILE | \
2304 LR_COPYDELETEORG | LR_COPYRETURNORG | LR_COLOR | LR_MONOCHROME \
2315 TRACE(
"hImage=%p, uType=%u, cxDesired=%d, cyDesired=%d, fuFlags=%x\n",
2316 hImage, uType, cxDesired, cyDesired, fuFlags);
2352 ERR(
"GetIconInfo Failed. hImage %p\n", hImage);
2357 ERR(
"GetObject Failed. iconinfo %p\n", iconinfo);
2405 _In_opt_ HBRUSH hbrFlickerFreeDraw,
2410 istepIfAniCur, hbrFlickerFreeDraw, diFlags,
2581 TRACE(
"hinst 0x%p, name %s, uType 0x%08x, cxDesired %d, cyDesired %d, fuLoad 0x%08x.\n",
2619 int i, numMatch = 0, iIndex = -1;
2622 ULONG bestScore = 0xFFFFFFFF, score;
2624 TRACE(
"%p, %x, %i, %i, %x.\n", presbits, fIcon, cxDesired, cyDesired,
Flags);
2626 if(!(
dir && !
dir->idReserved && (
dir->idType & 3)))
2628 WARN(
"Invalid resource.\n");
2651 for(
i = 0;
i <
dir->idCount;
i++)
2654 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2656 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2662 if( score > bestScore)
2665 if(
width > cxDesired)
2666 score -=
width - cxDesired;
2668 score -=
height - cyDesired;
2669 if(score > bestScore)
2671 if(score == bestScore)
2673 if(
entry->wBitCount > BitCount)
2674 BitCount =
entry->wBitCount;
2681 BitCount =
entry->wBitCount;
2687 return dir->idEntries[iIndex].wResId;
2691 if (bppDesired > 8 && BitCount > 8)
2697 for(
i = 0;
i <
dir->idCount;
i++)
2700 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2701 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2707 if(
width > cxDesired)
2708 score -=
width - cxDesired;
2710 score -=
height - cyDesired;
2711 if(score != bestScore)
2714 if(
entry->wBitCount == bppDesired)
2715 return entry->wResId;
2717 if((
entry->wBitCount > BitCount) && (
entry->wBitCount < bppDesired))
2720 if ((
entry->wBitCount <= 8) && notPaletted)
2723 BitCount =
entry->wBitCount;
2728 return dir->idEntries[iIndex].wResId;
2733 for(
i = 0;
i <
dir->idCount;
i++)
2736 width = fIcon ?
entry->ResInfo.icon.bWidth :
entry->ResInfo.cursor.wWidth;
2737 height = fIcon ?
entry->ResInfo.icon.bHeight :
entry->ResInfo.cursor.wHeight/2;
2743 if(
width > cxDesired)
2744 score -=
width - cxDesired;
2746 score -=
height - cyDesired;
2747 if(score != bestScore)
2750 if(
entry->wBitCount < BitCount)
2752 if((
entry->wBitCount <= 8) && notPaletted)
2755 BitCount =
entry->wBitCount;
2759 return dir->idEntries[iIndex].wResId;
2777 TRACE_(icon)(
"%dx%d, planes %d, bpp %d, xor %p, and %p\n",
2778 nWidth, nHeight, cPlanes, cBitsPixel, lpbXORbits, lpbANDbits);
2783 if (cPlanes * cBitsPixel > 1)
2828 TRACE(
"%p, %lu, %lu, %lu, %i, %i, %lu.\n", pbIconBits, cbIconBits, fIcon,
dwVersion, cxDesired, cyDesired,
uFlags);
2830 if (!pbIconBits || cbIconBits < 2 *
sizeof(
DWORD))
2832 ERR(
"Invalid IconBits array\n");
2843 cursorData.
cx = cxDesired;
2844 cursorData.
cy = cyDesired;
2848 if(!
memcmp(pbIconBits,
"RIFF", 4))
2852 ERR(
"Could not get cursor data from .ani.\n");
2872 TRACE(
"Pointer points to a directory structure.\n");
2875 if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
2883 if((fIcon && pCurIconDir->
idType == 2) || (!fIcon && pCurIconDir->
idType == 1))
2885 WARN(
"Got a %s directory pointer, but called for a %s\n", fIcon ?
"cursor" :
"icon", fIcon ?
"icon" :
"cursor");
2937 ERR(
"Couldn't get cursor/icon data\n");
2952 ERR(
"NtUserSetCursorIconData failed.\n");
2983 TRACE(
"%p.\n", piconinfo);
3000 TRACE(
"Returning 0x%08x.\n", hiconRet);
3027 nWidth, nHeight, xHotSpot, yHotSpot, pvXORPlane, pvANDPlane);
3030 info.xHotspot = xHotSpot;
3031 info.yHotspot = yHotSpot;
#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)
#define IS_INTRESOURCE(x)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLsizei GLsizei GLsizei depth
GLclampf GLclampf GLclampf alpha
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei imageSize
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLsizei GLsizei * length
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
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 GLint GLint j
FxContextHeader * pHeader
#define CURSORF_FROMRESOURCE
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
#define CURSORF_ACONFRAME
#define RtlFillMemory(Dest, Length, Fill)
#define LDR_IS_RESOURCE(handle)
#define memcpy(s1, s2, n)
#define FILE_FLAG_RANDOM_ACCESS
static const BYTE masks[8]
#define PNG_COLOR_TYPE_GRAY_ALPHA
#define PNG_COLOR_TYPE_GRAY
#define PNG_COLOR_TYPE_PALETTE
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)
png_voidp PNGAPI png_get_io_ptr(png_const_structrp png_ptr)
#define png_check_sig(sig, n)
#define PNG_LIBPNG_VER_STRING
png_const_structrp png_const_inforp info_ptr
union CURSORICONDIRENTRY::@5417 ResInfo
CURSORICONDIRENTRY idEntries[1]
CURSORICONFILEDIRENTRY idEntries[1]
CURSORICONFILEDIRENTRY 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)
#define RtlZeroMemory(Destination, 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)
#define PNG_CHECK_SIG_SIZE
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 PBYTE CURSORICON_ConvertPngToBmpIcon(_In_ PBYTE pngBits, _In_ DWORD fileSize, _Out_ PDWORD pBmpIconSize)
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 BOOL LibPngExists(VOID)
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)
static VOID ReadMemoryPng(_Inout_ png_structp png_ptr, _Out_ png_bytep data, _In_ size_t length)
struct _PNG_READER_STATE PNG_READER_STATE
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)
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