mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
WebBrowserComponent: Android: Add accessibility integration
This commit is contained in:
parent
d8c282e293
commit
f519af3b62
5 changed files with 931 additions and 767 deletions
|
|
@ -140,7 +140,10 @@ AndroidViewComponent::AndroidViewComponent()
|
|||
{
|
||||
}
|
||||
|
||||
AndroidViewComponent::~AndroidViewComponent() {}
|
||||
AndroidViewComponent::~AndroidViewComponent()
|
||||
{
|
||||
AccessibilityHandler::setNativeChildForComponent (*this, nullptr);
|
||||
}
|
||||
|
||||
void AndroidViewComponent::setView (void* view)
|
||||
{
|
||||
|
|
@ -156,6 +159,12 @@ void AndroidViewComponent::setView (void* view)
|
|||
auto localref = LocalRef<jobject>(env->NewLocalRef((jobject) view));
|
||||
|
||||
pimpl.reset (new Pimpl (localref, *this));
|
||||
|
||||
AccessibilityHandler::setNativeChildForComponent (*this, getView());
|
||||
}
|
||||
else
|
||||
{
|
||||
AccessibilityHandler::setNativeChildForComponent (*this, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -173,4 +182,9 @@ void AndroidViewComponent::resizeToFitView()
|
|||
|
||||
void AndroidViewComponent::paint (Graphics&) {}
|
||||
|
||||
std::unique_ptr<AccessibilityHandler> AndroidViewComponent::createAccessibilityHandler()
|
||||
{
|
||||
return std::make_unique<AccessibilityHandler> (*this, AccessibilityRole::group);
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue