Crate windows_dpi [] [src]

Functions

desktop_dpi

Gets the mainScreen DPI. Limitation: This will always be the screen which currently has keyboard focus. Use get_dpi_for if you want the dpi of a specific screen or window.

enable_dpi

Stub function, I don't know if this is necessary on mac of if it's even possible programatically. If it is possible, contributions would be happily accepted.

get_dpi_for

Gets the DPI for a specific surface. You can use NSScreen or NSWindow, but any object that respondes to -(CGFloat)backingScaleFactor may be passed. If the passed object is nil, or does not respond to backingScaleFactor, desktop_dpi is called instead.