Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

other application window close event

How to detect other applications window close event or notification in cocoa/carbon based application?

eg. if there are multiple windows in TextEdit application how to detect close event on particular window rather than whole application itself.

like image 451
Mahadev Kale Avatar asked May 21 '26 02:05

Mahadev Kale


1 Answers

How to detect other applications window close event or notification in cocoa/carbon based application?

The way to do that sort of thing is to use MacOS X's accessibility model. There's a good example in the documentation that'll give you an idea of the kinds of things you can do with accessibility -- getting notified of windows being opened or closed is certainly among its capabilities.

And by the way: it works with both Cocoa and Carbon apps.

like image 91
Caleb Avatar answered May 23 '26 17:05

Caleb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!