[Vala] Passing user data to a signal handler - it works, but is it right?
- From: tomw <tomw ubilix com>
- To: vala-list gnome org
- Subject: [Vala] Passing user data to a signal handler - it works, but is it right?
- Date: Thu, 15 Sep 2011 18:29:05 +0200
Hi,
to remove a ClutterGst.VideoTexture which implements the (Clutter.Media
interface) from a stage upon the eos signal I came up with the following
solution. It works - but it looks a bit weird. Especially passing the
player two times within the closure - the first player is the
Clutter.Media interface, the second is the wanted VideoTexture.
void on_eos (Clutter.Media m, void *player) {
Clutter.Actor *vp = player;
stage.remove_actor (vp);
...
player = new ClutterGst.VideoTexture;
player.eos.connect(() => {on_eos (player, player); });
Any suggestion how to change/improve this?
thanks
--
tomw <tomw ubilix com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]