// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_AURALINUX_H_ #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_AURALINUX_H_ #include <atk/atk.h> #include <memory> #include <optional> #include <string> #include <utility> #include "base/component_export.h" #include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/strings/utf_offset_string_conversions.h" #include "ui/accessibility/ax_enums.mojom-forward.h" #include "ui/accessibility/platform/ax_platform_node_base.h" // This deleter is used in order to ensure that we properly always free memory // used by AtkAttributeSet. struct AtkAttributeSetDeleter { … }; AtkAttributes; // Some ATK interfaces require returning a (const gchar*), use // this macro to make it safe to return a pointer to a temporary // string. #define ATK_AURALINUX_RETURN_STRING(str_expr) … namespace ui { struct FindInPageResultInfo { … }; // AtkTableCell was introduced in ATK 2.12. Ubuntu Trusty has ATK 2.10. // Compile-time checks are in place for ATK versions that are older than 2.12. // However, we also need runtime checks in case the version we are building // against is newer than the runtime version. To prevent a runtime error, we // check that we have a version of ATK that supports AtkTableCell. If we do, // we dynamically load the symbol; if we don't, the interface is absent from // the accessible object and its methods will not be exposed or callable. // The definitions below ensure we have no missing symbols. Note that in // environments where we have ATK > 2.12, the definitions of AtkTableCell and // AtkTableCellIface below are overridden by the runtime version. // TODO(accessibility) Remove AtkTableCellInterface when 2.12 is the minimum // supported version. struct COMPONENT_EXPORT(AX_PLATFORM) AtkTableCellInterface { … }; // This class with an enum is used to generate a bitmask which tracks the ATK // interfaces that an AXPlatformNodeAuraLinux's ATKObject implements. class ImplementedAtkInterfaces { … }; // Implements accessibility on Aura Linux using ATK. class COMPONENT_EXPORT(AX_PLATFORM) AXPlatformNodeAuraLinux : public AXPlatformNodeBase { … }; } // namespace ui #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_AURALINUX_H_