GimpUi.widget_get_monitor

function widget_get_monitor(widget: Gtk.Widget): Gdk.Monitor {
    // Gjs wrapper for gimp_widget_get_monitor()
}
  
widget

a Gtk.Widget.

Returns

the Gdk.Monitor where widget is current displayed on.