I want to register for screen resolution changes on the Mac. I have a c++ library that I use to listen for Power Notification events as well has hotplug events using IOKit but I'm not finding anything about how to register for resolution changes. I would like to do this without Cocoa if possible.
Asked
Active
Viewed 1,594 times
1 Answers
2
This answer may help you.
For a more in-depth article, read here: Getting Information About Displays
-
Thank you MrGomez. For power notification and hotplug events, I create a run loop source reference and add it to the current run loop. Do you have any insight into how I add CGDisplayRegisterReconfigurationCallback(...) as a run loop source? – wheels53 Mar 27 '12 at 03:34
-
@wheels53 I admit, I'm not a domain expert. But, I found [this terse example](http://stackoverflow.com/questions/958281/is-anything-required-to-get-a-quartz-callback-besides-registering-for-it), which pointed me to [this thread](http://stackoverflow.com/questions/8590546/cfrunlooprun-vs-nsrunloop-run) on how to set up a `CFRunLoopRun`. Your quandary [seems to be a shared one](http://lists.apple.com/archives/quartz-dev/2007/Jan/msg00026.html), in any event! – MrGomez Mar 27 '12 at 04:49