LibreOffice Module winaccessibility (master) 1
Public Member Functions | Private Attributes | List of all members
AccTopWindowListener Class Reference

AccEventListener is the general event listener for all top windows. More...

#include <AccTopWindowListener.hxx>

Inheritance diagram for AccTopWindowListener:
[legend]
Collaboration diagram for AccTopWindowListener:
[legend]

Public Member Functions

 AccTopWindowListener ()
 
virtual ~AccTopWindowListener () override
 
virtual void SAL_CALL windowOpened (const css::lang::EventObject &e) override
 It is invoked when a new window is opened, the source of this EventObject is the window. More...
 
virtual void SAL_CALL windowClosing (const css::lang::EventObject &e) override
 
virtual void SAL_CALL windowClosed (const css::lang::EventObject &e) override
 Invoke this method when the top window is closed, remove all the objects and its children from current manager's cache, and remove the COM object and the accessible event listener assigned to the accessible objects. More...
 
virtual void SAL_CALL windowMinimized (const css::lang::EventObject &e) override
 
virtual void SAL_CALL windowNormalized (const css::lang::EventObject &e) override
 
virtual void SAL_CALL windowActivated (const css::lang::EventObject &e) override
 
virtual void SAL_CALL windowDeactivated (const css::lang::EventObject &e) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void AddAllListeners (css::accessibility::XAccessible *pAccessible, css::accessibility::XAccessible *pParentXAcc, HWND pWND)
 Add the accessible event listener to object and all its children objects. More...
 
virtual void HandleWindowOpened (css::accessibility::XAccessible *pAccessible)
 For the new opened window, generate all the UNO accessible's object, COM object and add accessible listener to monitor all these objects. More...
 
sal_Int64 GetMSComPtr (sal_Int64 hWnd, sal_Int64 lParam, sal_Int64 wParam)
 

Private Attributes

AccObjectManagerAgent accManagerAgent
 

Detailed Description

AccEventListener is the general event listener for all top windows.

The top windows defined in UNO are: FRAME, WINDOW, DIALOG, MENU, TOOLTIP. It implements the methods of XTopWindowListener and the most important method is windowOpened(). In this method, all the accessible objects (including COM object and Uno objects) are created and cached into bridge managers, and they are monitored by listeners for later accessible event handling.

Definition at line 37 of file AccTopWindowListener.hxx.

Constructor & Destructor Documentation

◆ AccTopWindowListener()

AccTopWindowListener::AccTopWindowListener ( )

Definition at line 93 of file AccTopWindowListener.cxx.

◆ ~AccTopWindowListener()

AccTopWindowListener::~AccTopWindowListener ( )
overridevirtual

Definition at line 98 of file AccTopWindowListener.cxx.

Member Function Documentation

◆ AddAllListeners()

void AccTopWindowListener::AddAllListeners ( css::accessibility::XAccessible *  pAccessible,
css::accessibility::XAccessible *  pParentXAcc,
HWND  pWND 
)
virtual

Add the accessible event listener to object and all its children objects.

Parameters
pAccessiblethe accessible object
pParentXAccthe parent of current accessible object
pWNDthe handle of top window which current object resides

Definition at line 128 of file AccTopWindowListener.cxx.

References accManagerAgent, AddAllListeners(), i, AccObjectManagerAgent::InsertAccObj(), AccObjectManagerAgent::IsContainer(), AccObjectManagerAgent::IsStateManageDescendant(), mpContext, and nCount.

Referenced by AddAllListeners(), and HandleWindowOpened().

◆ disposing()

void AccTopWindowListener::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 243 of file AccTopWindowListener.cxx.

◆ GetMSComPtr()

sal_Int64 AccTopWindowListener::GetMSComPtr ( sal_Int64  hWnd,
sal_Int64  lParam,
sal_Int64  wParam 
)

◆ HandleWindowOpened()

void AccTopWindowListener::HandleWindowOpened ( css::accessibility::XAccessible *  pAccessible)
virtual

For the new opened window, generate all the UNO accessible's object, COM object and add accessible listener to monitor all these objects.

Parameters
pAccessiblethe accessible of the new opened window

Definition at line 41 of file AccTopWindowListener.cxx.

References accManagerAgent, AddAllListeners(), AccObjectManagerAgent::IncreaseState(), MENUPOPUPSTART, AccObjectManagerAgent::NotifyAccEvent(), AccObjectManagerAgent::SaveTopWindowHandle(), SHOW, and WB_MOVEABLE.

Referenced by windowOpened().

◆ windowActivated()

void AccTopWindowListener::windowActivated ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 235 of file AccTopWindowListener.cxx.

◆ windowClosed()

void AccTopWindowListener::windowClosed ( const css::lang::EventObject &  e)
overridevirtual

Invoke this method when the top window is closed, remove all the objects and its children from current manager's cache, and remove the COM object and the accessible event listener assigned to the accessible objects.

Definition at line 189 of file AccTopWindowListener.cxx.

References accManagerAgent, AccObjectManagerAgent::DeleteAccObj(), AccObjectManagerAgent::DeleteChildrenAccObj(), MENUPOPUPEND, AccObjectManagerAgent::NotifyAccEvent(), and SAL_INFO.

◆ windowClosing()

void AccTopWindowListener::windowClosing ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 179 of file AccTopWindowListener.cxx.

References SAL_INFO.

◆ windowDeactivated()

void AccTopWindowListener::windowDeactivated ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 239 of file AccTopWindowListener.cxx.

◆ windowMinimized()

void AccTopWindowListener::windowMinimized ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 227 of file AccTopWindowListener.cxx.

◆ windowNormalized()

void AccTopWindowListener::windowNormalized ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 231 of file AccTopWindowListener.cxx.

◆ windowOpened()

void AccTopWindowListener::windowOpened ( const css::lang::EventObject &  e)
overridevirtual

It is invoked when a new window is opened, the source of this EventObject is the window.

Definition at line 105 of file AccTopWindowListener.cxx.

References HandleWindowOpened(), and SAL_INFO.

Member Data Documentation

◆ accManagerAgent

AccObjectManagerAgent AccTopWindowListener::accManagerAgent
private

The documentation for this class was generated from the following files: