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 .
20 #ifndef INCLUDED_VCL_INC_UNX_SALINST_H
21 #define INCLUDED_VCL_INC_UNX_SALINST_H
23 #include <osl/thread.hxx>
24 #include <vclpluginapi.h>
25 #include <salinst.hxx>
26 #include "unx/geninst.h"
29 #include <X11/Xutil.h>
31 namespace com
{ namespace sun
{ namespace star
{ namespace datatransfer
{
32 namespace clipboard
{ class XClipboard
; }
39 class VCLPLUG_GEN_PUBLIC X11SalInstance
: public SalGenericInstance
42 std::unordered_map
< Atom
, css::uno::Reference
< css::datatransfer::clipboard::XClipboard
> > m_aInstances
;
47 virtual SalX11Display
* CreateDisplay() const;
50 explicit X11SalInstance(SalYieldMutex
* pMutex
);
51 virtual ~X11SalInstance() override
;
53 virtual SalFrame
* CreateChildFrame( SystemParentData
* pParent
, SalFrameStyleFlags nStyle
) override
;
54 virtual SalFrame
* CreateFrame( SalFrame
* pParent
, SalFrameStyleFlags nStyle
) override
;
55 virtual void DestroyFrame( SalFrame
* pFrame
) override
;
57 virtual SalObject
* CreateObject( SalFrame
* pParent
, SystemWindowData
* pWindowData
, bool bShow
) override
;
58 virtual void DestroyObject( SalObject
* pObject
) override
;
60 /// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics.
61 static SalVirtualDevice
* CreateX11VirtualDevice(SalGraphics
* pGraphics
, long &nDX
, long &nDY
,
62 DeviceFormat eFormat
, const SystemGraphicsData
* pData
, X11SalGraphics
* pNewGraphics
);
64 virtual SalVirtualDevice
* CreateVirtualDevice( SalGraphics
* pGraphics
,
66 DeviceFormat eFormat
, const SystemGraphicsData
*pData
= nullptr ) override
;
67 virtual void PostPrintersChanged() override
;
68 virtual GenPspGraphics
*CreatePrintGraphics() override
;
70 virtual SalTimer
* CreateSalTimer() override
;
71 virtual SalI18NImeStatus
* CreateI18NImeStatus() override
;
72 virtual SalSystem
* CreateSalSystem() override
;
73 virtual SalBitmap
* CreateSalBitmap() override
;
74 virtual SalSession
* CreateSalSession() override
;
75 virtual OpenGLContext
* CreateOpenGLContext() override
;
77 virtual SalYieldResult
DoYield(bool bWait
, bool bHandleAllCurrentEvents
, sal_uLong nReleased
) override
;
78 virtual bool AnyInput( VclInputFlags nType
) override
;
80 virtual OUString
GetConnectionIdentifier() override
;
81 void SetLib( SalXLib
*pXLib
) { mpXLib
= pXLib
; }
83 virtual void AfterAppInit() override
;
85 // dtrans implementation
86 virtual css::uno::Reference
< css::uno::XInterface
>
87 CreateClipboard( const css::uno::Sequence
< css::uno::Any
>& i_rArguments
) override
;
88 virtual css::uno::Reference
< css::uno::XInterface
> CreateDragSource() override
;
89 virtual css::uno::Reference
< css::uno::XInterface
> CreateDropTarget() override
;
90 virtual void AddToRecentDocumentList(const OUString
& rFileUrl
, const OUString
& rMimeType
, const OUString
& rDocumentService
) override
;
93 #endif // INCLUDED_VCL_INC_UNX_SALINST_H
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */