How to capture image of a gtk ApplicationWindow in Python in linux?
问题 I need to capture an image of an ApplicationWindow in Python, in linux. This would be my hypothetical test app taken from here: from gi.repository import Gtk import sys class MyWindow(Gtk.ApplicationWindow): # constructor for a Gtk.ApplicationWindow def __init__(self, app): Gtk.Window.__init__(self, title="Welcome to GNOME", application=app) self.set_default_size(200, 100) # create a label label = Gtk.Label() # set the text of the label label.set_text("Hello GNOME!") # add the label to the