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
;
57 bool blockIdleTimeout
;
60 void setupEventLoop();
63 void socketNotifierActivated( int fd
);
64 void timeoutActivated();
65 void userEventActivated();
66 void startTimeoutTimer();
67 void startUserEventTimer();
68 void processYield( bool bWait
, bool bHandleAllCurrentEvents
);
70 void startTimeoutTimerSignal();
71 void startUserEventTimerSignal();
72 void processYieldSignal( bool bWait
, bool bHandleAllCurrentEvents
);
73 com::sun::star::uno::Reference
< com::sun::star::ui::dialogs::XFilePicker2
>
74 createFilePickerSignal( const com::sun::star::uno::Reference
<
75 com::sun::star::uno::XComponentContext
>& );
76 int getFrameWidthSignal();
82 virtual void Init() SAL_OVERRIDE
;
83 virtual void Yield( bool bWait
, bool bHandleAllCurrentEvents
) SAL_OVERRIDE
;
84 virtual void Insert( int fd
, void* data
, YieldFunc pending
, YieldFunc queued
, YieldFunc handle
) SAL_OVERRIDE
;
85 virtual void Remove( int fd
) SAL_OVERRIDE
;
86 virtual void StartTimer( sal_uLong nMS
) SAL_OVERRIDE
;
87 virtual void StopTimer() SAL_OVERRIDE
;
88 virtual void Wakeup() SAL_OVERRIDE
;
89 virtual void PostUserEvent() SAL_OVERRIDE
;
92 bool allowKdeDialogs() { return m_allowKdeDialogs
; }
95 com::sun::star::uno::Reference
< com::sun::star::ui::dialogs::XFilePicker2
>
96 createFilePicker( const com::sun::star::uno::Reference
<
97 com::sun::star::uno::XComponentContext
>& );
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */