bump product version to 6.4.0.3
[LibreOffice.git] / vcl / inc / unx / salinst.h
blobbd28d6895f7829e76b2b10183b47a7fdff75da51
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 { namespace sun { namespace star { namespace datatransfer {
30 namespace clipboard { class XClipboard; }
31 } } } }
33 class SalXLib;
34 class X11SalGraphics;
35 class SalX11Display;
37 class VCLPLUG_GEN_PUBLIC X11SalInstance : public SalGenericInstance
39 private:
40 std::unordered_map< Atom, css::uno::Reference< css::datatransfer::clipboard::XClipboard > > m_aInstances;
42 protected:
43 SalXLib *mpXLib;
45 virtual SalX11Display* CreateDisplay() const;
47 public:
48 explicit X11SalInstance(std::unique_ptr<SalYieldMutex> pMutex);
49 virtual ~X11SalInstance() override;
51 virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
52 virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
53 virtual void DestroyFrame( SalFrame* pFrame ) override;
55 virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) override;
56 virtual void DestroyObject( SalObject* pObject ) override;
58 /// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics.
59 static std::unique_ptr<SalVirtualDevice> CreateX11VirtualDevice(SalGraphics const * pGraphics, long &nDX, long &nDY,
60 DeviceFormat eFormat, const SystemGraphicsData* pData, std::unique_ptr<X11SalGraphics> pNewGraphics);
62 virtual std::unique_ptr<SalVirtualDevice>
63 CreateVirtualDevice( SalGraphics* pGraphics,
64 long &nDX, long &nDY,
65 DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
66 virtual void PostPrintersChanged() override;
67 virtual std::unique_ptr<GenPspGraphics> CreatePrintGraphics() override;
69 virtual SalTimer* CreateSalTimer() override;
70 virtual SalSystem* CreateSalSystem() override;
71 virtual std::shared_ptr<SalBitmap> CreateSalBitmap() override;
72 virtual std::unique_ptr<SalSession> CreateSalSession() override;
73 virtual OpenGLContext* CreateOpenGLContext() override;
75 virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override;
76 virtual bool AnyInput( VclInputFlags nType ) override;
77 virtual bool IsMainThread() const override { return true; }
79 virtual OUString GetConnectionIdentifier() override;
80 void SetLib( SalXLib *pXLib ) { mpXLib = pXLib; }
82 virtual void AfterAppInit() override;
84 // dtrans implementation
85 virtual css::uno::Reference< css::uno::XInterface >
86 CreateClipboard( const css::uno::Sequence< css::uno::Any >& i_rArguments ) override;
87 virtual css::uno::Reference< css::uno::XInterface > CreateDragSource() override;
88 virtual css::uno::Reference< css::uno::XInterface > CreateDropTarget() override;
89 virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
92 #endif // INCLUDED_VCL_INC_UNX_SALINST_H
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */