1*83f558e8SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*83f558e8SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*83f558e8SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*83f558e8SAndrew Rist  * distributed with this work for additional information
6*83f558e8SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*83f558e8SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*83f558e8SAndrew Rist  * "License"); you may not use this file except in compliance
9*83f558e8SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*83f558e8SAndrew Rist  *
11*83f558e8SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*83f558e8SAndrew Rist  *
13*83f558e8SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*83f558e8SAndrew Rist  * software distributed under the License is distributed on an
15*83f558e8SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*83f558e8SAndrew Rist  * KIND, either express or implied.  See the License for the
17*83f558e8SAndrew Rist  * specific language governing permissions and limitations
18*83f558e8SAndrew Rist  * under the License.
19*83f558e8SAndrew Rist  *
20*83f558e8SAndrew Rist  *************************************************************/
21*83f558e8SAndrew Rist 
22*83f558e8SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #ifndef _WINIMPLHELPER_HXX_
26cdf0e10cSrcweir #define _WINIMPLHELPER_HXX_
27cdf0e10cSrcweir 
28cdf0e10cSrcweir //------------------------------------------------------------------------
29cdf0e10cSrcweir // includes
30cdf0e10cSrcweir //------------------------------------------------------------------------
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <sal/types.h>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #ifndef _RTL_USTRING_HXX_
35cdf0e10cSrcweir #include <rtl/ustring>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #include <windows.h>
39cdf0e10cSrcweir #include <com/sun/star/uno/Any.hxx>
40cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir //------------------------------------------------------------------------
43cdf0e10cSrcweir // deklarations
44cdf0e10cSrcweir //------------------------------------------------------------------------
45cdf0e10cSrcweir 
46cdf0e10cSrcweir sal_Bool SAL_CALL IsWin2000( );
47cdf0e10cSrcweir 
48cdf0e10cSrcweir // set actions
49cdf0e10cSrcweir void SAL_CALL ListboxAddItem(
50cdf0e10cSrcweir     HWND hwnd, const ::com::sun::star::uno::Any& aItem, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
51cdf0e10cSrcweir     throw( ::com::sun::star::lang::IllegalArgumentException );
52cdf0e10cSrcweir 
53cdf0e10cSrcweir void SAL_CALL ListboxAddItems(
54cdf0e10cSrcweir     HWND hwnd, const ::com::sun::star::uno::Any& aItemList, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
55cdf0e10cSrcweir     throw( ::com::sun::star::lang:: IllegalArgumentException );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir void SAL_CALL ListboxDeleteItem(
58cdf0e10cSrcweir     HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
59cdf0e10cSrcweir     throw( ::com::sun::star::lang::IllegalArgumentException );
60cdf0e10cSrcweir 
61cdf0e10cSrcweir void SAL_CALL ListboxDeleteItems(
62cdf0e10cSrcweir     HWND hwnd, const ::com::sun::star::uno::Any& aUnused, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
63cdf0e10cSrcweir     throw( ::com::sun::star::lang::IllegalArgumentException );
64cdf0e10cSrcweir 
65cdf0e10cSrcweir void SAL_CALL ListboxSetSelectedItem(
66cdf0e10cSrcweir     HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
67cdf0e10cSrcweir     throw( ::com::sun::star::lang::IllegalArgumentException );
68cdf0e10cSrcweir 
69cdf0e10cSrcweir // get actions
70cdf0e10cSrcweir ::com::sun::star::uno::Any SAL_CALL ListboxGetItems( HWND hwnd );
71cdf0e10cSrcweir ::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItem( HWND hwnd );
72cdf0e10cSrcweir 
73cdf0e10cSrcweir // checkbox helper functions
74cdf0e10cSrcweir ::com::sun::star::uno::Any SAL_CALL CheckboxGetState( HWND hwnd );
75cdf0e10cSrcweir 
76cdf0e10cSrcweir void SAL_CALL CheckboxSetState(
77cdf0e10cSrcweir     HWND hwnd, const ::com::sun::star::uno::Any& aState, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
78cdf0e10cSrcweir     throw( ::com::sun::star::lang::IllegalArgumentException );
79cdf0e10cSrcweir 
80cdf0e10cSrcweir // calculates the length of '\0' separated and '\0\0'
81cdf0e10cSrcweir // ending strings used in some Win32 functions
82cdf0e10cSrcweir // e.g. Filter\0*.txt\0\0
83cdf0e10cSrcweir // the returned length excludes the last '\0'
84cdf0e10cSrcweir sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir #endif
87