diff --git a/rostests/apitests/gdi32api/gdi.h b/rostests/apitests/gdi32api/gdi.h index 8e3c9309a7e..0f5c0d8cad7 100644 --- a/rostests/apitests/gdi32api/gdi.h +++ b/rostests/apitests/gdi32api/gdi.h @@ -200,4 +200,14 @@ typedef struct // RECT VisRectRegion; // 1b8 } DC_ATTR, *PDC_ATTR; +HDC WINAPI GdiConvertBitmap(HDC hdc); +HBRUSH WINAPI GdiConvertBrush(HBRUSH hbr); +HDC WINAPI GdiConvertDC(HDC hdc); +HFONT WINAPI GdiConvertFont(HFONT hfont); +HPALETTE WINAPI GdiConvertPalette(HPALETTE hpal); +HRGN WINAPI GdiConvertRegion(HRGN hregion); +HBRUSH WINAPI GdiGetLocalBrush(HBRUSH hbr); +HDC WINAPI GdiGetLocalDC(HDC hdc); + + diff --git a/rostests/apitests/gdi32api/testlist.c b/rostests/apitests/gdi32api/testlist.c index e7338ba7a1d..43e1f3e7609 100644 --- a/rostests/apitests/gdi32api/testlist.c +++ b/rostests/apitests/gdi32api/testlist.c @@ -12,11 +12,19 @@ #include "tests/CreatePen.c" #include "tests/CreateRectRgn.c" #include "tests/ExtCreatePen.c" +#include "tests/GdiConvertBitmap.c" +#include "tests/GdiConvertBrush.c" +#include "tests/GdiConvertDC.c" +#include "tests/GdiConvertFont.c" +#include "tests/GdiConvertPalette.c" +#include "tests/GdiConvertRegion.c" +#include "tests/GdiGetLocalBrush.c" +#include "tests/GdiGetLocalDC.c" #include "tests/GetClipRgn.c" #include "tests/GetCurrentObject.c" +#include "tests/GetDIBits.c" #include "tests/GetObject.c" #include "tests/GetStockObject.c" -#include "tests/GetDIBits.c" #include "tests/SelectObject.c" #include "tests/SetDCPenColor.c" #include "tests/SetSysColors.c" @@ -24,25 +32,39 @@ + + + + + + /* The List of tests */ TESTENTRY TestList[] = { { L"AddFontResourceA", Test_AddFontResourceA }, { L"AddFontResourceEx", Test_AddFontResourceEx }, - { L"CreateBitmapIndirect", Test_CreateBitmapIndirect }, + { L"CreateBitmapIndirect", Test_CreateBitmapIndirect }, { L"CreateCompatibleDC", Test_CreateCompatibleDC }, { L"CreateFont", Test_CreateFont }, { L"CreatePen", Test_CreatePen }, { L"CreateRectRgn", Test_CreateRectRgn }, { L"ExtCreatePen", Test_ExtCreatePen }, + { L"GdiConvertBitmap", Test_GdiConvertBitmap }, + { L"GdiConvertBrush", Test_GdiConvertBrush }, + { L"GdiConvertBrush", Test_GdiConvertDC }, + { L"GdiConvertFont", Test_GdiConvertFont }, + { L"GdiConvertPalette", Test_GdiConvertPalette }, + { L"GdiConvertRegion", Test_GdiConvertRegion }, + { L"GdiGetLocalBrush", Test_GdiGetLocalBrush }, + { L"GdiGetLocalDC", Test_GdiGetLocalDC }, { L"GetClipRgn", Test_GetClipRgn }, { L"GetCurrentObject", Test_GetCurrentObject }, + { L"GetDIBits", Test_GetDIBits }, { L"GetObject", Test_GetObject }, { L"GetStockObject", Test_GetStockObject }, - { L"GetDIBits", Test_GetDIBits }, - { L"SetSysColors", Test_SetSysColors }, { L"SelectObject", Test_SelectObject }, { L"SetDCPenColor", Test_SetDCPenColor }, + { L"SetSysColors", Test_SetSysColors }, { L"SetWorldTransform", Test_SetWorldTransform }, }; diff --git a/rostests/apitests/gdi32api/tests/GdiConvertBitmap.c b/rostests/apitests/gdi32api/tests/GdiConvertBitmap.c new file mode 100644 index 00000000000..bdbd4f9ab46 --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiConvertBitmap.c @@ -0,0 +1,10 @@ +INT +Test_GdiConvertBitmap(PTESTINFO pti) +{ + RTEST(GdiConvertBitmap((HDC)-1) == (HDC)-1); + RTEST(GdiConvertBitmap((HDC)0) == (HDC)0); + RTEST(GdiConvertBitmap((HDC)1) == (HDC)1); + RTEST(GdiConvertBitmap((HDC)2) == (HDC)2); + return APISTATUS_NORMAL; +} + diff --git a/rostests/apitests/gdi32api/tests/GdiConvertBrush.c b/rostests/apitests/gdi32api/tests/GdiConvertBrush.c new file mode 100644 index 00000000000..20ea326e47e --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiConvertBrush.c @@ -0,0 +1,9 @@ +INT +Test_GdiConvertBrush(PTESTINFO pti) +{ + RTEST(GdiConvertBrush((HBRUSH)-1) == (HBRUSH)-1); + RTEST(GdiConvertBrush((HBRUSH)0) == (HBRUSH)0); + RTEST(GdiConvertBrush((HBRUSH)1) == (HBRUSH)1); + RTEST(GdiConvertBrush((HBRUSH)2) == (HBRUSH)2); + return APISTATUS_NORMAL; +} diff --git a/rostests/apitests/gdi32api/tests/GdiConvertDC.c b/rostests/apitests/gdi32api/tests/GdiConvertDC.c new file mode 100644 index 00000000000..302d1cb8b16 --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiConvertDC.c @@ -0,0 +1,10 @@ +INT +Test_GdiConvertDC(PTESTINFO pti) +{ + RTEST(GdiConvertDC((HDC)-1) == (HDC)-1); + RTEST(GdiConvertDC((HDC)0) == (HDC)0); + RTEST(GdiConvertDC((HDC)1) == (HDC)1); + RTEST(GdiConvertDC((HDC)2) == (HDC)2); + return APISTATUS_NORMAL; +} + diff --git a/rostests/apitests/gdi32api/tests/GdiConvertFont.c b/rostests/apitests/gdi32api/tests/GdiConvertFont.c new file mode 100644 index 00000000000..7bb778d62a7 --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiConvertFont.c @@ -0,0 +1,9 @@ +INT +Test_GdiConvertFont(PTESTINFO pti) +{ + RTEST(GdiConvertFont((HFONT)-1) == (HFONT)-1); + RTEST(GdiConvertFont((HFONT)0) == (HFONT)0); + RTEST(GdiConvertFont((HFONT)1) == (HFONT)1); + RTEST(GdiConvertFont((HFONT)2) == (HFONT)2); + return APISTATUS_NORMAL; +} diff --git a/rostests/apitests/gdi32api/tests/GdiConvertPalette.c b/rostests/apitests/gdi32api/tests/GdiConvertPalette.c new file mode 100644 index 00000000000..5ccec307571 --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiConvertPalette.c @@ -0,0 +1,9 @@ +INT +Test_GdiConvertPalette(PTESTINFO pti) +{ + RTEST(GdiConvertPalette((HPALETTE)-1) == (HPALETTE)-1); + RTEST(GdiConvertPalette((HPALETTE)0) == (HPALETTE)0); + RTEST(GdiConvertPalette((HPALETTE)1) == (HPALETTE)1); + RTEST(GdiConvertPalette((HPALETTE)2) == (HPALETTE)2); + return APISTATUS_NORMAL; +} diff --git a/rostests/apitests/gdi32api/tests/GdiConvertRegion.c b/rostests/apitests/gdi32api/tests/GdiConvertRegion.c new file mode 100644 index 00000000000..34f1081b238 --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiConvertRegion.c @@ -0,0 +1,12 @@ +INT +Test_GdiConvertRegion(PTESTINFO pti) +{ + RTEST(GdiConvertRegion((HRGN)-1) == (HRGN)-1); + RTEST(GdiConvertRegion((HRGN)0) == (HRGN)0); + RTEST(GdiConvertRegion((HRGN)1) == (HRGN)1); + RTEST(GdiConvertRegion((HRGN)2) == (HRGN)2); + RTEST(GdiConvertRegion((HRGN)3) == (HRGN)3); + RTEST(GdiConvertRegion((HRGN)4) == (HRGN)4); + return APISTATUS_NORMAL; +} + diff --git a/rostests/apitests/gdi32api/tests/GdiGetLocalBrush.c b/rostests/apitests/gdi32api/tests/GdiGetLocalBrush.c new file mode 100644 index 00000000000..45b134b1e66 --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiGetLocalBrush.c @@ -0,0 +1,11 @@ +INT +Test_GdiGetLocalBrush(PTESTINFO pti) +{ + RTEST(GdiGetLocalBrush((HBRUSH)-1) == (HBRUSH)-1); + RTEST(GdiGetLocalBrush((HBRUSH)0) == (HBRUSH)0); + RTEST(GdiGetLocalBrush((HBRUSH)1) == (HBRUSH)1); + RTEST(GdiGetLocalBrush((HBRUSH)2) == (HBRUSH)2); + RTEST(GdiGetLocalBrush((HBRUSH)3) == (HBRUSH)3); + RTEST(GdiGetLocalBrush((HBRUSH)4) == (HBRUSH)4); + return APISTATUS_NORMAL; +} diff --git a/rostests/apitests/gdi32api/tests/GdiGetLocalDC.c b/rostests/apitests/gdi32api/tests/GdiGetLocalDC.c new file mode 100644 index 00000000000..ca62675c44d --- /dev/null +++ b/rostests/apitests/gdi32api/tests/GdiGetLocalDC.c @@ -0,0 +1,11 @@ +INT +Test_GdiGetLocalDC(PTESTINFO pti) +{ + RTEST(GdiGetLocalDC((HDC)-1) == (HDC)-1); + RTEST(GdiGetLocalDC((HDC)0) == (HDC)0); + RTEST(GdiGetLocalDC((HDC)1) == (HDC)1); + RTEST(GdiGetLocalDC((HDC)2) == (HDC)2); + RTEST(GdiGetLocalDC((HDC)3) == (HDC)3); + RTEST(GdiGetLocalDC((HDC)4) == (HDC)4); + return APISTATUS_NORMAL; +}