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 .
22 #include <unx/saldisp.hxx>
27 #include <qsocketnotifier.h>
30 #include <unx/salinst.h>
32 class VCLKDEApplication
;
34 class KDEXLib
: public QObject
, public SalXLib
39 VCLKDEApplication
* m_pApplication
;
40 char** m_pFreeCmdLineArgs
;
41 char** m_pAppCmdLineArgs
;
42 int m_nFakeCmdLineArgs
;
49 QSocketNotifier
* notifier
;
51 QHash
< int, SocketData
> socketData
; // key is fd
53 QTimer userEventTimer
;
55 bool m_isGlibEventLoopType
;
56 bool m_allowKdeDialogs
;
59 void setupEventLoop();
62 void socketNotifierActivated( int fd
);
63 void timeoutActivated();
64 void userEventActivated();
65 void startTimeoutTimer();
66 void startUserEventTimer();
67 void processYield( bool bWait
, bool bHandleAllCurrentEvents
);
69 void startTimeoutTimerSignal();
70 void startUserEventTimerSignal();
71 void processYieldSignal( bool bWait
, bool bHandleAllCurrentEvents
);
72 com::sun::star::uno::Reference
< com::sun::star::ui::dialogs::XFilePicker2
>
73 createFilePickerSignal( const com::sun::star::uno::Reference
<
74 com::sun::star::uno::XComponentContext
>& );
75 int getFrameWidthSignal();
81 virtual void Init() SAL_OVERRIDE
;
82 virtual void Yield( bool bWait
, bool bHandleAllCurrentEvents
) SAL_OVERRIDE
;
83 virtual void Insert( int fd
, void* data
, YieldFunc pending
, YieldFunc queued
, YieldFunc handle
) SAL_OVERRIDE
;
84 virtual void Remove( int fd
) SAL_OVERRIDE
;
85 virtual void StartTimer( sal_uLong nMS
) SAL_OVERRIDE
;
86 virtual void StopTimer() SAL_OVERRIDE
;
87 virtual void Wakeup() SAL_OVERRIDE
;
88 virtual void PostUserEvent() SAL_OVERRIDE
;
91 bool allowKdeDialogs() { return m_allowKdeDialogs
; }
94 com::sun::star::uno::Reference
< com::sun::star::ui::dialogs::XFilePicker2
>
95 createFilePicker( const com::sun::star::uno::Reference
<
96 com::sun::star::uno::XComponentContext
>& );
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */