riched20: Use ME_PointFromChar to calculate the caret position.
[wine] / dlls / ole32 / olestd.h
1 /*
2  * Copyright 2000 Abey George
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #if !defined( __WINE_OLESTD_H_ )
20 #define __WINE_OLESTD_H_
21
22 #if !defined(__cplusplus) && !defined( __TURBOC__)
23 #define NONAMELESSUNION     /* use strict ANSI standard (for DVOBJ.H) */
24 #endif
25
26 /* Clipboard format strings */
27 #define CF_EMBEDSOURCE      "Embed Source"
28 #define CF_EMBEDDEDOBJECT   "Embedded Object"
29 #define CF_LINKSOURCE       "Link Source"
30 #define CF_CUSTOMLINKSOURCE "Custom Link Source"
31 #define CF_OBJECTDESCRIPTOR "Object Descriptor"
32 #define CF_LINKSRCDESCRIPTOR "Link Source Descriptor"
33 #define CF_OWNERLINK        "OwnerLink"
34 #define CF_FILENAME         "FileName"
35
36 #define OleStdQueryOleObjectData(lpformatetc)   \
37    (((lpformatetc)->tymed & TYMED_ISTORAGE) ?    \
38          NOERROR : ResultFromScode(DV_E_FORMATETC))
39
40 #define OleStdQueryLinkSourceData(lpformatetc)   \
41    (((lpformatetc)->tymed & TYMED_ISTREAM) ?    \
42          NOERROR : ResultFromScode(DV_E_FORMATETC))
43
44 #define OleStdQueryObjectDescriptorData(lpformatetc)    \
45    (((lpformatetc)->tymed & TYMED_HGLOBAL) ?    \
46          NOERROR : ResultFromScode(DV_E_FORMATETC))
47
48 #define OleStdQueryFormatMedium(lpformatetc, tymd)  \
49    (((lpformatetc)->tymed & tymd) ?    \
50          NOERROR : ResultFromScode(DV_E_FORMATETC))
51
52 /* Make an independent copy of a MetafilePict */
53 #define OleStdCopyMetafilePict(hpictin, phpictout)  \
54    (*(phpictout) = OleDuplicateData(hpictin,CF_METAFILEPICT,GHND|GMEM_SHARE))
55
56 #endif /* __WINE_OLESTD_H_ */