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