diff options
author | Benjamin Otte <otte@redhat.com> | 2012-04-08 17:33:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-04-17 08:59:21 +0200 |
commit | 74f4c6f6bd755967b68bac3e551f6fff2dde6a24 (patch) | |
tree | 56e430355159e5a9397047bcd4bf932e68a4ade1 /gtk/gtkstyleproviderprivate.c | |
parent | 29fbfcb8f5149a2b62c14ee38e0a381fd7dc2e2b (diff) | |
download | gtk+-74f4c6f6bd755967b68bac3e551f6fff2dde6a24.tar.gz |
styleprovider: Add a private signal for when things change
Diffstat (limited to 'gtk/gtkstyleproviderprivate.c')
-rw-r--r-- | gtk/gtkstyleproviderprivate.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gtk/gtkstyleproviderprivate.c b/gtk/gtkstyleproviderprivate.c index fc7e29862e..a646201950 100644 --- a/gtk/gtkstyleproviderprivate.c +++ b/gtk/gtkstyleproviderprivate.c @@ -18,13 +18,30 @@ #include "config.h" #include "gtkstyleproviderprivate.h" + +#include "gtkintl.h" #include "gtkstyleprovider.h" +enum { + CHANGED, + LAST_SIGNAL +}; + G_DEFINE_INTERFACE (GtkStyleProviderPrivate, _gtk_style_provider_private, GTK_TYPE_STYLE_PROVIDER) +guint signals[LAST_SIGNAL]; + static void _gtk_style_provider_private_default_init (GtkStyleProviderPrivateInterface *iface) { + signals[CHANGED] = g_signal_new (I_("-gtk-private-changed"), + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GtkStyleProviderPrivateInterface, changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + } GtkSymbolicColor * @@ -78,3 +95,12 @@ _gtk_style_provider_private_get_change (GtkStyleProviderPrivate *provider, return iface->get_change (provider, matcher); } + +void +_gtk_style_provider_private_changed (GtkStyleProviderPrivate *provider) +{ + g_return_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider)); + + g_signal_emit (provider, signals[CHANGED], 0); +} + |