I'm fairly new to the whole GTK game and want to create an algorithm to take screen shot of all monitors.
I was thinking something along these lines:
gdk_display_manager_list_displays
- each display can have multiple screens (screens means monitors?) so use
gdk_display_get_n_screens
to get monitors per display from1
- get root gtk window of all screens from
2
- create new Pixbuf for each root gtk window for each screen from
3
withgdk_pixbuf_new
- fill each pixbuf from
4
withgdk_pixbuf_get_from_drawable
for each respective root window from3
for each respective screen from2
for each respective display from1
(may need togdk_drawable_get_size
andgdk_window_get_origin
for each for args to pixbuf) gdk_pixbuf_get_pixels
for each pixbuf
Is this a workable solution?
gdk_pixbuf_get_from_window
and its crashing when i try gdk2 method ofgdk_pixbuf_get_from_drawable
:( – Winebibber