GimpUi.widget_track_monitor
@accepts(Gtk.Widget, GObject.Callback, gpointer, GLib.DestroyNotify)
@returns(none)
def widget_track_monitor(widget, monitor_changed_callback, user_data, user_data_destroy):
# Python wrapper for gimp_widget_track_monitor()
This function behaves as if Gtk.Widget had a signal
GtkWidget::monitor_changed(GtkWidget *widget, gpointer user_data)
That is emitted whenever widget's toplevel window is moved from one monitor to another. This function automatically connects to the right toplevel Gtk.Window, even across moving widget between toplevel windows.
Note that this function tracks the toplevel, not widget itself, so all a window's widgets are always considered to be on the same monitor. This is because this function is mainly used for fetching the new monitor's color profile, and it makes little sense to use different profiles for the widgets of one window.
Since 2.10
- widget
- monitor_changed_callback
the callback when widget's monitor changes
- user_data
data passed to monitor_changed_callback
- user_data_destroy
destroy function for user_data.