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 52 void SAL_CALL ListboxAddItems( 53 HWND hwnd, const ::com::sun::star::uno::Any& aItemList, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ); 54 55 void SAL_CALL ListboxDeleteItem( 56 HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ); 57 58 void SAL_CALL ListboxDeleteItems( 59 HWND hwnd, const ::com::sun::star::uno::Any& aUnused, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ); 60 61 void SAL_CALL ListboxSetSelectedItem( 62 HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ); 63 64 // get actions 65 ::com::sun::star::uno::Any SAL_CALL ListboxGetItems( HWND hwnd ); 66 ::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ); 67 68 // checkbox helper functions 69 ::com::sun::star::uno::Any SAL_CALL CheckboxGetState( HWND hwnd ); 70 71 void SAL_CALL CheckboxSetState( 72 HWND hwnd, const ::com::sun::star::uno::Any& aState, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ); 73 74 // calculates the length of '\0' separated and '\0\0' 75 // ending strings used in some Win32 functions 76 // e.g. Filter\0*.txt\0\0 77 // the returned length excludes the last '\0' 78 sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ); 79 80 #endif 81