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_drawing_XPresenterHelper_idl__
25#define __com_sun_star_drawing_XPresenterHelper_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_rendering_XCanvas_idl__
31#include <com/sun/star/rendering/XCanvas.idl>
32#endif
33#ifndef __com_sun_star_rendering_XSpriteCanvas_idl__
34#include <com/sun/star/rendering/XSpriteCanvas.idl>
35#endif
36#ifndef __com_sun_star_awt_Rectangle_idl__
37#include <com/sun/star/awt/Rectangle.idl>
38#endif
39#ifndef __com_sun_star_drawing_CanvasFeature_idl__
40#include <com/sun/star/drawing/CanvasFeature.idl>
41#endif
42
43module com { module sun { module star { module drawing {
44
45/** This interface is a collection of functions that are necessary to
46    implement larger parts of the presenter screen as extension.  The
47    methods of this interface give access to services that can, at the
48    moment, only implemented in the Office core, not in an extension.
49
50    <p>With time some, maybe all, methods can moved to other, better suited,
51    interfaces.</p>
52*/
53interface XPresenterHelper
54{
55    /** Create a new window as child window of the given parent window.
56        @param xParentWindow
57            The parent window of the new window.
58        @param bCreateSystemChildWindow
59            When <TRUE/> then the new window will be a system window that,
60            in the context of the presenter screen, can not be painted over
61            by other windows that lie behind it.
62        @param bInitiallyVisible
63            When <TRUE/> the new window will be visible from the start,
64            i.e. a window listener will not receive a windowShown signal.
65        @param bEnableChildTransparentMode
66            When <TRUE/> the parent window is painted behind its child
67            windows. This is one half of allowing child windows to be
68            transparent.
69        @param bEnableParentClip
70            When <TRUE/> then the parent window is not clipped where its
71            child windows are painted.  This is the other half of allowing
72            child windows to be transparent.
73    */
74    ::com::sun::star::awt::XWindow createWindow (
75        [in] ::com::sun::star::awt::XWindow xParentWindow,
76        [in] boolean bCreateSystemChildWindow,
77        [in] boolean bInitiallyVisible,
78        [in] boolean bEnableChildTransparentMode,
79        [in] boolean bEnableParentClip);
80
81    /** Create a new canvas for the given window.  The new canvas is a
82        wrapper around the given shared canvas.  The wrapper only modifies
83        the origin in all output and clipping methods.
84        @param xUpdateCanvas
85            This canvas is used to call updateScreen() on.  May be <NULL/>
86        @param xUpdateWindow
87            The window that belongs to the update canvas.  May also be
88            <NULL/> (is expected to b <NULL/> whenever xUpdateCanvas is.)
89        @param xSharedCanvas
90            The canvas that is shared by the wrapper.
91        @param xSharedWindow
92            The window of the shared canvas.  This is used to determine the
93            proper offset.
94        @param xWindow
95            The canvas is created for this window.  Must not be <NULL/>
96    */
97    ::com::sun::star::rendering::XCanvas createSharedCanvas (
98        [in] ::com::sun::star::rendering::XSpriteCanvas xUpdateCanvas,
99        [in] ::com::sun::star::awt::XWindow xUpdateWindow,
100        [in] ::com::sun::star::rendering::XCanvas xSharedCanvas,
101        [in] ::com::sun::star::awt::XWindow xSharedWindow,
102        [in] ::com::sun::star::awt::XWindow xWindow);
103
104    /** Create a new canvas for the given window.
105        @param xWindow
106            The canvas is created for this window.  Must not be <NULL/>
107        @param nRequestedCanvasFeatureList
108            List of requested features that the new canvas should (has to)
109            provide.  Use only values from the <type>CanvasFeature</type>
110            constants group.
111        @param sOptionalCanvasServiceName
112            When an explicit service name is given then a new object of this
113            service is created.  This service name lets the caller select a
114            specific canvas implementation, e.g. with or without hardware
115            acceleration.
116    */
117    ::com::sun::star::rendering::XCanvas createCanvas (
118        [in] ::com::sun::star::awt::XWindow xWindow,
119        [in] short nRequestedCanvasFeatureList,
120        [in] string sOptionalCanvasServiceName);
121
122    /** Move the specified window to the top of its stacking order.  As a
123        result the window will be painted over all its overlapping
124        siblings.
125        @param xWindow
126            This window will be moved to the top of its stacking order.
127    */
128    void toTop (
129        [in] ::com::sun::star::awt::XWindow xWindow);
130
131    /** Load a bitmap from a file or other accessible resource that can be
132        located via a URL.
133        @param sURL
134            The URL of the bitmap.  For a file URL the bitmap is loaded from
135            the specified file.
136        @param xCanvas
137            The bitmap is created to be compatible, and possibly optimized,
138            for this canvas.
139    */
140    ::com::sun::star::rendering::XBitmap loadBitmap (
141        [in] string sURL,
142        [in] ::com::sun::star::rendering::XCanvas xCanvas);
143
144    /** Capture the mouse so that no other window will receive mouse events.
145        Note that this is a potentially dangerous method.  Not calling
146        releaseMouse eventually can lead to an unresponsive application.
147        @param xWindow
148            The window for which mouse events will be notified even when the
149            mouse pointer moves outside the window or over other windows.
150    */
151    void captureMouse (
152        [in] ::com::sun::star::awt::XWindow xWindow);
153
154    /** Release a previously captured mouse.
155        @param xWindow
156            The window from which the mouse will be released.
157    */
158    void releaseMouse (
159        [in] ::com::sun::star::awt::XWindow xWindow);
160
161    /** Return the bounding box of the given child window relative to the
162        direct or indirect parent window.
163    */
164    com::sun::star::awt::Rectangle getWindowExtentsRelative (
165        [in] ::com::sun::star::awt::XWindow xChildWindow,
166        [in] ::com::sun::star::awt::XWindow xParentWindow);
167};
168
169
170}; }; }; }; // ::com::sun::star::drawing
171
172#endif
173