1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <sal/config.h>
24 #include <osl/conditn.hxx>
26 #include <salinst.hxx>
30 class WinSalInstance
: public SalInstance
35 /// invisible Window so non-main threads can SendMessage() the main thread
38 osl::Condition maWaitingYieldCond
;
39 unsigned m_nNoYieldLock
;
43 virtual ~WinSalInstance() override
;
45 virtual void AfterAppInit() override
;
46 virtual SalFrame
* CreateChildFrame( SystemParentData
* pParent
, SalFrameStyleFlags nStyle
) override
;
47 virtual SalFrame
* CreateFrame( SalFrame
* pParent
, SalFrameStyleFlags nStyle
) override
;
48 virtual void DestroyFrame( SalFrame
* pFrame
) override
;
49 virtual SalObject
* CreateObject( SalFrame
* pParent
, SystemWindowData
* pWindowData
, bool bShow
) override
;
50 virtual void DestroyObject( SalObject
* pObject
) override
;
51 virtual std::unique_ptr
<SalVirtualDevice
>
52 CreateVirtualDevice( SalGraphics
& rGraphics
,
53 tools::Long
&nDX
, tools::Long
&nDY
,
54 DeviceFormat eFormat
, const SystemGraphicsData
*pData
= nullptr ) override
;
55 virtual SalInfoPrinter
* CreateInfoPrinter( SalPrinterQueueInfo
* pQueueInfo
,
56 ImplJobSetup
* pSetupData
) override
;
57 virtual void DestroyInfoPrinter( SalInfoPrinter
* pPrinter
) override
;
58 virtual std::unique_ptr
<SalPrinter
> CreatePrinter( SalInfoPrinter
* pInfoPrinter
) override
;
59 virtual void GetPrinterQueueInfo( ImplPrnQueueList
* pList
) override
;
60 virtual void GetPrinterQueueState( SalPrinterQueueInfo
* pInfo
) override
;
61 virtual OUString
GetDefaultPrinter() override
;
62 virtual SalTimer
* CreateSalTimer() override
;
63 virtual SalSystem
* CreateSalSystem() override
;
64 virtual std::shared_ptr
<SalBitmap
> CreateSalBitmap() override
;
65 virtual bool IsMainThread() const override
;
67 virtual bool DoYield(bool bWait
, bool bHandleAllCurrentEvents
) override
;
68 virtual bool AnyInput( VclInputFlags nType
) override
;
69 virtual std::unique_ptr
<SalMenu
> CreateMenu( bool bMenuBar
, Menu
* ) override
;
70 virtual std::unique_ptr
<SalMenuItem
> CreateMenuItem( const SalItemParams
& rItemData
) override
;
71 virtual OpenGLContext
* CreateOpenGLContext() override
;
72 virtual OUString
GetConnectionIdentifier() override
;
73 virtual void AddToRecentDocumentList(const OUString
& rFileUrl
, const OUString
& rMimeType
, const OUString
& rDocumentService
) override
;
75 virtual OUString
getOSVersion() override
;
76 virtual void BeforeAbort(const OUString
&, bool) override
;
78 static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept
, LPEXCEPTION_POINTERS pExceptionInfo
);
80 virtual css::uno::Reference
<css::uno::XInterface
> ImplCreateDragSource(const SystemEnvData
*) override
;
81 virtual css::uno::Reference
<css::uno::XInterface
> ImplCreateDropTarget(const SystemEnvData
*) override
;
84 SalFrame
* ImplSalCreateFrame( WinSalInstance
* pInst
, HWND hWndParent
, SalFrameStyleFlags nSalFrameStyle
);
85 SalObject
* ImplSalCreateObject( WinSalInstance
* pInst
, WinSalFrame
* pParent
);
86 HWND
ImplSalReCreateHWND( HWND hWndParent
, HWND oldhWnd
, bool bAsChild
);
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */