Update ooo320-m1
[ooovba.git] / vcl / win / inc / salinst.h
blobcb12c36c7edae04b98d68e52356b3af28992ea31
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: salinst.h,v $
10 * $Revision: 1.16.154.1 $
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 _SV_SALINST_H
32 #define _SV_SALINST_H
34 #include <vcl/sv.h>
35 #include <vcl/salinst.hxx>
37 namespace vos { class OMutex; }
39 // -------------------
40 // - SalInstanceData -
41 // -------------------
43 class SalYieldMutex;
45 class WinSalInstance : public SalInstance
47 public:
48 HINSTANCE mhInst; // Instance Handle
49 HWND mhComWnd; // window, for communication (between threads and the main thread)
50 SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
51 vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex
52 USHORT mnYieldWaitCount; // Wait-Count
53 public:
54 WinSalInstance();
55 virtual ~WinSalInstance();
57 virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
58 virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
59 virtual void DestroyFrame( SalFrame* pFrame );
60 virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
61 virtual void DestroyObject( SalObject* pObject );
62 virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
63 long nDX, long nDY,
64 USHORT nBitCount, const SystemGraphicsData *pData );
65 virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
67 virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
68 ImplJobSetup* pSetupData );
69 virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
70 virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
71 virtual void DestroyPrinter( SalPrinter* pPrinter );
72 virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
73 virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
74 virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
75 virtual String GetDefaultPrinter();
76 virtual SalTimer* CreateSalTimer();
77 virtual SalI18NImeStatus* CreateI18NImeStatus();
78 virtual SalSystem* CreateSalSystem();
79 virtual SalBitmap* CreateSalBitmap();
80 virtual vos::IMutex* GetYieldMutex();
81 virtual ULONG ReleaseYieldMutex();
82 virtual void AcquireYieldMutex( ULONG nCount );
83 virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
84 virtual bool AnyInput( USHORT nType );
85 virtual SalMenu* CreateMenu( BOOL bMenuBar );
86 virtual void DestroyMenu( SalMenu* );
87 virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
88 virtual void DestroyMenuItem( SalMenuItem* );
89 virtual SalSession* CreateSalSession();
90 virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
91 virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
93 static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
96 // --------------
97 // - Prototypen -
98 // --------------
100 SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle );
101 SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent );
102 HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild );
103 void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE );
104 void ImplSalPrinterAbortJobAsync( HDC hPrnDC );
106 #endif // _SV_SALINST_H