I have a graphical app that needs to test the resolution of the display it is starting up on in Mac OS X to ensure it is not larger than the resolution. This is done before the window itself is initialized.
If there is more than one display, it needs to be the primary display. This is the display that hardware accelerated (OpenGL) apps will start up on in Full Screen, and is typically the display that has the menu bar at the top.
In Windows, I can successfully use GetSystemMetrics(). How can I do this on OS X?