Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-12-18 Thread Andrew Breiner
On 12/18/2009 08:53 AM, Gordon Allott wrote:
> On Wed, 2009-12-16 at 22:34 -0600, Andrew Breiner wrote:
>>
>> Your patch made gtkstage.get_stage() return a Clutter.Actor, I was
>> just 
>> wondering why it didn't return a Clutter.Stage.  I manually edited
>> the 
>> vapi file and told GtkClutter.Embed to have the following information:
>>
>> public class Embed : Gtk.Container, Atk.Implementor, Gtk.Buildable {
>> [CCode (type = "GtkWidget*", has_construct_function = false)]
>> public Embed ();
>> public unowned Clutter.Stage get_stage ();
>> } 
> 
> It returns a ClutterActor because thats what gtk_clutter_get_stage ()
> returns, on the whole clutter functions will *always* return clutter
> actors and its up to you to to cast them appropriately. just do 
> Clutter.Stage stage = gtkstage.get_stage (); 
> 
> vala will handle the typecasting for you just fine. if it doesn't for
> whatever reason (it should) just add "As Clutter.stage"
> 

Thanks.  I did have to cast it.  I had "private Clutter.Stage stage;" at
the top of my class and inside my constructor I had:

  var gtkstage = new GtkClutter.Embed();
  stage = gtkstage.get_stage();

And it gave me the error:

Assignment: Cannot convert from `Clutter.Actor' to `Clutter.Stage'
  stage = gtkstage.get_stage();
  
So I changed the line to:

stage = (Clutter.Stage)gtkstage.get_stage();

and it was much happier.

However I have a side question if you don't mind.  I have a simple
button that starts the animation, but anytime I roll over the button
during animation it slows down/pauses my animation, is it just my
computer or is there something special I need to know about?

Again thanks for the help.

Andy B
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-12-18 Thread Gordon Allott
On Wed, 2009-12-16 at 22:34 -0600, Andrew Breiner wrote:
> 
> Your patch made gtkstage.get_stage() return a Clutter.Actor, I was
> just 
> wondering why it didn't return a Clutter.Stage.  I manually edited
> the 
> vapi file and told GtkClutter.Embed to have the following information:
> 
> public class Embed : Gtk.Container, Atk.Implementor, Gtk.Buildable {
> [CCode (type = "GtkWidget*", has_construct_function = false)]
> public Embed ();
> public unowned Clutter.Stage get_stage ();
> } 

It returns a ClutterActor because thats what gtk_clutter_get_stage ()
returns, on the whole clutter functions will *always* return clutter
actors and its up to you to to cast them appropriately. just do 
Clutter.Stage stage = gtkstage.get_stage (); 

vala will handle the typecasting for you just fine. if it doesn't for
whatever reason (it should) just add "As Clutter.stage"

-- 
Gordon Allott 
Canonical


signature.asc
Description: This is a digitally signed message part
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [PATCH] gtk-clutter-0.10 bindings

2009-12-16 Thread Andrew Breiner
I have a question about your patch.  I applied the patch and copied the 
vapi and deps to the right folder, but my question involves the 
following code:


var gtkstage = new GtkClutter.Embed();
stage = gtkstage.get_stage();

Your patch made gtkstage.get_stage() return a Clutter.Actor, I was just 
wondering why it didn't return a Clutter.Stage.  I manually edited the 
vapi file and told GtkClutter.Embed to have the following information:


public class Embed : Gtk.Container, Atk.Implementor, Gtk.Buildable {
   [CCode (type = "GtkWidget*", has_construct_function = false)]
   public Embed ();
   public unowned Clutter.Stage get_stage ();
}

I changed the last line from Clutter.Actor get_stage() to Clutter.Stage 
get_stage().  Now it likes this perfectly fine and allows me to embed a 
stage with multiple actors instead of just having one actor.  Just 
wondering if I wasn't understanding something or what.


Thanks
Andy
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-10-20 Thread Quikee
> At the end, what's going on with clutter-gtk bindings?
>
> are they included with the default vala installation?
> can I donwload them from somewhere?
>
> Thanks.

No, the bingings are not yet provided with vala.

You can download the patch from Gordon's first post and the just do
"patch -p0 < clutter-gtk-0.10-vapi.patch" and you will get the
clutter-gtk-0.10.vapi and clutter-gtk-0.10.deps in ./vapi dir.

Regards, Tomaž
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-10-20 Thread Brian Vidal

On Tue, 13 Oct 2009 17:36:22 -0300, Quikee  wrote:

At the end, what's going on with clutter-gtk bindings?

are they included with the default vala installation?
can I donwload them from somewhere?

Thanks.


On Mon, Sep 14, 2009 at 11:50 AM, Gordon Allott
 wrote:

On Mon, 2009-09-14 at 11:46 +0200, Jürg Billeter wrote:

Thanks for the patch. As you've generated them using vapigen, would you
mind also adding the .gi and .metadata files?

Jürg



Sure of course

Gord,

--
Gordon Allott 
Canonical

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list




Hi,

If I want to "recreate" the vapi (using the clutter-gtk-0.10.gi and
clutter-gtk-0.10.metadata) via the following command line:

vapigen --pkg clutter-1.0 --pkg gtk+-2.0 --library clutter-gtk-0.10
clutter-gtk-0.10/clutter-gtk-0.10.gi

I get an invalid vapi that has entries as (too much " chars and \n
character where one would not expect it):
[CCode (cheader_filename = ""clutter-gtk/clutter-gtk.h"

")]

Is this some problem with the gi file? I used a similar metadata file
than this one for libclutter bindings but I generated the gi file
myself and did not have this problem.

Will this bindings be added to the repository? The bindings are not
needed by libchamplain but it is nice to have them.

regards,
Tomaž
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-10-13 Thread Quikee
On Mon, Sep 14, 2009 at 11:50 AM, Gordon Allott
 wrote:
> On Mon, 2009-09-14 at 11:46 +0200, Jürg Billeter wrote:
>> Thanks for the patch. As you've generated them using vapigen, would you
>> mind also adding the .gi and .metadata files?
>>
>> Jürg
>>
>
> Sure of course
>
> Gord,
>
> --
> Gordon Allott 
> Canonical
>
> ___
> Vala-list mailing list
> Vala-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/vala-list
>
>

Hi,

If I want to "recreate" the vapi (using the clutter-gtk-0.10.gi and
clutter-gtk-0.10.metadata) via the following command line:

vapigen --pkg clutter-1.0 --pkg gtk+-2.0 --library clutter-gtk-0.10
clutter-gtk-0.10/clutter-gtk-0.10.gi

I get an invalid vapi that has entries as (too much " chars and \n
character where one would not expect it):
[CCode (cheader_filename = ""clutter-gtk/clutter-gtk.h"

")]

Is this some problem with the gi file? I used a similar metadata file
than this one for libclutter bindings but I generated the gi file
myself and did not have this problem.

Will this bindings be added to the repository? The bindings are not
needed by libchamplain but it is nice to have them.

regards,
Tomaž
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-09-14 Thread Gordon Allott
On Mon, 2009-09-14 at 11:46 +0200, Jürg Billeter wrote:
> Thanks for the patch. As you've generated them using vapigen, would you
> mind also adding the .gi and .metadata files?
> 
> Jürg
> 

Sure of course

Gord,

-- 
Gordon Allott 
Canonical


clutter-gtk-0.10.gi
Description: XML document
GtkClutter cheader_filename="clutter-gtk/clutter-gtk.h"
gtk_clutter_get_fg_color.color is_out="1"
gtk_clutter_get_bg_color.color is_out="1"
gtk_clutter_get_dark_color.color is_out="1"
gtk_clutter_get_base_color.color is_out="1"
gtk_clutter_get_text_color.color is_out="1"
gtk_clutter_get_text_aa_color.color is_out="1"
gtk_clutter_get_light_color.color is_out="1"
gtk_clutter_get_mid_color.color is_out="1"
gtk_clutter_init.argc hidden="1"
gtk_clutter_init.argv is_array="1" is_ref="1" array_length_pos="0.9"



signature.asc
Description: This is a digitally signed message part
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [PATCH] gtk-clutter-0.10 bindings

2009-09-14 Thread Jürg Billeter
Hi Gord,

On Thu, 2009-09-10 at 16:33 +0100, Gordon Allott wrote:
> there are clutter-1.0 bindings in vala now (great!) but no clutter-gtk-0.10
> bindings, they are very often paired together so I thought it best to generate
> some up-to-date ones and would love for them to included in the trunk. they 
> were
> built using vapigen and used metadata to correct them.
> Also have a vested interest in maintaining them against newer versions 
> clutter-gtk
> patch is attached to this email but can also post in the bugzilla if anyone
> feels that's more appropriate

Thanks for the patch. As you've generated them using vapigen, would you
mind also adding the .gi and .metadata files?

Jürg

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [PATCH] gtk-clutter-0.10 bindings

2009-09-10 Thread Gordon Allott
Hi,

there are clutter-1.0 bindings in vala now (great!) but no clutter-gtk-0.10
bindings, they are very often paired together so I thought it best to generate
some up-to-date ones and would love for them to included in the trunk. they were
built using vapigen and used metadata to correct them.
Also have a vested interest in maintaining them against newer versions 
clutter-gtk
patch is attached to this email but can also post in the bugzilla if anyone
feels that's more appropriate

Gord,


Gord Allott (gord.all...@canonical.com)
=== added file 'vapi/clutter-gtk-0.10.deps'
--- vapi/clutter-gtk-0.10.deps	1970-01-01 00:00:00 +
+++ vapi/clutter-gtk-0.10.deps	2009-09-10 15:22:55 +
@@ -0,0 +1,8 @@
+gio-2.0
+atk
+gdk-pixbuf-2.0
+pango
+cairo
+gdk-2.0
+clutter-1.0
+gtk+-2.0

=== added file 'vapi/clutter-gtk-0.10.vapi'
--- vapi/clutter-gtk-0.10.vapi	1970-01-01 00:00:00 +
+++ vapi/clutter-gtk-0.10.vapi	2009-09-10 15:02:35 +
@@ -0,0 +1,74 @@
+/* clutter-gtk-0.10.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "GtkClutter", lower_case_cprefix = "gtk_clutter_")]
+namespace GtkClutter {
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public class Embed : Gtk.Container, Atk.Implementor, Gtk.Buildable {
+		[CCode (type = "GtkWidget*", has_construct_function = false)]
+		public Embed ();
+		public unowned Clutter.Actor get_stage ();
+	}
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public class Viewport : Clutter.Actor, GtkClutter.Zoomable, GtkClutter.Scrollable, Clutter.Container, Clutter.Scriptable {
+		[CCode (type = "ClutterActor*", has_construct_function = false)]
+		public Viewport (Gtk.Adjustment h_adjust, Gtk.Adjustment v_adjust, Gtk.Adjustment z_adjust);
+		public void get_origin (float x, float y, float z);
+		[NoAccessorMethod]
+		public Clutter.Actor child { owned get; set; }
+		public Clutter.Vertex origin { get; }
+	}
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public interface Scrollable {
+		public abstract void get_adjustments (out unowned Gtk.Adjustment h_adjust, out unowned Gtk.Adjustment v_adjust);
+		public abstract void set_adjustments (Gtk.Adjustment h_adjust, Gtk.Adjustment v_adjust);
+	}
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public interface Zoomable {
+		public abstract unowned Gtk.Adjustment get_adjustment ();
+		public abstract void set_adjustment (Gtk.Adjustment z_adjust);
+	}
+	[CCode (cprefix = "CLUTTER_INIT_ERROR_", has_type_id = "0", cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public enum ClutterGtkInitError {
+		LAST,
+		GTK
+	}
+	[CCode (cprefix = "CLUTTER_GTK_TEXTURE_", has_type_id = "0", cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public enum ClutterGtkTextureError {
+		INVALID_STOCK_ID,
+		ERROR_LAST
+	}
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_base_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_bg_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_dark_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_fg_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_light_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_mid_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_text_aa_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static void get_text_color (Gtk.Widget widget, Gtk.StateType state, out Clutter.Color color);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static Clutter.InitError init ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static Clutter.InitError init_with_args (int argc, out unowned string argv, string parameter_string, GLib.OptionEntry entries, string translation_domain) throws GLib.Error;
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static GLib.Quark texture_error_quark ();
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static unowned Clutter.Actor texture_new_from_icon_name (Gtk.Widget widget, string icon_name, Gtk.IconSize size);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	public static unowned Clutter.Actor texture_new_from_pixbuf (Gdk.Pixbuf pixbuf);
+	[CCode (cheader_filename = "clutter-gtk/clutter-gtk.h")]
+	pub