po: Fix trailing full stops errors in the Russian translation.
[wine/multimedia.git] / include / gdiplusmetaheader.h
blobe59ab09c8e49ed599644d1bf8e71717c120e0379
1 /*
2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _GDIPLUSMETAHEADER_H
20 #define _GDIPLUSMETAHEADER_H
22 typedef struct
24 DWORD iType;
25 DWORD nSize;
26 RECTL rclBounds;
27 RECTL rclFrame;
28 DWORD dSignature;
29 DWORD nVersion;
30 DWORD nBytes;
31 DWORD nRecords;
32 WORD nHandles;
33 WORD sReserved;
34 DWORD nDescription;
35 DWORD offDescription;
36 DWORD nPalEntries;
37 SIZEL szlDevice;
38 SIZEL szlMillimeters;
39 } ENHMETAHEADER3;
41 #include <pshpack2.h>
43 typedef struct
45 INT16 Left;
46 INT16 Top;
47 INT16 Right;
48 INT16 Bottom;
49 } PWMFRect16;
51 typedef struct
53 UINT32 Key;
54 INT16 Hmf;
55 PWMFRect16 BoundingBox;
56 INT16 Inch;
57 UINT32 Reserved;
58 INT16 Checksum;
59 } WmfPlaceableFileHeader;
61 #include <poppack.h>
63 #define GDIP_EMFPLUSFLAGS_DISPLAY 0x00000001
65 #ifdef __cplusplus
66 class MetafileHeader
68 public:
69 MetafileType Type;
70 UINT Size;
71 UINT Version;
72 UINT EmfPlusFlags;
73 REAL DpiX;
74 REAL DpiY;
75 INT X;
76 INT Y;
77 INT Width;
78 INT Height;
79 union
81 METAHEADER WmfHeader;
82 ENHMETAHEADER3 EmfHeader;
84 INT EmfPlusHeaderSize;
85 INT LogicalDpiX;
86 INT LogicalDpiY;
88 public:
89 MetafileType GetType() const { return Type; }
91 UINT GetMetafileSize() const { return Size; }
93 UINT GetVersion() const { return Version; }
95 UINT GetEmfPlusFlags() const { return EmfPlusFlags; }
97 REAL GetDpiX() const { return DpiX; }
99 REAL GetDpiY() const { return DpiY; }
101 VOID GetBounds (OUT Rect *r) const
103 r->X = X;
104 r->Y = Y;
105 r->Width = Width;
106 r->Height = Height;
109 BOOL IsWmf() const
111 return ((Type == MetafileTypeWmf) || (Type == MetafileTypeWmfPlaceable));
114 BOOL IsWmfPlaceable() const { return (Type == MetafileTypeWmfPlaceable); }
116 BOOL IsEmf() const { return (Type == MetafileTypeEmf); }
118 BOOL IsEmfOrEmfPlus() const { return (Type >= MetafileTypeEmf); }
120 BOOL IsEmfPlus() const { return (Type >= MetafileTypeEmfPlusOnly); }
122 BOOL IsEmfPlusDual() const { return (Type == MetafileTypeEmfPlusDual); }
124 BOOL IsEmfPlusOnly() const { return (Type == MetafileTypeEmfPlusOnly); }
126 BOOL IsDisplay() const
128 return IsEmfPlus() && ((EmfPlusFlags & GDIP_EMFPLUSFLAGS_DISPLAY) != 0);
131 const METAHEADER * GetWmfHeader() const
133 return IsWmf() ? &WmfHeader : NULL;
136 const ENHMETAHEADER3 * GetEmfHeader() const
138 return IsEmfOrEmfPlus() ? &EmfHeader : NULL;
141 #else /* end of c++ typedefs */
143 typedef struct MetafileHeader
145 MetafileType Type;
146 UINT Size;
147 UINT Version;
148 UINT EmfPlusFlags;
149 REAL DpiX;
150 REAL DpiY;
151 INT X;
152 INT Y;
153 INT Width;
154 INT Height;
155 union
157 METAHEADER WmfHeader;
158 ENHMETAHEADER3 EmfHeader;
159 } DUMMYUNIONNAME;
160 INT EmfPlusHeaderSize;
161 INT LogicalDpiX;
162 INT LogicalDpiY;
163 } MetafileHeader;
165 #endif /* end of c typedefs */
167 #endif /* _GDIPLUSMETAHEADER_H */