Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / win / salinst.h
blob25b4afb17aa07c6395b062eab75006c5c28358e7
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 INCLUDED_VCL_INC_WIN_SALINST_H
21 #define INCLUDED_VCL_INC_WIN_SALINST_H
23 #include <salinst.hxx>
25 class SalYieldMutex;
27 class WinSalInstance : public SalInstance
29 public:
30 /// Instance Handle
31 HINSTANCE mhInst;
32 /// invisible Window so non-main threads can SendMessage() the main thread
33 HWND mhComWnd;
34 /// The Yield mutex ensures that only one thread calls into VCL
35 SalYieldMutex* mpSalYieldMutex;
37 public:
38 WinSalInstance();
39 virtual ~WinSalInstance() override;
41 virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
42 virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
43 virtual void DestroyFrame( SalFrame* pFrame ) override;
44 virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) override;
45 virtual void DestroyObject( SalObject* pObject ) override;
46 virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
47 long &nDX, long &nDY,
48 DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
49 virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
50 ImplJobSetup* pSetupData ) override;
51 virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) override;
52 virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) override;
53 virtual void DestroyPrinter( SalPrinter* pPrinter ) override;
54 virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) override;
55 virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) override;
56 virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) override;
57 virtual OUString GetDefaultPrinter() override;
58 virtual SalTimer* CreateSalTimer() override;
59 virtual SalSystem* CreateSalSystem() override;
60 virtual SalBitmap* CreateSalBitmap() override;
61 virtual comphelper::SolarMutex* GetYieldMutex() override;
62 virtual sal_uIntPtr ReleaseYieldMutex() override;
63 virtual void AcquireYieldMutex( sal_uIntPtr nCount ) override;
64 virtual bool CheckYieldMutex() override;
66 virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override;
67 virtual bool AnyInput( VclInputFlags nType ) override;
68 virtual SalMenu* CreateMenu( bool bMenuBar, Menu* ) override;
69 virtual void DestroyMenu( SalMenu* ) override;
70 virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) override;
71 virtual void DestroyMenuItem( SalMenuItem* ) override;
72 virtual SalSession* CreateSalSession() override;
73 virtual OpenGLContext* CreateOpenGLContext() override;
74 virtual OUString GetConnectionIdentifier() override;
75 virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
77 virtual OUString getOSVersion() override;
79 static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
82 SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, SalFrameStyleFlags nSalFrameStyle );
83 SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent );
84 HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, bool bAsChild );
85 void ImplSalStartTimer( sal_uIntPtr nMS, bool bMutex = false );
86 void ImplSalStopTimer();
88 #endif // INCLUDED_VCL_INC_WIN_SALINST_H
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */