1*5fdc4257SSteve Yin /************************************************************************* 2*5fdc4257SSteve Yin * 3*5fdc4257SSteve Yin * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*5fdc4257SSteve Yin * 5*5fdc4257SSteve Yin * Copyright IBM Corporation 2010. 6*5fdc4257SSteve Yin * Copyright 2000, 2010 Oracle and/or its affiliates. 7*5fdc4257SSteve Yin * 8*5fdc4257SSteve Yin * OpenOffice.org - a multi-platform office productivity suite 9*5fdc4257SSteve Yin * 10*5fdc4257SSteve Yin * This file is part of OpenOffice.org. 11*5fdc4257SSteve Yin * 12*5fdc4257SSteve Yin * OpenOffice.org is free software: you can redistribute it and/or modify 13*5fdc4257SSteve Yin * it under the terms of the GNU Lesser General Public License version 3 14*5fdc4257SSteve Yin * only, as published by the Free Software Foundation. 15*5fdc4257SSteve Yin * 16*5fdc4257SSteve Yin * OpenOffice.org is distributed in the hope that it will be useful, 17*5fdc4257SSteve Yin * but WITHOUT ANY WARRANTY; without even the implied warranty of 18*5fdc4257SSteve Yin * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19*5fdc4257SSteve Yin * GNU Lesser General Public License version 3 for more details 20*5fdc4257SSteve Yin * (a copy is included in the LICENSE file that accompanied this code). 21*5fdc4257SSteve Yin * 22*5fdc4257SSteve Yin * You should have received a copy of the GNU Lesser General Public License 23*5fdc4257SSteve Yin * version 3 along with OpenOffice.org. If not, see 24*5fdc4257SSteve Yin * <http://www.openoffice.org/license.html> 25*5fdc4257SSteve Yin * for a copy of the LGPLv3 License. 26*5fdc4257SSteve Yin * 27*5fdc4257SSteve Yin ************************************************************************/ 28*5fdc4257SSteve Yin 29*5fdc4257SSteve Yin #ifndef __ACCOBJECTMANAGERAGENT_HXX 30*5fdc4257SSteve Yin #define __ACCOBJECTMANAGERAGENT_HXX 31*5fdc4257SSteve Yin 32*5fdc4257SSteve Yin #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ 33*5fdc4257SSteve Yin #include <com/sun/star/accessibility/XAccessible.hpp> 34*5fdc4257SSteve Yin #endif 35*5fdc4257SSteve Yin 36*5fdc4257SSteve Yin struct IMAccessible; 37*5fdc4257SSteve Yin struct IAccessible; 38*5fdc4257SSteve Yin class AccObjectWinManager; 39*5fdc4257SSteve Yin 40*5fdc4257SSteve Yin /**************************************************************** 41*5fdc4257SSteve Yin AccObjectMangerAgent is used for manaing AccObjects,which encapsulates 42*5fdc4257SSteve Yin platform differences,and call AccObjectWinManager for Windows platform. To do for 43*5fdc4257SSteve Yin Linux platform 44*5fdc4257SSteve Yin *****************************************************************/ 45*5fdc4257SSteve Yin class AccObjectManagerAgent 46*5fdc4257SSteve Yin { 47*5fdc4257SSteve Yin private: 48*5fdc4257SSteve Yin 49*5fdc4257SSteve Yin AccObjectWinManager* pWinManager; 50*5fdc4257SSteve Yin 51*5fdc4257SSteve Yin public: 52*5fdc4257SSteve Yin 53*5fdc4257SSteve Yin AccObjectManagerAgent(); 54*5fdc4257SSteve Yin virtual ~AccObjectManagerAgent(); 55*5fdc4257SSteve Yin 56*5fdc4257SSteve Yin virtual unsigned char InsertAccObj( com::sun::star::accessibility::XAccessible* pXAcc, 57*5fdc4257SSteve Yin com::sun::star::accessibility::XAccessible* pParentXAcc, 58*5fdc4257SSteve Yin long pWnd=0); 59*5fdc4257SSteve Yin virtual void GetIAccessibleFromResID(long childID,IMAccessible**); 60*5fdc4257SSteve Yin virtual unsigned char GetIAccessibleFromXAccessible(com::sun::star::accessibility::XAccessible* pXAcc, IAccessible** ppIA); 61*5fdc4257SSteve Yin 62*5fdc4257SSteve Yin virtual void DeleteAccObj( com::sun::star::accessibility::XAccessible* pXAcc ); 63*5fdc4257SSteve Yin virtual IMAccessible* GetIMAccByXAcc(com::sun::star::accessibility::XAccessible* pXAcc); 64*5fdc4257SSteve Yin 65*5fdc4257SSteve Yin unsigned char NotifyAccEvent( short pEvent = 0, com::sun::star::accessibility::XAccessible* pXAcc = 0 ); 66*5fdc4257SSteve Yin 67*5fdc4257SSteve Yin unsigned char InsertChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc, 68*5fdc4257SSteve Yin long pWnd=0); 69*5fdc4257SSteve Yin void DeleteChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc ); 70*5fdc4257SSteve Yin 71*5fdc4257SSteve Yin void DecreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState ); 72*5fdc4257SSteve Yin void IncreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState ); 73*5fdc4257SSteve Yin void UpdateState( com::sun::star::accessibility::XAccessible* pXAcc ); 74*5fdc4257SSteve Yin 75*5fdc4257SSteve Yin void UpdateLocation( com::sun::star::accessibility::XAccessible* pXAcc, 76*5fdc4257SSteve Yin long Top = 0,long left = 0,long width = 0,long height = 0 ); 77*5fdc4257SSteve Yin void UpdateAction( com::sun::star::accessibility::XAccessible* pXAcc ); 78*5fdc4257SSteve Yin 79*5fdc4257SSteve Yin void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc ); 80*5fdc4257SSteve Yin void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any ); 81*5fdc4257SSteve Yin 82*5fdc4257SSteve Yin void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newName); 83*5fdc4257SSteve Yin void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc); 84*5fdc4257SSteve Yin 85*5fdc4257SSteve Yin void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newDesc ); 86*5fdc4257SSteve Yin void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc ); 87*5fdc4257SSteve Yin 88*5fdc4257SSteve Yin void NotifyDestroy(com::sun::star::accessibility::XAccessible* pXAcc); 89*5fdc4257SSteve Yin 90*5fdc4257SSteve Yin com::sun::star::accessibility::XAccessible* GetParentXAccessible( 91*5fdc4257SSteve Yin com::sun::star::accessibility::XAccessible* pXAcc ); 92*5fdc4257SSteve Yin short GetParentRole(com::sun::star::accessibility::XAccessible* pXAcc ); 93*5fdc4257SSteve Yin unsigned short IsContainer(com::sun::star::accessibility::XAccessible* pXAcc); 94*5fdc4257SSteve Yin 95*5fdc4257SSteve Yin void SaveTopWindowHandle(long hWnd, com::sun::star::accessibility::XAccessible* pXAcc); 96*5fdc4257SSteve Yin 97*5fdc4257SSteve Yin void UpdateChildState(com::sun::star::accessibility::XAccessible* pXAcc); 98*5fdc4257SSteve Yin 99*5fdc4257SSteve Yin bool IsSpecialToolboItem(com::sun::star::accessibility::XAccessible* pXAcc); 100*5fdc4257SSteve Yin 101*5fdc4257SSteve Yin short GetRole(com::sun::star::accessibility::XAccessible* pXAcc); 102*5fdc4257SSteve Yin 103*5fdc4257SSteve Yin com::sun::star::accessibility::XAccessible* GetAccDocByAccTopWin( com::sun::star::accessibility::XAccessible* pXAcc ); 104*5fdc4257SSteve Yin bool IsTopWinAcc( com::sun::star::accessibility::XAccessible* pXAcc ); 105*5fdc4257SSteve Yin 106*5fdc4257SSteve Yin bool IsStateManageDescendant(com::sun::star::accessibility::XAccessible* pXAcc); 107*5fdc4257SSteve Yin }; 108*5fdc4257SSteve Yin 109*5fdc4257SSteve Yin #endif 110