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.17.154.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 ************************************************************************/
31 // -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
36 #ifndef _VOS_MUTEX_HXX
37 #include <vos/mutex.hxx>
39 #ifndef _VOS_THREAD_HXX
40 #include <vos/thread.hxx>
42 #include <vcl/dllapi.h>
43 #include <vcl/salinst.hxx>
45 class VCL_DLLPUBLIC SalYieldMutex
: public NAMESPACE_VOS(OMutex
)
49 NAMESPACE_VOS(OThread
)::TThreadIdentifier mnThreadId
;
54 virtual void acquire();
55 virtual void release();
56 virtual sal_Bool
tryToAcquire();
58 ULONG
GetAcquireCount() const { return mnCount
; }
59 NAMESPACE_VOS(OThread
)::TThreadIdentifier
GetThreadId() const { return mnThreadId
; }
62 // -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
63 class VCL_DLLPUBLIC X11SalInstance
: public SalInstance
66 SalYieldMutex
* mpSalYieldMutex
;
70 X11SalInstance( SalYieldMutex
* pMutex
)
71 : mpSalYieldMutex( pMutex
),
72 mbPrinterInit( false )
74 virtual ~X11SalInstance();
76 virtual SalFrame
* CreateChildFrame( SystemParentData
* pParent
, ULONG nStyle
);
77 virtual SalFrame
* CreateFrame( SalFrame
* pParent
, ULONG nStyle
);
78 virtual void DestroyFrame( SalFrame
* pFrame
);
80 virtual SalObject
* CreateObject( SalFrame
* pParent
, SystemWindowData
* pWindowData
, BOOL bShow
= TRUE
);
81 virtual void DestroyObject( SalObject
* pObject
);
83 virtual SalVirtualDevice
* CreateVirtualDevice( SalGraphics
* pGraphics
,
85 USHORT nBitCount
, const SystemGraphicsData
*pData
= NULL
);
86 virtual void DestroyVirtualDevice( SalVirtualDevice
* pDevice
);
88 virtual SalInfoPrinter
* CreateInfoPrinter( SalPrinterQueueInfo
* pQueueInfo
,
89 ImplJobSetup
* pSetupData
);
90 virtual void DestroyInfoPrinter( SalInfoPrinter
* pPrinter
);
91 virtual SalPrinter
* CreatePrinter( SalInfoPrinter
* pInfoPrinter
);
92 virtual void DestroyPrinter( SalPrinter
* pPrinter
);
94 virtual void GetPrinterQueueInfo( ImplPrnQueueList
* pList
);
95 virtual void GetPrinterQueueState( SalPrinterQueueInfo
* pInfo
);
96 virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo
* pInfo
);
97 virtual String
GetDefaultPrinter();
99 virtual SalTimer
* CreateSalTimer();
100 virtual SalI18NImeStatus
* CreateI18NImeStatus();
101 virtual SalSystem
* CreateSalSystem();
102 virtual SalBitmap
* CreateSalBitmap();
103 virtual SalSession
* CreateSalSession();
105 virtual vos::IMutex
* GetYieldMutex();
106 virtual ULONG
ReleaseYieldMutex();
107 virtual void AcquireYieldMutex( ULONG nCount
);
109 virtual void Yield( bool bWait
, bool bHandleAllCurrentEvents
);
110 virtual bool AnyInput( USHORT nType
);
111 virtual SalMenu
* CreateMenu( BOOL bMenuBar
);
112 virtual void DestroyMenu( SalMenu
* pMenu
);
113 virtual SalMenuItem
* CreateMenuItem( const SalItemParams
* pItemData
);
114 virtual void DestroyMenuItem( SalMenuItem
* pItem
);
116 virtual void* GetConnectionIdentifier( ConnectionIdentifierType
& rReturnedType
, int& rReturnedBytes
);
117 void FillFontPathList( std::list
< rtl::OString
>& o_rFontPaths
);
119 // dtrans implementation
120 virtual com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
>
121 CreateClipboard( const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
>& i_rArguments
);
122 virtual com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> CreateDragSource();
123 virtual com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> CreateDropTarget();
124 virtual void AddToRecentDocumentList(const rtl::OUString
& rFileUrl
, const rtl::OUString
& rMimeType
);
127 bool isPrinterInit() const
129 return mbPrinterInit
;
133 #endif // _SV_SALINST_H