getWindowDensity.lua 592 B

12345678910111213141516171819202122
  1. return {
  2. tag = 'system-window',
  3. summary = 'Get the window pixel density.',
  4. description = [[
  5. Returns the window pixel density. High DPI windows will usually return 2.0 to indicate that
  6. there are 2 pixels for every window coordinate in each axis. On a normal display, 1.0 is
  7. returned, indicating that window coordinates match up with pixels 1:1.
  8. ]],
  9. arguments = {},
  10. returns = {
  11. density = {
  12. type = 'number',
  13. description = 'The pixel density of the window.'
  14. }
  15. },
  16. variants = {
  17. {
  18. arguments = {},
  19. returns = { 'density' }
  20. }
  21. }
  22. }