Commit 8adb27803e16e94bb0f63fbd3a650f77fe671c48

Authored by Artur Świgoń
1 parent 07c69cd5

[AT-SPI] Squashed implementation

Change-Id: I20d6675ab05cd9eb6344cc11e74aab37ed5f6441
Showing 1 changed file with 12 additions and 1 deletions
shared/dali-table-view.cpp 100644 → 100755
@@ -19,6 +19,11 @@ @@ -19,6 +19,11 @@
19 #include "dali-table-view.h" 19 #include "dali-table-view.h"
20 20
21 // EXTERNAL INCLUDES 21 // EXTERNAL INCLUDES
  22 +#include <dali/devel-api/actors/actor-devel.h>
  23 +#include <dali/devel-api/images/distance-field.h>
  24 +#include <dali-toolkit/devel-api/controls/control-devel.h>
  25 +#include <dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h>
  26 +#include <dali-toolkit/devel-api/shader-effects/distance-field-effect.h>
22 #include <dali-toolkit/dali-toolkit.h> 27 #include <dali-toolkit/dali-toolkit.h>
23 #include <dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h> 28 #include <dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h>
24 #include <dali-toolkit/devel-api/controls/table-view/table-view.h> 29 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
@@ -321,7 +326,6 @@ void DaliTableView::CreateFocusEffect() @@ -321,7 +326,6 @@ void DaliTableView::CreateFocusEffect()
321 auto keyboardFocusManager = KeyboardFocusManager::Get(); 326 auto keyboardFocusManager = KeyboardFocusManager::Get();
322 keyboardFocusManager.PreFocusChangeSignal().Connect(this, &DaliTableView::OnKeyboardPreFocusChange); 327 keyboardFocusManager.PreFocusChangeSignal().Connect(this, &DaliTableView::OnKeyboardPreFocusChange);
323 keyboardFocusManager.FocusedActorEnterKeySignal().Connect(this, &DaliTableView::OnFocusedActorActivated); 328 keyboardFocusManager.FocusedActorEnterKeySignal().Connect(this, &DaliTableView::OnFocusedActorActivated);
324 - AccessibilityManager::Get().FocusedActorActivatedSignal().Connect(this, &DaliTableView::OnFocusedActorActivated);  
325 329
326 // Loop to create both actors for the focus highlight effect. 330 // Loop to create both actors for the focus highlight effect.
327 for(unsigned int i = 0; i < FOCUS_ANIMATION_ACTOR_NUMBER; ++i) 331 for(unsigned int i = 0; i < FOCUS_ANIMATION_ACTOR_NUMBER; ++i)
@@ -529,6 +533,7 @@ Actor DaliTableView::CreateTile(const std::string&amp; name, const std::string&amp; titl @@ -529,6 +533,7 @@ Actor DaliTableView::CreateTile(const std::string&amp; name, const std::string&amp; titl
529 borderImage.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); 533 borderImage.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
530 borderImage.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS); 534 borderImage.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
531 borderImage.SetProperty(Actor::Property::OPACITY, 0.8f); 535 borderImage.SetProperty(Actor::Property::OPACITY, 0.8f);
  536 + DevelControl::AppendAccessibilityRelation(borderImage, focusableTile, Accessibility::RelationType::CONTROLLED_BY);
532 focusableTile.Add(borderImage); 537 focusableTile.Add(borderImage);
533 538
534 TextLabel label = TextLabel::New(); 539 TextLabel label = TextLabel::New();
@@ -543,11 +548,17 @@ Actor DaliTableView::CreateTile(const std::string&amp; name, const std::string&amp; titl @@ -543,11 +548,17 @@ Actor DaliTableView::CreateTile(const std::string&amp; name, const std::string&amp; titl
543 548
544 // Pad around the label as its size is the same as the 9-patch border. It will overlap it without padding. 549 // Pad around the label as its size is the same as the 9-patch border. It will overlap it without padding.
545 label.SetProperty(Actor::Property::PADDING, Padding(TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING)); 550 label.SetProperty(Actor::Property::PADDING, Padding(TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING));
  551 + DevelControl::AppendAccessibilityRelation(label, focusableTile, Accessibility::RelationType::CONTROLLED_BY);
546 focusableTile.Add(label); 552 focusableTile.Add(label);
547 553
548 // Connect to the touch events 554 // Connect to the touch events
549 focusableTile.TouchedSignal().Connect(this, &DaliTableView::OnTilePressed); 555 focusableTile.TouchedSignal().Connect(this, &DaliTableView::OnTilePressed);
550 focusableTile.HoveredSignal().Connect(this, &DaliTableView::OnTileHovered); 556 focusableTile.HoveredSignal().Connect(this, &DaliTableView::OnTileHovered);
  557 + focusableTile.SetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_ROLE, Dali::Accessibility::Role::PUSH_BUTTON);
  558 + DevelControl::AccessibilityActivateSignal(focusableTile).Connect(this, [=](){
  559 + DoTilePress(focusableTile, PointState::DOWN);
  560 + DoTilePress(focusableTile, PointState::UP);
  561 + });
551 562
552 return focusableTile; 563 return focusableTile;
553 } 564 }