AccObjectManagerAgent.hxx 4.28 KB
Newer Older
1 2 3
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
4
 *
5 6 7
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
11 12 13 14 15 16 17 18
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
19

20 21
#ifndef INCLUDED_WINACCESSIBILITY_INC_ACCOBJECTMANAGERAGENT_HXX
#define INCLUDED_WINACCESSIBILITY_INC_ACCOBJECTMANAGERAGENT_HXX
22

Caolán McNamara's avatar
Caolán McNamara committed
23
#include <memory>
24

25 26 27 28 29 30 31
#include <com/sun/star/accessibility/XAccessible.hpp>

struct IMAccessible;
struct IAccessible;
class AccObjectWinManager;

/****************************************************************
Andrea Gelmini's avatar
Andrea Gelmini committed
32
AccObjectMangerAgent is used for managing AccObjects, which encapsulates
33 34 35 36 37 38 39
platform differences,and call AccObjectWinManager for Windows platform. To do for
Linux platform
*****************************************************************/
class AccObjectManagerAgent
{
private:

Caolán McNamara's avatar
Caolán McNamara committed
40
    std::unique_ptr<AccObjectWinManager> pWinManager;
41 42 43 44 45 46

public:

    AccObjectManagerAgent();
    virtual ~AccObjectManagerAgent();

47 48
    virtual bool InsertAccObj(css::accessibility::XAccessible* pXAcc,
                              css::accessibility::XAccessible* pParentXAcc,
49
                              sal_Int64 pWnd=0);
50
    virtual void GetIAccessibleFromResID(long childID,IMAccessible**);
51
    virtual bool GetIAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc, IAccessible** ppIA);
52

53 54
    virtual void DeleteAccObj( css::accessibility::XAccessible* pXAcc );
    virtual IMAccessible*  GetIMAccByXAcc(css::accessibility::XAccessible* pXAcc);
55

56
    bool NotifyAccEvent(short pEvent = 0, css::accessibility::XAccessible* pXAcc = nullptr);
57

58
    bool InsertChildrenAccObj(css::accessibility::XAccessible* pXAcc,
59
                              sal_Int64 pWnd=0);
60
    void DeleteChildrenAccObj( css::accessibility::XAccessible* pXAcc );
61

62 63 64
    void  DecreaseState( css::accessibility::XAccessible* pXAcc,unsigned short pState );
    void  IncreaseState( css::accessibility::XAccessible* pXAcc,unsigned short pState );
    void  UpdateState( css::accessibility::XAccessible* pXAcc );
65

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 );
69

70 71
    void  UpdateValue( css::accessibility::XAccessible* pXAcc );
    void  UpdateValue( css::accessibility::XAccessible* pXAcc, css::uno::Any );
72

73 74
    void  UpdateAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any newName);
    void  UpdateAccName( css::accessibility::XAccessible* pXAcc);
75

76 77
    void  UpdateDescription( css::accessibility::XAccessible* pXAcc, css::uno::Any newDesc );
    void  UpdateDescription( css::accessibility::XAccessible* pXAcc );
78

79
    void NotifyDestroy(css::accessibility::XAccessible* pXAcc);
80

81 82 83
    css::accessibility::XAccessible* GetParentXAccessible( css::accessibility::XAccessible* pXAcc );
    short GetParentRole(css::accessibility::XAccessible* pXAcc );
    bool IsContainer(css::accessibility::XAccessible* pXAcc);
84

85
    void SaveTopWindowHandle(sal_Int64 hWnd,
86
            css::accessibility::XAccessible* pXAcc);
87

88
    void UpdateChildState(css::accessibility::XAccessible* pXAcc);
89

90
    bool IsSpecialToolboItem(css::accessibility::XAccessible* pXAcc);
91

92
    short GetRole(css::accessibility::XAccessible* pXAcc);
93

94 95
    css::accessibility::XAccessible* GetAccDocByAccTopWin( css::accessibility::XAccessible* pXAcc );
    bool IsTopWinAcc( css::accessibility::XAccessible* pXAcc );
96

97
    bool IsStateManageDescendant(css::accessibility::XAccessible* pXAcc);
98 99 100

    sal_Int64 Get_ToATInterface(sal_Int64 hWnd, sal_Int64 lParam, sal_Int64 wParam);

101 102 103
};

#endif
104 105

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */