gdiplus: Added public headers.

This commit is contained in:
Evan Stade 2007-06-08 13:44:28 -07:00 committed by Alexandre Julliard
parent ef65b233c0
commit 48f10d4bbf
9 changed files with 382 additions and 0 deletions

View File

@ -159,6 +159,14 @@ SRCDIR_INCLUDES = \
exdispid.h \
fci.h \
fdi.h \
gdiplus.h \
gdiplusenums.h \
gdiplusflat.h \
gdiplusgpstubs.h \
gdiplusinit.h \
gdiplusmem.h \
gdipluspixelformats.h \
gdiplustypes.h \
guiddef.h \
hlguids.h \
htmlhelp.h \

57
include/gdiplus.h Normal file
View File

@ -0,0 +1,57 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUS_H
#define _GDIPLUS_H
#ifdef __cplusplus
namespace Gdiplus
{
namespace DllExports
{
#include "gdiplusmem.h"
};
#include "gdiplustypes.h"
#include "gdiplusenums.h"
#include "gdiplusinit.h"
#include "gdipluspixelformats.h"
#include "gdiplusgpstubs.h"
namespace DllExports
{
#include "gdiplusflat.h"
};
};
#else /* end c++ includes */
#include "gdiplusmem.h"
#include "gdiplustypes.h"
#include "gdiplusenums.h"
#include "gdiplusinit.h"
#include "gdipluspixelformats.h"
#include "gdiplusgpstubs.h"
#include "gdiplusflat.h"
#endif /* end c includes */
#endif /* _GDIPLUS_H_ */

49
include/gdiplusenums.h Normal file
View File

@ -0,0 +1,49 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUSENUMS_H
#define _GDIPLUSENUMS_H
enum Unit
{
UnitWorld = 0,
UnitDisplay = 1,
UnitPixel = 2,
UnitPoint = 3,
UnitInch = 4,
UnitDocument = 5,
UnitMillimeter = 6
};
enum BrushType
{
BrushTypeSolidColor = 0,
BrushTypeHatchFill = 1,
BrushTypeTextureFill = 2,
BrushTypePathGradient = 3,
BrushTypeLinearGradient = 4
};
#ifndef __cplusplus
typedef enum Unit Unit;
typedef enum BrushType BrushType;
#endif /* end of c typedefs */
#endif

46
include/gdiplusflat.h Normal file
View File

@ -0,0 +1,46 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _FLATAPI_H
#define _FLATAPI_H
#define WINGDIPAPI __stdcall
#ifdef __cplusplus
extern "C" {
#endif
GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**);
GpStatus WINGDIPAPI GdipDeletePen(GpPen*);
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**);
GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**);
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *);
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
#ifdef __cplusplus
}
#endif
#endif

42
include/gdiplusgpstubs.h Normal file
View File

@ -0,0 +1,42 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUSGPSTUBS_H
#define _GDIPLUSGPSTUBS_H
#ifdef __cplusplus
class GpGraphics {};
class GpGraphics {};
class GpBrush {};
class GpSolidFill {};
#else /* end of c++ declarations */
typedef struct GpGraphics GpGraphics;
typedef struct GpPen GpPen;
typedef struct GpBrush GpBrush;
typedef struct GpSolidFill GpSolidFill;
#endif /* end of c declarations */
typedef Status GpStatus;
typedef Unit GpUnit;
typedef BrushType GpBrushType;
#endif

67
include/gdiplusinit.h Normal file
View File

@ -0,0 +1,67 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUSINIT_H
#define _GDIPLUSINIT_H
enum DebugEventLevel
{
DebugEventLevelFatal,
DebugEventLevelWarning
};
typedef VOID (WINAPI *DebugEventProc)(enum DebugEventLevel, CHAR *);
struct GdiplusStartupInput
{
UINT32 GdiplusVersion;
DebugEventProc DebugEventCallback;
BOOL SuppressBackgroundThread;
BOOL SuppressExternalCodecs;
#ifdef __cplusplus
GdiplusStartupInput(DebugEventProc debugEventCallback = NULL,
BOOL suppressBackgroundThread = FALSE,
BOOL suppressExternalCodecs = FALSE)
{
GdiplusVersion = 1;
DebugEventCallback = debugEventCallback;
SuppressBackgroundThread = suppressBackgroundThread;
SuppressExternalCodecs = suppressExternalCodecs;
}
#endif
};
struct GdiplusStartupOutput
{
ULONG_PTR NotificationHook;
ULONG_PTR NotificationUnhook;
};
#ifdef __cplusplus
extern "C" {
#endif
Status WINAPI GdiplusStartup(ULONG_PTR *, const struct GdiplusStartupInput *, struct GdiplusStartupOutput *);
void WINAPI GdiplusShutdown(ULONG_PTR);
#ifdef __cplusplus
}
#endif
#endif

35
include/gdiplusmem.h Normal file
View File

@ -0,0 +1,35 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUSMEM_H
#define _GDIPLUSMEM_H
#define WINGDIPAPI __stdcall
#ifdef __cplusplus
extern "C" {
#endif
void* WINGDIPAPI GdipAlloc(SIZE_T);
void WINGDIPAPI GdipFree(void*);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUSPIXELFORMATS_H
#define _GDIPLUSPIXELFORMATS_H
typedef DWORD ARGB;
#endif

54
include/gdiplustypes.h Normal file
View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _GDIPLUSTYPES_H
#define _GDIPLUSTYPES_H
typedef float REAL;
enum Status{
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
};
#ifndef __cplusplus
typedef enum Status Status;
#endif /* end of c typedefs */
#endif