bump product version to 7.2.5.1
[LibreOffice.git] / vcl / inc / unx / salinst.h
blob75a5cd6ae5ab77693abf625ac891ef4ed5b7562e
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_UNX_SALINST_H
21 #define INCLUDED_VCL_INC_UNX_SALINST_H
23 #include <vclpluginapi.h>
24 #include <salinst.hxx>
25 #include <unx/geninst.h>
27 #include <X11/X.h>
29 namespace com::sun::star::datatransfer::clipboard { class XClipboard; }
30 class SalXLib;
31 class X11SalGraphics;
32 class SalX11Display;
34 class X11SalInstance final : public SalGenericInstance
36 private:
37 std::unordered_map< Atom, css::uno::Reference< css::datatransfer::clipboard::XClipboard > > m_aInstances;
39 SalXLib *mpXLib;
41 virtual SalX11Display* CreateDisplay() const;
43 public:
44 explicit X11SalInstance(std::unique_ptr<SalYieldMutex> pMutex);
45 virtual ~X11SalInstance() override;
47 virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
48 virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
49 virtual void DestroyFrame( SalFrame* pFrame ) override;
51 virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) override;
52 virtual void DestroyObject( SalObject* pObject ) override;
54 /// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics.
55 static std::unique_ptr<SalVirtualDevice> CreateX11VirtualDevice(const SalGraphics& rGraphics, tools::Long &nDX, tools::Long &nDY,
56 DeviceFormat eFormat, const SystemGraphicsData* pData, std::unique_ptr<X11SalGraphics> pNewGraphics);
58 virtual std::unique_ptr<SalVirtualDevice>
59 CreateVirtualDevice( SalGraphics& rGraphics,
60 tools::Long &nDX, tools::Long &nDY,
61 DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
62 virtual void PostPrintersChanged() override;
63 virtual std::unique_ptr<GenPspGraphics> CreatePrintGraphics() override;
65 virtual SalTimer* CreateSalTimer() override;
66 virtual SalSystem* CreateSalSystem() override;
67 virtual std::shared_ptr<SalBitmap> CreateSalBitmap() override;
68 virtual std::unique_ptr<SalSession> CreateSalSession() override;
69 virtual OpenGLContext* CreateOpenGLContext() override;
71 virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override;
72 virtual bool AnyInput( VclInputFlags nType ) override;
73 virtual bool IsMainThread() const override { return true; }
75 virtual OUString GetConnectionIdentifier() override;
76 void SetLib( SalXLib *pXLib ) { mpXLib = pXLib; }
78 virtual void AfterAppInit() override;
80 // dtrans implementation
81 virtual css::uno::Reference< css::uno::XInterface >
82 CreateClipboard( const css::uno::Sequence< css::uno::Any >& i_rArguments ) override;
83 virtual css::uno::Reference< css::uno::XInterface > CreateDragSource() override;
84 virtual css::uno::Reference< css::uno::XInterface > CreateDropTarget() override;
85 virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
88 #endif // INCLUDED_VCL_INC_UNX_SALINST_H
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */