xref: /aoo41x/main/vcl/inc/unx/kde/kdedata.hxx (revision ebfcd9af)
1*ebfcd9afSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ebfcd9afSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ebfcd9afSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ebfcd9afSAndrew Rist  * distributed with this work for additional information
6*ebfcd9afSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ebfcd9afSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ebfcd9afSAndrew Rist  * "License"); you may not use this file except in compliance
9*ebfcd9afSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ebfcd9afSAndrew Rist  *
11*ebfcd9afSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ebfcd9afSAndrew Rist  *
13*ebfcd9afSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ebfcd9afSAndrew Rist  * software distributed under the License is distributed on an
15*ebfcd9afSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ebfcd9afSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ebfcd9afSAndrew Rist  * specific language governing permissions and limitations
18*ebfcd9afSAndrew Rist  * under the License.
19*ebfcd9afSAndrew Rist  *
20*ebfcd9afSAndrew Rist  *************************************************************/
21*ebfcd9afSAndrew Rist 
22*ebfcd9afSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _VCL_KDEDATA_HXX
25cdf0e10cSrcweir #define _VCL_KDEDATA_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <unx/saldisp.hxx>
28cdf0e10cSrcweir #include <unx/saldata.hxx>
29cdf0e10cSrcweir #include <unx/salframe.h>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir class KDEData : public X11SalData
32cdf0e10cSrcweir {
33cdf0e10cSrcweir public:
KDEData()34cdf0e10cSrcweir     KDEData() {}
35cdf0e10cSrcweir     virtual ~KDEData();
36cdf0e10cSrcweir 
37cdf0e10cSrcweir     virtual void Init();
38cdf0e10cSrcweir     virtual void initNWF();
39cdf0e10cSrcweir     virtual void deInitNWF();
40cdf0e10cSrcweir };
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class SalKDEDisplay : public SalX11Display
43cdf0e10cSrcweir {
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir     SalKDEDisplay( Display* pDisp );
46cdf0e10cSrcweir     virtual ~SalKDEDisplay();
47cdf0e10cSrcweir };
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class KDESalFrame : public X11SalFrame
50cdf0e10cSrcweir {
51cdf0e10cSrcweir     static const int nMaxGraphics = 2;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir     struct GraphicsHolder
54cdf0e10cSrcweir     {
55cdf0e10cSrcweir         X11SalGraphics*		pGraphics;
56cdf0e10cSrcweir         bool				bInUse;
GraphicsHolderKDESalFrame::GraphicsHolder57cdf0e10cSrcweir         GraphicsHolder()
58cdf0e10cSrcweir                 : pGraphics( NULL ),
59cdf0e10cSrcweir                   bInUse( false )
60cdf0e10cSrcweir         {}
61cdf0e10cSrcweir 		~GraphicsHolder();
62cdf0e10cSrcweir     };
63cdf0e10cSrcweir     GraphicsHolder m_aGraphics[ nMaxGraphics ];
64cdf0e10cSrcweir 
65cdf0e10cSrcweir public:
66cdf0e10cSrcweir 	KDESalFrame( SalFrame* pParent, sal_uLong );
67cdf0e10cSrcweir 	virtual ~KDESalFrame();
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     virtual SalGraphics* GetGraphics();
70cdf0e10cSrcweir 	virtual void ReleaseGraphics( SalGraphics *pGraphics );
71cdf0e10cSrcweir     virtual void updateGraphics( bool bClear );
72cdf0e10cSrcweir     virtual void UpdateSettings( AllSettings& rSettings );
73cdf0e10cSrcweir     virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate );
74cdf0e10cSrcweir };
75cdf0e10cSrcweir 
76cdf0e10cSrcweir class KDESalInstance : public X11SalInstance
77cdf0e10cSrcweir {
78cdf0e10cSrcweir public:
KDESalInstance(SalYieldMutex * pMutex)79cdf0e10cSrcweir     KDESalInstance( SalYieldMutex* pMutex )
80cdf0e10cSrcweir             : X11SalInstance( pMutex ) {}
~KDESalInstance()81cdf0e10cSrcweir 	virtual ~KDESalInstance() {}
82cdf0e10cSrcweir     virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
83cdf0e10cSrcweir };
84cdf0e10cSrcweir 
85cdf0e10cSrcweir class KDEXLib : public SalXLib
86cdf0e10cSrcweir {
87cdf0e10cSrcweir     bool            m_bStartupDone;
88cdf0e10cSrcweir     void*           m_pApplication;
89cdf0e10cSrcweir     char**          m_pFreeCmdLineArgs;
90cdf0e10cSrcweir     char**          m_pAppCmdLineArgs;
91cdf0e10cSrcweir     int             m_nFakeCmdLineArgs;
92cdf0e10cSrcweir public:
KDEXLib()93cdf0e10cSrcweir 	KDEXLib() : SalXLib(),
94cdf0e10cSrcweir         m_bStartupDone( false ),
95cdf0e10cSrcweir         m_pApplication( NULL ),
96cdf0e10cSrcweir         m_pFreeCmdLineArgs( NULL ),
97cdf0e10cSrcweir         m_pAppCmdLineArgs( NULL ),
98cdf0e10cSrcweir         m_nFakeCmdLineArgs( 0 )
99cdf0e10cSrcweir         {}
100cdf0e10cSrcweir 	virtual ~KDEXLib();
101cdf0e10cSrcweir     virtual void Init();
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     void doStartup();
104cdf0e10cSrcweir };
105cdf0e10cSrcweir 
106cdf0e10cSrcweir #endif // _VCL_KDEDATA_HXX
107