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_KDE_KDEDATA_HXX
21 #define INCLUDED_VCL_INC_UNX_KDE_KDEDATA_HXX
23 #include <unx/saldisp.hxx>
24 #include <unx/saldata.hxx>
25 #include <unx/salframe.h>
26 #include <unx/salgdi.h>
30 class KDEData
: public X11SalData
33 KDEData( SalInstance
*pInstance
) : X11SalData( SAL_DATA_KDE3
, pInstance
) {}
34 virtual ~KDEData() override
;
36 virtual void Init() override
;
37 virtual void initNWF() override
;
38 virtual void deInitNWF() override
;
41 class SalKDEDisplay
: public SalX11Display
44 SalKDEDisplay( Display
* pDisp
);
45 virtual ~SalKDEDisplay() override
;
48 class KDESalFrame
: public X11SalFrame
50 static const int nMaxGraphics
= 2;
54 std::unique_ptr
<X11SalGraphics
> pGraphics
;
56 GraphicsHolder() : bInUse( false ) {}
58 GraphicsHolder m_aGraphics
[ nMaxGraphics
];
61 KDESalFrame( SalFrame
* pParent
, SalFrameStyleFlags
);
62 virtual ~KDESalFrame() override
;
64 virtual SalGraphics
* AcquireGraphics() override
;
65 virtual void ReleaseGraphics( SalGraphics
*pGraphics
) override
;
66 virtual void updateGraphics( bool bClear
) override
;
67 virtual void UpdateSettings( AllSettings
& rSettings
) override
;
68 virtual void Show( bool bVisible
, bool bNoActivate
= false ) override
;
71 class KDESalInstance
: public X11SalInstance
74 virtual SalX11Display
* CreateDisplay() const override
;
77 KDESalInstance( SalYieldMutex
* pMutex
)
78 : X11SalInstance( pMutex
) {}
79 virtual SalFrame
* CreateFrame( SalFrame
* pParent
, SalFrameStyleFlags nStyle
) override
;
81 virtual bool hasNativeFileSelection() const override
{ return true; }
83 virtual css::uno::Reference
< css::ui::dialogs::XFilePicker2
>
84 createFilePicker( const css::uno::Reference
< css::uno::XComponentContext
>& ) override
;
87 class KDEXLib
: public SalXLib
91 char** m_pFreeCmdLineArgs
;
92 char** m_pAppCmdLineArgs
;
93 int m_nFakeCmdLineArgs
;
95 KDEXLib() : SalXLib(),
96 m_bStartupDone( false ),
97 m_pApplication( nullptr ),
98 m_pFreeCmdLineArgs( nullptr ),
99 m_pAppCmdLineArgs( nullptr ),
100 m_nFakeCmdLineArgs( 0 )
102 virtual ~KDEXLib() override
;
103 virtual void Init() override
;
108 #endif // INCLUDED_VCL_INC_UNX_KDE_KDEDATA_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */