LibreOffice Module comphelper (master)  1
Public Types | Public Member Functions | Static Public Member Functions | List of all members
comphelper::AccessibleEventNotifier Class Reference

#include <accessibleeventnotifier.hxx>

Public Types

typedef sal_uInt32 TClientId
 

Public Member Functions

 AccessibleEventNotifier ()=delete
 
 ~AccessibleEventNotifier ()=delete
 
 AccessibleEventNotifier (const AccessibleEventNotifier &)=delete
 
AccessibleEventNotifieroperator= (const AccessibleEventNotifier &)=delete
 

Static Public Member Functions

static TClientId registerClient ()
 registers a client of this class, means a broadcaster of AccessibleEvents More...
 
static void revokeClient (const TClientId _nClient)
 revokes a broadcaster of AccessibleEvents More...
 
static void revokeClientNotifyDisposing (const TClientId _nClient, const css::uno::Reference< css::uno::XInterface > &_rxEventSource)
 revokes a client, with additionally notifying a disposing event to all listeners registered for this client More...
 
static sal_Int32 addEventListener (const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
 registers a listener for the given client More...
 
static sal_Int32 removeEventListener (const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
 revokes a listener for the given client More...
 
static void addEvent (const TClientId _nClient, const css::accessibility::AccessibleEventObject &_rEvent)
 adds an event, which is to be broadcasted, to the queue More...
 

Detailed Description

Definition at line 32 of file accessibleeventnotifier.hxx.

Member Typedef Documentation

Definition at line 35 of file accessibleeventnotifier.hxx.

Constructor & Destructor Documentation

comphelper::AccessibleEventNotifier::AccessibleEventNotifier ( )
delete
comphelper::AccessibleEventNotifier::~AccessibleEventNotifier ( )
delete
comphelper::AccessibleEventNotifier::AccessibleEventNotifier ( const AccessibleEventNotifier )
delete

Member Function Documentation

void comphelper::AccessibleEventNotifier::addEvent ( const TClientId  _nClient,
const css::accessibility::AccessibleEventObject &  _rEvent 
)
static

adds an event, which is to be broadcasted, to the queue

Parameters
_nClientthe id of the client which needs to broadcast the event

Definition at line 247 of file accessibleeventnotifier.cxx.

References aListeners, and Exception.

Referenced by comphelper::OAccessibleContextHelper::NotifyAccessibleEvent(), and comphelper::OAccessibleContextWrapper::notifyTranslatedEvent().

sal_Int32 comphelper::AccessibleEventNotifier::addEventListener ( const TClientId  _nClient,
const css::uno::Reference< css::accessibility::XAccessibleEventListener > &  _rxListener 
)
static

registers a listener for the given client

Parameters
_nClientthe id of the client for which a listener should be registered
Returns
the number of event listeners currently registered for this client

Definition at line 215 of file accessibleeventnotifier.cxx.

Referenced by comphelper::OAccessibleContextHelper::addAccessibleEventListener(), and comphelper::OAccessibleContextWrapper::addAccessibleEventListener().

AccessibleEventNotifier& comphelper::AccessibleEventNotifier::operator= ( const AccessibleEventNotifier )
delete
AccessibleEventNotifier::TClientId comphelper::AccessibleEventNotifier::registerClient ( )
static

registers a client of this class, means a broadcaster of AccessibleEvents

No precaution is taken to care for disposal of this component. When the component dies, it must call <member>revokeClient</member> or <member>revokeClientNotifyDisposing</member> explicitly itself.

Definition at line 145 of file accessibleeventnotifier.cxx.

Referenced by comphelper::OAccessibleContextHelper::addAccessibleEventListener(), and comphelper::OAccessibleContextWrapper::addAccessibleEventListener().

sal_Int32 comphelper::AccessibleEventNotifier::removeEventListener ( const TClientId  _nClient,
const css::uno::Reference< css::accessibility::XAccessibleEventListener > &  _rxListener 
)
static

revokes a listener for the given client

Parameters
_nClientthe id of the client for which a listener should be revoked
Returns
the number of event listeners currently registered for this client

Definition at line 231 of file accessibleeventnotifier.cxx.

Referenced by comphelper::OAccessibleContextHelper::removeAccessibleEventListener(), and comphelper::OAccessibleContextWrapper::removeAccessibleEventListener().

void comphelper::AccessibleEventNotifier::revokeClient ( const TClientId  _nClient)
static

revokes a broadcaster of AccessibleEvents

Note that no disposing event is fired when you use this method, the client is simply revoked. You can for instance revoke a client if the last listener for it is revoked, but the client itself is not disposed.
When the client is disposed, you should prefer <member>revokeClientNotifyDisposing</member>

Any possibly pending events for this client are removed from the queue.

revokeClientNotifyDisposing

Definition at line 167 of file accessibleeventnotifier.cxx.

Referenced by comphelper::OAccessibleContextHelper::removeAccessibleEventListener(), and comphelper::OAccessibleContextWrapper::removeAccessibleEventListener().

void comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing ( const TClientId  _nClient,
const css::uno::Reference< css::uno::XInterface > &  _rxEventSource 
)
static

revokes a client, with additionally notifying a disposing event to all listeners registered for this client

Any other possibly pending events for this client are removed from the queue

Parameters
_nClientthe id of the client which should be revoked
_rxEventSourcethe source to be notified together with the <member scope="com.sun.star.lang">XComponent::disposing</member> call.

Definition at line 182 of file accessibleeventnotifier.cxx.

Referenced by comphelper::OAccessibleContextHelper::disposing(), and comphelper::OAccessibleContextWrapper::disposing().


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