1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir#ifndef __com_sun_star_drawing_XPresenterHelper_idl__
29*cdf0e10cSrcweir#define __com_sun_star_drawing_XPresenterHelper_idl__
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#ifndef __com_sun_star_awt_XWindow_idl__
32*cdf0e10cSrcweir#include <com/sun/star/awt/XWindow.idl>
33*cdf0e10cSrcweir#endif
34*cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XCanvas_idl__
35*cdf0e10cSrcweir#include <com/sun/star/rendering/XCanvas.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XSpriteCanvas_idl__
38*cdf0e10cSrcweir#include <com/sun/star/rendering/XSpriteCanvas.idl>
39*cdf0e10cSrcweir#endif
40*cdf0e10cSrcweir#ifndef __com_sun_star_awt_Rectangle_idl__
41*cdf0e10cSrcweir#include <com/sun/star/awt/Rectangle.idl>
42*cdf0e10cSrcweir#endif
43*cdf0e10cSrcweir
44*cdf0e10cSrcweirmodule com { module sun { module star { module drawing {
45*cdf0e10cSrcweir
46*cdf0e10cSrcweirconstants CanvasFeature
47*cdf0e10cSrcweir{
48*cdf0e10cSrcweir    const short None = 0;
49*cdf0e10cSrcweir    const short SpriteCanvas = 1;
50*cdf0e10cSrcweir};
51*cdf0e10cSrcweir
52*cdf0e10cSrcweir/** This interface is a collection of functions that are necessary to
53*cdf0e10cSrcweir    implement larger parts of the presenter screen as extension.  The
54*cdf0e10cSrcweir    methods of this interface give access to services that can, at the
55*cdf0e10cSrcweir    moment, only implemented in the Office core, not in an extension.
56*cdf0e10cSrcweir
57*cdf0e10cSrcweir    <p>With time some, maybe all, methods can moved to other, better suited,
58*cdf0e10cSrcweir    interfaces.</p>
59*cdf0e10cSrcweir*/
60*cdf0e10cSrcweirinterface XPresenterHelper
61*cdf0e10cSrcweir{
62*cdf0e10cSrcweir    /** Create a new window as child window of the given parent window.
63*cdf0e10cSrcweir        @param xParentWindow
64*cdf0e10cSrcweir            The parent window of the new window.
65*cdf0e10cSrcweir        @param bCreateSystemChildWindow
66*cdf0e10cSrcweir            When <TRUE/> then the new window will be a system window that,
67*cdf0e10cSrcweir            in the context of the presenter screen, can not be painted over
68*cdf0e10cSrcweir            by other windows that lie behind it.
69*cdf0e10cSrcweir        @param bInitiallyVisible
70*cdf0e10cSrcweir            When <TRUE/> the new window will be visible from the start,
71*cdf0e10cSrcweir            i.e. a window listener will not receive a windowShown signal.
72*cdf0e10cSrcweir        @param bEnableChildTransparentMode
73*cdf0e10cSrcweir            When <TRUE/> the parent window is painted behind its child
74*cdf0e10cSrcweir            windows. This is one half of allowing child windows to be
75*cdf0e10cSrcweir            transparent.
76*cdf0e10cSrcweir        @param bEnableParentClip
77*cdf0e10cSrcweir            When <TRUE/> then the parent window is not clipped where its
78*cdf0e10cSrcweir            child windows are painted.  This is the other half of allowing
79*cdf0e10cSrcweir            child windows to be transparent.
80*cdf0e10cSrcweir    */
81*cdf0e10cSrcweir    ::com::sun::star::awt::XWindow createWindow (
82*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xParentWindow,
83*cdf0e10cSrcweir        [in] boolean bCreateSystemChildWindow,
84*cdf0e10cSrcweir        [in] boolean bInitiallyVisible,
85*cdf0e10cSrcweir        [in] boolean bEnableChildTransparentMode,
86*cdf0e10cSrcweir        [in] boolean bEnableParentClip);
87*cdf0e10cSrcweir
88*cdf0e10cSrcweir    /** Create a new canvas for the given window.  The new canvas is a
89*cdf0e10cSrcweir        wrapper around the given shared canvas.  The wrapper only modifies
90*cdf0e10cSrcweir        the origin in all output and clipping methods.
91*cdf0e10cSrcweir        @param xUpdateCanvas
92*cdf0e10cSrcweir            This canvas is used to call updateScreen() on.  May be <NULL/>
93*cdf0e10cSrcweir        @param xUpdateWindow
94*cdf0e10cSrcweir            The window that belongs to the update canvas.  May also be
95*cdf0e10cSrcweir            <NULL/> (is expected to b <NULL/> whenever xUpdateCanvas is.)
96*cdf0e10cSrcweir        @param xSharedCanvas
97*cdf0e10cSrcweir            The canvas that is shared by the wrapper.
98*cdf0e10cSrcweir        @param xSharedWindow
99*cdf0e10cSrcweir            The window of the shared canvas.  This is used to determine the
100*cdf0e10cSrcweir            proper offset.
101*cdf0e10cSrcweir        @param xWindow
102*cdf0e10cSrcweir            The canvas is created for this window.  Must not be <NULL/>
103*cdf0e10cSrcweir    */
104*cdf0e10cSrcweir    ::com::sun::star::rendering::XCanvas createSharedCanvas (
105*cdf0e10cSrcweir        [in] ::com::sun::star::rendering::XSpriteCanvas xUpdateCanvas,
106*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xUpdateWindow,
107*cdf0e10cSrcweir        [in] ::com::sun::star::rendering::XCanvas xSharedCanvas,
108*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xSharedWindow,
109*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xWindow);
110*cdf0e10cSrcweir
111*cdf0e10cSrcweir    /** Create a new canvas for the given window.
112*cdf0e10cSrcweir        @param xWindow
113*cdf0e10cSrcweir            The canvas is created for this window.  Must not be <NULL/>
114*cdf0e10cSrcweir        @param nRequestedCanvasFeatureList
115*cdf0e10cSrcweir            List of requested features that the new canvas should (has to)
116*cdf0e10cSrcweir            provide.  Use only values from the <type>CanvasFeature</type>
117*cdf0e10cSrcweir            constants group.
118*cdf0e10cSrcweir        @param sOptionalCanvasServiceName
119*cdf0e10cSrcweir            When an explicit service name is given then a new object of this
120*cdf0e10cSrcweir            service is created.  This service name lets the caller select a
121*cdf0e10cSrcweir            specific canvas implementation, e.g. with or without hardware
122*cdf0e10cSrcweir            acceleration.
123*cdf0e10cSrcweir    */
124*cdf0e10cSrcweir    ::com::sun::star::rendering::XCanvas createCanvas (
125*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xWindow,
126*cdf0e10cSrcweir        [in] short nRequestedCanvasFeatureList,
127*cdf0e10cSrcweir        [in] string sOptionalCanvasServiceName);
128*cdf0e10cSrcweir
129*cdf0e10cSrcweir    /** Move the specified window to the top of its stacking order.  As a
130*cdf0e10cSrcweir        result the window will be painted over all its overlapping
131*cdf0e10cSrcweir        siblings.
132*cdf0e10cSrcweir        @param xWindow
133*cdf0e10cSrcweir            This window will be moved to the top of its stacking order.
134*cdf0e10cSrcweir    */
135*cdf0e10cSrcweir    void toTop (
136*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xWindow);
137*cdf0e10cSrcweir
138*cdf0e10cSrcweir    /** Load a bitmap from a file or other accessible resource that can be
139*cdf0e10cSrcweir        located via a URL.
140*cdf0e10cSrcweir        @param sURL
141*cdf0e10cSrcweir            The URL of the bitmap.  For a file URL the bitmap is loaded from
142*cdf0e10cSrcweir            the specified file.
143*cdf0e10cSrcweir        @param xCanvas
144*cdf0e10cSrcweir            The bitmap is created to be compatible, and possibly optimized,
145*cdf0e10cSrcweir            for this canvas.
146*cdf0e10cSrcweir    */
147*cdf0e10cSrcweir    ::com::sun::star::rendering::XBitmap loadBitmap (
148*cdf0e10cSrcweir        [in] string sURL,
149*cdf0e10cSrcweir        [in] ::com::sun::star::rendering::XCanvas xCanvas);
150*cdf0e10cSrcweir
151*cdf0e10cSrcweir    /** Capture the mouse so that no other window will receive mouse events.
152*cdf0e10cSrcweir        Note that this is a potentially dangerous method.  Not calling
153*cdf0e10cSrcweir        releaseMouse eventually can lead to an unresponsive application.
154*cdf0e10cSrcweir        @param xWindow
155*cdf0e10cSrcweir            The window for which mouse events will be notified even when the
156*cdf0e10cSrcweir            mouse pointer moves outside the window or over other windows.
157*cdf0e10cSrcweir    */
158*cdf0e10cSrcweir    void captureMouse (
159*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xWindow);
160*cdf0e10cSrcweir
161*cdf0e10cSrcweir    /** Release a previously captured mouse.
162*cdf0e10cSrcweir        @param xWindow
163*cdf0e10cSrcweir            The window from which the mouse will be released.
164*cdf0e10cSrcweir    */
165*cdf0e10cSrcweir    void releaseMouse (
166*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xWindow);
167*cdf0e10cSrcweir
168*cdf0e10cSrcweir    /** Return the bounding box of the given child window relative to the
169*cdf0e10cSrcweir        direct or indirect parent window.
170*cdf0e10cSrcweir    */
171*cdf0e10cSrcweir    com::sun::star::awt::Rectangle getWindowExtentsRelative (
172*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xChildWindow,
173*cdf0e10cSrcweir        [in] ::com::sun::star::awt::XWindow xParentWindow);
174*cdf0e10cSrcweir};
175*cdf0e10cSrcweir
176*cdf0e10cSrcweir
177*cdf0e10cSrcweir}; }; }; }; // ::com::sun::star::drawing
178*cdf0e10cSrcweir
179*cdf0e10cSrcweir#endif
180