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