other application window close event

前端 未结 1 630
[愿得一人]
[愿得一人] 2021-01-21 04:51

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

eg. if there are multip

1条回答
  •  [愿得一人]
    2021-01-21 05:20

    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.

    0 讨论(0)
提交回复
热议问题