1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_awt_XContainerWindowProvider_idl__
25#define __com_sun_star_awt_XContainerWindowProvider_idl__
26
27#ifndef __com_sun_star_awt_XWindow_idl__
28#include <com/sun/star/awt/XWindow.idl>
29#endif
30#ifndef __com_sun_star_awt_XWindowPeer_idl__
31#include <com/sun/star/awt/XWindowPeer.idl>
32#endif
33#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34#include <com/sun/star/lang/IllegalArgumentException.idl>
35#endif
36
37//=============================================================================
38
39module com { module sun { module star { module awt {
40
41//=============================================================================
42
43/** provides container windows implementing the
44    <type scope="com::sun::star::awt">XWindow</type> interface.
45 */
46published interface XContainerWindowProvider : ::com::sun::star::uno::XInterface {
47
48    //-------------------------------------------------------------------------
49
50    /** creates a window for the given URL
51
52        @param URL
53            is the URL.
54
55        @param WindowType
56            Type of Window to be created,
57            for future use, not supported yet
58
59        @param xParent
60            a valid XWindowPeer reference which is used as a parent.
61            This parameter must not be null.
62
63        @param xHandler
64            is the interface that will be called to handle the Events that
65            are generated by the window (and all controls placed on it) and
66            bound to the handler using a vnd.sun.star.UNO URL specifying a
67            handler method to be called. Usually this will be done directly
68            by the user.
69
70            xHandler can handle events in two different ways:
71
72            1. By supporting the <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
73            interface. This is a generic interface to accept event notifications.
74
75            2. By providing interfaces that directly implement the handler
76            methods to be called. The XContainerWindowProvider implementation then
77            will try to access these events using the
78            <type scope="com::sun::star::beans">Introspection</type>Introspection
79            service. To make this possible the handler implementation also has to
80            support <type scope="com::sun::star::lang">XTypeProvider</type>.
81
82            If XContainerWindowEventHandler is supported XContainerWindowEventHandler.callHandlerMethod()
83            is always called first to handle the event. Only if the event cannot be
84            handled by XContainerWindowEventHandler (callHandlerMethod() then has to return
85            false) or if XContainerWindowEventHandler is not supported at all the Introspection
86            based access will be used.
87
88            The Introspection based access tries to call a method named according to the
89            HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL.
90            First a method
91
92            void HandlerMethodName( [in] com::sun::star::awt::XWindow xWindow, [in] any aEvent )
93
94            will be searched. The signature is similar to XContainerWindowEventHandler.
95            callHandlerMethod except for MethodName itself that isn't needed
96            here. For more information about these parameters, see
97            <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>.
98
99            If this method is found, it will be called, otherwise a method
100
101            void HandlerMethodName( void )
102
103            will be searched and called.
104
105        @returns
106            a window implementing the <type scope="com::sun::star::awt">XWindow</type> interface.
107
108        @throws com::sun::star::lang::IllegalArgumentException
109            if no window for the given URL is found or if the URL is invalid
110            or xParent is null.
111
112        @see <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
113
114     */
115    com::sun::star::awt::XWindow createContainerWindow
116        ( [in] string URL, [in] string WindowType,
117          [in] com::sun::star::awt::XWindowPeer xParent,
118          [in] com::sun::star::uno::XInterface xHandler )
119            raises ( com::sun::star::lang::IllegalArgumentException );
120};
121
122//=============================================================================
123
124}; }; }; };
125
126#endif
127