GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Apr 20, 2014 5:46 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: screen resolution and dpi
PostPosted: Thu May 17, 2007 8:24 am 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
Hello,
How can I get the screen resolution (such as 800 x 600) and screen dpi (such as 72 or 96) using gtk call?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 2:23 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
Get your default GdkScreen* with gdk_screen_get_default(). Then, use gdk_screen_get_width(), gdk_screen_get_height(), and gdk_screen_get_resolution().

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 3:52 am 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
Got it, thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group