Mike McCormack | 3be4f5d | 2004-10-18 22:28:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2002 Andriy Palamarchuk |
| 3 | * Copyright (C) 2004 Mike McCormack |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | */ |
| 19 | |
| 20 | cpp_quote("#if 0"); /* not included on Windows */ |
| 21 | import "oleidl.idl"; |
| 22 | cpp_quote("#endif"); |
| 23 | |
| 24 | /* REOBJECT structure flags */ |
| 25 | cpp_quote("#define REO_GETOBJ_NO_INTERFACES 0x00000000"); |
| 26 | cpp_quote("#define REO_GETOBJ_POLEOBJ 0x00000001"); |
| 27 | cpp_quote("#define REO_GETOBJ_PSTG 0x00000002"); |
| 28 | cpp_quote("#define REO_GETOBJ_POLESITE 0x00000004"); |
| 29 | cpp_quote("#define REO_GETOBJ_ALL_INTERFACES 0x00000007"); |
| 30 | cpp_quote("#define REO_CP_SELECTION 0xFFFFFFFF"); |
| 31 | cpp_quote("#define REO_IOB_SELECTION 0xFFFFFFFF"); |
| 32 | cpp_quote("#define REO_IOB_USE_CP 0xFFFFFFFE"); |
| 33 | cpp_quote("#define REO_NULL 0x00000000"); |
| 34 | cpp_quote("#define REO_READWRITEMASK 0x0000003F"); |
| 35 | cpp_quote("#define REO_DONTNEEDPALETTE 0x00000020"); |
| 36 | cpp_quote("#define REO_BLANK 0x00000010"); |
| 37 | cpp_quote("#define REO_DYNAMICSIZE 0x00000008"); |
| 38 | cpp_quote("#define REO_INVERTEDSELECT 0x00000004"); |
| 39 | cpp_quote("#define REO_BELOWBASELINE 0x00000002"); |
| 40 | cpp_quote("#define REO_RESIZABLE 0x00000001"); |
| 41 | cpp_quote("#define REO_LINK 0x80000000"); |
| 42 | cpp_quote("#define REO_STATIC 0x40000000"); |
| 43 | cpp_quote("#define REO_SELECTED 0x08000000"); |
| 44 | cpp_quote("#define REO_OPEN 0x04000000"); |
| 45 | cpp_quote("#define REO_INPLACEACTIVE 0x02000000"); |
| 46 | cpp_quote("#define REO_HILITED 0x01000000"); |
| 47 | cpp_quote("#define REO_LINKAVAILABLE 0x00800000"); |
| 48 | cpp_quote("#define REO_GETMETAFILE 0x00400000"); |
| 49 | |
| 50 | /* clipboard operation flags */ |
| 51 | cpp_quote("#define RECO_PASTE 0x00000000"); |
| 52 | cpp_quote("#define RECO_DROP 0x00000001"); |
| 53 | cpp_quote("#define RECO_COPY 0x00000002"); |
| 54 | cpp_quote("#define RECO_CUT 0x00000003"); |
| 55 | cpp_quote("#define RECO_DRAG 0x00000004"); |
| 56 | |
| 57 | typedef struct _reobject { |
| 58 | DWORD cbStruct; |
| 59 | LONG cp; |
| 60 | CLSID clsid; |
| 61 | LPOLEOBJECT poleobj; |
| 62 | LPSTORAGE pstg; |
| 63 | LPOLECLIENTSITE polesite; |
| 64 | SIZEL sizel; |
| 65 | DWORD dvaspect; |
| 66 | DWORD dwFlags; |
| 67 | DWORD dwUser; |
| 68 | } REOBJECT; |
| 69 | |
| 70 | cpp_quote("#ifndef __RICHEDIT_CHARRANGE_DEFINED"); |
| 71 | cpp_quote("#define __RICHEDIT_CHARRANGE_DEFINED"); |
| 72 | |
| 73 | typedef struct _charrange |
| 74 | { |
| 75 | LONG cpMin; |
| 76 | LONG cpMax; |
| 77 | } CHARRANGE; |
| 78 | |
| 79 | cpp_quote("#endif /* __RICHEDIT_CHARRANGE_DEFINED */"); |
| 80 | |
| 81 | /***************************************************************************** |
| 82 | * IRichEditOle |
| 83 | */ |
| 84 | [ |
| 85 | object, |
| 86 | uuid(00020d00-0000-0000-c000-000000000046), |
| 87 | pointer_default(unique) |
| 88 | ] |
| 89 | interface IRichEditOle : IUnknown |
| 90 | { |
| 91 | HRESULT GetClientSite(LPOLECLIENTSITE *lplpolesite); |
| 92 | HRESULT GetObjectCount(); |
| 93 | HRESULT GetLinkCount(); |
| 94 | HRESULT GetObject(LONG iob, REOBJECT *lpreobject, DWORD dwFlags); |
| 95 | HRESULT InsertObject(REOBJECT *lpreobject); |
| 96 | HRESULT ConvertObject(LONG iob, REFCLSID rclsidNew, LPCSTR lpstrUserTypeNew); |
| 97 | HRESULT ActivateAs(REFCLSID rclsid, REFCLSID rclsidAs); |
| 98 | HRESULT SetHostNames(LPCSTR lpstrContainerApp, LPCSTR lpstrContainerObj); |
| 99 | HRESULT SetLinkAvailable(LONG iob, BOOL fAvailable); |
| 100 | HRESULT SetDvaspect(LONG iob, DWORD dvaspect); |
| 101 | HRESULT HandsOffStorage(LONG iob); |
| 102 | HRESULT SaveCompleted(LONG iob, LPSTORAGE lpstg); |
| 103 | HRESULT InPlaceDeactivate(); |
| 104 | HRESULT ContextSensitiveHelp(BOOL fEnterMode); |
| 105 | HRESULT GetClipboardData(CHARRANGE* lpchrg, DWORD reco, LPDATAOBJECT *lplpdataobj); |
| 106 | HRESULT ImportDataObject(LPDATAOBJECT lpdataobj, CLIPFORMAT cf, HGLOBAL hMetaPict); |
| 107 | } |
Vincent BĂ©ron | a57c391 | 2005-02-21 18:28:47 +0000 | [diff] [blame] | 108 | |
| 109 | /***************************************************************************** |
| 110 | * IRichEditOleCallback |
| 111 | */ |
| 112 | [ |
| 113 | object, |
| 114 | uuid(00020d03-0000-0000-c000-000000000046), |
| 115 | pointer_default(unique) |
| 116 | ] |
| 117 | interface IRichEditOleCallback : IUnknown |
| 118 | { |
| 119 | HRESULT GetNewStorage(LPSTORAGE *lplpstg); |
| 120 | HRESULT GetInPlaceContext(LPOLEINPLACEFRAME *lplpFrame, LPOLEINPLACEUIWINDOW *lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo); |
| 121 | HRESULT ShowContainerUI(BOOL fShow); |
| 122 | HRESULT QueryInsertObject(LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp); |
| 123 | HRESULT DeleteObject(LPOLEOBJECT lpoleobj); |
| 124 | HRESULT QueryAcceptData(LPDATAOBJECT lpdataobj, CLIPFORMAT *lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict); |
| 125 | HRESULT ContextSensitiveHelp(BOOL fEnterMode); |
| 126 | HRESULT GetClipboardData(CHARRANGE *lpchrg, DWORD reco, LPDATAOBJECT *lplpdataobj); |
| 127 | HRESULT GetDragDropEffect(BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect); |
| 128 | HRESULT GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE *lpchrg, HMENU *lphmenu); |
| 129 | } |