Update ooo320-m1
[ooovba.git] / vcl / unx / inc / plugins / kde / kdedata.hxx
blob723562d8aab113ac574cf190c95da42bd54d6f23
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: kdedata.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _VCL_KDEDATA_HXX
32 #define _VCL_KDEDATA_HXX
34 #include <saldisp.hxx>
35 #include <saldata.hxx>
36 #include <salframe.h>
38 class KDEData : public X11SalData
40 public:
41 KDEData() {}
42 virtual ~KDEData();
44 virtual void Init();
45 virtual void initNWF();
46 virtual void deInitNWF();
49 class SalKDEDisplay : public SalX11Display
51 public:
52 SalKDEDisplay( Display* pDisp );
53 virtual ~SalKDEDisplay();
56 class KDESalFrame : public X11SalFrame
58 static const int nMaxGraphics = 2;
60 struct GraphicsHolder
62 X11SalGraphics* pGraphics;
63 bool bInUse;
64 GraphicsHolder()
65 : pGraphics( NULL ),
66 bInUse( false )
68 ~GraphicsHolder();
70 GraphicsHolder m_aGraphics[ nMaxGraphics ];
72 public:
73 KDESalFrame( SalFrame* pParent, ULONG nStyle );
74 virtual ~KDESalFrame();
76 virtual SalGraphics* GetGraphics();
77 virtual void ReleaseGraphics( SalGraphics *pGraphics );
78 virtual void updateGraphics();
79 virtual void UpdateSettings( AllSettings& rSettings );
80 virtual void Show( BOOL bVisible, BOOL bNoActivate );
83 class KDESalInstance : public X11SalInstance
85 public:
86 KDESalInstance( SalYieldMutex* pMutex )
87 : X11SalInstance( pMutex ) {}
88 virtual ~KDESalInstance() {}
89 virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
92 class KDEXLib : public SalXLib
94 bool m_bStartupDone;
95 void* m_pApplication;
96 char** m_pFreeCmdLineArgs;
97 char** m_pAppCmdLineArgs;
98 int m_nFakeCmdLineArgs;
99 public:
100 KDEXLib() : SalXLib(),
101 m_bStartupDone( false ),
102 m_pApplication( NULL ),
103 m_pFreeCmdLineArgs( NULL ),
104 m_pAppCmdLineArgs( NULL ),
105 m_nFakeCmdLineArgs( 0 )
107 virtual ~KDEXLib();
108 virtual void Init();
110 void doStartup();
113 #endif // _VCL_KDEDATA_HXX