update dev300-m58
[ooovba.git] / vcl / unx / gtk / a11y / atklistener.hxx
blobfd7233337615f5ab92692cf4c577c22f9937bc0e
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: atklistener.hxx,v $
10 * $Revision: 1.4 $
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 #ifndef _ATK_LISTENER_HXX_
32 #define _ATK_LISTENER_HXX_
34 #include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
35 #include <cppuhelper/implbase1.hxx>
37 #include <vector>
39 #include "atkwrapper.hxx"
41 typedef std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleVector;
43 class AtkListener : public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleEventListener >
45 public:
46 AtkListener(AtkObjectWrapper * pWrapper);
48 // XEventListener
49 virtual void disposing( const ::com::sun::star::lang::EventObject& Source )
50 throw (::com::sun::star::uno::RuntimeException);
52 // XAccessibleEventListener
53 virtual void notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
54 throw( ::com::sun::star::uno::RuntimeException );
56 AtkObjectWrapper *mpWrapper;
57 AccessibleVector m_aChildList;
59 private:
61 virtual ~AtkListener();
63 // Updates the child list held to provide the old IndexInParent on children_changed::remove
64 void updateChildList(::com::sun::star::accessibility::XAccessibleContext* pContext);
66 // Process CHILD_EVENT notifications with a new child added
67 void handleChildAdded(
68 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent,
69 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxChild);
71 // Process CHILD_EVENT notifications with a child removed
72 void handleChildRemoved(
73 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent,
74 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxChild);
76 // Process INVALIDATE_ALL_CHILDREN notification
77 void handleInvalidateChildren(
78 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent);
81 #endif /* _ATK_LISTENER_HXX_ */