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 .
28 #include <com/sun/star/accessibility/XAccessible.hpp>
32 class AccObjectWinManager
;
33 enum class UnoMSAAEvent
;
35 /****************************************************************
36 AccObjectManagerAgent is used for managing AccObjects, which encapsulates
37 platform differences,and call AccObjectWinManager for Windows platform. To do for
39 *****************************************************************/
40 class AccObjectManagerAgent
44 std::unique_ptr
<AccObjectWinManager
> pWinManager
;
48 AccObjectManagerAgent();
49 virtual ~AccObjectManagerAgent();
51 virtual bool InsertAccObj(css::accessibility::XAccessible
* pXAcc
,
52 css::accessibility::XAccessible
* pParentXAcc
,
54 virtual void GetIAccessibleFromResID(long childID
,IMAccessible
**);
55 virtual bool GetIAccessibleFromXAccessible(css::accessibility::XAccessible
* pXAcc
, IAccessible
** ppIA
);
57 virtual void DeleteAccObj( css::accessibility::XAccessible
* pXAcc
);
58 virtual IMAccessible
* GetIMAccByXAcc(css::accessibility::XAccessible
* pXAcc
);
60 bool NotifyAccEvent(UnoMSAAEvent eEvent
, css::accessibility::XAccessible
* pXAcc
= nullptr);
62 bool InsertChildrenAccObj(css::accessibility::XAccessible
* pXAcc
,
64 void DeleteChildrenAccObj( css::accessibility::XAccessible
* pXAcc
);
66 void DecreaseState( css::accessibility::XAccessible
* pXAcc
, sal_Int64 pState
);
67 void IncreaseState( css::accessibility::XAccessible
* pXAcc
, sal_Int64 pState
);
68 void UpdateState( css::accessibility::XAccessible
* pXAcc
);
70 void UpdateAction( css::accessibility::XAccessible
* pXAcc
);
72 void UpdateValue( css::accessibility::XAccessible
* pXAcc
);
73 void UpdateValue( css::accessibility::XAccessible
* pXAcc
, css::uno::Any
);
75 void UpdateAccName( css::accessibility::XAccessible
* pXAcc
, css::uno::Any newName
);
76 void UpdateAccName( css::accessibility::XAccessible
* pXAcc
);
78 void NotifyDestroy(css::accessibility::XAccessible
* pXAcc
);
80 css::accessibility::XAccessible
* GetParentXAccessible( css::accessibility::XAccessible
* pXAcc
);
81 short GetParentRole(css::accessibility::XAccessible
* pXAcc
);
82 bool IsContainer(css::accessibility::XAccessible
* pXAcc
);
84 void SaveTopWindowHandle(HWND hWnd
, css::accessibility::XAccessible
* pXAcc
);
86 void UpdateChildState(css::accessibility::XAccessible
* pXAcc
);
88 bool IsSpecialToolbarItem(css::accessibility::XAccessible
* pXAcc
);
90 short GetRole(css::accessibility::XAccessible
* pXAcc
);
92 css::accessibility::XAccessible
* GetAccDocByAccTopWin( css::accessibility::XAccessible
* pXAcc
);
93 bool IsTopWinAcc( css::accessibility::XAccessible
* pXAcc
);
95 bool IsStateManageDescendant(css::accessibility::XAccessible
* pXAcc
);
97 sal_Int64
Get_ToATInterface(sal_Int64 hWnd
, sal_Int64 lParam
, sal_Int64 wParam
);
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */