using namespace Dali::Accessibility;
+namespace
+{
+inline std::string GetAccessiblePath(Accessible* accessible)
+{
+ auto address = accessible->GetAddress();
+ return address ? ATSPI_PREFIX_PATH + address.GetPath() : ATSPI_NULL_PATH;
+}
+} // namespace
+
BridgeObject::BridgeObject()
{
}
if(!IsUp()) return;
auto index = child->GetIndexInParent();
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<Address>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"ActiveDescendantChanged",
"",
if(name)
{
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"PropertyChange",
name,
if(name)
{
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventWindow,
name,
"",
if(stateName)
{
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"StateChanged",
stateName,
{
if(!IsBoundsChangedEventAllowed) return;
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
DBus::EldbusVariant<std::tuple<int32_t, int32_t, int32_t, int32_t> > tmp{
std::tuple<int32_t, int32_t, int32_t, int32_t>{rect.x, rect.y, rect.width, rect.height}};
AddFilteredEvent(FilteredEvents::BOUNDS_CHANGED, obj, 1.0f, [=]() {
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<std::tuple<int32_t, int32_t, int32_t, int32_t> >, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"BoundsChanged",
"",
void BridgeObject::EmitCursorMoved(Accessible* obj, unsigned int cursorPosition)
{
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"TextCaretMoved",
"",
if(stateName)
{
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<std::string>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"TextChanged",
stateName,
void BridgeObject::EmitMovedOutOfScreen(Accessible* obj, ScreenRelativeMoveType type)
{
- auto addr = obj->GetAddress();
- std::string path = addr ? ATSPI_PREFIX_PATH + addr.GetPath() : ATSPI_NULL_PATH;
-
mDbusServer.emit2<std::string, int, int, DBus::EldbusVariant<int>, Address>(
- path,
+ GetAccessiblePath(obj),
AtspiDbusInterfaceEventObject,
"MoveOuted",
"",