Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / vcl / inc / win / salinst.h
blob2b0dfaa1bc0aa61012528e6254ef5e6d02967b82
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SV_SALINST_H
21 #define _SV_SALINST_H
23 #include <salinst.hxx>
25 class SalYieldMutex;
27 class WinSalInstance : public SalInstance
29 public:
30 HINSTANCE mhInst; // Instance Handle
31 HWND mhComWnd; // window, for communication (between threads and the main thread)
32 SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
33 osl::Mutex* mpSalWaitMutex; // Sal-Wait-Mutex
34 sal_uInt16 mnYieldWaitCount; // Wait-Count
35 public:
36 WinSalInstance();
37 virtual ~WinSalInstance();
39 virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle );
40 virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle );
41 virtual void DestroyFrame( SalFrame* pFrame );
42 virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
43 virtual void DestroyObject( SalObject* pObject );
44 virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
45 long nDX, long nDY,
46 sal_uInt16 nBitCount, const SystemGraphicsData *pData );
47 virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
49 virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
50 ImplJobSetup* pSetupData );
51 virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
52 virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
53 virtual void DestroyPrinter( SalPrinter* pPrinter );
54 virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
55 virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
56 virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
57 virtual OUString GetDefaultPrinter();
58 virtual SalTimer* CreateSalTimer();
59 virtual SalI18NImeStatus* CreateI18NImeStatus();
60 virtual SalSystem* CreateSalSystem();
61 virtual SalBitmap* CreateSalBitmap();
62 virtual comphelper::SolarMutex* GetYieldMutex();
63 virtual sal_uIntPtr ReleaseYieldMutex();
64 virtual void AcquireYieldMutex( sal_uIntPtr nCount );
65 virtual bool CheckYieldMutex();
67 virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
68 virtual bool AnyInput( sal_uInt16 nType );
69 virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* );
70 virtual void DestroyMenu( SalMenu* );
71 virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
72 virtual void DestroyMenuItem( SalMenuItem* );
73 virtual SalSession* CreateSalSession();
74 virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
75 virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
77 static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
80 SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPtr nSalFrameStyle );
81 SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent );
82 HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild );
83 void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex = sal_False );
84 void ImplSalPrinterAbortJobAsync( HDC hPrnDC );
86 #endif // _SV_SALINST_H
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */