GUI/Maximum window dimensions: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Add a Perl 6 example)
Line 667: Line 667:
</lang>
</lang>
get_size returns (1425,870) here.
get_size returns (1425,870) here.

=={{header|Perl 6}}==
{{works with|Rakudo|2018.12}}
This is kind-of a silly task. The maximum window size is going to depend on your OS, hardware, display server and graphics toolkit, not your programming language. Taken at face value, using a Linux system running an X11 display server, the maximum displayable window size is the resolution of your monitor. Basically, the size of your desktop viewport. The Perl 6 module X11::libxdo returns the desktop viewport size for get-desktop-dimensions which is the effective maximum window size.

<lang perl6>use X11::libxdo;

my $xdo = Xdo.new;

my ($dw, $dh) = $xdo.get-desktop-dimensions( 0 );

say "Desktop viewport dimensions: (maximum-fullscreen size) $dw x $dh";</lang>
{{out|On my system returns}}
<pre>Desktop viewport dimensions: (maximum-fullscreen size) 1920 x 1080</pre>


=={{header|Phix}}==
=={{header|Phix}}==