[CMAKE]
[reactos.git] / subsystems / win32 / win32k / include / path.h
1 #pragma once
2
3 /* DCPATH flPath */
4 #define DCPATH_ACTIVE 0x0001
5 #define DCPATH_SAVE 0x0002
6 #define DCPATH_CLOCKWISE 0x0004
7 // ReactOS only
8 #define DCPATH_SAVESTATE 0x80000000
9
10 typedef HGDIOBJ HPATH, *PHPATH;
11
12 typedef enum tagGdiPathState
13 {
14 PATH_Null,
15 PATH_Open,
16 PATH_Closed
17 } GdiPathState;
18
19 typedef struct _PATH
20 {
21 BASEOBJECT BaseObject;
22
23 RECTFX rcfxBoundBox;
24 POINTFX ptfxSubPathStart;
25
26 // Things to convert from:
27 DWORD state;
28 POINT *pPoints;
29 BYTE *pFlags;
30 int numEntriesUsed;
31 int numEntriesAllocated;
32 BOOL newStroke;
33 } PATH, *PPATH;
34
35 typedef struct _EPATHOBJ
36 {
37 PATHOBJ po;
38 PPATH pPath;
39 } EPATHOBJ, *PEPATHOBJ;
40
41 #define PATH_AllocPath() ((PPATH) GDIOBJ_AllocObj(GDIObjType_PATH_TYPE))
42 #define PATH_AllocPathWithHandle() ((PPATH) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_PATH, sizeof(PATH)))
43 #define PATH_FreePath(pPath) GDIOBJ_FreeObj((POBJ)pPath, GDIObjType_PATH_TYPE)
44 #define PATH_FreeExtPathByHandle(hPath) GDIOBJ_FreeObjByHandle((HGDIOBJ) hPath, GDI_OBJECT_TYPE_PATH)
45 #define PATH_LockPath(hPath) ((PPATH)GDIOBJ_ShareLockObj((HGDIOBJ)hPath, GDI_OBJECT_TYPE_PATH))
46 #define PATH_UnlockPath(pPath) GDIOBJ_vDereferenceObject((POBJ)pPath)
47
48
49 #define PATH_IsPathOpen(dclevel) ( ((dclevel).hPath) && ((dclevel).flPath & DCPATH_ACTIVE) )
50
51 BOOL FASTCALL PATH_Arc (PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd, INT lines);
52 BOOL FASTCALL PATH_AssignGdiPath (PPATH pPathDest, const PPATH pPathSrc);
53 VOID FASTCALL PATH_DestroyGdiPath (PPATH pPath);
54 BOOL FASTCALL PATH_Ellipse (PDC dc, INT x1, INT y1, INT x2, INT y2);
55 VOID FASTCALL PATH_EmptyPath (PPATH pPath);
56 VOID FASTCALL PATH_InitGdiPath (PPATH pPath);
57 BOOL FASTCALL PATH_LineTo (PDC dc, INT x, INT y);
58 BOOL FASTCALL PATH_MoveTo (PDC dc);
59 BOOL FASTCALL PATH_PolyBezier (PDC dc, const POINT *pts, DWORD cbPoints);
60 BOOL FASTCALL PATH_PolyBezierTo (PDC dc, const POINT *pts, DWORD cbPoints);
61 BOOL FASTCALL PATH_Polygon (PDC dc, const POINT *pts, DWORD cbPoints);
62 BOOL FASTCALL PATH_Polyline (PDC dc, const POINT *pts, DWORD cbPoints);
63 BOOL FASTCALL PATH_PolylineTo (PDC dc, const POINT *pts, DWORD cbPoints);
64 BOOL FASTCALL PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons);
65 BOOL FASTCALL PATH_PolyPolyline( PDC dc, const POINT* pts, const DWORD* counts, DWORD polylines);
66 BOOL FASTCALL PATH_Rectangle (PDC dc, INT x1, INT y1, INT x2, INT y2);
67 BOOL FASTCALL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height);
68 BOOL FASTCALL PATH_PathToRegion (PPATH pPath, INT nPolyFillMode, HRGN *pHrgn);
69 BOOL FASTCALL PATH_ExtTextOut(PDC dc,INT x,INT y,UINT flags,const RECTL *lprc,LPCWSTR str,UINT count,const INT *dx);
70
71 VOID FASTCALL IntGdiCloseFigure(PPATH pPath);
72 BOOL FASTCALL PATH_Delete(HPATH hPath);