1*2123d757SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2123d757SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2123d757SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2123d757SAndrew Rist * distributed with this work for additional information 6*2123d757SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2123d757SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2123d757SAndrew Rist * "License"); you may not use this file except in compliance 9*2123d757SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*2123d757SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*2123d757SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2123d757SAndrew Rist * software distributed under the License is distributed on an 15*2123d757SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2123d757SAndrew Rist * KIND, either express or implied. See the License for the 17*2123d757SAndrew Rist * specific language governing permissions and limitations 18*2123d757SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*2123d757SAndrew Rist *************************************************************/ 21*2123d757SAndrew Rist 22*2123d757SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SV_SALINST_H 25cdf0e10cSrcweir #define _SV_SALINST_H 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <salinst.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir namespace vos { class OMutex; } 30cdf0e10cSrcweir 31cdf0e10cSrcweir // ------------------- 32cdf0e10cSrcweir // - SalInstanceData - 33cdf0e10cSrcweir // ------------------- 34cdf0e10cSrcweir 35cdf0e10cSrcweir class SalYieldMutex; 36cdf0e10cSrcweir 37cdf0e10cSrcweir class WinSalInstance : public SalInstance 38cdf0e10cSrcweir { 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir HINSTANCE mhInst; // Instance Handle 41cdf0e10cSrcweir HWND mhComWnd; // window, for communication (between threads and the main thread) 42cdf0e10cSrcweir SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex 43cdf0e10cSrcweir vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex 44cdf0e10cSrcweir sal_uInt16 mnYieldWaitCount; // Wait-Count 45cdf0e10cSrcweir public: 46cdf0e10cSrcweir WinSalInstance(); 47cdf0e10cSrcweir virtual ~WinSalInstance(); 48cdf0e10cSrcweir 49cdf0e10cSrcweir virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle ); 50cdf0e10cSrcweir virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle ); 51cdf0e10cSrcweir virtual void DestroyFrame( SalFrame* pFrame ); 52cdf0e10cSrcweir virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True ); 53cdf0e10cSrcweir virtual void DestroyObject( SalObject* pObject ); 54cdf0e10cSrcweir virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, 55cdf0e10cSrcweir long nDX, long nDY, 56cdf0e10cSrcweir sal_uInt16 nBitCount, const SystemGraphicsData *pData ); 57cdf0e10cSrcweir virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); 58cdf0e10cSrcweir 59cdf0e10cSrcweir virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, 60cdf0e10cSrcweir ImplJobSetup* pSetupData ); 61cdf0e10cSrcweir virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); 62cdf0e10cSrcweir virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); 63cdf0e10cSrcweir virtual void DestroyPrinter( SalPrinter* pPrinter ); 64cdf0e10cSrcweir virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); 65cdf0e10cSrcweir virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); 66cdf0e10cSrcweir virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); 67cdf0e10cSrcweir virtual String GetDefaultPrinter(); 68cdf0e10cSrcweir virtual SalTimer* CreateSalTimer(); 69cdf0e10cSrcweir virtual SalI18NImeStatus* CreateI18NImeStatus(); 70cdf0e10cSrcweir virtual SalSystem* CreateSalSystem(); 71cdf0e10cSrcweir virtual SalBitmap* CreateSalBitmap(); 72cdf0e10cSrcweir virtual vos::IMutex* GetYieldMutex(); 73cdf0e10cSrcweir virtual sal_uIntPtr ReleaseYieldMutex(); 74cdf0e10cSrcweir virtual void AcquireYieldMutex( sal_uIntPtr nCount ); 75cdf0e10cSrcweir virtual bool CheckYieldMutex(); 76cdf0e10cSrcweir 77cdf0e10cSrcweir virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); 78cdf0e10cSrcweir virtual bool AnyInput( sal_uInt16 nType ); 79cdf0e10cSrcweir virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* ); 80cdf0e10cSrcweir virtual void DestroyMenu( SalMenu* ); 81cdf0e10cSrcweir virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); 82cdf0e10cSrcweir virtual void DestroyMenuItem( SalMenuItem* ); 83cdf0e10cSrcweir virtual SalSession* CreateSalSession(); 84cdf0e10cSrcweir virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); 85cdf0e10cSrcweir virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); 86cdf0e10cSrcweir 87cdf0e10cSrcweir static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo); 88cdf0e10cSrcweir }; 89cdf0e10cSrcweir 90cdf0e10cSrcweir // -------------- 91cdf0e10cSrcweir // - Prototypen - 92cdf0e10cSrcweir // -------------- 93cdf0e10cSrcweir 94cdf0e10cSrcweir SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPtr nSalFrameStyle ); 95cdf0e10cSrcweir SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent ); 96cdf0e10cSrcweir HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild ); 97cdf0e10cSrcweir void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex = sal_False ); 98cdf0e10cSrcweir void ImplSalPrinterAbortJobAsync( HDC hPrnDC ); 99cdf0e10cSrcweir 100cdf0e10cSrcweir #endif // _SV_SALINST_H 101