1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_WINACCESSIBILITY_INC_ACCOBJECTMANAGERAGENT_HXX
21 #define INCLUDED_WINACCESSIBILITY_INC_ACCOBJECTMANAGERAGENT_HXX
25 #include <com/sun/star/accessibility/XAccessible.hpp>
29 class AccObjectWinManager
;
31 /****************************************************************
32 AccObjectMangerAgent is used for managing AccObjects, which encapsulates
33 platform differences,and call AccObjectWinManager for Windows platform. To do for
35 *****************************************************************/
36 class AccObjectManagerAgent
40 std::unique_ptr
<AccObjectWinManager
> pWinManager
;
44 AccObjectManagerAgent();
45 virtual ~AccObjectManagerAgent();
47 virtual bool InsertAccObj(css::accessibility::XAccessible
* pXAcc
,
48 css::accessibility::XAccessible
* pParentXAcc
,
50 virtual void GetIAccessibleFromResID(long childID
,IMAccessible
**);
51 virtual bool GetIAccessibleFromXAccessible(css::accessibility::XAccessible
* pXAcc
, IAccessible
** ppIA
);
53 virtual void DeleteAccObj( css::accessibility::XAccessible
* pXAcc
);
54 virtual IMAccessible
* GetIMAccByXAcc(css::accessibility::XAccessible
* pXAcc
);
56 bool NotifyAccEvent(short pEvent
= 0, css::accessibility::XAccessible
* pXAcc
= nullptr);
58 bool InsertChildrenAccObj(css::accessibility::XAccessible
* pXAcc
,
60 void DeleteChildrenAccObj( css::accessibility::XAccessible
* pXAcc
);
62 void DecreaseState( css::accessibility::XAccessible
* pXAcc
,unsigned short pState
);
63 void IncreaseState( css::accessibility::XAccessible
* pXAcc
,unsigned short pState
);
64 void UpdateState( css::accessibility::XAccessible
* pXAcc
);
66 static void UpdateLocation( css::accessibility::XAccessible
* pXAcc
,
67 long Top
= 0,long left
= 0,long width
= 0,long height
= 0 );
68 void UpdateAction( css::accessibility::XAccessible
* pXAcc
);
70 void UpdateValue( css::accessibility::XAccessible
* pXAcc
);
71 void UpdateValue( css::accessibility::XAccessible
* pXAcc
, css::uno::Any
);
73 void UpdateAccName( css::accessibility::XAccessible
* pXAcc
, css::uno::Any newName
);
74 void UpdateAccName( css::accessibility::XAccessible
* pXAcc
);
76 void UpdateDescription( css::accessibility::XAccessible
* pXAcc
, css::uno::Any newDesc
);
77 void UpdateDescription( css::accessibility::XAccessible
* pXAcc
);
79 void NotifyDestroy(css::accessibility::XAccessible
* pXAcc
);
81 css::accessibility::XAccessible
* GetParentXAccessible( css::accessibility::XAccessible
* pXAcc
);
82 short GetParentRole(css::accessibility::XAccessible
* pXAcc
);
83 bool IsContainer(css::accessibility::XAccessible
* pXAcc
);
85 void SaveTopWindowHandle(sal_Int64 hWnd
,
86 css::accessibility::XAccessible
* pXAcc
);
88 void UpdateChildState(css::accessibility::XAccessible
* pXAcc
);
90 bool IsSpecialToolboItem(css::accessibility::XAccessible
* pXAcc
);
92 short GetRole(css::accessibility::XAccessible
* pXAcc
);
94 css::accessibility::XAccessible
* GetAccDocByAccTopWin( css::accessibility::XAccessible
* pXAcc
);
95 bool IsTopWinAcc( css::accessibility::XAccessible
* pXAcc
);
97 bool IsStateManageDescendant(css::accessibility::XAccessible
* pXAcc
);
99 sal_Int64
Get_ToATInterface(sal_Int64 hWnd
, sal_Int64 lParam
, sal_Int64 wParam
);
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */