olecli_main.c 7.39 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3 4
/*
 *	OLECLI library
 *
 *	Copyright 1995	Martin von Loewis
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard's avatar
Alexandre Julliard committed
19 20 21 22
 */

/*	At the moment, these are only empty stubs.
 */
23 24 25

#include "config.h"

26 27
#include <stdarg.h>

Alexandre Julliard's avatar
Alexandre Julliard committed
28 29
#include "windef.h"
#include "wine/windef16.h"
30
#include "winbase.h"
31
#include "wingdi.h"
32
#include "wownt32.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
33
#include "objbase.h"
34
#include "olecli.h"
35
#include "wine/debug.h"
36

37
WINE_DEFAULT_DEBUG_CHANNEL(ole);
38

Alexandre Julliard's avatar
Alexandre Julliard committed
39
typedef struct _OLEOBJECTVTBL {
40
    void *         (CALLBACK *QueryProtocol)(_LPOLEOBJECT,LPCOLESTR16);
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
    OLESTATUS      (CALLBACK *Release)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *Show)(_LPOLEOBJECT,BOOL16);
    OLESTATUS      (CALLBACK *DoVerb)(_LPOLEOBJECT,UINT16,BOOL16,BOOL16);
    OLESTATUS      (CALLBACK *GetData)(_LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
    OLESTATUS      (CALLBACK *SetData)(_LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
    OLESTATUS      (CALLBACK *SetTargetDevice)(_LPOLEOBJECT,HGLOBAL16);
    OLESTATUS      (CALLBACK *SetBounds)(_LPOLEOBJECT,LPRECT16);
    OLESTATUS      (CALLBACK *EnumFormats)(_LPOLEOBJECT,OLECLIPFORMAT);
    OLESTATUS      (CALLBACK *SetColorScheme)(_LPOLEOBJECT,struct tagLOGPALETTE*);
    OLESTATUS      (CALLBACK *Delete)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *SetHostNames)(_LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16);
    OLESTATUS      (CALLBACK *SaveToStream)(_LPOLEOBJECT,struct _OLESTREAM*);
    OLESTATUS      (CALLBACK *Clone)(_LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,_LPOLEOBJECT *);
    OLESTATUS      (CALLBACK *CopyFromLink)(_LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,_LPOLEOBJECT *);
    OLESTATUS      (CALLBACK *Equal)(_LPOLEOBJECT,_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *CopyToClipBoard)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *Draw)(_LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
    OLESTATUS      (CALLBACK *Activate)(_LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16);
    OLESTATUS      (CALLBACK *Execute)(_LPOLEOBJECT,HGLOBAL16,UINT16);
    OLESTATUS      (CALLBACK *Close)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *Update)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *Reconnect)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *ObjectConvert)(_LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,_LPOLEOBJECT*);
    OLESTATUS      (CALLBACK *GetLinkUpdateOptions)(_LPOLEOBJECT,LPOLEOPT_UPDATE);
    OLESTATUS      (CALLBACK *SetLinkUpdateOptions)(_LPOLEOBJECT,OLEOPT_UPDATE);
    OLESTATUS      (CALLBACK *Rename)(_LPOLEOBJECT,LPCOLESTR16);
    OLESTATUS      (CALLBACK *QueryName)(_LPOLEOBJECT,LPSTR,LPUINT16);
    OLESTATUS      (CALLBACK *QueryType)(_LPOLEOBJECT,LPLONG);
    OLESTATUS      (CALLBACK *QueryBounds)(_LPOLEOBJECT,LPRECT16);
    OLESTATUS      (CALLBACK *QuerySize)(_LPOLEOBJECT,LPDWORD);
    OLESTATUS      (CALLBACK *QueryOpen)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *QueryOutOfDate)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *QueryReleaseStatus)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *QueryReleaseError)(_LPOLEOBJECT);
    OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(_LPOLEOBJECT);
    OLESTATUS      (CALLBACK *RequestData)(_LPOLEOBJECT,OLECLIPFORMAT);
    OLESTATUS      (CALLBACK *ObjectLong)(_LPOLEOBJECT,UINT16,LPLONG);
Alexandre Julliard's avatar
Alexandre Julliard committed
78 79 80 81 82
} OLEOBJECTVTBL;
typedef OLEOBJECTVTBL *LPOLEOBJECTVTBL;

typedef struct _OLEOBJECT
{
83
    const OLEOBJECTVTBL *lpvtbl;
Alexandre Julliard's avatar
Alexandre Julliard committed
84
} OLEOBJECT;
Alexandre Julliard's avatar
Alexandre Julliard committed
85

86
static LONG OLE_current_handle;
Alexandre Julliard's avatar
Alexandre Julliard committed
87

88 89 90 91 92
/******************************************************************************
 *		OleSavedClientDoc	[OLECLI32.45]
 */
OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC hDoc)
{
93
    FIXME("(%d: stub\n", hDoc);
94 95 96
    return OLE_OK;
}

97
/******************************************************************************
98
 *		OleRegisterClientDoc	[OLECLI32.41]
Alexandre Julliard's avatar
Alexandre Julliard committed
99
 */
100
OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR classname, LPCSTR docname,
Alexandre Julliard's avatar
Alexandre Julliard committed
101 102
                                        LONG reserved, LHCLIENTDOC *hRet )
{
103
    FIXME("(%s,%s,...): stub\n",classname,docname);
Alexandre Julliard's avatar
Alexandre Julliard committed
104 105 106 107
    *hRet=++OLE_current_handle;
    return OLE_OK;
}

108
/******************************************************************************
109
 *		OleRenameClientDoc	[OLECLI32.43]
Alexandre Julliard's avatar
Alexandre Julliard committed
110
 */
111
OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC hDoc, LPCSTR newName)
Alexandre Julliard's avatar
Alexandre Julliard committed
112
{
113
    FIXME("(%d,%s,...): stub\n",hDoc, newName);
Alexandre Julliard's avatar
Alexandre Julliard committed
114 115 116
    return OLE_OK;
}

117
/******************************************************************************
118
 *		OleRevokeClientDoc	[OLECLI32.42]
Alexandre Julliard's avatar
Alexandre Julliard committed
119
 */
120
OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
Alexandre Julliard's avatar
Alexandre Julliard committed
121
{
122
    FIXME("(%d): stub\n",hServerDoc);
Alexandre Julliard's avatar
Alexandre Julliard committed
123 124 125
    return OLE_OK;
}

126
/******************************************************************************
127
 *           OleCreateLinkFromClip	[OLECLI32.11]
Alexandre Julliard's avatar
Alexandre Julliard committed
128
 */
129
OLESTATUS WINAPI OleCreateLinkFromClip(
Alexandre Julliard's avatar
Alexandre Julliard committed
130
	LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
131
	_LPOLEOBJECT *lpoleob,OLEOPT_RENDER render,OLECLIPFORMAT clipformat
Alexandre Julliard's avatar
Alexandre Julliard committed
132
) {
133
	FIXME("(%s,%p,%08x,%s,%p,%d,%d): stub!\n",
Alexandre Julliard's avatar
Alexandre Julliard committed
134
	      name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
Alexandre Julliard's avatar
Alexandre Julliard committed
135 136 137
	return OLE_OK;
}

138
/******************************************************************************
139
 *           OleQueryLinkFromClip	[OLECLI32.9]
Alexandre Julliard's avatar
Alexandre Julliard committed
140
 */
141
OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
142
	FIXME("(%s,%d,%d): stub!\n",name,render,clipformat);
Alexandre Julliard's avatar
Alexandre Julliard committed
143 144
	return OLE_OK;
}
145

146
/******************************************************************************
147
 *           OleQueryCreateFromClip	[OLECLI32.10]
Alexandre Julliard's avatar
Alexandre Julliard committed
148
 */
149
OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
150
	FIXME("(%s,%d,%d): stub!\n",name,render,clipformat);
Alexandre Julliard's avatar
Alexandre Julliard committed
151 152 153
	return OLE_OK;
}

154
/******************************************************************************
155
 *		OleIsDcMeta	[OLECLI32.60]
Alexandre Julliard's avatar
Alexandre Julliard committed
156
 */
157
BOOL WINAPI OleIsDcMeta(HDC hdc)
Alexandre Julliard's avatar
Alexandre Julliard committed
158
{
159
    TRACE("(%p)\n",hdc);
160
    return GetObjectType( hdc ) == OBJ_METADC;
Alexandre Julliard's avatar
Alexandre Julliard committed
161 162
}

163
/******************************************************************************
164
 *		OleSetHostNames	[OLECLI32.15]
Alexandre Julliard's avatar
Alexandre Julliard committed
165
 */
166
OLESTATUS WINAPI OleSetHostNames(_LPOLEOBJECT oleob,LPCSTR name1,LPCSTR name2) {
167
	FIXME("(%p,%s,%s): stub\n",oleob,name1,name2);
Alexandre Julliard's avatar
Alexandre Julliard committed
168 169 170
	return OLE_OK;
}

171
/******************************************************************************
172
 *		OleQueryType	[OLECLI32.14]
Alexandre Julliard's avatar
Alexandre Julliard committed
173
 */
174
OLESTATUS WINAPI OleQueryType(_LPOLEOBJECT oleob,LONG*xlong) {
175
	FIXME("(%p,%p): stub!\n",oleob,xlong);
Alexandre Julliard's avatar
Alexandre Julliard committed
176 177
	if (!oleob)
		return 0x10;
178
	TRACE("Calling OLEOBJECT.QueryType (%p) (%p,%p)\n",
Alexandre Julliard's avatar
Alexandre Julliard committed
179
	      oleob->lpvtbl->QueryType,oleob,xlong);
Alexandre Julliard's avatar
Alexandre Julliard committed
180 181 182
	return oleob->lpvtbl->QueryType(oleob,xlong);
}

183
/******************************************************************************
184
 *		OleCreateFromClip	[OLECLI32.12]
Alexandre Julliard's avatar
Alexandre Julliard committed
185
 */
186
OLESTATUS WINAPI OleCreateFromClip(
Alexandre Julliard's avatar
Alexandre Julliard committed
187
	LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
188
	_LPOLEOBJECT *lpoleob,OLEOPT_RENDER render, OLECLIPFORMAT clipformat
Alexandre Julliard's avatar
Alexandre Julliard committed
189
) {
190
	FIXME("(%s,%p,%08x,%s,%p,%d,%d): stub!\n",
Alexandre Julliard's avatar
Alexandre Julliard committed
191
	      name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
Alexandre Julliard's avatar
Alexandre Julliard committed
192 193 194
	/* clipb type, object kreieren entsprechend etc. */
	return OLE_OK;
}