LibreOffice Module vcl (master)  1
win/salinst.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_WIN_SALINST_H
21 #define INCLUDED_VCL_INC_WIN_SALINST_H
22 
23 #include <sal/config.h>
24 
25 #include <osl/conditn.hxx>
26 
27 #include <salinst.hxx>
28 
29 class SalYieldMutex;
30 
32 {
33 public:
35  HINSTANCE mhInst;
37  HWND mhComWnd;
38 
39  osl::Condition maWaitingYieldCond;
40  unsigned m_nNoYieldLock;
41 
42 public:
44  virtual ~WinSalInstance() override;
45 
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* pGraphics,
53  long &nDX, long &nDY,
54  DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
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;
66 
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;
74 
75  virtual OUString getOSVersion() override;
76 
77  static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
78 };
79 
80 SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, SalFrameStyleFlags nSalFrameStyle );
82 HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, bool bAsChild );
83 
84 #endif // INCLUDED_VCL_INC_WIN_SALINST_H
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString getOSVersion() override
get information about underlying versions
osl::Condition maWaitingYieldCond
Definition: win/salinst.h:39
virtual void DestroyInfoPrinter(SalInfoPrinter *pPrinter) override
virtual std::unique_ptr< SalPrinter > CreatePrinter(SalInfoPrinter *pInfoPrinter) override
HWND mhComWnd
invisible Window so non-main threads can SendMessage() the main thread
Definition: win/salinst.h:37
virtual OpenGLContext * CreateOpenGLContext() override
SalObject * ImplSalCreateObject(WinSalInstance *pInst, WinSalFrame *pParent)
VclInputFlags
Definition: inputtypes.hxx:25
virtual SalObject * CreateObject(SalFrame *pParent, SystemWindowData *pWindowData, bool bShow) override
virtual std::unique_ptr< SalVirtualDevice > CreateVirtualDevice(SalGraphics *pGraphics, long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData=nullptr) override
virtual std::shared_ptr< SalBitmap > CreateSalBitmap() override
virtual bool AnyInput(VclInputFlags nType) override
virtual bool IsMainThread() const override
virtual void DestroyFrame(SalFrame *pFrame) override
HINSTANCE mhInst
Instance Handle.
Definition: win/salinst.h:35
virtual OUString GetDefaultPrinter() override
virtual void GetPrinterQueueState(SalPrinterQueueInfo *pInfo) override
virtual std::unique_ptr< SalMenuItem > CreateMenuItem(const SalItemParams &rItemData) override
unsigned m_nNoYieldLock
Definition: win/salinst.h:40
virtual SalTimer * CreateSalTimer() override
virtual OUString GetConnectionIdentifier() override
HWND ImplSalReCreateHWND(HWND hWndParent, HWND oldhWnd, bool bAsChild)
DeviceFormat
Definition: salgtype.hxx:28
virtual std::unique_ptr< SalMenu > CreateMenu(bool bMenuBar, Menu *) override
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:112
Definition: menu.hxx:121
virtual SalFrame * CreateFrame(SalFrame *pParent, SalFrameStyleFlags nStyle) override
SalFrameStyleFlags
Definition: salframe.hxx:64
SalFrame * ImplSalCreateFrame(WinSalInstance *pInst, HWND hWndParent, SalFrameStyleFlags nSalFrameStyle)
virtual SalInfoPrinter * CreateInfoPrinter(SalPrinterQueueInfo *pQueueInfo, ImplJobSetup *pSetupData) override
static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo)
virtual void GetPrinterQueueInfo(ImplPrnQueueList *pList) override
virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override
Wait for the next event (if bWait) and dispatch it, includes posted events, and timers.
virtual SalFrame * CreateChildFrame(SystemParentData *pParent, SalFrameStyleFlags nStyle) override
virtual SalSystem * CreateSalSystem() override
virtual ~WinSalInstance() override
virtual void DestroyObject(SalObject *pObject) override
virtual void AddToRecentDocumentList(const OUString &rFileUrl, const OUString &rMimeType, const OUString &rDocumentService) override