diff options
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r-- | vcl/unx/gtk/a11y/atklistener.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkwrapper.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkwrapper.hxx | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx index f1614d8ed512..f13a0a318601 100644 --- a/vcl/unx/gtk/a11y/atklistener.cxx +++ b/vcl/unx/gtk/a11y/atklistener.cxx @@ -549,6 +549,14 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven g_signal_emit_by_name( G_OBJECT( atk_obj ), "property_change::accessible-hypertext-offset"); break; + case accessibility::AccessibleEventId::ROLE_CHANGED: + { + uno::Reference< accessibility::XAccessibleContext > xContext; + xContext = getAccessibleContextFromSource( aEvent.Source ); + atk_object_wrapper_set_role( mpWrapper, xContext->getAccessibleRole() ); + break; + } + default: g_warning( "Unknown event notification %d", aEvent.EventId ); break; diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx index 6e48230166e5..ac5075b11405 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk/a11y/atkwrapper.cxx @@ -876,6 +876,14 @@ void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child /*****************************************************************************/ +void atk_object_wrapper_set_role(AtkObjectWrapper* wrapper, sal_Int16 role) +{ + AtkObject *atk_obj = ATK_OBJECT( wrapper ); + atk_object_set_role( atk_obj, mapToAtkRole( role ) ); +} + +/*****************************************************************************/ + #define RELEASE(i) if( i ) { i->release(); i = NULL; } void atk_object_wrapper_dispose(AtkObjectWrapper* wrapper) diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx index 2b018b92a9fe..02126cbc541f 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.hxx +++ b/vcl/unx/gtk/a11y/atkwrapper.hxx @@ -84,6 +84,7 @@ AtkObject * atk_object_wrapper_new( void atk_object_wrapper_add_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index); void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index); +void atk_object_wrapper_set_role(AtkObjectWrapper* wrapper, sal_Int16 role); void atk_object_wrapper_dispose(AtkObjectWrapper* wrapper); |