"Evan Stade" <[EMAIL PROTECTED]> wrote:

+WINE_DEFAULT_DEBUG_CHANNEL(gdip);
+
+COLORREF ARGB2COLORREF(ARGB color)
+{

If this is a module local function it should be static.

+GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit, + GpPen **pen)
+{
+    LOGBRUSH lb;
+    GpPen *gp_pen;
+
+    gp_pen = (GpPen*) malloc(sizeof(GpPen));

Do not use malloc in Wine, use HeapAlloc and friends.

+    if(!pen){ return OutOfMemory; }

if (!pen) return OutOfMemory;

looks more naturally IMO without redundant braces, here and in other places.

+START_TEST(pen)
+{
+    GdiplusStartupInput gdiplusStartupInput;
+    ULONG_PTR gdiplusToken;
+
+    gdiplusStartupInput.GdiplusVersion=1;
+    gdiplusStartupInput.DebugEventCallback=NULL;
+    gdiplusStartupInput.SuppressBackgroundThread=0;
+    gdiplusStartupInput.SuppressExternalCodecs=0;
+
+    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
+
+    test_constructor_destructor();
+
+    GdiplusShutdown(gdiplusToken);

It's better to check whether GdiplusStartup/GdiplusShutdown fail.

--- /dev/null
+++ b/include/GdiplusEnums.h
@@ -0,0 +1,39 @@
+#ifndef _GP_ENUMERATIONS_H_
+#define _GP_ENUMERATIONS_H_
+
+typedef enum {
+    UnitWorld = 0,  /* seemingly equivalent to notion of "logical unit" */
+    UnitDisplay = 1,
+    UnitPixel = 2,
+    UnitPoint = 3,
+    UnitInch = 4,
+    UnitDocument = 5,
+    UnitMillimeter = 6
+} Unit;
+
+typedef enum {
+    Ok = 0,
+    GenericError = 1,
+    InvalidParameter = 2,
+    OutOfMemory = 3,
+    ObjectBusy = 4,
+    InsufficientBuffer = 5,
+    NotImplemented = 6,
+    Win32Error = 7,
+    WrongState = 8,
+    Aborted = 9,
+    FileNotFound = 10,
+    ValueOverflow = 11,
+    AccessDenied = 12,
+    UnknownImageFormat = 13,
+    FontFamilyNotFound = 14,
+    FontStyleNotFound = 15,
+    NotTrueTypeFont = 16,
+    UnsupportedGdiplusVersion = 17,
+    GdiplusNotInitialized = 18,
+    PropertyNotFound = 19,
+    PropertyNotSupported = 20,
+    ProfileNotFound = 21
+} Status;

Why are you duplicating dlls/gdiplus/gdip_enumerations.h? Besides my version
of PSDK doesn't have Status in GdiplusEnums.h, they are in GdiPlusTypes.h.

Otherwise the patch looks good.


--
Dmitry.


Reply via email to