 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
bil Familiar Face
Joined: 27 Mar 2007 Posts: 26
|
Posted: Thu May 17, 2007 8:24 am Post subject: screen resolution and dpi |
|
|
Hello,
How can I get the screen resolution (such as 800 x 600) and screen dpi (such as 72 or 96) using gtk call? |
|
| Back to top |
|
 |
openldev Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 376 Location: State College, Pennsylvania
|
Posted: Thu May 17, 2007 2:23 pm Post subject: |
|
|
| Get your default GdkScreen* with gdk_screen_get_default(). Then, use gdk_screen_get_width(), gdk_screen_get_height(), and gdk_screen_get_resolution(). |
|
| Back to top |
|
 |
bil Familiar Face
Joined: 27 Mar 2007 Posts: 26
|
Posted: Fri May 18, 2007 3:52 am Post subject: |
|
|
| Got it, thank you! |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|