1*fc9fd3f1SPedro Giffuni /************************************************************************* 2*fc9fd3f1SPedro Giffuni * 3*fc9fd3f1SPedro Giffuni * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*fc9fd3f1SPedro Giffuni * 5*fc9fd3f1SPedro Giffuni * Copyright 2000, 2010 Oracle and/or its affiliates. 6*fc9fd3f1SPedro Giffuni * 7*fc9fd3f1SPedro Giffuni * OpenOffice.org - a multi-platform office productivity suite 8*fc9fd3f1SPedro Giffuni * 9*fc9fd3f1SPedro Giffuni * This file is part of OpenOffice.org. 10*fc9fd3f1SPedro Giffuni * 11*fc9fd3f1SPedro Giffuni * OpenOffice.org is free software: you can redistribute it and/or modify 12*fc9fd3f1SPedro Giffuni * it under the terms of the GNU Lesser General Public License version 3 13*fc9fd3f1SPedro Giffuni * only, as published by the Free Software Foundation. 14*fc9fd3f1SPedro Giffuni * 15*fc9fd3f1SPedro Giffuni * OpenOffice.org is distributed in the hope that it will be useful, 16*fc9fd3f1SPedro Giffuni * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*fc9fd3f1SPedro Giffuni * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*fc9fd3f1SPedro Giffuni * GNU Lesser General Public License version 3 for more details 19*fc9fd3f1SPedro Giffuni * (a copy is included in the LICENSE file that accompanied this code). 20*fc9fd3f1SPedro Giffuni * 21*fc9fd3f1SPedro Giffuni * You should have received a copy of the GNU Lesser General Public License 22*fc9fd3f1SPedro Giffuni * version 3 along with OpenOffice.org. If not, see 23*fc9fd3f1SPedro Giffuni * <http://www.openoffice.org/license.html> 24*fc9fd3f1SPedro Giffuni * for a copy of the LGPLv3 License. 25*fc9fd3f1SPedro Giffuni * 26*fc9fd3f1SPedro Giffuni ************************************************************************/ 27*fc9fd3f1SPedro Giffuni 28*fc9fd3f1SPedro Giffuni #ifndef _SV_SALINST_H 29*fc9fd3f1SPedro Giffuni #define _SV_SALINST_H 30*fc9fd3f1SPedro Giffuni 31*fc9fd3f1SPedro Giffuni #include <salinst.hxx> 32*fc9fd3f1SPedro Giffuni 33*fc9fd3f1SPedro Giffuni namespace vos { class OMutex; } 34*fc9fd3f1SPedro Giffuni 35*fc9fd3f1SPedro Giffuni // ------------------- 36*fc9fd3f1SPedro Giffuni // - SalInstanceData - 37*fc9fd3f1SPedro Giffuni // ------------------- 38*fc9fd3f1SPedro Giffuni 39*fc9fd3f1SPedro Giffuni class SalYieldMutex; 40*fc9fd3f1SPedro Giffuni 41*fc9fd3f1SPedro Giffuni #define SAL_COMMANDLINENOINIT ((USHORT)0xFFFF) 42*fc9fd3f1SPedro Giffuni #define SAL_MAXPARAM 40 43*fc9fd3f1SPedro Giffuni 44*fc9fd3f1SPedro Giffuni class Os2SalInstance : public SalInstance 45*fc9fd3f1SPedro Giffuni { 46*fc9fd3f1SPedro Giffuni public: 47*fc9fd3f1SPedro Giffuni HAB mhAB; // anchor block handle 48*fc9fd3f1SPedro Giffuni HMQ mhMQ; // handle of os2 message queue 49*fc9fd3f1SPedro Giffuni HPOINTER mhAppIcon; // app icon 50*fc9fd3f1SPedro Giffuni int mnArgc; // commandline param count 51*fc9fd3f1SPedro Giffuni char** mpArgv; // commandline 52*fc9fd3f1SPedro Giffuni HWND mhComWnd; // window, for communication (between threads and the main thread) 53*fc9fd3f1SPedro Giffuni SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex 54*fc9fd3f1SPedro Giffuni vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex 55*fc9fd3f1SPedro Giffuni USHORT mnYieldWaitCount; // Wait-Count 56*fc9fd3f1SPedro Giffuni 57*fc9fd3f1SPedro Giffuni public: 58*fc9fd3f1SPedro Giffuni Os2SalInstance(); 59*fc9fd3f1SPedro Giffuni virtual ~Os2SalInstance(); 60*fc9fd3f1SPedro Giffuni 61*fc9fd3f1SPedro Giffuni virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); 62*fc9fd3f1SPedro Giffuni virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); 63*fc9fd3f1SPedro Giffuni virtual void DestroyFrame( SalFrame* pFrame ); 64*fc9fd3f1SPedro Giffuni virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = TRUE ); 65*fc9fd3f1SPedro Giffuni virtual void DestroyObject( SalObject* pObject ); 66*fc9fd3f1SPedro Giffuni virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, 67*fc9fd3f1SPedro Giffuni long nDX, long nDY, 68*fc9fd3f1SPedro Giffuni USHORT nBitCount, const SystemGraphicsData *pData ); 69*fc9fd3f1SPedro Giffuni virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); 70*fc9fd3f1SPedro Giffuni 71*fc9fd3f1SPedro Giffuni virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, 72*fc9fd3f1SPedro Giffuni ImplJobSetup* pSetupData ); 73*fc9fd3f1SPedro Giffuni virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); 74*fc9fd3f1SPedro Giffuni virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); 75*fc9fd3f1SPedro Giffuni virtual void DestroyPrinter( SalPrinter* pPrinter ); 76*fc9fd3f1SPedro Giffuni virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); 77*fc9fd3f1SPedro Giffuni virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); 78*fc9fd3f1SPedro Giffuni virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); 79*fc9fd3f1SPedro Giffuni virtual String GetDefaultPrinter(); 80*fc9fd3f1SPedro Giffuni virtual SalTimer* CreateSalTimer(); 81*fc9fd3f1SPedro Giffuni virtual SalI18NImeStatus* CreateI18NImeStatus(); 82*fc9fd3f1SPedro Giffuni virtual SalSystem* CreateSalSystem(); 83*fc9fd3f1SPedro Giffuni virtual SalBitmap* CreateSalBitmap(); 84*fc9fd3f1SPedro Giffuni virtual vos::IMutex* GetYieldMutex(); 85*fc9fd3f1SPedro Giffuni virtual ULONG ReleaseYieldMutex(); 86*fc9fd3f1SPedro Giffuni virtual void AcquireYieldMutex( ULONG nCount ); 87*fc9fd3f1SPedro Giffuni virtual bool CheckYieldMutex(); 88*fc9fd3f1SPedro Giffuni 89*fc9fd3f1SPedro Giffuni virtual void Yield( bool, bool ); 90*fc9fd3f1SPedro Giffuni virtual bool AnyInput( USHORT nType ); 91*fc9fd3f1SPedro Giffuni virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* ); 92*fc9fd3f1SPedro Giffuni virtual void DestroyMenu( SalMenu* ); 93*fc9fd3f1SPedro Giffuni virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); 94*fc9fd3f1SPedro Giffuni virtual void DestroyMenuItem( SalMenuItem* ); 95*fc9fd3f1SPedro Giffuni virtual SalSession* CreateSalSession(); 96*fc9fd3f1SPedro Giffuni virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); 97*fc9fd3f1SPedro Giffuni virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); 98*fc9fd3f1SPedro Giffuni }; 99*fc9fd3f1SPedro Giffuni 100*fc9fd3f1SPedro Giffuni SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle ); 101*fc9fd3f1SPedro Giffuni SalObject* ImplSalCreateObject( Os2SalInstance* pInst, Os2SalFrame* pParent ); 102*fc9fd3f1SPedro Giffuni void ImplSalStartTimer( ULONG nMS, sal_Bool bMutex = FALSE ); 103*fc9fd3f1SPedro Giffuni 104*fc9fd3f1SPedro Giffuni #endif // _SV_SALINST_H 105