Re: [Vala] gtk-clutter question
- From: Andrew Breiner <breinera gmail com>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] gtk-clutter question
- Date: Wed, 16 Dec 2009 18:23:54 -0600
Thanks, but ClutterGtk.init() didn't work for me, however I tried
GtkClutter.init(ref args[]) and it was much happier.
Again Thanks.
Andy
On Thu, 2009-12-17 at 00:03 +0000, Emmanuele Bassi wrote:
You haven't initialized Clutter. Use ClutterGtk.init() instead of
Gtk.init().
Ciao,
Emmanuele.
On 16 Dec 2009 20:46, "Andrew Breiner" <breinera gmail com> wrote:
I hope this is the correct place to ask this question. I started to
play around with Vala, Gtk, and Clutter. I wanted to embed clutter
inside of my Gtk program. I downloaded the gtk-clutter-0.10 binding
patch and applied it. However I can not figure out how to get the
stage/actor embedded inside of Gtk. Can anyone provide a simple
example.
I currently have
using Gtk;
using Clutter;
public class test : Window {
public test () {
this.title = "Embed Clutter Inside GTK";
this.position = WindowPosition.CENTER;
this.set_default_size (400,400);
//Create Clutter Stage/Actor to embed inside GTK
Gtk.Widget clutter_box = new GtkClutter.Embed ();
//Add a button that will start the clutter animation
var sbutton = new Button.with_label ("Start");
//sbutton.clicked.connect ( () => {
// //need to start clutter animation some how
//});
//create a vbox with embed clutter on top and button on bottom
var vbox = new VBox (true, 5);
//vbox.add(clutter_box);
vbox.add(sbutton);
this.add (vbox);
} //test
public static int main (string[] args) {
Gtk.init (ref args);
var window = new test ();
window.destroy.connect (Gtk.main_quit);
window.show_all ();
Gtk.main ();
return 0;
} //main
} //test
It compiles just fine, but when I run the program I get the errors:
(test:3029): Clutter-WARNING **: Unable to create a new stage: the
glx backend does not support multiple stages.
(test:3029): GLib-GObject-WARNING **: invalid (NULL) pointer
instance
(test:3029): GLib-GObject-CRITICAL **: g_signal_connect_data:
assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Is that my computer causing the errors or my code? Thanks for any
help you can provide, it will be most appreciated. Also if I am
asking this in the wrong place I apologize.
Andy B
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]