xref: /trunk/main/odk/examples/OLE/activex/so_activex.idl (revision ef1ef8e674fabf3a541d12c6e6c14cecdfc2f9e7)
1/*************************************************************************
2 *
3 *  The Contents of this file are made available subject to the terms of
4 *  the BSD license.
5 *
6 *  Copyright 2000, 2010 Oracle and/or its affiliates.
7 *  All rights reserved.
8 *
9 *  Redistribution and use in source and binary forms, with or without
10 *  modification, are permitted provided that the following conditions
11 *  are met:
12 *  1. Redistributions of source code must retain the above copyright
13 *     notice, this list of conditions and the following disclaimer.
14 *  2. Redistributions in binary form must reproduce the above copyright
15 *     notice, this list of conditions and the following disclaimer in the
16 *     documentation and/or other materials provided with the distribution.
17 *  3. Neither the name of Sun Microsystems, Inc. nor the names of its
18 *     contributors may be used to endorse or promote products derived
19 *     from this software without specific prior written permission.
20 *
21 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30 *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31 *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 *************************************************************************/
34
35// so_activex.idl : IDL source for so_activex.dll
36//
37
38// This file will be processed by the MIDL tool to
39// produce the type library (so_activex.tlb) and marshalling code.
40
41import "oaidl.idl";
42import "ocidl.idl";
43#include "olectl.h"
44
45
46    [
47        object,
48        uuid(DACF7E3F-626B-4BF9-964B-F4910C843711),
49        dual,
50        helpstring("ISOActiveX Interface"),
51        pointer_default(unique)
52    ]
53    interface ISOActiveX : IDispatch
54    {
55    };
56
57[
58    object,
59    uuid(BF5D10F3-8A10-4A0B-B150-2B6AA2D7E118),
60    dual,
61    helpstring("ISOComWindowPeer Interface"),
62    pointer_default(unique)
63]
64interface ISOComWindowPeer : IDispatch
65{
66    [id(1), helpstring("method getWindowHandle")]
67                HRESULT getWindowHandle( [in] SAFEARRAY(VARIANT) procId,
68                                         [in] short s,
69                                         [out,retval] long* ret);
70
71    [id(2), helpstring("method getToolkit")]
72                HRESULT getToolkit( [out,retval] IDispatch** retVal );
73
74    [id(3), helpstring("method setPointer")]
75                HRESULT setPointer( [in] IDispatch* xPointer );
76
77    [id(4), helpstring("method setBackground")]
78                HRESULT setBackground( [in] int nColor );
79
80    [id(5), helpstring("method invalidate")]
81                HRESULT invalidate( [in] short );
82
83    [id(6), helpstring("method invalidateRect")]
84                HRESULT invalidateRect( [in] IDispatch* aRect, [in] short nFlags );
85
86    [id(7), helpstring("method dispose")]
87                HRESULT dispose();
88
89    [id(8), helpstring("method addEventListener")]
90                HRESULT addEventListener( [in] IDispatch* xListener );
91
92    [id(9), helpstring("method removeEventListener")]
93                HRESULT removeEventListener( [in] IDispatch* xListener );
94
95    [propget, id(10), helpstring("property_implementedInterfaces")]
96                HRESULT Bridge_implementedInterfaces([out, retval] SAFEARRAY(BSTR) *pVal);
97};
98
99[
100    uuid(61FA3F13-8061-4796-B055-3697ED28CB38),
101    version(1.0),
102    helpstring("so_activex 1.0 Type Library")
103]
104library SO_ACTIVEXLib
105{
106    importlib("stdole32.tlb");
107    importlib("stdole2.tlb");
108
109    [
110        uuid(7F760565-5719-4F04-BA86-112C474B10EA),
111        helpstring("_ISOActiveXEvents Interface")
112    ]
113    dispinterface _ISOActiveXEvents
114    {
115        properties:
116        methods:
117    };
118
119    [
120        uuid(67F2A879-82D5-4A6D-8CC5-FFB3C114B69D),
121        helpstring("SOActiveX Class")
122    ]
123    coclass SOActiveX
124    {
125        [default] interface ISOActiveX;
126        [default, source] dispinterface _ISOActiveXEvents;
127    };
128
129    [
130        uuid(EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D),
131        helpstring("SOComWindowPeer Class")
132    ]
133    coclass SOComWindowPeer
134    {
135        [default] interface ISOComWindowPeer;
136    };
137};
138
139