Search code examples
xcodeequivalentmacos

Is there a Mac/Xcode equivalent to the Windows Workarea?


I am creating a toolbar on Windows that is being ported over to the Mac, is there such a concept as a workarea on the Mac, like there is on Windows.

If you are unfamiliar of what the workarea on Windows is, it is basically a defined space that all open windows can re-size in. Meaning normally you can re-size your windows to fill the whole screen, but if I change the workarea to a smaller size when you try to maximize your open windows they will stop at the boundaries of the new workarea. For example the Windows taskbar does this. If you move your windows taskbar up or down, then this affects how much space you have left for open windows to utilize, the taskbar is changing your workarea dimensions.

Windows uses the following function SystemParametersInfo with SPI_SETWORKAREA passed into to change the size of a workarea. Is there an equivalent to this on the Mac?

Thanks.


Solution

  • Yes, there is a mechanism in OS X to keep maximized windows from overlapping the Dock. Look at NSScreen's -visibleFrame method.