Added missing OleDraw() declaration.
[wine] / include / ole2.h
1 /*
2  * Declarations for OLE2
3  *
4  * Copyright (C) the Wine project
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_OLE2_H
22 #define __WINE_OLE2_H
23
24 #include <winerror.h>
25 #include <objbase.h>
26 #include <oleauto.h>
27 #include <oleidl.h>
28
29 struct tagMSG;
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* defined(__cplusplus) */
34
35 #define E_DRAW                  VIEW_E_DRAW
36 #define DATA_E_FORMATETC        DV_E_FORMATETC
37
38 #define OLEIVERB_PRIMARY            (0L)
39 #define OLEIVERB_SHOW               (-1L)
40 #define OLEIVERB_OPEN               (-2L)
41 #define OLEIVERB_HIDE               (-3L)
42 #define OLEIVERB_UIACTIVATE         (-4L)
43 #define OLEIVERB_INPLACEACTIVATE    (-5L)
44 #define OLEIVERB_DISCARDUNDOSTATE   (-6L)
45 #define OLEIVERB_PROPERTIES         (-7L)
46
47 /*
48  * API declarations
49  */
50 HRESULT     WINAPI RegisterDragDrop(HWND,LPDROPTARGET);
51 HRESULT     WINAPI RevokeDragDrop(HWND);
52 HRESULT     WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
53 HRESULT  WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
54 HRESULT  WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm);
55 HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths);
56 HRESULT   WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor);
57 HRESULT  WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject);
58
59 HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
60 HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid);
61 HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid);
62
63
64 HRESULT     WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
65 HRESULT     WINAPI OleRegGetUserType(REFCLSID clsid,
66                                      DWORD dwFormOfType,
67                                      LPOLESTR* pszUserType);
68 HRESULT     WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus);
69 HRESULT     WINAPI OleRegEnumFormatEtc (REFCLSID clsid,
70                                         DWORD    dwDirection,
71                                         LPENUMFORMATETC* ppenumFormatetc);
72 HRESULT     WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
73 HRESULT     WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL* phglobal);
74 HRESULT     WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum);
75 BOOL        WINAPI OleIsRunning(LPOLEOBJECT pObject);
76 HRESULT     WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
77                 DWORD renderopt, LPFORMATETC pFormatEtc,
78                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
79                 LPVOID* ppvObj);
80 HRESULT     WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained);
81 HRESULT     WINAPI OleQueryLinkFromData(IDataObject* pSrcDataObject);
82 HRESULT     WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject);
83 HRESULT     WINAPI OleRun(LPUNKNOWN pUnknown);
84 HRESULT     WINAPI OleDraw(LPUNKNOWN pUnknown, DWORD dwAspect, HDC hdcDraw, LPCRECT lprcBounds);
85 VOID        WINAPI ReleaseStgMedium(LPSTGMEDIUM);
86 HRESULT     WINAPI OleGetClipboard(IDataObject** ppDataObj);
87 HRESULT     WINAPI OleIsCurrentClipboard(LPDATAOBJECT);
88 HRESULT     WINAPI OleSetClipboard(LPDATAOBJECT);
89 HRESULT     WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
90                 DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
91                 LPSTORAGE pStg, LPVOID* ppvObj);
92 HRESULT     WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType);
93 HRESULT     WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj);
94 HRESULT     WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL* phglobal);
95 HRESULT     WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt);
96 HRESULT     WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
97 HGLOBAL     WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel);
98 HRESULT     WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses);
99 HRESULT     WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
100                 DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
101 HRESULT     WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
102                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
103 HRESULT     WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
104                 LPSTORAGE pStg, LPVOID* ppvObj);
105 HRESULT     WINAPI OleFlushClipboard(void);
106 HRESULT     WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert);
107 BOOL        WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd);
108 HRESULT     WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
109                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
110 HANDLE      WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
111 HRESULT     WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType);
112 HRESULT     WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg);
113 HRESULT     WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
114                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
115 HRESULT     WINAPI OleCreateDefaultHandler(REFCLSID  clsid,
116                                            LPUNKNOWN pUnkOuter,
117                                            REFIID    riid,
118                                            LPVOID*   ppvObj);
119 HRESULT     WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
120 HRESULT     WINAPI OleInitialize(LPVOID pvReserved);
121 void        WINAPI OleUninitialize(void);
122 BOOL        WINAPI IsValidInterface(LPUNKNOWN punk);
123
124 /*
125  *  OLE version conversion declarations
126  */
127
128
129 typedef struct _OLESTREAM* LPOLESTREAM;
130 typedef struct _OLESTREAMVTBL {
131         DWORD   (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
132         DWORD   (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
133 } OLESTREAMVTBL;
134 typedef OLESTREAMVTBL*  LPOLESTREAMVTBL;
135 typedef struct _OLESTREAM {
136         LPOLESTREAMVTBL lpstbl;
137 } OLESTREAM;
138
139 HRESULT     WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd);
140 HRESULT     WINAPI OleConvertIStorageToOLESTREAM( LPSTORAGE pstg, LPOLESTREAM lpolestream);
141
142 HRESULT     WINAPI OleGetAutoConvert( REFCLSID clsidOld, LPCLSID pClsidNew );
143 HRESULT     WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew );
144
145 #ifdef __cplusplus
146 } /* extern "C" */
147 #endif /* defined(__cplusplus) */
148
149 #endif  /* __WINE_OLE2_H */