color: Emit signal when device is updated
Will be emitted when a device updated its color state. Will be used by an X11 color manager implementation, and tests. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2165>
This commit is contained in:
@ -37,6 +37,7 @@ enum
|
||||
{
|
||||
READY,
|
||||
CHANGED,
|
||||
UPDATED,
|
||||
|
||||
N_SIGNALS
|
||||
};
|
||||
@ -322,6 +323,12 @@ meta_color_device_class_init (MetaColorDeviceClass *klass)
|
||||
G_SIGNAL_RUN_LAST, 0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
signals[UPDATED] =
|
||||
g_signal_new ("updated",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, 0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1133,4 +1140,6 @@ meta_color_device_update (MetaColorDevice *color_device,
|
||||
lut_size);
|
||||
|
||||
meta_monitor_set_gamma_lut (monitor, lut);
|
||||
|
||||
g_signal_emit (color_device, signals[UPDATED], 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user