Re: Window title change notification in Apple Safari
Re: Window title change notification in Apple Safari
- Subject: Re: Window title change notification in Apple Safari
- From: email@hidden
- Date: Mon, 28 Feb 2011 21:08:34 +0100
Hello,
I tried to implement the below-mentioned suggestion to get notified about tab switches in Safari. But adding the notification to observer doesn't return kAXErrorSuccess.
Unfortunately I'm not that familiar with accessibility to see my error. Could someone help me to get this right?
AXUIElementRef app;
CFTypeRef window;
CFTypeRef tabs;
// get safari app
app = AXUIElementCreateApplication(safari_pid);
// get window
AXUIElementCopyAttributeValue(app, kAXFocusedWindowAttribute, &window);
// get tabs
AXUIElementCopyAttributeValue(window, kAXTabGroupRole, &tabs);
// register for changes in tabs
AXObserverAddNotification(observer, tabs, kAXValueChangedNotification, self);
If there are other possibilities to receive notifications about tab changes (maybe Carbon events or s.th. like that) I'd be glad to hear about them, too.
best regards,
jake
> When the selected tab of a tab group changes, AXValueChangedNotification is fired off for the AXTabGroup. Then you can examine the AXValue of this AXTabGroup and fetch the AXTitle of the AXRadioButton.
>
> Patti Hoa
>
> On Jun 17, 2010, at 8:38 AM, Peter wrote:
>
>> > Hi all,
>> >
>> > I am trying to keep track of window title changes in the user's launched applications. With exception of Apple Safari, everything seems to work fine. I got some useful help during the WWDC10.
>> >
>> > I noticed that Safari uses some AXTabGroup items and a change of the current tab doesn't seem to fire a title change notification.
>> >
>> > VoiceOver receives an event of a 'html content' change that would be useful for this case but I cannot find something related in the documentation.
>> >
>> > What solution exists to get a notification if the frontmost tab changed that also changed the window title?
>> >
>> > Thanks for any input,
>> > Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden