56#define RIFF_FOURCC( c0, c1, c2, c3 ) \
57 ( (DWORD)(BYTE)(c0) | ( (DWORD)(BYTE)(c1) << 8 ) | \
58 ( (DWORD)(BYTE)(c2) << 16 ) | ( (DWORD)(BYTE)(c3) << 24 ) )
60#define ANI_RIFF_ID RIFF_FOURCC('R', 'I', 'F', 'F')
61#define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T')
62#define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N')
63#define ANI_anih_ID RIFF_FOURCC('a', 'n', 'i', 'h')
64#define ANI_seq__ID RIFF_FOURCC('s', 'e', 'q', ' ')
65#define ANI_fram_ID RIFF_FOURCC('f', 'r', 'a', 'm')
66#define ANI_icon_ID RIFF_FOURCC('i', 'c', 'o', 'n')
67#define ANI_rate_ID RIFF_FOURCC('r', 'a', 't', 'e')
69#define ANI_FLAG_ICON 0x1
70#define ANI_FLAG_SEQUENCE 0x2
154#define EMPTY_ICON32 \
157 sizeof(ani_frame32x32x32), \
171 sizeof(ani_data32x32x32), \
172 sizeof(CURSORICONFILEDIR) \
177 sizeof(BITMAPINFOHEADER), \
280 { 0xc0de, 0xcafe, 0xbabe}
302#define PROC_INIT (WM_USER+1)
333 ok(!
ret,
"DestroyCursor on the active cursor succeeded.\n");
336 "Last error: %lu\n",
error);
367 class.cbClsExtra = 0;
368 class.cbWndExtra = 0;
371 class.hCursor =
NULL;
372 class.hbrBackground =
NULL;
373 class.lpszMenuName =
NULL;
374 class.lpszClassName =
"cursor_child";
382 0, 0, 200, 200, 0, 0, 0,
NULL);
409 class.cbClsExtra = 0;
410 class.cbWndExtra = 0;
413 class.hCursor =
NULL;
414 class.hbrBackground =
NULL;
415 class.lpszMenuName =
NULL;
416 class.lpszClassName =
"cursor_parent";
424 0, 0, 200, 200, 0, 0, 0,
NULL);
434 ok(
CreateProcessA(
NULL,
path_name,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed.\n");
455 static const BYTE bmp_bits[4096];
486 return (
a & 0x00F8F8F8) == (
b & 0x00F8F8F8);
490 INT expectedWidth,
INT expectedHeight,
WORD expectedDepth,
BOOL dibExpected)
509 origBitmap.
bmBits ?
"DIB" :
"DDB",
type,
flags, copyWidth, copyHeight);
546 if (copy_is_dib && dibExpected
548 && (expectedDepth == 16 || expectedDepth == 32))
573 ok(copy_is_dib == dibExpected,
"Expected %s, got %s\n",
574 dibExpected ?
"DIB" :
"DDB", copy_is_dib ?
"DIB" :
"DDB");
575 ok(copyBitmap.
bmWidth == expectedWidth,
"Expected width %u, got %u\n",
576 expectedWidth, copyBitmap.
bmWidth);
577 ok(copyBitmap.
bmHeight == expectedHeight,
"Expected height %u, got %u\n",
578 expectedHeight, copyBitmap.
bmHeight);
580 ok(copyBitmap.
bmBitsPixel == expectedDepth ||
broken(copyBitmap.
bmBitsPixel == display_bpp && expectedDepth == 32),
"Expected depth %u, got %u\n",
583 ok(copyBitmap.
bmBitsPixel == expectedDepth,
"Expected depth %u, got %u\n",
595 ok(!copyBitmap.
bmBits,
"Expected DDB\n");
596 ok(copyBitmap.
bmWidth == expectedWidth,
"Expected mask width %u, got %u\n",
597 expectedWidth, copyBitmap.
bmWidth);
598 ok(copyBitmap.
bmHeight == expectedHeight,
"Expected mask height %u, got %u\n",
599 expectedHeight, copyBitmap.
bmHeight);
625 info->bmiHeader.biSize =
sizeof(
info->bmiHeader);
626 info->bmiHeader.biWidth = 2;
627 info->bmiHeader.biHeight = 2;
628 info->bmiHeader.biPlanes = 1;
632 for (
i=0;
i < 256;
i++)
634 info->bmiColors[
i].rgbRed =
i;
635 info->bmiColors[
i].rgbGreen =
i;
636 info->bmiColors[
i].rgbBlue = 255 -
i;
637 info->bmiColors[
i].rgbReserved = 0;
717 info->bmiHeader.biBitCount = 1;
718 info->bmiColors[0].rgbRed = 0xFF;
719 info->bmiColors[0].rgbGreen = 0;
720 info->bmiColors[0].rgbBlue = 0;
721 info->bmiColors[1].rgbRed = 0;
722 info->bmiColors[1].rgbGreen = 0xFF;
723 info->bmiColors[1].rgbBlue = 0;
732 info->bmiHeader.biBitCount = 1;
733 info->bmiColors[0].rgbRed = 0;
734 info->bmiColors[0].rgbGreen = 0;
735 info->bmiColors[0].rgbBlue = 0;
736 info->bmiColors[1].rgbRed = 0xFF;
737 info->bmiColors[1].rgbGreen = 0xFF;
738 info->bmiColors[1].rgbBlue = 0xFF;
747 info->bmiHeader.biBitCount = 1;
748 info->bmiColors[0].rgbRed = 0xFF;
749 info->bmiColors[0].rgbGreen = 0xFF;
750 info->bmiColors[0].rgbBlue = 0xFF;
751 info->bmiColors[1].rgbRed = 0;
752 info->bmiColors[1].rgbGreen = 0;
753 info->bmiColors[1].rgbBlue = 0;
778 ok(
cursor == cursor2,
"cursor (%p) is not IDC_WAIT (%p).\n",
cursor, cursor2);
781 ok(
error == 0xdeadbeef,
"Last error: 0x%08lx\n",
error);
793 ok_(__FILE__,
line)(
ret,
"GetIconInfo failed\n");
796 ok_(__FILE__,
line)(
info.xHotspot == exp_cx/2,
"info.xHotspot = %lu\n",
info.xHotspot);
797 ok_(__FILE__,
line)(
info.yHotspot == exp_cy/2,
"info.yHotspot = %lu\n",
info.yHotspot);
798 ok_(__FILE__,
line)(
info.hbmMask != 0,
"info.hbmMask is NULL\n");
802 unsigned int exp_stride = (exp_cx + 7) / 8;
803 exp_stride = (exp_stride + 1) & ~1;
805 ok_(__FILE__,
line)(
ret == exp_stride * exp_mask_cy,
"GetBitmapBits returned %lu\n",
ret);
806 ok_(__FILE__,
line)(!
memcmp(ret_bits, mask_bits,
ret),
"mask bitmap didn't match\n");
810 ok_(__FILE__,
line)(
ret ==
sizeof(bmMask),
"GetObject(info.hbmMask) failed, ret %lu\n",
ret);
812 ok_(__FILE__,
line)(!!
info.hbmColor == has_color,
"got hbmColor %p\n",
info.hbmColor);
824 ok_(__FILE__,
line)(
ret ==
sizeof(bmColor),
"GetObject(info.hbmColor) failed, ret %lu\n",
ret);
828 "bmColor.bmBitsPixel = %d\n", bmColor.
bmBitsPixel);
831 "bmColor.bmBitsPixel = %d\n", bmColor.
bmBitsPixel);
850 memset( &infoex, 0xcc,
sizeof(infoex) );
852 infoex.
cbSize =
sizeof(infoex) - 1;
853 ret = pGetIconInfoExA(
hIcon, &infoex );
854 ok_(__FILE__,
line)(!
ret,
"GetIconInfoEx succeeded\n");
858 infoex.
cbSize =
sizeof(infoex) + 1;
859 ret = pGetIconInfoExA(
hIcon, &infoex );
860 ok_(__FILE__,
line)(!
ret,
"GetIconInfoEx succeeded\n");
864 infoex.
cbSize =
sizeof(infoex);
865 ret = pGetIconInfoExA( (
HICON)0xdeadbabe, &infoex );
866 ok_(__FILE__,
line)(!
ret,
"GetIconInfoEx succeeded\n");
870 infoex.
cbSize =
sizeof(infoex);
871 ret = pGetIconInfoExA(
hIcon, &infoex );
879#define test_icon_info(a,b,c,d,e,f,g) test_icon_info_(a,b,c,d,e,f,g,__LINE__)
893 for (
i = 0;
i <
sizeof(bmp_bits); ++
i)
894 bmp_bits[
i] = 111 *
i;
905 ok(
hIcon != 0,
"CreateIcon failed\n");
910 ok(
hIcon != 0,
"CreateCursor failed\n");
915 ok(
hIcon != 0,
"CreateIcon failed\n");
920 ok(hbmMask != 0,
"CreateBitmap failed\n");
921 hbmColor =
CreateBitmap(16, 16, 1, display_bpp, bmp_bits);
922 ok(hbmColor != 0,
"CreateBitmap failed\n");
931 ok(!
hIcon,
"CreateIconIndirect should fail\n");
938 info.hbmColor = hbmColor;
941 ok(!
hIcon,
"CreateIconIndirect should fail\n");
947 info.hbmMask = hbmMask;
948 info.hbmColor = hbmColor;
950 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
958 ok(hbmMask != 0,
"CreateBitmap failed\n");
963 info.hbmMask = hbmMask;
967 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
971 info.hbmMask = hbmMask;
972 info.hbmColor = hbmMask;
975 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
981 for (
i = 0;
i <= 4;
i++)
984 ok(hbmMask != 0,
"CreateBitmap failed\n");
989 info.hbmMask = hbmMask;
993 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
1000 ok(hbmMask != 0,
"CreateBitmap failed\n");
1002 info.hbmMask = hbmMask;
1006 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
1022 ok(hbmColor !=
NULL,
"Expected a handle to the DIB\n");
1027 ok(hbmMask !=
NULL,
"Expected a handle to the DIB\n");
1034 info.hbmMask = hbmColor;
1035 info.hbmColor = hbmMask;
1038 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
1045 ok(hbmColor !=
NULL,
"Expected a handle to the DIB\n");
1052 info.hbmMask = hbmColor;
1053 info.hbmColor = hbmMask;
1056 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
1063 ok(hbmColor !=
NULL,
"Expected a handle to the DIB\n");
1070 info.hbmMask = hbmColor;
1071 info.hbmColor = hbmMask;
1074 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
10880x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff,
10890xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
10950xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c,
10960x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05,
10970x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b,
10980x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13,
10990x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17,
11000x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05,
11010x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e,
11020x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
11030x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
11040x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0,
11050x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11,
11060x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
11070x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00,
11080x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4,
11090x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
11100x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
11110x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01,
11120x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9
11170x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
11180x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,
11190xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,
11200x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5,
11210x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41,
11220x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,
11230xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
11290x42,0x4d,0x46,0x00,0x00,0x00,0xDE,0xAD,0xBE,0xEF,0x42,0x00,0x00,0x00,0x28,0x00,
11300x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,
11310x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
11320x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0x55,0x55,0x55,0x00,0xFF,0xFF,
11330xFF,0xFF,0x00,0x00,0x00,0x00
11380x42,0x4d,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x0c,0x00,
11390x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x18,0x00,0xff,0xff,0xff,0x00
11440x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,
11450x39,0x62,0xfc,0xff,0x1a,0xe5,0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x02,0x00,
11460x02,0x00,0x00,0x02,0x03,0x14,0x16,0x05,0x00,0x3b
1151 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00
1163 sizeof(BITMAPV5HEADER) - 1,
1164 sizeof(BITMAPV5HEADER) + 1,
1179 ok(
ret ==
sizeof(bm),
"GetObject returned %ld\n",
ret);
1181 memset(&bmi, 0,
sizeof(bmi));
1191 ok(
color_match(pixel, 0x00ffffff),
"Pixel is 0x%08lx\n", pixel);
1213 ok(
ret && bytes_written ==
image_size,
"test file created improperly.\n");
1219 ok(
handle ==
NULL,
"IMAGE_CURSOR succeeded incorrectly\n");
1227 ok(
handle ==
NULL,
"IMAGE_ICON succeeded incorrectly\n");
1238 if (expect_success) {
1240 "IMAGE_BITMAP failed\n");
1243 else ok(
handle ==
NULL,
"IMAGE_BITMAP succeeded incorrectly\n");
1262 DWORD bytes_written;
1268 const unsigned icon_bpp = 32;
1271 for(
i=0;
i<entry_cnt;
i++)
1277 dir->idReserved = 0;
1279 dir->idCount = entry_cnt;
1282 for(
i=0;
i<entry_cnt;
i++) {
1283 icon_entry =
dir->idEntries+
i;
1310 ok(
ret && bytes_written ==
icon_size,
"icon.ico created improperly.\n");
1318 unsigned int clr_used, bmi_size, bits_size,
stride;
1321 DWORD bytes_written;
1325 clr_used =
h->biBitCount <= 8 ? 1u <<
h->biBitCount : 0;
1326 stride = ((
h->biBitCount *
h->biWidth + 7) / 8 + 3) & ~3;
1327 bits_size =
h->biHeight *
stride;
1328 bmi_size =
h->biSize + clr_used *
sizeof(
RGBQUAD);
1330 hdr.bfType = 0x4d42;
1332 hdr.bfSize =
hdr.bfOffBits + bits_size;
1333 hdr.bfReserved1 = 0;
1334 hdr.bfReserved2 = 0;
1339 ok(
ret && bytes_written ==
sizeof(
hdr),
"Unexpected WriteFile() result, ret %#x, bytes_written %lu.\n",
1340 ret, bytes_written);
1342 ok(
ret && bytes_written == bmi_size,
"Unexpected WriteFile() result, ret %#x, bytes_written %lu.\n",
1343 ret, bytes_written);
1345 ok(
ret && bytes_written == bits_size,
"Unexpected WriteFile() result, ret %#x, bytes_written %lu.\n",
1346 ret, bytes_written);
1352 DWORD bytes_written;
1368 ok(
ret && bytes_written ==
sizeof(
bmpimage),
"run %s: Test file created improperly.\n",
path);
1399 char old_PATH[10000];
1406 strcat(temp_dir_current,
"wine-test-dir-current\\");
1408 strcat(temp_dir_PATH,
"wine-test-dir-path\\");
1411 pos_slash =
strrchr(executable_path,
'\\') - executable_path;
1412 executable_path[pos_slash + 1] = 0;
1420 sprintf(new_PATH,
"%s;%s", old_PATH, temp_dir_PATH);
1445#define ICON_WIDTH 32
1446#define ICON_HEIGHT 32
1447#define ICON_AND_SIZE (ICON_WIDTH*ICON_HEIGHT/8)
1450 (sizeof(CURSORICONFILEDIR) + sizeof(BITMAPINFOHEADER) \
1451 + ICON_AND_SIZE + ICON_AND_SIZE*ICON_BPP)
1467 ok(
ret,
"GetIconInfo() failed.\n");
1480 if (pGetIconInfoExA)
1483 infoex.
cbSize =
sizeof(infoex);
1484 ret = pGetIconInfoExA(
handle, &infoex );
1486 ok( infoex.
wResID == 0,
"GetIconInfoEx wrong resid %x\n", infoex.
wResID );
1490 else win_skip(
"GetIconInfoEx not available\n" );
1495 ok(
ret,
"DestroyCursor() failed.\n");
1504 if (pGetIconInfoExA)
1508 infoexA.
cbSize =
sizeof(infoexA);
1509 ret = pGetIconInfoExA(
handle, &infoexA );
1514 trace(
"GetIconInfoExA broken on Win64\n" );
1517 "GetIconInfoEx wrong module %s\n", infoexA.
szModName );
1519 infoexW.
cbSize =
sizeof(infoexW);
1520 ret = pGetIconInfoExW(
handle, &infoexW );
1544 bitmap_header->
biWidth = 65536;
1562 char **res_name = (
char **)
param;
1583#define ICON_RES_WIDTH 32
1584#define ICON_RES_HEIGHT 32
1585#define ICON_RES_AND_SIZE (ICON_WIDTH*ICON_HEIGHT/8)
1586#define ICON_RES_BPP 32
1587#define ICON_RES_SIZE \
1588 (sizeof(BITMAPINFOHEADER) + ICON_AND_SIZE + ICON_AND_SIZE*ICON_BPP)
1589#define CRSR_RES_SIZE (2*sizeof(INT16) + ICON_RES_SIZE)
1616 ok(
ret,
"GetIconInfo() failed.\n");
1629 if (pGetIconInfoExA)
1632 infoex.
cbSize =
sizeof(infoex);
1633 ret = pGetIconInfoExA(
handle, &infoex );
1635 ok( infoex.
wResID == 0,
"GetIconInfoEx wrong resid %x\n", infoex.
wResID );
1651 ok(
ret,
"GetIconInfo() failed.\n");
1684 ok(
ret,
"GetIconInfo() failed.\n");
1705 ok(!
ret,
"Get info succeeded.\n");
1722 ok(
handle != old_handle,
"Expect a different handle.\n");
1758 ok(
handle != old_handle,
"Expect a different handle.\n");
1770 ok(
ret,
"GetIconInfo() failed\n");
1775 if (!
info)
return 0;
1778 info->bmiHeader.biWidth = 32;
1779 info->bmiHeader.biHeight = 32;
1780 info->bmiHeader.biPlanes = 1;
1781 info->bmiHeader.biBitCount = 32;
1783 info->bmiHeader.biSizeImage = 32 * 32 * 4;
1784 info->bmiHeader.biXPelsPerMeter = 0;
1785 info->bmiHeader.biYPelsPerMeter = 0;
1786 info->bmiHeader.biClrUsed = 0;
1787 info->bmiHeader.biClrImportant = 0;
1792 ok(
ret,
"GetDIBits() failed\n");
1807 DWORD frame_identifier[] = { 0x10Ad, 0xc001, 0x1c05 };
1819 if (!pGetCursorFrameInfo)
1821 win_skip(
"GetCursorFrameInfo not supported, skipping tests.\n" );
1826 ok(
hdc != 0,
"CreateCompatibleDC(0) failed to return a valid DC\n");
1830 memset(&bitmapInfo, 0,
sizeof(bitmapInfo));
1839 ok (
bmp &&
bits,
"CreateDIBSection failed to return a valid bitmap and buffer\n");
1844#define ICON_RES_WIDTH 32
1845#define ICON_RES_HEIGHT 32
1846#define ICON_RES_AND_SIZE (ICON_WIDTH*ICON_HEIGHT/8)
1847#define ICON_RES_BPP 32
1848#define ICON_RES_SIZE \
1849 (sizeof(BITMAPINFOHEADER) + ICON_AND_SIZE + ICON_AND_SIZE*ICON_BPP)
1850#define CRSR_RES_SIZE (2*sizeof(INT16) + ICON_RES_SIZE)
1874 h2 = pGetCursorFrameInfo(h1, 0xdead, 0xdead, &
rate, &
steps);
1875 ok(h1 == h2,
"GetCursorFrameInfo() failed: (%p != %p).\n", h1, h2);
1876 ok(
rate == 0,
"GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x0).\n",
rate);
1877 ok(
steps == 1,
"GetCursorFrameInfo() unexpected param 5 value (%ld != 1).\n",
steps);
1895 h2 = pGetCursorFrameInfo(h1, 0xdead, 0, &
rate, &
steps);
1896 ok(h1 == h2,
"GetCursorFrameInfo() failed: (%p != %p).\n", h1, h2);
1898 ok(
ret,
"GetCursorFrameInfo() returned wrong cursor data for frame 0.\n");
1899 ok(
rate == 0x0,
"GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x0).\n",
rate);
1901 "GetCursorFrameInfo() unexpected param 5 value (%ld != 1).\n",
steps);
1925 "Unexpected number of steps in cursor (%d != %ld)\n",
1932 h2 = pGetCursorFrameInfo(h1, 0xdead,
i, &
rate, &
steps);
1933 ok(h1 != h2 && h2 != 0,
"GetCursorFrameInfo() failed for cursor %p: (%p, %p).\n", h1, h1, h2);
1935 ok(
ret,
"GetCursorFrameInfo() returned wrong cursor data for frame %d.\n",
i);
1937 "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x%lx).\n",
1940 "GetCursorFrameInfo() unexpected param 5 value (%ld != %ld).\n",
1946 h2 = pGetCursorFrameInfo(h1, 0xdead, 3, &
rate, &
steps);
1947 ok(h2 == 0,
"GetCursorFrameInfo() failed for cursor %p: (%p != 0).\n", h1, h2);
1948 ok(
rate == 0xdead,
"GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0xdead).\n",
rate);
1949 ok(
steps == 0xdead,
"GetCursorFrameInfo() unexpected param 5 value (0x%lx != 0xdead).\n",
steps);
1967 "Unexpected number of steps in cursor (%d != %ld)\n",
1972 h2 = pGetCursorFrameInfo(h1, 0xdead, 0, &
rate, &
steps);
1973 ok(h1 != h2 && h2 != 0,
"GetCursorFrameInfo() failed for cursor %p: (%p, %p).\n", h1, h1, h2);
1975 ok(
ret,
"GetCursorFrameInfo() returned wrong cursor data for frame 0.\n");
1977 "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x%lx).\n",
1981 "GetCursorFrameInfo() unexpected param 5 value (%ld != ~0).\n",
steps);
1985 h2 = pGetCursorFrameInfo(h1, 0xdead, 1, &
rate, &
steps);
1986 ok(h2 == 0,
"GetCursorFrameInfo() failed for cursor %p: (%p != 0).\n", h1, h2);
1987 ok(
rate == 0xdead,
"GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0xdead).\n",
rate);
1988 ok(
steps == 0xdead,
"GetCursorFrameInfo() unexpected param 5 value (%ld != 0xdead).\n",
steps);
2012 "Unexpected number of steps in cursor (%d != %ld)\n",
2021 h2 = pGetCursorFrameInfo(h1, 0xdead,
i, &
rate, &
steps);
2022 ok(h1 != h2 && h2 != 0,
"GetCursorFrameInfo() failed for cursor %p: (%p, %p).\n", h1, h1, h2);
2024 ok(
ret,
"GetCursorFrameInfo() returned wrong cursor data for frame %d.\n",
i);
2026 "GetCursorFrameInfo() unexpected param 4 value (0x%lx != 0x%lx).\n",
2029 "GetCursorFrameInfo() unexpected param 5 value (%ld != %ld).\n",
2051 UINT32 mask = maskvalue ? 0xFFFFFFFF : 0x00000000;
2053 memset(&bitmapInfo, 0,
sizeof(bitmapInfo));
2087 color[0] = 0x00A0B0C0;
2089 modern_expected =
alpha ? 0x00FFFFFF : 0x00C0B0A0;
2090 legacy_expected = 0x00C0B0A0;
2104 "%s. Expected a close match to %06lX (modern) or %06lX (legacy) with %s. "
2105 "Got %06lX from line %d\n",
2106 alpha ?
"Alpha blending" :
"Not alpha blending", modern_expected, legacy_expected,
2107 drawiconex ?
"DrawIconEx" :
"DrawIcon",
result,
line);
2123 "Overlaying Mask %d on Color %06X with DrawIcon. "
2124 "Expected a close match to %06lX (modern), or %06lX (legacy). Got %06lX from line %d\n",
2130 "Overlaying Mask %d on Color %06X with DrawIcon. "
2131 "Expected a close match to %06lX (modern), or %06lX (legacy). Got %06lX from line %d\n",
2137 "Overlaying Mask %d on Color %06X with DrawIcon. "
2138 "Expected unchanged background color %06lX. Got %06lX from line %d\n",
2151 ok(
hdcDst != 0,
"CreateCompatibleDC(0) failed to return a valid DC\n");
2157 skip(
"Windows will distort DrawIcon colors at 8-bpp and less due to palettizing.\n");
2161 memset(&bitmapInfo, 0,
sizeof(bitmapInfo));
2171 ok (bmpDst &&
bits,
"CreateDIBSection failed to return a valid bitmap and buffer\n");
2172 if (!bmpDst || !
bits)
2220 "Overlaying Mask %d on Color %06X with DrawIconEx flags %08X. "
2221 "Expected a close match to %06lX (modern) or %06lX (legacy). Got %06lX from line %d\n",
2234 ok(
hdcDst != 0,
"CreateCompatibleDC(0) failed to return a valid DC\n");
2240 skip(
"Windows will distort DrawIconEx colors at 8-bpp and less due to palettizing.\n");
2244 memset(&bitmapInfo, 0,
sizeof(bitmapInfo));
2253 ok (bmpDst &&
bits,
"CreateDIBSection failed to return a valid bitmap and buffer\n");
2254 if (!bmpDst || !
bits)
2306 background = 0x00FFFFFF;
2333 if(!passed[0]&&!passed[1])
2335 "DrawState failed to draw a 1x1 Icon in the correct size, independent of the "
2336 "width and height settings passed to it, for Icon with: Overlaying Mask %d on "
2337 "Color %06X with flags %08X. Line %d\n",
2341 "DrawState failed to draw a 1x1 Icon in the correct size, if the width and height "
2342 "parameters passed to it are bigger than the real Icon size, for Icon with: Overlaying "
2343 "Mask %d on Color %06X with flags %08X. Line %d\n",
2347 "DrawState failed to draw a 1x1 Icon in the correct size, if the width and height "
2348 "parameters passed to it are 0, for Icon with: Overlaying Mask %d on "
2349 "Color %06X with flags %08X. Line %d\n",
2368 "DrawState drawing Icon with Overlaying Mask %d on Color %06X with flags %08X. "
2369 "Expected a close match to %06lX (modern) or %06lX (legacy). Got %06lX from line %d\n",
2382 ok(
hdcDst != 0,
"CreateCompatibleDC(0) failed to return a valid DC\n");
2388 skip(
"Windows will distort DrawIconEx colors at 8-bpp and less due to palettizing.\n");
2392 memset(&bitmapInfo, 0,
sizeof(bitmapInfo));
2401 ok (bmpDst &&
bits,
"CreateDIBSection failed to return a valid bitmap and buffer\n");
2402 if (!bmpDst || !
bits)
2434 ok(
ret,
"AttachThreadInput failed\n" );
2443 static const BYTE bmp_bits[4096];
2456 if (!pGetCursorInfo( &
info ))
2458 win_skip(
"GetCursorInfo not working\n" );
2459 pGetCursorInfo =
NULL;
2461 else global_cursor =
info.hCursor;
2486 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2488 ok(
info.hCursor == global_cursor,
"expected global cursor %p\n", global_cursor );
2518 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2519 ok(
info.hCursor == global_cursor,
"expected global cursor %p\n", global_cursor );
2533 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2534 ok(
info.hCursor == global_cursor,
"expected global cursor %p\n", global_cursor );
2549 ok(
ret,
"AttachThreadInput failed\n" );
2569 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2592 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2646 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2658 ok( pGetCursorInfo( &
info ),
"GetCursorInfo failed\n" );
2666 static const BYTE bmp_bits[4096];
2693 ok(!
ret,
"DestroyCursor on the active cursor succeeded\n");
2698 ok(new_cursor ==
cursor,
"GetCursor returned %p/%p\n", new_cursor,
cursor);
2702 ok( !
ret,
"GetIconInfo succeeded\n" );
2712 ok( !
ret,
"DestroyCursor succeeded\n" );
2718 ok( cursor2 ==
cursor,
"SetCursor returned %p/%p\n", cursor2,
cursor);
2726 ok(!cursor2,
"CopyCursor succeeded\n" );
2731 ok( !
ret,
"DestroyCursor succeeded\n" );
2737 ok(!cursor2,
"SetCursor returned %p/%p\n", cursor2,
cursor);
2743 ok(cursor2 == new_cursor,
"GetCursor returned %p/%p\n", cursor2, new_cursor);
2747 ok( cursor2 != new_cursor,
"SetCursor returned %p/%p\n", cursor2,
cursor );
2751 ok(!cursor2,
"GetCursor returned %p/%p\n", cursor2,
cursor);
2755 ok( !
ret,
"DestroyCursor succeeded\n" );
2767 ok(
ret,
"DestroyCursor on the active cursor failed.\n");
2769 ok(
error == 0xdeadbeef,
"Last error: 0x%08lx\n",
error);
2775 ok(
error == 0xdeadbeef,
"Last error: 0x%08lx\n",
error);
2779 ok(cursor2 ==
cursor,
"cursor == %p, cursor2 == %p\n",
cursor, cursor2);
2783 ok(cursor2 !=
cursor,
"cursor == %p, cursor2 == %p\n",
cursor, cursor2);
2791 static const test_icon_entries_t icon_desc[] = {{0,0,
TRUE}, {16,16,
TRUE}, {32,32}, {64,64,
TRUE}};
2796 ok(
ret == 1,
"PrivateExtractIconsA returned %u\n",
ret);
2797 ok(icon !=
NULL,
"icon == NULL\n");
2809 DWORD bytes_written;
2816 BOOL monochrome, use_core_info;
2821 for (monochrome =
FALSE; monochrome <=
TRUE; monochrome++)
2822 for (use_core_info =
FALSE; use_core_info <=
TRUE; use_core_info++)
2825 monochrome ?
"monochrome" :
"colored",
2826 use_core_info ?
"core info" :
"bitmap info");
2884 ok(
ret && bytes_written ==
icon_size,
"icon.ico created improperly.\n");
2896 skip(
"Icon failed to load: %s, %s\n",
2897 monochrome ?
"monochrome" :
"colored",
2898 use_core_info ?
"core info" :
"bitmap info");
2930 const unsigned char *
data;
2934 stride = ((
h->biBitCount *
h->biWidth + 7) / 8 + 3) & ~3;
2936 if (
h->biBitCount >= 24)
2939 if (
h->biBitCount == 16)
2942 return RGB(((color16 >> 10) & 0x1f) << 3, ((color16 >> 5) & 0x1f) << 3,
2943 (color16 & 0x1f) << 3);
2946 mask = ~(~0
u <<
h->biBitCount);
2951#define compare_bitmap_bits(a, b, c, d, e, f, g, h) compare_bitmap_bits_(__LINE__, a, b, c, d, e, f, g, h)
2953 size_t result_bits_size,
const unsigned char *expected_bits,
unsigned int test_index,
2954 BOOL allow_todo,
const unsigned char *expected_broken_bits)
2956 unsigned char *result_bits;
2960 result_bits =
malloc(result_bits_size);
2976 "Colors do not match, got 0x%06lx, expected 0x%06lx, test_index %u, row %u, column %u.\n",
2984 static const unsigned char test_bits_24[] =
2986 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00,
2987 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00,
2988 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00,
2989 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00,
2991 static const unsigned char expected_broken_bits_24[] =
2993 0x3f, 0xff, 0x00, 0x3f, 0xff, 0x3f, 0x00, 0x00,
2994 0x3f, 0xff, 0x7f, 0x00, 0xff, 0x3f, 0x00, 0x00,
2996 static const unsigned char expected_bits_24[] =
2998 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
2999 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
3001#define rgb16(r, g, b) ((WORD)(((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3)))
3002 static const WORD test_bits_16[] =
3004 rgb16(0x00, 0x20, 0x00),
rgb16(0x00, 0x40, 0x00),
rgb16(0x00, 0x40, 0xff),
rgb16(0x00, 0x20, 0x00),
3005 rgb16(0x00, 0x60, 0x00),
rgb16(0xff, 0x80, 0x00),
rgb16(0xff, 0x60, 0x00),
rgb16(0x00, 0x80, 0x00),
3006 rgb16(0x00, 0x20, 0xff),
rgb16(0x00, 0x40, 0x00),
rgb16(0x00, 0x40, 0xff),
rgb16(0x00, 0x20, 0x00),
3007 rgb16(0xff, 0x80, 0x00),
rgb16(0x00, 0x60, 0xff),
rgb16(0x00, 0x80, 0x00),
rgb16(0x00, 0x60, 0x00),
3009 static const WORD expected_bits_16[] =
3011 rgb16(0x00, 0x40, 0x00),
rgb16(0x00, 0x20, 0x00),
3012 rgb16(0x00, 0x40, 0x00),
rgb16(0x00, 0x20, 0x00),
3015 static const unsigned char test_bits_8[] =
3017 0x00, 0xff, 0x00, 0xff,
3018 0x00, 0x00, 0x00, 0x00,
3019 0xff, 0x55, 0x00, 0xff,
3020 0x00, 0xff, 0xff, 0x00,
3022 static const unsigned char expected_bits_8[] =
3024 0xff, 0xff, 0x00, 0x00,
3025 0x55, 0xff, 0x00, 0x00,
3027 static const unsigned char test_bits_1[] =
3029 0x30, 0x0, 0x0, 0x0,
3030 0x30, 0x0, 0x0, 0x0,
3031 0x40, 0x0, 0x0, 0x0,
3032 0xc0, 0x0, 0x0, 0x0,
3034 static const unsigned char expected_bits_1[] =
3036 0x40, 0x0, 0x0, 0x0,
3039 static const RGBQUAD colors_bits_1[] =
3044 static RGBQUAD colors_bits_8[256];
3050 const unsigned char *test_bits, *expected_bits;
3051 size_t test_bits_size, result_bits_size;
3053 size_t bmi_colors_size;
3055 const unsigned char *expected_broken_bits;
3059 {4, 4, 2, 2, 24, test_bits_24, expected_bits_24,
3060 sizeof(test_bits_24),
sizeof(expected_bits_24),
NULL, 0,
TRUE,
3061 expected_broken_bits_24},
3062 {4, 4, 2, 2, 1, test_bits_1, expected_bits_1,
3063 sizeof(test_bits_1),
sizeof(expected_bits_1), colors_bits_1,
3064 sizeof(colors_bits_1)},
3065 {4, 4, 2, 2, 8, test_bits_8, expected_bits_8,
3066 sizeof(test_bits_8),
sizeof(expected_bits_8), colors_bits_8,
3067 sizeof(colors_bits_8),
TRUE},
3068 {4, 4, 2, 2, 16, (
const unsigned char *)test_bits_16, (
const unsigned char *)expected_bits_16,
3069 sizeof(test_bits_16),
sizeof(expected_bits_16),
NULL, 0,
TRUE},
3071 static const char filename[] =
"test.bmp";
3074 unsigned int test_index;
3075 unsigned char *
bits;
3081 bmi =
calloc(1, bmi_size);
3082 bmi_output =
calloc(1, bmi_size);
3087 for (
i = 0;
i < 256; ++
i)
3088 colors_bits_8[
i].rgbRed = colors_bits_8[
i].rgbGreen = colors_bits_8[
i].rgbBlue =
i;
3094 if (
tests[test_index].bmi_colors)
3102 memcpy(bmi_output, bmi, bmi_size);
3112 ok(!!bitmap_copy,
"CopyImage() failed, result %lu.\n",
GetLastError());
3115 tests[test_index].expected_bits, test_index,
tests[test_index].allow_todo,
3116 tests[test_index].expected_broken_bits);
3126 tests[test_index].expected_bits, test_index,
tests[test_index].allow_todo,
3127 tests[test_index].expected_broken_bits);
3138 static const UINT depths[] = {1, 4, 8, 16, 24, 32};
static void startup(void)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define GetEnvironmentVariableA(x, y, z)
static const WCHAR *const ext[]
static void cleanup(void)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
VOID WINAPI ExitProcess(IN UINT uExitCode)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
BOOL WINAPI EnumResourceNamesA(HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfun, LONG_PTR lparam)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
DWORD WINAPI GetVersion(void)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl sscanf(const char *, const char *,...) __WINE_CRT_SCANF_ATTR(2
_ACRTIMP char *__cdecl strrchr(const char *, int)
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
static char * path_name(DOS_FILE *file)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLsizei GLsizei * length
GLuint GLdouble GLdouble GLint GLint order
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat GLfloat h
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 * u
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
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
#define memcpy(s1, s2, n)
static struct test_info tests[]
static void test_SetCursor(void)
#define ANI_FLAG_SEQUENCE
static LRESULT CALLBACK callback_parent(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static DWORD DWORD DWORD DWORD * steps
riff_cursor3_t empty_anicursor3
static DWORD DWORD DWORD * rate
static void test_LoadImageBitmap(HBITMAP hbm)
static void do_child(void)
static void check_DrawState_Color(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, HBRUSH hbr, UINT flags, COLORREF background, COLORREF modern_expected, COLORREF legacy_expected, int line)
static void test_GetCursorFrameInfo(void)
static void finish_child_process(void)
static void test_ShowCursor(void)
static void test_DrawIcon(void)
static HANDLE event_start
static void test_initial_cursor(void)
static const unsigned char bmpcoreimage[38]
static void test_LoadImage(void)
static void do_test_copy_image(UINT type, UINT depth)
static DWORD CALLBACK set_cursor_thread(void *arg)
static void check_alpha_draw(HDC hdc, BOOL drawiconex, BOOL alpha, int bpp, int line)
static void test_child_process(void)
static const unsigned char gifimage[35]
static unsigned char bmpimage[70]
static BOOL color_match(COLORREF a, COLORREF b)
static HICON create_test_icon(HDC hdc, int width, int height, int bpp, BOOL maskvalue, UINT32 *color, int colorSize)
static void check_copy_image(HBITMAP bitmap, UINT type, UINT flags, INT copyWidth, INT copyHeight, INT expectedWidth, INT expectedHeight, WORD expectedDepth, BOOL dibExpected)
static void test_icon_info_(HICON hIcon, UINT exp_cx, UINT exp_cy, UINT exp_mask_cy, UINT exp_bpp, const BYTE *mask_bits, UINT has_color, int line)
riff_cursor1_t empty_anicursor
static HANDLE child_process
static void create_ico_file(const char *filename, const test_icon_entries_t *test_icon_entries, unsigned entry_cnt)
riff_cursor3_seq_t empty_anicursor3_seq
#define compare_bitmap_bits(a, b, c, d, e, f, g, h)
static ICONINFOEXA *static ICONINFOEXW *static const BOOL is_win64
static void test_DrawIconEx(void)
static void test_monochrome_icon(void)
static void test_LoadImageFile(const char *test_desc, const unsigned char *image_data, unsigned int image_size, const char *ext, BOOL expect_success)
#define test_icon_info(a, b, c, d, e, f, g)
static void test_DrawState(void)
static void test_LoadImage_working_directory(void)
static void test_LoadImage_working_directory_run(char *path)
static void create_bitmap_file(const char *filename, const BITMAPINFO *bmi, const unsigned char *bits)
static void test_DestroyCursor(void)
static void test_CreateIcon(void)
static void check_DrawIcon(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, COLORREF background, COLORREF modern_expected, COLORREF legacy_expected, int line)
static void test_CreateIconFromResource(void)
static DWORD CALLBACK show_cursor_thread(void *arg)
static int check_cursor_data(HDC hdc, HCURSOR hCursor, void *data, int length)
static void test_PrivateExtractIcons(void)
static const DWORD biSize_tests[]
static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_Image_StretchMode(void)
static const unsigned char invalid_dwDIBOffset[]
static const unsigned char pngimage[285]
static void do_parent(void)
static COLORREF get_color_from_bits(const unsigned char *bits, const BITMAPINFO *bmi, unsigned int row, unsigned int column)
static const unsigned char jpgimage[285]
static void test_copy_image(void)
static BOOL CALLBACK find_res_proc(HMODULE module, LPCSTR type, LPSTR name, LONG_PTR param)
static void check_DrawState_Size(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, HBRUSH hbr, UINT flags, int line)
static const unsigned char gif4pixel[42]
static void check_DrawIconEx(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, UINT flags, COLORREF background, COLORREF modern_expected, COLORREF legacy_expected, int line)
static void compare_bitmap_bits_(unsigned int line, HDC hdc, HBITMAP bitmap, BITMAPINFO *bmi, size_t result_bits_size, const unsigned char *expected_bits, unsigned int test_index, BOOL allow_todo, const unsigned char *expected_broken_bits)
unsigned __int3264 UINT_PTR
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
CURSORICONFILEDIRENTRY idEntries[1]
BITMAPCOREHEADER bmciHeader
WCHAR szModName[MAX_PATH]
WCHAR szResName[MAX_PATH]
BITMAPINFOHEADER bmi_header
CURSORICONFILEDIR icon_info
ani_data32x32x32 bmi_data
riff_icon32x32x32_t frames[1]
riff_icon32x32x32_t frames[3]
riff_icon32x32x32_t frames[3]
BITMAPINFOHEADER bmiHeader
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define FIELD_OFFSET(t, f)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
DWORD WINAPI GetCurrentThreadId(void)
#define ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
#define ERROR_INVALID_CURSOR_HANDLE
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
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)
struct tagBITMAPCOREHEADER BITMAPCOREHEADER
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
LONG WINAPI GetBitmapBits(_In_ HBITMAP hbit, _In_ LONG cb, _Out_writes_bytes_(cb) LPVOID lpvBits)
HCURSOR WINAPI GetCursor(void)
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
HICON WINAPI CreateIconFromResource(_In_reads_bytes_(dwResSize) PBYTE presbits, _In_ DWORD dwResSize, _In_ BOOL fIcon, _In_ DWORD dwVer)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI AttachThreadInput(_In_ DWORD, _In_ DWORD, _In_ BOOL)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
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 CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
int WINAPI LookupIconIdFromDirectory(_In_reads_bytes_(sizeof(NEWHEADER)) PBYTE, _In_ BOOL)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define LR_CREATEDIBSECTION
BOOL WINAPI DrawIcon(_In_ HDC, _In_ int, _In_ int, _In_ HICON)
int WINAPI ShowCursor(_In_ BOOL)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
HICON WINAPI CreateIconFromResourceEx(_In_reads_bytes_(dwResSize) PBYTE presbits, _In_ DWORD dwResSize, _In_ BOOL fIcon, _In_ DWORD dwVer, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT Flags)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
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)
#define MAKEINTRESOURCEA(i)
UINT WINAPI PrivateExtractIconsA(_In_reads_(MAX_PATH) LPCSTR szFileName, _In_ int nIconIndex, _In_ int cxIcon, _In_ int cyIcon, _Out_writes_opt_(nIcons) HICON *phicon, _Out_writes_opt_(nIcons) UINT *piconid, _In_ UINT nIcons, _In_ UINT flags)
BOOL WINAPI DrawStateA(_In_ HDC, _In_opt_ HBRUSH, _In_opt_ DRAWSTATEPROC, _In_ LPARAM, _In_ WPARAM, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HANDLE WINAPI LoadImageA(_In_opt_ HINSTANCE hInst, _In_ LPCSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
HCURSOR WINAPI CreateCursor(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ int, _In_ int, _In_ CONST VOID *, _In_ CONST VOID *)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetSystemMetrics(_In_ int)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
BOOL WINAPI DestroyIcon(_In_ HICON)