Re: Get screen resolution.



On Tue, 2007-10-09 at 19:28 -0500, Nik Ogura wrote:

How do I get the screen's current resolution?

There's a method somewhere... but I just... can't... find...it...

Gtk2::Gdk::Screen ...
http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/Gdk/Screen.html

It has get_height(), get_width(), get_resolution() ... none of which
I've used.

I think you have to do something like:

my $screen = Gtk2::Gdk::Screen->get_default;

 ... and then you can do:

my $width = $screen->get_width;

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
website: http://www.nusconsulting.com.au




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]