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