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