1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
32 #include <vcl/salinst.hxx>
34 namespace vos
{ class OMutex
; }
36 // -------------------
37 // - SalInstanceData -
38 // -------------------
42 #define SAL_COMMANDLINENOINIT ((USHORT)0xFFFF)
43 #define SAL_MAXPARAM 40
45 class Os2SalInstance
: public SalInstance
48 HAB mhAB
; // anchor block handle
49 HMQ mhMQ
; // handle of os2 message queue
50 HPOINTER mhAppIcon
; // app icon
51 int mnArgc
; // commandline param count
52 char** mpArgv
; // commandline
53 HWND mhComWnd
; // window, for communication (between threads and the main thread)
54 SalYieldMutex
* mpSalYieldMutex
; // Sal-Yield-Mutex
55 vos::OMutex
* mpSalWaitMutex
; // Sal-Wait-Mutex
56 USHORT mnYieldWaitCount
; // Wait-Count
60 virtual ~Os2SalInstance();
62 virtual SalFrame
* CreateChildFrame( SystemParentData
* pParent
, ULONG nStyle
);
63 virtual SalFrame
* CreateFrame( SalFrame
* pParent
, ULONG nStyle
);
64 virtual void DestroyFrame( SalFrame
* pFrame
);
65 virtual SalObject
* CreateObject( SalFrame
* pParent
, SystemWindowData
* pWindowData
, BOOL bShow
= TRUE
);
66 virtual void DestroyObject( SalObject
* pObject
);
67 virtual SalVirtualDevice
* CreateVirtualDevice( SalGraphics
* pGraphics
,
69 USHORT nBitCount
, const SystemGraphicsData
*pData
);
70 virtual void DestroyVirtualDevice( SalVirtualDevice
* pDevice
);
72 virtual SalInfoPrinter
* CreateInfoPrinter( SalPrinterQueueInfo
* pQueueInfo
,
73 ImplJobSetup
* pSetupData
);
74 virtual void DestroyInfoPrinter( SalInfoPrinter
* pPrinter
);
75 virtual SalPrinter
* CreatePrinter( SalInfoPrinter
* pInfoPrinter
);
76 virtual void DestroyPrinter( SalPrinter
* pPrinter
);
77 virtual void GetPrinterQueueInfo( ImplPrnQueueList
* pList
);
78 virtual void GetPrinterQueueState( SalPrinterQueueInfo
* pInfo
);
79 virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo
* pInfo
);
80 virtual String
GetDefaultPrinter();
81 virtual SalTimer
* CreateSalTimer();
82 virtual SalI18NImeStatus
* CreateI18NImeStatus();
83 virtual SalSystem
* CreateSalSystem();
84 virtual SalBitmap
* CreateSalBitmap();
85 virtual vos::IMutex
* GetYieldMutex();
86 virtual ULONG
ReleaseYieldMutex();
87 virtual void AcquireYieldMutex( ULONG nCount
);
88 virtual bool CheckYieldMutex();
89 virtual void Yield( bool, bool );
90 virtual bool AnyInput( USHORT nType
);
91 virtual SalSession
* CreateSalSession();
92 virtual void* GetConnectionIdentifier( ConnectionIdentifierType
& rReturnedType
, int& rReturnedBytes
);
93 virtual void AddToRecentDocumentList(const rtl::OUString
& rFileUrl
, const rtl::OUString
& rMimeType
);
96 SalFrame
* ImplSalCreateFrame( Os2SalInstance
* pInst
, HWND hWndParent
, ULONG nSalFrameStyle
);
97 SalObject
* ImplSalCreateObject( Os2SalInstance
* pInst
, Os2SalFrame
* pParent
);
98 void ImplSalStartTimer( ULONG nMS
, BOOL bMutex
= FALSE
);
100 #endif // _SV_SALINST_H