1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: spritedevicehelper.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _VCLCANVAS_SPRITEDEVICEHELPER_HXX
32 #define _VCLCANVAS_SPRITEDEVICEHELPER_HXX
34 #include <com/sun/star/awt/Rectangle.hpp>
35 #include <com/sun/star/awt/XWindow2.hpp>
36 #include <com/sun/star/rendering/XGraphicDevice.hpp>
37 #include <com/sun/star/rendering/XBufferController.hpp>
39 #include <vcl/outdev.hxx>
40 #include <vcl/window.hxx>
42 #include "backbuffer.hxx"
43 #include "devicehelper.hxx"
45 #include <boost/utility.hpp>
48 /* Definition of DeviceHelper class */
53 class SpriteCanvasHelper
;
55 class SpriteDeviceHelper
: public DeviceHelper
60 void init( const OutDevProviderSharedPtr
& rOutDev
);
62 /// Dispose all internal references
65 ::sal_Int32
createBuffers( ::sal_Int32 nBuffers
);
66 void destroyBuffers( );
67 ::sal_Bool
showBuffer( bool bWindowVisible
, ::sal_Bool bUpdateAll
);
68 ::sal_Bool
switchBuffer( bool bWindowVisible
, ::sal_Bool bUpdateAll
);
70 ::com::sun::star::uno::Any
isAccelerated() const;
71 ::com::sun::star::uno::Any
getDeviceHandle() const;
72 ::com::sun::star::uno::Any
getSurfaceHandle() const;
74 void dumpScreenContent() const;
75 BackBufferSharedPtr
getBackBuffer() const { return mpBackBuffer
; }
77 void notifySizeUpdate( const ::com::sun::star::awt::Rectangle
& rBounds
);
80 /// This buffer holds the background content for all associated canvases
81 BackBufferSharedPtr mpBackBuffer
;
85 #endif /* _VCLCANVAS_SPRITEDEVICEHELPER_HXX */