2013-12-23 12:30:05 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2013 Nikolay Sivov for CodeWeavers
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
import "unknwn.idl";
|
|
|
|
import "d2dbasetypes.h";
|
|
|
|
|
|
|
|
typedef D2D_POINT_2F D2D1_POINT_2F;
|
|
|
|
|
2014-02-18 09:39:22 +00:00
|
|
|
typedef enum D2D1_DEBUG_LEVEL
|
|
|
|
{
|
|
|
|
D2D1_DEBUG_LEVEL_NONE = 0,
|
|
|
|
D2D1_DEBUG_LEVEL_ERROR = 1,
|
|
|
|
D2D1_DEBUG_LEVEL_WARNING = 2,
|
|
|
|
D2D1_DEBUG_LEVEL_INFORMATION = 3,
|
|
|
|
D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff,
|
|
|
|
} D2D1_DEBUG_LEVEL;
|
|
|
|
|
|
|
|
typedef enum D2D1_FACTORY_TYPE
|
|
|
|
{
|
|
|
|
D2D1_FACTORY_TYPE_SINGLE_THREADED = 0,
|
|
|
|
D2D1_FACTORY_TYPE_MULTI_THREADED = 1,
|
|
|
|
D2D1_FACTORY_TYPE_FORCE_DWORD = 0xfffffff,
|
|
|
|
} D2D1_FACTORY_TYPE;
|
|
|
|
|
2013-12-23 12:30:05 +00:00
|
|
|
typedef enum D2D1_FILL_MODE
|
|
|
|
{
|
|
|
|
D2D1_FILL_MODE_ALTERNATE = 0,
|
|
|
|
D2D1_FILL_MODE_WINDING = 1,
|
|
|
|
D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
|
|
|
|
} D2D1_FILL_MODE;
|
|
|
|
|
|
|
|
typedef enum D2D1_PATH_SEGMENT
|
|
|
|
{
|
|
|
|
D2D1_PATH_SEGMENT_NONE = 0,
|
|
|
|
D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 1,
|
|
|
|
D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 2,
|
|
|
|
D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
|
|
|
|
} D2D1_PATH_SEGMENT;
|
|
|
|
|
|
|
|
typedef enum D2D1_FIGURE_BEGIN
|
|
|
|
{
|
|
|
|
D2D1_FIGURE_BEGIN_FILLED = 0,
|
|
|
|
D2D1_FIGURE_BEGIN_HOLLOW = 1,
|
|
|
|
D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
|
|
|
|
} D2D1_FIGURE_BEGIN;
|
|
|
|
|
|
|
|
typedef struct D2D1_BEZIER_SEGMENT
|
|
|
|
{
|
|
|
|
D2D1_POINT_2F point1;
|
|
|
|
D2D1_POINT_2F point2;
|
|
|
|
D2D1_POINT_2F point3;
|
|
|
|
} D2D1_BEZIER_SEGMENT;
|
|
|
|
|
|
|
|
typedef enum D2D1_FIGURE_END
|
|
|
|
{
|
|
|
|
D2D1_FIGURE_END_OPEN = 0,
|
|
|
|
D2D1_FIGURE_END_CLOSED = 1,
|
|
|
|
D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
|
|
|
|
} D2D1_FIGURE_END;
|
|
|
|
|
2014-02-18 09:39:22 +00:00
|
|
|
typedef struct D2D1_FACTORY_OPTIONS
|
|
|
|
{
|
|
|
|
D2D1_DEBUG_LEVEL debugLevel;
|
|
|
|
} D2D1_FACTORY_OPTIONS;
|
|
|
|
|
2014-05-12 07:34:00 +00:00
|
|
|
interface ID2D1Factory;
|
|
|
|
|
|
|
|
[
|
|
|
|
local,
|
|
|
|
object,
|
|
|
|
uuid(2cd90691-12e2-11dc-9fed-001143a055f9)
|
|
|
|
]
|
|
|
|
interface ID2D1Resource : IUnknown
|
|
|
|
{
|
|
|
|
void GetFactory(
|
|
|
|
[out] ID2D1Factory **factory
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2013-12-23 12:30:05 +00:00
|
|
|
[
|
|
|
|
local,
|
|
|
|
object,
|
|
|
|
uuid(2cd9069e-12e2-11dc-9fed-001143a055f9)
|
|
|
|
]
|
|
|
|
interface ID2D1SimplifiedGeometrySink : IUnknown
|
|
|
|
{
|
|
|
|
void SetFillMode(D2D1_FILL_MODE mode);
|
|
|
|
void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags);
|
|
|
|
void BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin);
|
|
|
|
void AddLines(const D2D1_POINT_2F *points, UINT32 count);
|
|
|
|
void AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT32 count);
|
|
|
|
void EndFigure(D2D1_FIGURE_END figureEnd);
|
|
|
|
HRESULT Close();
|
|
|
|
}
|
2014-02-18 09:39:22 +00:00
|
|
|
|
|
|
|
[local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
|
|
|
|
const D2D1_FACTORY_OPTIONS *factory_options, void **factory);
|