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