update dev300-m58
[ooovba.git] / fpicker / source / win32 / filepicker / controlaccess.hxx
blob26c70e2434277a7449a23c1b128b01cc4d5ce09c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: controlaccess.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
32 #ifndef _CONTROLACCESS_HXX_
33 #define _CONTROLACCESS_HXX_
35 //------------------------------------------------------------------------
36 // includes
37 //------------------------------------------------------------------------
39 #include <sal/types.h>
40 #include <rtl/ustring.hxx>
42 #if defined _MSC_VER
43 #pragma warning(push, 1)
44 #endif
45 #include <windows.h>
46 #if defined _MSC_VER
47 #pragma warning(pop)
48 #endif
49 #include <com/sun/star/uno/Any.hxx>
51 //------------------------------------------------------------------------
52 // deklarations
53 //------------------------------------------------------------------------
55 typedef void ( SAL_CALL *CTRL_SETVALUE_FUNCTION_T)( HWND, const ::com::sun::star::uno::Any&, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >&, sal_Int16 );
56 typedef ::com::sun::star::uno::Any ( SAL_CALL *CTRL_GETVALUE_FUNCTION_T )( HWND );
58 // the currently supported control classes
59 enum CTRL_CLASS
61 UNKNOWN = 0,
62 CHECKBOX,
63 LISTBOX,
64 PUSHBUTTON
67 // returns the class of a control
68 CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl );
70 // returns a pointer to a setValue function based on the control class
71 // and the control action, if no function was found NULL will be returned
72 CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction );
74 // returns a pointer to a getValue function based on the control class
75 // and the control action, if no function was found NULL will be returned
76 CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction );
78 // translates a CommonFilePickerElementId as defined in CommonFilePickerElementIds.idl
79 // to a control id that is valid for the FileOpen dialog under windows as defined
80 // in dlgs.h in the Windows Platform SDK
81 int SAL_CALL CommonFilePickerCtrlIdToWinFileOpenCtrlId( sal_Int16 aControlId );
83 #endif