bump product version to 4.1.6.2
[LibreOffice.git] / offapi / com / sun / star / awt / XContainerWindowProvider.idl
blob801cd1bb21b9d431e49c2c73aa14ea79e1382f60
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /**
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_awt_XContainerWindowProvider_idl__
21 #define __com_sun_star_awt_XContainerWindowProvider_idl__
23 #include <com/sun/star/awt/XWindow.idl>
24 #include <com/sun/star/awt/XWindowPeer.idl>
25 #include <com/sun/star/lang/IllegalArgumentException.idl>
28 module com { module sun { module star { module awt {
31 /** provides container windows implementing the
32 <type scope="com::sun::star::awt">XWindow</type> interface.
34 interface XContainerWindowProvider : ::com::sun::star::uno::XInterface {
37 /** creates a window for the given URL
39 @param URL
40 is the URL.
42 @param WindowType
43 Type of Window to be created,
44 for future use, not supported yet
46 @param xParent
47 a valid XWindowPeer reference which is used as a parent.
48 This parameter must not be null.
50 @param xHandler
51 is the interface that will be called to handle the Events that
52 are generated by the window (and all controls placed on it) and
53 bound to the handler using a vnd.sun.star.UNO URL specifying a
54 handler method to be called. Usually this will be done directly
55 by the user.
57 xHandler can handle events in two different ways:
59 1. By supporting the <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
60 interface. This is a generic interface to accept event notifications.
62 2. By providing interfaces that directly implement the handler
63 methods to be called. The XContainerWindowProvider implementation then
64 will try to access these events using the
65 <type scope="com::sun::star::beans">Introspection</type>Introspection
66 service. To make this possible the handler implementation also has to
67 support <type scope="com::sun::star::lang">XTypeProvider</type>.
69 If XContainerWindowEventHandler is supported XContainerWindowEventHandler.callHandlerMethod()
70 is always called first to handle the event. Only if the event cannot be
71 handled by XContainerWindowEventHandler (callHandlerMethod() then has to return
72 false) or if XContainerWindowEventHandler is not supported at all the Introspection
73 based access will be used.
75 The Introspection based access tries to call a method named according to the
76 HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL.
77 First a method
79 void HandlerMethodName( [in] com::sun::star::awt::XWindow xWindow, [in] any aEvent )
81 will be searched. The signature is similar to XContainerWindowEventHandler.
82 callHandlerMethod except for MethodName itself that isn't needed
83 here. For more information about these parameters, see
84 <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>.
86 If this method is found, it will be called, otherwise a method
88 void HandlerMethodName( void )
90 will be searched and called.
92 @returns
93 a window implementing the <type scope="com::sun::star::awt">XWindow</type> interface.
95 @throws com::sun::star::lang::IllegalArgumentException
96 if no window for the given URL is found or if the URL is invalid
97 or xParent is null.
99 @see <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
102 com::sun::star::awt::XWindow createContainerWindow
103 ( [in] string URL, [in] string WindowType,
104 [in] com::sun::star::awt::XWindowPeer xParent,
105 [in] com::sun::star::uno::XInterface xHandler )
106 raises ( com::sun::star::lang::IllegalArgumentException );
110 }; }; }; };
112 #endif
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */