From: Juerg Billeter Date: Fri, 24 Aug 2007 14:14:50 +0000 (+0000) Subject: fix array fields of Gtk.Style, fixes bug 463959 add g_get_user_data_dir X-Git-Tag: VALA_0_1_3~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd26d2c640c6472d9d9e101b7ee8b02c38467e1a;p=platform%2Fupstream%2Fvala.git fix array fields of Gtk.Style, fixes bug 463959 add g_get_user_data_dir 2007-08-24 Juerg Billeter * 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 --- diff --git a/ChangeLog b/ChangeLog index 49939fd..8600259 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-08-24 Jürg Billeter + * 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 + * 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 diff --git a/vapi/glib-2.0.vala b/vapi/glib-2.0.vala index 995e578..a32b848 100644 --- a/vapi/glib-2.0.vala +++ b/vapi/glib-2.0.vala @@ -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")] diff --git a/vapi/gtk+-2.0.vala b/vapi/gtk+-2.0.vala index 0bb640f..0d4a006 100644 --- a/vapi/gtk+-2.0.vala +++ b/vapi/gtk+-2.0.vala @@ -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 (); diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata index 020687d..710fff2 100644 --- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata +++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata @@ -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" diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 1253bc5..d87940b 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -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; + } } } }