[Vala] Clutter actor signal connect



Hello again,

Can anyone show me how to handle a mouse click event on my VideoTexture?
I'm just getting started and I have a movie playing on a VideoTexture that
I would like to start and stop by clicking on the movie. No master plan
here yet, I am just trying to learn how to hookup actor events to an event
handler. Here is what I have (movie plays fine) ...

using Clutter;
using Gst;
using ClutterGst;

void main (string[] args) {

Clutter.init(ref args);
Gst.init(ref args);

Stage stage = new Stage();
//stage.get_default ();
stage.color = Color () { alpha = 255 };
//stage.set_fullscreen(true);
stage.set_size(1280, 720);


VideoTexture tx = new VideoTexture();
// hook up button_press_event to this VideoTexture ?

tx.set_uri("file:///home/brian/Downloads/louis.mp4");
tx.set_playing(true);

stage.add(tx);
stage.show_all();


Clutter.main();
}

// event handler ?



//valac -g --pkg clutter-1.0 --pkg gstreamer-0.10 --pkg
gstreamer-interfaces-0.10 --pkg clutter-gst-1.0 g_test.vala

Thanks

Brian

-- 
Duff


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]