summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/drawing/XPresenterHelper.idl
blob: 4923b8ba25a47d9da7cee9a43427381bb0e7be52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: XPresenterHelper.idl,v $
 *
 * $Revision: 1.3 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org 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 version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/

#ifndef __com_sun_star_drawing_XPresenterHelper_idl__
#define __com_sun_star_drawing_XPresenterHelper_idl__

#ifndef __com_sun_star_awt_XWindow_idl__
#include <com/sun/star/awt/XWindow.idl>
#endif
#ifndef __com_sun_star_rendering_XCanvas_idl__
#include <com/sun/star/rendering/XCanvas.idl>
#endif
#ifndef __com_sun_star_rendering_XSpriteCanvas_idl__
#include <com/sun/star/rendering/XSpriteCanvas.idl>
#endif
#ifndef __com_sun_star_awt_Rectangle_idl__
#include <com/sun/star/awt/Rectangle.idl>
#endif

module com { module sun { module star { module drawing {

constants CanvasFeature
{
    const short None = 0;
    const short SpriteCanvas = 1;
};

/** This interface is a collection of functions that are necessary to
    implement larger parts of the presenter screen as extension.  The
    methods of this interface give access to services that can, at the
    moment, only implemented in the Office core, not in an extension.

    <p>With time some, maybe all, methods can moved to other, better suited,
    interfaces.</p>
*/
interface XPresenterHelper
{
    /** Create a new window as child window of the given parent window.
        @param xParentWindow
            The parent window of the new window.
        @param bCreateSystemChildWindow
            When <TRUE/> then the new window will be a system window that,
            in the context of the presenter screen, can not be painted over
            by other windows that lie behind it.
        @param bInitiallyVisible
            When <TRUE/> the new window will be visible from the start,
            i.e. a window listener will not receive a windowShown signal.
        @param bEnableChildTransparentMode
            When <TRUE/> the parent window is painted behind its child
            windows. This is one half of allowing child windows to be
            transparent.
        @param bEnableParentClip
            When <TRUE/> then the parent window is not clipped where its
            child windows are painted.  This is the other half of allowing
            child windows to be transparent.
    */
    ::com::sun::star::awt::XWindow createWindow (
        [in] ::com::sun::star::awt::XWindow xParentWindow,
        [in] boolean bCreateSystemChildWindow,
        [in] boolean bInitiallyVisible,
        [in] boolean bEnableChildTransparentMode,
        [in] boolean bEnableParentClip);

    /** Create a new canvas for the given window.  The new canvas is a
        wrapper around the given shared canvas.  The wrapper only modifies
        the origin in all output and clipping methods.
        @param xUpdateCanvas
            This canvas is used to call updateScreen() on.  May be <NULL/>
        @param xUpdateWindow
            The window that belongs to the update canvas.  May also be
            <NULL/> (is expected to b <NULL/> whenever xUpdateCanvas is.)
        @param xSharedCanvas
            The canvas that is shared by the wrapper.
        @param xSharedWindow
            The window of the shared canvas.  This is used to determine the
            proper offset.
        @param xWindow
            The canvas is created for this window.  Must not be <NULL/>
    */
    ::com::sun::star::rendering::XCanvas createSharedCanvas (
        [in] ::com::sun::star::rendering::XSpriteCanvas xUpdateCanvas,
        [in] ::com::sun::star::awt::XWindow xUpdateWindow,
        [in] ::com::sun::star::rendering::XCanvas xSharedCanvas,
        [in] ::com::sun::star::awt::XWindow xSharedWindow,
        [in] ::com::sun::star::awt::XWindow xWindow);

    /** Create a new canvas for the given window.
        @param xWindow
            The canvas is created for this window.  Must not be <NULL/>
        @param nRequestedCanvasFeatureList
            List of requested features that the new canvas should (has to)
            provide.  Use only values from the <type>CanvasFeature</type>
            constants group.
        @param sOptionalCanvasServiceName
            When an explicit service name is given then a new object of this
            service is created.  This service name lets the caller select a
            specific canvas implementation, e.g. with or without hardware
            acceleration.
    */
    ::com::sun::star::rendering::XCanvas createCanvas (
        [in] ::com::sun::star::awt::XWindow xWindow,
        [in] short nRequestedCanvasFeatureList,
        [in] string sOptionalCanvasServiceName);

    /** Move the specified window to the top of its stacking order.  As a
        result the window will be painted over all its overlapping
        siblings.
        @param xWindow
            This window will be moved to the top of its stacking order.
    */
    void toTop (
        [in] ::com::sun::star::awt::XWindow xWindow);

    /** Load a bitmap from a file or other accessible resource that can be
        located via a URL.
        @param sURL
            The URL of the bitmap.  For a file URL the bitmap is loaded from
            the specified file.
        @param xCanvas
            The bitmap is created to be compatible, and possibly optimized,
            for this canvas.
    */
    ::com::sun::star::rendering::XBitmap loadBitmap (
        [in] string sURL,
        [in] ::com::sun::star::rendering::XCanvas xCanvas);

    /** Capture the mouse so that no other window will receive mouse events.
        Note that this is a potentially dangerous method.  Not calling
        releaseMouse eventually can lead to an unresponsive application.
        @param xWindow
            The window for which mouse events will be notified even when the
            mouse pointer moves outside the window or over other windows.
    */
    void captureMouse (
        [in] ::com::sun::star::awt::XWindow xWindow);

    /** Release a previously captured mouse.
        @param xWindow
            The window from which the mouse will be released.
    */
    void releaseMouse (
        [in] ::com::sun::star::awt::XWindow xWindow);

    /** Return the bounding box of the given child window relative to the
        direct or indirect parent window.
    */
    com::sun::star::awt::Rectangle getWindowExtentsRelative (
        [in] ::com::sun::star::awt::XWindow xChildWindow,
        [in] ::com::sun::star::awt::XWindow xParentWindow);
};


}; }; }; }; // ::com::sun::star::drawing

#endif