42 #ifndef QACCESSIBLE_MAC_P_H 43 #define QACCESSIBLE_MAC_P_H 58 #include <private/qt_mac_p.h> 75 : interface(0), childrenIsRegistered(new bool(false)), refCount(new int(1)) { }
78 :interface(interface), childrenIsRegistered(new bool(false)), refCount(new int(1)) { }
82 if (--(*refCount) == 0) {
85 delete childrenIsRegistered;
90 :interface(other.interface), childrenIsRegistered(other.childrenIsRegistered), refCount(other.refCount)
100 if (--(*refCount) == 0) {
103 delete childrenIsRegistered;
106 interface = other.interface;
136 if (interface == 0 || child > interface->
childCount()) {
140 m_cachedObject = interface->
object();
146 :
base(wrapper), m_cachedObject(wrapper.interface->object()), child(child)
164 {
return base.interface->actionText(action, text, child); }
171 const int foundChild =
base.interface->childAt(x, y);
173 if (foundChild == -1)
179 if (foundChild == child)
189 if (*
this != child.
parent())
192 if (
object() == child.
object())
205 return base.interface->childCount();
214 for (
int i = 1; i <= childCount(); ++i) {
230 base.interface->doAction(action, child, params);
240 return base.interface->object();
276 return m_cachedObject;
283 return base.interface->rect(child);
290 return base.interface->role(child);
297 base.interface->setText(t, child, text);
304 return base.interface->state(child);
311 return base.interface->text(text, child);
324 return base.interface->userActionCount(child);
335 {
return (child == 0 &&
object() != 0); }
337 inline int id()
const 342 return (
base.interface != 0 &&
base.interface->isValid());
354 const bool valid = isValid();
355 #ifdef Q_ACCESSIBLE_MAC_DEBUG 357 qFatal(
"QAccessible_mac: tried to use invalid interface.");
377 explicit QAElement(AXUIElementRef elementRef);
385 return AXUIElementGetHIObject(elementRef);
391 inline int id()
const 394 #ifndef QT_MAC_USE_COCOA 395 AXUIElementGetIdentifier(elementRef, &theId);
409 return (elementRef != 0);
422 virtual QAInterface interface(UInt64 identifier) = 0;
426 return element(interface.
id());
428 virtual void registerChildren() = 0;
457 void registerChildren(
const QAInterface &interface);
464 void objectDestroyed(
QObject *);
HIObjectRef hiObject() const
T qobject_cast(QObject *object)
The QDebug class provides an output stream for debugging information.
int indexOfChild(const QAInterface &child) const
void doAction(int action, const QVariantList ¶ms=QVariantList()) const
QObjectElementHash qobjectElementHash
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
HIObjectRef object() const
Role
This enum defines the role of an accessible object.
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
bool * childrenIsRegistered
virtual int childCount() const =0
Returns the number of children that belong to this object.
QAccessibleInterfaceWrapper(const QAccessibleInterfaceWrapper &other)
QAInterface childAt(int index) const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QAccessibleInterface * interface
QAInterface childAt(int x, int y) const
HIObjectInterfaceHash hiobjectInterfaceHash
bool operator!=(QBool b1, bool b2)
The QString class provides a Unicode character string.
virtual QObject * object() const =0
Returns a pointer to the QObject this interface implementation provides information for...
QHash< QObject *, HIObjectRef > QObjectHIObjectHash
The QObject class is the base class of all Qt objects.
~QAccessibleHierarchyManager()
QAccessibleInterfaceWrapper()
QAInterface(QAccessibleInterfaceWrapper wrapper, int child=0)
QAInterface(const QAInterface &other, int child)
void append(const T &t)
Inserts value at the end of the list.
QHash< QObject *, QInterfaceFactory * > QObjectElementHash
#define QT_BEGIN_NAMESPACE
This macro expands to.
QAInterface parent() const
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
void setText(Text t, const QString &text) const
QObject * cachedObject() const
QAInterface(QAccessibleInterface *interface, int child=0)
The State element defines configurations of objects and properties.
virtual ~QInterfaceFactory()
AXUIElementRef element() const
QString actionText(int action, Text text) const
QHash< HIObjectRef, QInterfaceFactory * > HIObjectInterfaceHash
~QAccessibleInterfaceWrapper()
Q_CORE_EXPORT void qFatal(const char *,...)
Q_AUTOTEST_EXPORT bool isItInteresting(const QAInterface &interface)
virtual QAElement element(const QAInterface &interface)
int userActionCount() const
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
QList< QVariant > QVariantList
struct OpaqueHIObjectRef * HIObjectRef
The QRect class defines a rectangle in the plane using integer precision.
#define Q_AUTOTEST_EXPORT
QList< QAElement > lookup(const QList< QAInterface > &interfaces)
QAccessibleInterfaceWrapper(QAccessibleInterface *interface)
QAccessibleInterfaceWrapper interfaceWrapper() const
QAInterface objectInterface() const
QList< QAInterface > children() const
AXUIElementRef elementRef
QString text(Text text) const
bool operator==(QBool b1, bool b2)
QString className() const
void operator=(const QAccessibleInterfaceWrapper &other)
QAccessibleInterfaceWrapper base
The QAccessible class provides enums and static functions relating to accessibility.
QObjectHIObjectHash qobjectHiobjectHash
The QList class is a template class that provides lists.
The Text item allows you to add formatted text to a scene.
Q_AUTOTEST_EXPORT QDebug operator<<(QDebug debug, const QAInterface &interface)