Qt 4.8
Functions | Variables
qaccessible_mac_carbon.cpp File Reference

Go to the source code of this file.

Functions

static OSStatus accessibilityEventHandler (EventHandlerCallRef next_ref, EventRef event, void *data)
 
static OSStatus applicationEventHandler (EventHandlerCallRef next_ref, EventRef event, void *data)
 
static void installAcessibilityEventHandler (HIObjectRef hiObject)
 
static void installApplicationEventhandler ()
 
static OSStatus objectCreateEventHandler (EventHandlerCallRef next_ref, EventRef event, void *data)
 
static void registerQtAccessibilityHIObjectSubclass ()
 
static void removeEventhandler (EventHandlerUPP eventHandler)
 

Variables

static EventHandlerUPP accessibilityEventHandlerUPP = 0
 
static EventTypeSpec accessibilityEvents []
 
static EventTypeSpec application_events []
 
static EventHandlerUPP applicationEventHandlerUPP = 0
 
static CFStringRef kObjectQtAccessibility = CFSTR("com.trolltech.qt.accessibility")
 
static EventHandlerUPP objectCreateEventHandlerUPP = 0
 
static EventTypeSpec objectCreateEvents []
 

Function Documentation

◆ accessibilityEventHandler()

static OSStatus accessibilityEventHandler ( EventHandlerCallRef  next_ref,
EventRef  event,
void *  data 
)
static

◆ applicationEventHandler()

static OSStatus applicationEventHandler ( EventHandlerCallRef  next_ref,
EventRef  event,
void *  data 
)
static

◆ installAcessibilityEventHandler()

static void installAcessibilityEventHandler ( HIObjectRef  hiObject)
static

Definition at line 72 of file qaccessible_mac_carbon.cpp.

Referenced by QAccessibleHierarchyManager::registerInterface().

73 {
76 
77  InstallHIObjectEventHandler(hiObject, accessibilityEventHandlerUPP,
78  GetEventTypeCount(accessibilityEvents),
79  accessibilityEvents, 0, 0);
80 }
static EventHandlerUPP accessibilityEventHandlerUPP
static EventTypeSpec accessibilityEvents[]
static OSStatus accessibilityEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data)

◆ installApplicationEventhandler()

static void installApplicationEventhandler ( )
static

Definition at line 100 of file qaccessible_mac_carbon.cpp.

Referenced by QAccessible::initialize().

101 {
104 
105  OSStatus err = InstallApplicationEventHandler(applicationEventHandlerUPP,
106  GetEventTypeCount(application_events), application_events,
107  0, 0);
108 
109  if (err && err != eventHandlerAlreadyInstalledErr)
110  qWarning("qaccessible_mac internal error: Could not install application accessibility event handler");
111 }
static EventHandlerUPP applicationEventHandlerUPP
Q_CORE_EXPORT void qWarning(const char *,...)
signed long OSStatus
static OSStatus applicationEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data)
static EventTypeSpec application_events[]

◆ objectCreateEventHandler()

static OSStatus objectCreateEventHandler ( EventHandlerCallRef  next_ref,
EventRef  event,
void *  data 
)
static

Definition at line 82 of file qaccessible_mac_carbon.cpp.

Referenced by registerQtAccessibilityHIObjectSubclass().

83 {
84  Q_UNUSED(data)
86  Q_UNUSED(next_ref)
87  return noErr;
88 }
EventRef event
static const char * data(const QByteArray &arr)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ registerQtAccessibilityHIObjectSubclass()

static void registerQtAccessibilityHIObjectSubclass ( )
static

Definition at line 90 of file qaccessible_mac_carbon.cpp.

Referenced by QAccessible::initialize().

91 {
94  OSStatus err = HIObjectRegisterSubclass(kObjectQtAccessibility, 0, 0, objectCreateEventHandlerUPP,
95  GetEventTypeCount(objectCreateEvents), objectCreateEvents, 0, 0);
96  if (err && err != hiObjectClassExistsErr)
97  qWarning("qaccessible_mac internal error: Could not register accessibility HIObject subclass");
98 }
static EventHandlerUPP objectCreateEventHandlerUPP
static CFStringRef kObjectQtAccessibility
Q_CORE_EXPORT void qWarning(const char *,...)
static EventTypeSpec objectCreateEvents[]
signed long OSStatus
static OSStatus objectCreateEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data)

◆ removeEventhandler()

static void removeEventhandler ( EventHandlerUPP  eventHandler)
static

Definition at line 113 of file qaccessible_mac_carbon.cpp.

Referenced by QAccessible::cleanup().

114 {
115  if (eventHandler) {
116  DisposeEventHandlerUPP(eventHandler);
117  eventHandler = 0;
118  }
119 }

Variable Documentation

◆ accessibilityEventHandlerUPP

EventHandlerUPP accessibilityEventHandlerUPP = 0
static

◆ accessibilityEvents

EventTypeSpec accessibilityEvents[]
static
Initial value:
= {
{ kEventClassAccessibility, kEventAccessibleGetChildAtPoint },
{ kEventClassAccessibility, kEventAccessibleGetFocusedChild },
{ kEventClassAccessibility, kEventAccessibleGetAllAttributeNames },
{ kEventClassAccessibility, kEventAccessibleGetNamedAttribute },
{ kEventClassAccessibility, kEventAccessibleSetNamedAttribute },
{ kEventClassAccessibility, kEventAccessibleIsNamedAttributeSettable },
{ kEventClassAccessibility, kEventAccessibleGetAllActionNames },
{ kEventClassAccessibility, kEventAccessiblePerformNamedAction },
{ kEventClassAccessibility, kEventAccessibleGetNamedActionDescription }
}

Definition at line 60 of file qaccessible_mac_carbon.cpp.

Referenced by installAcessibilityEventHandler().

◆ application_events

EventTypeSpec application_events[]
static
Initial value:
= {
{ kEventClassAccessibility, kEventAccessibleGetChildAtPoint },
{ kEventClassAccessibility, kEventAccessibleGetNamedAttribute }
}

Definition at line 44 of file qaccessible_mac_carbon.cpp.

Referenced by installApplicationEventhandler().

◆ applicationEventHandlerUPP

EventHandlerUPP applicationEventHandlerUPP = 0
static

◆ kObjectQtAccessibility

CFStringRef kObjectQtAccessibility = CFSTR("com.trolltech.qt.accessibility")
static

◆ objectCreateEventHandlerUPP

EventHandlerUPP objectCreateEventHandlerUPP = 0
static

◆ objectCreateEvents

EventTypeSpec objectCreateEvents[]
static
Initial value:
= {
{ kEventClassHIObject, kEventHIObjectConstruct },
{ kEventClassHIObject, kEventHIObjectInitialize },
{ kEventClassHIObject, kEventHIObjectDestruct },
{ kEventClassHIObject, kEventHIObjectPrintDebugInfo }
}

Definition at line 51 of file qaccessible_mac_carbon.cpp.

Referenced by registerQtAccessibilityHIObjectSubclass().