1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#ifndef _RICHOLE_
7#define _RICHOLE_
8
9#include "richedit.h"
10
11typedef struct _reobject {
12  DWORD cbStruct;
13  LONG cp;
14  CLSID clsid;
15  LPOLEOBJECT poleobj;
16  LPSTORAGE pstg;
17  LPOLECLIENTSITE polesite;
18  SIZEL sizel;
19  DWORD dvaspect;
20  DWORD dwFlags;
21  DWORD dwUser;
22} REOBJECT;
23
24#define REO_GETOBJ_NO_INTERFACES (__MSABI_LONG(0x00000000))
25#define REO_GETOBJ_POLEOBJ (__MSABI_LONG(0x00000001))
26#define REO_GETOBJ_PSTG (__MSABI_LONG(0x00000002))
27#define REO_GETOBJ_POLESITE (__MSABI_LONG(0x00000004))
28#define REO_GETOBJ_ALL_INTERFACES (__MSABI_LONG(0x00000007))
29
30#define REO_CP_SELECTION ((ULONG) -1)
31
32#define REO_IOB_SELECTION ((ULONG) -1)
33#define REO_IOB_USE_CP ((ULONG) -2)
34
35#define REO_NULL (__MSABI_LONG(0x00000000))
36#define REO_READWRITEMASK (__MSABI_LONG(0x000007ff))
37#define REO_CANROTATE (__MSABI_LONG(0x00000080))
38#define REO_OWNERDRAWSELECT (__MSABI_LONG(0x00000040))
39#define REO_DONTNEEDPALETTE (__MSABI_LONG(0x00000020))
40#define REO_BLANK (__MSABI_LONG(0x00000010))
41#define REO_DYNAMICSIZE (__MSABI_LONG(0x00000008))
42#define REO_INVERTEDSELECT (__MSABI_LONG(0x00000004))
43#define REO_BELOWBASELINE (__MSABI_LONG(0x00000002))
44#define REO_RESIZABLE (__MSABI_LONG(0x00000001))
45#define REO_USEASBACKGROUND (__MSABI_LONG(0x00000400))
46#define REO_WRAPTEXTAROUND (__MSABI_LONG(0x00000200))
47#define REO_ALIGNTORIGHT (__MSABI_LONG(0x00000100))
48#define REO_LINK (__MSABI_LONG(0x80000000))
49#define REO_STATIC (__MSABI_LONG(0x40000000))
50#define REO_SELECTED (__MSABI_LONG(0x08000000))
51#define REO_OPEN (__MSABI_LONG(0x04000000))
52#define REO_INPLACEACTIVE (__MSABI_LONG(0x02000000))
53#define REO_HILITED (__MSABI_LONG(0x01000000))
54#define REO_LINKAVAILABLE (__MSABI_LONG(0x00800000))
55#define REO_GETMETAFILE (__MSABI_LONG(0x00400000))
56
57#define RECO_PASTE (__MSABI_LONG(0x00000000))
58#define RECO_DROP (__MSABI_LONG(0x00000001))
59#define RECO_COPY (__MSABI_LONG(0x00000002))
60#define RECO_CUT (__MSABI_LONG(0x00000003))
61#define RECO_DRAG (__MSABI_LONG(0x00000004))
62
63#undef INTERFACE
64#define INTERFACE IRichEditOle
65
66DECLARE_INTERFACE_ (IRichEditOle, IUnknown) {
67#ifndef __cplusplus
68  STDMETHOD (QueryInterface) (THIS_ REFIID riid, LPVOID *lplpObj) PURE;
69  STDMETHOD_ (ULONG, AddRef) (THIS) PURE;
70  STDMETHOD_ (ULONG, Release) (THIS) PURE;
71#endif
72  STDMETHOD (GetClientSite) (THIS_ LPOLECLIENTSITE *lplpolesite) PURE;
73  STDMETHOD_ (LONG, GetObjectCount) (THIS) PURE;
74  STDMETHOD_ (LONG, GetLinkCount) (THIS) PURE;
75  STDMETHOD (GetObject) (THIS_ LONG iob, REOBJECT *lpreobject, DWORD dwFlags) PURE;
76  STDMETHOD (InsertObject) (THIS_ REOBJECT *lpreobject) PURE;
77  STDMETHOD (ConvertObject) (THIS_ LONG iob, REFCLSID rclsidNew, LPCSTR lpstrUserTypeNew) PURE;
78  STDMETHOD (ActivateAs) (THIS_ REFCLSID rclsid, REFCLSID rclsidAs) PURE;
79  STDMETHOD (SetHostNames) (THIS_ LPCSTR lpstrContainerApp, LPCSTR lpstrContainerObj) PURE;
80  STDMETHOD (SetLinkAvailable) (THIS_ LONG iob, WINBOOL fAvailable) PURE;
81  STDMETHOD (SetDvaspect) (THIS_ LONG iob, DWORD dvaspect) PURE;
82  STDMETHOD (HandsOffStorage) (THIS_ LONG iob) PURE;
83  STDMETHOD (SaveCompleted) (THIS_ LONG iob, LPSTORAGE lpstg) PURE;
84  STDMETHOD (InPlaceDeactivate) (THIS) PURE;
85  STDMETHOD (ContextSensitiveHelp) (THIS_ WINBOOL fEnterMode) PURE;
86  STDMETHOD (GetClipboardData) (THIS_ CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT *lplpdataobj) PURE;
87  STDMETHOD (ImportDataObject) (THIS_ LPDATAOBJECT lpdataobj, CLIPFORMAT cf, HGLOBAL hMetaPict) PURE;
88};
89typedef IRichEditOle *LPRICHEDITOLE;
90
91#undef INTERFACE
92#define INTERFACE IRichEditOleCallback
93DECLARE_INTERFACE_ (IRichEditOleCallback, IUnknown) {
94#ifndef __cplusplus
95  STDMETHOD (QueryInterface) (THIS_ REFIID riid, LPVOID *lplpObj) PURE;
96  STDMETHOD_ (ULONG, AddRef) (THIS) PURE;
97  STDMETHOD_ (ULONG, Release) (THIS) PURE;
98#endif
99  STDMETHOD (GetNewStorage) (THIS_ LPSTORAGE *lplpstg) PURE;
100  STDMETHOD (GetInPlaceContext) (THIS_ LPOLEINPLACEFRAME *lplpFrame, LPOLEINPLACEUIWINDOW *lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo) PURE;
101  STDMETHOD (ShowContainerUI) (THIS_ WINBOOL fShow) PURE;
102  STDMETHOD (QueryInsertObject) (THIS_ LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp) PURE;
103  STDMETHOD (DeleteObject) (THIS_ LPOLEOBJECT lpoleobj) PURE;
104  STDMETHOD (QueryAcceptData) (THIS_ LPDATAOBJECT lpdataobj, CLIPFORMAT *lpcfFormat, DWORD reco, WINBOOL fReally, HGLOBAL hMetaPict) PURE;
105  STDMETHOD (ContextSensitiveHelp) (THIS_ WINBOOL fEnterMode) PURE;
106  STDMETHOD (GetClipboardData) (THIS_ CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT *lplpdataobj) PURE;
107  STDMETHOD (GetDragDropEffect) (THIS_ WINBOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect) PURE;
108  STDMETHOD (GetContextMenu) (THIS_ WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE *lpchrg, HMENU *lphmenu) PURE;
109};
110typedef IRichEditOleCallback *LPRICHEDITOLECALLBACK;
111
112DEFINE_GUID (IID_IRichEditOle,0x00020D00,0,0,0xC0,0,0,0,0,0,0,0x46);
113DEFINE_GUID (IID_IRichEditOleCallback,0x00020D03,0,0,0xC0,0,0,0,0,0,0,0x46);
114#endif
115