1*b1cdbd2cSJim Jagielski /************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski #ifndef __ACCOBJECTMANAGERAGENT_HXX 23*b1cdbd2cSJim Jagielski #define __ACCOBJECTMANAGERAGENT_HXX 24*b1cdbd2cSJim Jagielski 25*b1cdbd2cSJim Jagielski #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ 26*b1cdbd2cSJim Jagielski #include <com/sun/star/accessibility/XAccessible.hpp> 27*b1cdbd2cSJim Jagielski #endif 28*b1cdbd2cSJim Jagielski 29*b1cdbd2cSJim Jagielski struct IMAccessible; 30*b1cdbd2cSJim Jagielski struct IAccessible; 31*b1cdbd2cSJim Jagielski class AccObjectWinManager; 32*b1cdbd2cSJim Jagielski 33*b1cdbd2cSJim Jagielski /**************************************************************** 34*b1cdbd2cSJim Jagielski AccObjectMangerAgent is used for manaing AccObjects,which encapsulates 35*b1cdbd2cSJim Jagielski platform differences,and call AccObjectWinManager for Windows platform. To do for 36*b1cdbd2cSJim Jagielski Linux platform 37*b1cdbd2cSJim Jagielski *****************************************************************/ 38*b1cdbd2cSJim Jagielski class AccObjectManagerAgent 39*b1cdbd2cSJim Jagielski { 40*b1cdbd2cSJim Jagielski private: 41*b1cdbd2cSJim Jagielski 42*b1cdbd2cSJim Jagielski AccObjectWinManager* pWinManager; 43*b1cdbd2cSJim Jagielski 44*b1cdbd2cSJim Jagielski public: 45*b1cdbd2cSJim Jagielski 46*b1cdbd2cSJim Jagielski AccObjectManagerAgent(); 47*b1cdbd2cSJim Jagielski virtual ~AccObjectManagerAgent(); 48*b1cdbd2cSJim Jagielski 49*b1cdbd2cSJim Jagielski virtual unsigned char InsertAccObj( com::sun::star::accessibility::XAccessible* pXAcc, 50*b1cdbd2cSJim Jagielski com::sun::star::accessibility::XAccessible* pParentXAcc, 51*b1cdbd2cSJim Jagielski long pWnd=0); 52*b1cdbd2cSJim Jagielski virtual void GetIAccessibleFromResID(long childID,IMAccessible**); 53*b1cdbd2cSJim Jagielski virtual unsigned char GetIAccessibleFromXAccessible(com::sun::star::accessibility::XAccessible* pXAcc, IAccessible** ppIA); 54*b1cdbd2cSJim Jagielski 55*b1cdbd2cSJim Jagielski virtual void DeleteAccObj( com::sun::star::accessibility::XAccessible* pXAcc ); 56*b1cdbd2cSJim Jagielski virtual IMAccessible* GetIMAccByXAcc(com::sun::star::accessibility::XAccessible* pXAcc); 57*b1cdbd2cSJim Jagielski 58*b1cdbd2cSJim Jagielski unsigned char NotifyAccEvent( short pEvent = 0, com::sun::star::accessibility::XAccessible* pXAcc = 0 ); 59*b1cdbd2cSJim Jagielski 60*b1cdbd2cSJim Jagielski unsigned char InsertChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc, 61*b1cdbd2cSJim Jagielski long pWnd=0); 62*b1cdbd2cSJim Jagielski void DeleteChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc ); 63*b1cdbd2cSJim Jagielski 64*b1cdbd2cSJim Jagielski void DecreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState ); 65*b1cdbd2cSJim Jagielski void IncreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState ); 66*b1cdbd2cSJim Jagielski void UpdateState( com::sun::star::accessibility::XAccessible* pXAcc ); 67*b1cdbd2cSJim Jagielski 68*b1cdbd2cSJim Jagielski void UpdateLocation( com::sun::star::accessibility::XAccessible* pXAcc, 69*b1cdbd2cSJim Jagielski long Top = 0,long left = 0,long width = 0,long height = 0 ); 70*b1cdbd2cSJim Jagielski void UpdateAction( com::sun::star::accessibility::XAccessible* pXAcc ); 71*b1cdbd2cSJim Jagielski 72*b1cdbd2cSJim Jagielski void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc ); 73*b1cdbd2cSJim Jagielski void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any ); 74*b1cdbd2cSJim Jagielski 75*b1cdbd2cSJim Jagielski void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newName); 76*b1cdbd2cSJim Jagielski void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc); 77*b1cdbd2cSJim Jagielski 78*b1cdbd2cSJim Jagielski void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newDesc ); 79*b1cdbd2cSJim Jagielski void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc ); 80*b1cdbd2cSJim Jagielski 81*b1cdbd2cSJim Jagielski void NotifyDestroy(com::sun::star::accessibility::XAccessible* pXAcc); 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski com::sun::star::accessibility::XAccessible* GetParentXAccessible( 84*b1cdbd2cSJim Jagielski com::sun::star::accessibility::XAccessible* pXAcc ); 85*b1cdbd2cSJim Jagielski short GetParentRole(com::sun::star::accessibility::XAccessible* pXAcc ); 86*b1cdbd2cSJim Jagielski unsigned short IsContainer(com::sun::star::accessibility::XAccessible* pXAcc); 87*b1cdbd2cSJim Jagielski 88*b1cdbd2cSJim Jagielski void SaveTopWindowHandle(long hWnd, com::sun::star::accessibility::XAccessible* pXAcc); 89*b1cdbd2cSJim Jagielski 90*b1cdbd2cSJim Jagielski void UpdateChildState(com::sun::star::accessibility::XAccessible* pXAcc); 91*b1cdbd2cSJim Jagielski 92*b1cdbd2cSJim Jagielski bool IsSpecialToolboItem(com::sun::star::accessibility::XAccessible* pXAcc); 93*b1cdbd2cSJim Jagielski 94*b1cdbd2cSJim Jagielski short GetRole(com::sun::star::accessibility::XAccessible* pXAcc); 95*b1cdbd2cSJim Jagielski 96*b1cdbd2cSJim Jagielski com::sun::star::accessibility::XAccessible* GetAccDocByAccTopWin( com::sun::star::accessibility::XAccessible* pXAcc ); 97*b1cdbd2cSJim Jagielski bool IsTopWinAcc( com::sun::star::accessibility::XAccessible* pXAcc ); 98*b1cdbd2cSJim Jagielski 99*b1cdbd2cSJim Jagielski bool IsStateManageDescendant(com::sun::star::accessibility::XAccessible* pXAcc); 100*b1cdbd2cSJim Jagielski }; 101*b1cdbd2cSJim Jagielski 102*b1cdbd2cSJim Jagielski #endif 103