import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk window = Gtk.Window() # Setting the window type hint to a dialog window.set_type_hint(Gdk.WindowTypeHint.DIALOG) # Displaying the window with the dialog type window.show()
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GdkPixbuf window = Gtk.Window() # Specifying window icon icon = GdkPixbuf.Pixbuf.new_from_file("icon.png") window.set_icon(icon) # Displaying the window with the icon window.show()This example uses the "GdkPixbuf" package library to specify a `Pixbuf` object as an icon for the window. Overall, the `gi.repository Gdk.WindowHints` module provides a range of window hints and functions that can be used in creating a more consistent look-and-feel for applications.