| 1 | /* $Id: gdiplus.cpp,v 1.94 2016-02-09 10:00:00 rousseau Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * GDIPLUS apis
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
|---|
| 7 | * Copyright 1998 Patrick Haller
|
|---|
| 8 | *
|
|---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 10 | *
|
|---|
| 11 | */
|
|---|
| 12 |
|
|---|
| 13 | #include <os2win.h>
|
|---|
| 14 | #include <stdlib.h>
|
|---|
| 15 | #include <stdarg.h>
|
|---|
| 16 | #include <string.h>
|
|---|
| 17 | #include <odinwrap.h>
|
|---|
| 18 | #include <debugtools.h>
|
|---|
| 19 | #include <misc.h>
|
|---|
| 20 | #include "unicode.h"
|
|---|
| 21 | #include <codepage.h>
|
|---|
| 22 | #include <dcdata.h>
|
|---|
| 23 | #include <winuser32.h>
|
|---|
| 24 | #include <stats.h>
|
|---|
| 25 | #include <objhandle.h>
|
|---|
| 26 | #include <winspool.h>
|
|---|
| 27 |
|
|---|
| 28 | #include <shlwapi.h>
|
|---|
| 29 |
|
|---|
| 30 | // rousseau.201602140232
|
|---|
| 31 | // In 'initguid.h' we made the GUID in macro 'DEFINE_GUID' static to work
|
|---|
| 32 | // around duplicate defined GUIDs when building 'swt.dll'. (Rev:22089)
|
|---|
| 33 | // Since 'DEFINE_GUID' is also defined in 'guiddef.h', we will use that
|
|---|
| 34 | // (non-static) version here. See 'comtype.h' for some more info.
|
|---|
| 35 | // TODO: Investigate duplicate ID's in 'swt.dll'.
|
|---|
| 36 | // Have one definition of 'DEFINE_GUID' ?
|
|---|
| 37 | ///#include <initguid.h>
|
|---|
| 38 | #include <guiddef.h>
|
|---|
| 39 |
|
|---|
| 40 | #include <gdiplus.h>
|
|---|
| 41 |
|
|---|
| 42 | #define DBG_LOCALLOG DBG_gdiplus
|
|---|
| 43 | #include "dbglocal.h"
|
|---|
| 44 |
|
|---|
| 45 | ODINDEBUGCHANNEL(GDIPLUS-GDIPLUS)
|
|---|
| 46 |
|
|---|
| 47 | void* WINGDIPAPI GdipAlloc(SIZE_T size)
|
|---|
| 48 | {
|
|---|
| 49 | return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | void WINGDIPAPI GdipFree(void* ptr)
|
|---|
| 53 | {
|
|---|
| 54 | HeapFree(GetProcessHeap(), 0, ptr);
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | void WINAPI GdiplusShutdown(ULONG_PTR token)
|
|---|
| 58 | {
|
|---|
| 59 | /* FIXME: no object tracking */
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input,
|
|---|
| 63 | struct GdiplusStartupOutput *output)
|
|---|
| 64 | {
|
|---|
| 65 | if(!token)
|
|---|
| 66 | return InvalidParameter;
|
|---|
| 67 |
|
|---|
| 68 | if(input->GdiplusVersion != 1) {
|
|---|
| 69 | return UnsupportedGdiplusVersion;
|
|---|
| 70 | } else if ((input->DebugEventCallback) ||
|
|---|
| 71 | (input->SuppressBackgroundThread) || (input->SuppressExternalCodecs)){
|
|---|
| 72 | FIXME("Unimplemented for non-default GdiplusStartupInput");
|
|---|
| 73 | return NotImplemented;
|
|---|
| 74 | } else if(output) {
|
|---|
| 75 | FIXME("Unimplemented for non-null GdiplusStartupOutput");
|
|---|
| 76 | return NotImplemented;
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | return Ok;
|
|---|
| 80 | }
|
|---|