merge the formfield patch from ooo-build
[ooovba.git] / canvas / source / directx / dx_rendermodule.hxx
blob54a26b8ce14e838d5277a1679fba96ad5976f715
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dx_rendermodule.hxx,v $
10 * $Revision: 1.3 $
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 _DXCANVAS_RENDERMODULE_HXX
32 #define _DXCANVAS_RENDERMODULE_HXX
34 #include <basegfx/vector/b2ivector.hxx>
35 #include <basegfx/range/b2irectangle.hxx>
36 #include <canvas/rendering/irendermodule.hxx>
37 #include <boost/shared_ptr.hpp>
38 #include "dx_winstuff.hxx"
40 class Window;
41 namespace basegfx
43 class B2IRange;
44 class B2DVector;
47 namespace dxcanvas
49 /// Specialization of IRenderModule for DirectX
50 struct IDXRenderModule : public canvas::IRenderModule
52 /** Flip front- and backbuffer, update only given area
54 Note: Both update area and offset are ignored for
55 fullscreen canvas, that uses page flipping (cannot, by
56 definition, do anything else there except displaying the
57 full backbuffer instead of the front buffer)
59 @param rUpdateArea
60 Area to copy from backbuffer to front
62 @param rCurrWindowArea
63 Current area of VCL window (coordinates relative to VCL
64 HWND)
66 virtual bool flip( const ::basegfx::B2IRectangle& rUpdateArea,
67 const ::basegfx::B2IRectangle& rCurrWindowArea ) = 0;
69 /** Resize backbuffer area for this render module
71 virtual void resize( const ::basegfx::B2IRange& rect ) = 0;
73 /// Write a snapshot of the screen to disk
74 virtual void screenShot() = 0;
76 virtual COMReference<surface_type>
77 createSystemMemorySurface(
78 const ::basegfx::B2IVector& rSize ) = 0;
80 virtual void disposing() = 0;
81 virtual HWND getHWND() const = 0;
84 typedef ::boost::shared_ptr< IDXRenderModule > IDXRenderModuleSharedPtr;
87 /** Factory method, to create an IRenderModule instance for the
88 given VCL window instance
90 IDXRenderModuleSharedPtr createRenderModule( const ::Window& rParent );
93 #endif