1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _DXCANVAS_RENDERMODULE_HXX
29 #define _DXCANVAS_RENDERMODULE_HXX
31 #include <basegfx/vector/b2ivector.hxx>
32 #include <basegfx/range/b2irectangle.hxx>
33 #include <canvas/rendering/irendermodule.hxx>
34 #include <boost/shared_ptr.hpp>
35 #include "dx_winstuff.hxx"
46 /// Specialization of IRenderModule for DirectX
47 struct IDXRenderModule
: public canvas::IRenderModule
49 /** Flip front- and backbuffer, update only given area
51 Note: Both update area and offset are ignored for
52 fullscreen canvas, that uses page flipping (cannot, by
53 definition, do anything else there except displaying the
54 full backbuffer instead of the front buffer)
57 Area to copy from backbuffer to front
59 @param rCurrWindowArea
60 Current area of VCL window (coordinates relative to VCL
63 virtual bool flip( const ::basegfx::B2IRectangle
& rUpdateArea
,
64 const ::basegfx::B2IRectangle
& rCurrWindowArea
) = 0;
66 /** Resize backbuffer area for this render module
68 virtual void resize( const ::basegfx::B2IRange
& rect
) = 0;
70 /// Write a snapshot of the screen to disk
71 virtual void screenShot() = 0;
73 virtual COMReference
<surface_type
>
74 createSystemMemorySurface(
75 const ::basegfx::B2IVector
& rSize
) = 0;
77 virtual void disposing() = 0;
78 virtual HWND
getHWND() const = 0;
81 typedef ::boost::shared_ptr
< IDXRenderModule
> IDXRenderModuleSharedPtr
;
84 /** Factory method, to create an IRenderModule instance for the
85 given VCL window instance
87 IDXRenderModuleSharedPtr
createRenderModule( const ::Window
& rParent
);