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