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