fix array fields of Gtk.Style, fixes bug 463959 add g_get_user_data_dir
authorJuerg Billeter <j@bitron.ch>
Fri, 24 Aug 2007 14:14:50 +0000 (14:14 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Fri, 24 Aug 2007 14:14:50 +0000 (14:14 +0000)
2007-08-24  Juerg Billeter  <j@bitron.ch>

* vapigen/valagidlparser.vala, vapi/gtk+-2.0.vala,
  vapi/packages/gtk+-2.0/gtk+-2.0.metadata: fix array fields of
  Gtk.Style, fixes bug 463959
* vapi/glib-2.0.vala: add g_get_user_data_dir

svn path=/trunk/; revision=500

ChangeLog
vapi/glib-2.0.vala
vapi/gtk+-2.0.vala
vapi/packages/gtk+-2.0/gtk+-2.0.metadata
vapigen/valagidlparser.vala

index 49939fd..8600259 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2007-08-24  Jürg Billeter  <j@bitron.ch>
 
+       * vapigen/valagidlparser.vala, vapi/gtk+-2.0.vala,
+         vapi/packages/gtk+-2.0/gtk+-2.0.metadata: fix array fields of
+         Gtk.Style, fixes bug 463959
+       * vapi/glib-2.0.vala: add g_get_user_data_dir
+
+2007-08-24  Jürg Billeter  <j@bitron.ch>
+
        * vapigen/valagidlparser.vala: recognize unsigned and unsigned-int types
        * vapi/Makefile.am, vapi/libwnck-1.0.vala, vapi/packages/libwnck-1.0/:
          add libwnck bindings
index 995e578..a32b848 100644 (file)
@@ -1336,6 +1336,8 @@ namespace GLib {
                public static bool set_variable (string! variable, string! value, bool overwrite);
                [CCode (cname = "g_get_user_name")]
                public static weak string get_user_name ();
+               [CCode (cname = "g_get_user_data_dir")]
+               public static weak string get_user_data_dir ();
                [CCode (cname = "g_get_host_name")]
                public static weak string! get_host_name ();
                [CCode (cname = "g_get_home_dir")]
index 0bb640f..0d4a006 100644 (file)
@@ -3641,30 +3641,30 @@ namespace Gtk {
        }
        [CCode (cheader_filename = "gtk/gtk.h")]
        public class Style : GLib.Object {
-               public Gdk.Color fg;
-               public Gdk.Color bg;
-               public Gdk.Color light;
-               public Gdk.Color dark;
-               public Gdk.Color mid;
-               public Gdk.Color text;
-               public Gdk.Color @base;
-               public Gdk.Color text_aa;
+               public Gdk.Color[] fg;
+               public Gdk.Color[] bg;
+               public Gdk.Color[] light;
+               public Gdk.Color[] dark;
+               public Gdk.Color[] mid;
+               public Gdk.Color[] text;
+               public Gdk.Color[] @base;
+               public Gdk.Color[] text_aa;
                public Gdk.Color black;
                public Gdk.Color white;
                public weak Pango.FontDescription font_desc;
                public int xthickness;
                public int ythickness;
-               public weak Gdk.GC fg_gc;
-               public weak Gdk.GC bg_gc;
-               public weak Gdk.GC light_gc;
-               public weak Gdk.GC dark_gc;
-               public weak Gdk.GC mid_gc;
-               public weak Gdk.GC text_gc;
-               public weak Gdk.GC base_gc;
-               public weak Gdk.GC text_aa_gc;
+               public Gdk.GC[] fg_gc;
+               public Gdk.GC[] bg_gc;
+               public Gdk.GC[] light_gc;
+               public Gdk.GC[] dark_gc;
+               public Gdk.GC[] mid_gc;
+               public Gdk.GC[] text_gc;
+               public Gdk.GC[] base_gc;
+               public Gdk.GC[] text_aa_gc;
                public weak Gdk.GC black_gc;
                public weak Gdk.GC white_gc;
-               public weak Gdk.Pixmap bg_pixmap;
+               public Gdk.Pixmap[] bg_pixmap;
                public void apply_default_background (Gdk.Window window, bool set_bg, Gtk.StateType state_type, out Gdk.Rectangle area, int x, int y, int width, int height);
                public weak Gtk.Style attach (Gdk.Window window);
                public virtual weak Gtk.Style copy ();
index 020687d..710fff2 100644 (file)
@@ -49,6 +49,23 @@ gtk_quit_add_full hidden="1"
 GtkRadioActionEntry is_value_type="1"
 GtkRequisition is_value_type="1"
 gtk_show_about_dialog ellipsis="1"
+GtkStyle.fg weak="0" is_array="1"
+GtkStyle.bg weak="0" is_array="1"
+GtkStyle.light weak="0" is_array="1"
+GtkStyle.dark weak="0" is_array="1"
+GtkStyle.mid weak="0" is_array="1"
+GtkStyle.text weak="0" is_array="1"
+GtkStyle.base weak="0" is_array="1"
+GtkStyle.text_aa weak="0" is_array="1"
+GtkStyle.fg_gc weak="0" is_array="1"
+GtkStyle.bg_gc weak="0" is_array="1"
+GtkStyle.light_gc weak="0" is_array="1"
+GtkStyle.dark_gc weak="0" is_array="1"
+GtkStyle.mid_gc weak="0" is_array="1"
+GtkStyle.text_gc weak="0" is_array="1"
+GtkStyle.base_gc weak="0" is_array="1"
+GtkStyle.text_aa_gc weak="0" is_array="1"
+GtkStyle.bg_pixmap weak="0" is_array="1"
 GtkTextBuffer::apply_tag has_emitter="1"
 GtkTextBuffer::begin_user_action has_emitter="1"
 GtkTextBuffer::end_user_action has_emitter="1"
index 1253bc5..d87940b 100644 (file)
@@ -1017,6 +1017,14 @@ public class Vala.GIdlParser : CodeVisitor {
                                        if (eval (nv[1]) == "1") {
                                                return null;
                                        }
+                               } else if (nv[0] == "is_array") {
+                                       if (eval (nv[1]) == "1") {
+                                               type.array_rank = 1;
+                                       }
+                               } else if (nv[0] == "weak") {
+                                       if (eval (nv[1]) == "0") {
+                                               type.takes_ownership = true;
+                                       }
                                }
                        }
                }