diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-12-07 12:11:30 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-12-07 12:11:30 +0000 |
commit | 9bda5831b8818d0fe4286fdb1217085913277c0d (patch) | |
tree | 404583dd41a644b2e2dd72aa587357b252c135d8 /gst-libs/gst/colorbalance/colorbalance.c | |
parent | ef074394e68785508b4def25078ffaba572cb0c8 (diff) | |
download | gst-plugins-bad-9bda5831b8818d0fe4286fdb1217085913277c0d.tar.gz gst-plugins-bad-9bda5831b8818d0fe4286fdb1217085913277c0d.tar.bz2 gst-plugins-bad-9bda5831b8818d0fe4286fdb1217085913277c0d.zip |
Move over from GstInterface to GstImplementsInterface. Also adds some signals to several interfaces
Original commit message from CVS:
Move over from GstInterface to GstImplementsInterface. Also adds some signals to several interfaces
Diffstat (limited to 'gst-libs/gst/colorbalance/colorbalance.c')
-rw-r--r-- | gst-libs/gst/colorbalance/colorbalance.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/gst-libs/gst/colorbalance/colorbalance.c b/gst-libs/gst/colorbalance/colorbalance.c index 829cf5f6..163111cd 100644 --- a/gst-libs/gst/colorbalance/colorbalance.c +++ b/gst-libs/gst/colorbalance/colorbalance.c @@ -25,9 +25,17 @@ #endif #include "colorbalance.h" +#include "colorbalancemarshal.h" + +enum { + VALUE_CHANGED, + LAST_SIGNAL +}; static void gst_color_balance_class_init (GstColorBalanceClass *klass); +static guint gst_color_balance_signals[LAST_SIGNAL] = { 0 }; + GType gst_color_balance_get_type (void) { @@ -50,7 +58,7 @@ gst_color_balance_get_type (void) "GstColorBalance", &gst_color_balance_info, 0); g_type_interface_add_prerequisite (gst_color_balance_type, - GST_TYPE_INTERFACE); + GST_TYPE_IMPLEMENTS_INTERFACE); } return gst_color_balance_type; @@ -59,6 +67,21 @@ gst_color_balance_get_type (void) static void gst_color_balance_class_init (GstColorBalanceClass *klass) { + static gboolean initialized = FALSE; + + if (!initialized) { + gst_color_balance_signals[VALUE_CHANGED] = + g_signal_new ("value_changed", + GST_TYPE_COLOR_BALANCE, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstColorBalanceClass, value_changed), + NULL, NULL, + gst_color_balance_marshal_VOID__OBJECT_INT, + G_TYPE_NONE, 2, + GST_TYPE_COLOR_BALANCE_CHANNEL, G_TYPE_INT); + + initialized = TRUE; + } + /* default virtual functions */ klass->list_channels = NULL; klass->set_value = NULL; @@ -101,3 +124,15 @@ gst_color_balance_get_value (GstColorBalance *balance, return channel->min_value; } + +void +gst_color_balance_value_changed (GstColorBalance *balance, + GstColorBalanceChannel *channel, + gint value) +{ + g_signal_emit (G_OBJECT (balance), + gst_color_balance_signals[VALUE_CHANGED], + 0, channel, value); + + g_signal_emit_by_name (G_OBJECT (channel), "value_changed", value); +} |