From 2cb291b19151c83915efaf41141882f8f3b56c51 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Tue, 20 Jul 2010 19:13:06 +0200 Subject: [PATCH] connect to layer object-{added,removed} and display message --- tests/examples/ges-ui.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c index f83a808810..21ff5c9807 100644 --- a/tests/examples/ges-ui.c +++ b/tests/examples/ges-ui.c @@ -142,6 +142,24 @@ app_dispose (App * app) } } +/* Backend callbacks ********************************************************/ + +static void +layer_object_added_cb (GESTimelineLayer * layer, GESTimelineObject * object, + App * app) +{ + GST_INFO ("layer object added cb %p %p %p", layer, object, app); + g_print ("layer object added"); +} + +static void +layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object, + App * app) +{ + GST_INFO ("layer object removed cb %p %p %p", layer, object, app); + g_print ("layer object removed"); +} + /* Layout *******************************************************************/ GtkWidget * @@ -158,6 +176,11 @@ create_ui (App * app) gtk_widget_show (window); + g_signal_connect (app->layer, "object-added", + G_CALLBACK (layer_object_added_cb), app); + g_signal_connect (app->layer, "object-removed", + G_CALLBACK (layer_object_removed_cb), app); + return window; }