diff options
author | Jürg Billeter <j@bitron.ch> | 2009-02-02 22:31:02 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2009-02-02 22:31:02 +0000 |
commit | 07843abb19f198d9c518b60ea45a2d773dba17eb (patch) | |
tree | de6cdbe90d6531440e1a762ab0dcfa76f65efe47 | |
parent | d652b521983eb05d633391c0fccc75cb256d922d (diff) | |
download | vala-07843abb19f198d9c518b60ea45a2d773dba17eb.tar.gz |
Write type_id attribute for GBoxed compact classes
2009-02-02 Jürg Billeter <j@bitron.ch>
* vala/valacodewriter.vala:
Write type_id attribute for GBoxed compact classes
* vapi/gdk-2.0.vapi:
* vapi/gtk+-2.0.vapi:
* vapi/pango.vapi:
Regenerated
svn path=/trunk/; revision=2417
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | vala/valacodewriter.vala | 4 | ||||
-rw-r--r-- | vapi/gdk-2.0.vapi | 4 | ||||
-rw-r--r-- | vapi/gtk+-2.0.vapi | 20 | ||||
-rw-r--r-- | vapi/pango.vapi | 18 |
5 files changed, 37 insertions, 21 deletions
@@ -1,5 +1,17 @@ 2009-02-02 Jürg Billeter <j@bitron.ch> + * vala/valacodewriter.vala: + + Write type_id attribute for GBoxed compact classes + + * vapi/gdk-2.0.vapi: + * vapi/gtk+-2.0.vapi: + * vapi/pango.vapi: + + Regenerated + +2009-02-02 Jürg Billeter <j@bitron.ch> + * vala/valathrowstatement.vala: Fix crash on invalid error expressions diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala index 9e82047ed..0023fad7d 100644 --- a/vala/valacodewriter.vala +++ b/vala/valacodewriter.vala @@ -159,6 +159,10 @@ public class Vala.CodeWriter : CodeVisitor { write_string ("type_check_function = \"%s\", ".printf (cl.type_check_function )); } + if (cl.is_compact && cl.get_type_id () != "G_TYPE_POINTER") { + write_string ("type_id = \"%s\", ".printf (cl.get_type_id ())); + } + if (cl.get_param_spec_function () != null && (cl.base_class == null || cl.get_param_spec_function () != cl.base_class.get_param_spec_function ())) { write_string ("param_spec_function = \"%s\", ".printf (cl.get_param_spec_function ())); diff --git a/vapi/gdk-2.0.vapi b/vapi/gdk-2.0.vapi index a011ce6ec..5b45aac03 100644 --- a/vapi/gdk-2.0.vapi +++ b/vapi/gdk-2.0.vapi @@ -36,7 +36,7 @@ namespace Gdk { public void query_color (ulong pixel, out Gdk.Color _result); } [Compact] - [CCode (ref_function = "gdk_cursor_ref", unref_function = "gdk_cursor_unref", cheader_filename = "gdk/gdk.h")] + [CCode (ref_function = "gdk_cursor_ref", unref_function = "gdk_cursor_unref", type_id = "GDK_TYPE_CURSOR", cheader_filename = "gdk/gdk.h")] public class Cursor { public uint ref_count; public Gdk.CursorType type; @@ -215,7 +215,7 @@ namespace Gdk { public virtual void set_colormap (Gdk.Colormap colormap); } [Compact] - [CCode (ref_function = "gdk_font_ref", unref_function = "gdk_font_unref", cheader_filename = "gdk/gdk.h")] + [CCode (ref_function = "gdk_font_ref", unref_function = "gdk_font_unref", type_id = "GDK_TYPE_FONT", cheader_filename = "gdk/gdk.h")] public class Font { public int ascent; public int descent; diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi index 785e53d08..bcf070390 100644 --- a/vapi/gtk+-2.0.vapi +++ b/vapi/gtk+-2.0.vapi @@ -1603,7 +1603,7 @@ namespace Gtk { public void remove_default (); } [Compact] - [CCode (copy_function = "gtk_icon_info_copy", cheader_filename = "gtk/gtk.h")] + [CCode (copy_function = "gtk_icon_info_copy", type_id = "GTK_TYPE_ICON_INFO", cheader_filename = "gtk/gtk.h")] public class IconInfo { public unowned Gtk.IconInfo copy (); [CCode (has_construct_function = false)] @@ -1618,7 +1618,7 @@ namespace Gtk { public void set_raw_coordinates (bool raw_coordinates); } [Compact] - [CCode (ref_function = "gtk_icon_set_ref", unref_function = "gtk_icon_set_unref", cheader_filename = "gtk/gtk.h")] + [CCode (ref_function = "gtk_icon_set_ref", unref_function = "gtk_icon_set_unref", type_id = "GTK_TYPE_ICON_SET", cheader_filename = "gtk/gtk.h")] public class IconSet { public void add_source (Gtk.IconSource source); public unowned Gtk.IconSet copy (); @@ -1630,7 +1630,7 @@ namespace Gtk { public unowned Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail); } [Compact] - [CCode (copy_function = "gtk_icon_source_copy", cheader_filename = "gtk/gtk.h")] + [CCode (copy_function = "gtk_icon_source_copy", type_id = "GTK_TYPE_ICON_SOURCE", cheader_filename = "gtk/gtk.h")] public class IconSource { public unowned Gtk.IconSource copy (); public Gtk.TextDirection get_direction (); @@ -2488,7 +2488,7 @@ namespace Gtk { public virtual signal bool toggle_handle_focus (); } [Compact] - [CCode (copy_function = "gtk_paper_size_copy", cheader_filename = "gtk/gtk.h")] + [CCode (copy_function = "gtk_paper_size_copy", type_id = "GTK_TYPE_PAPER_SIZE", cheader_filename = "gtk/gtk.h")] public class PaperSize { public unowned Gtk.PaperSize copy (); [CCode (has_construct_function = false)] @@ -2967,7 +2967,7 @@ namespace Gtk { public weak string uri; } [Compact] - [CCode (ref_function = "gtk_recent_info_ref", unref_function = "gtk_recent_info_unref", cheader_filename = "gtk/gtk.h")] + [CCode (ref_function = "gtk_recent_info_ref", unref_function = "gtk_recent_info_unref", type_id = "GTK_TYPE_RECENT_INFO", cheader_filename = "gtk/gtk.h")] public class RecentInfo { public bool exists (); public ulong get_added (); @@ -3125,7 +3125,7 @@ namespace Gtk { public virtual signal bool scroll_child (Gtk.ScrollType scroll, bool horizontal); } [Compact] - [CCode (copy_function = "gtk_selection_data_copy", cheader_filename = "gtk/gtk.h")] + [CCode (copy_function = "gtk_selection_data_copy", type_id = "GTK_TYPE_SELECTION_DATA", cheader_filename = "gtk/gtk.h")] public class SelectionData { [CCode (array_length = false)] public weak uchar[] data; @@ -3624,7 +3624,7 @@ namespace Gtk { public uint16 spacing; } [Compact] - [CCode (ref_function = "gtk_target_list_ref", unref_function = "gtk_target_list_unref", cheader_filename = "gtk/gtk.h")] + [CCode (ref_function = "gtk_target_list_ref", unref_function = "gtk_target_list_unref", type_id = "GTK_TYPE_TARGET_LIST", cheader_filename = "gtk/gtk.h")] public class TargetList { public weak GLib.List list; public uint ref_count; @@ -3672,7 +3672,7 @@ namespace Gtk { public uint underline; } [Compact] - [CCode (ref_function = "gtk_text_attributes_ref", unref_function = "gtk_text_attributes_unref", cheader_filename = "gtk/gtk.h")] + [CCode (ref_function = "gtk_text_attributes_ref", unref_function = "gtk_text_attributes_unref", type_id = "GTK_TYPE_TEXT_ATTRIBUTES", cheader_filename = "gtk/gtk.h")] public class TextAttributes { public weak Gtk.TextAppearance appearance; public uint bg_full_height; @@ -4343,7 +4343,7 @@ namespace Gtk { } [Compact] [Immutable] - [CCode (copy_function = "gtk_tree_path_copy", cheader_filename = "gtk/gtk.h")] + [CCode (copy_function = "gtk_tree_path_copy", type_id = "GTK_TYPE_TREE_PATH", cheader_filename = "gtk/gtk.h")] public class TreePath { public void append_index (int index_); public int compare (Gtk.TreePath b); @@ -4369,7 +4369,7 @@ namespace Gtk { public bool up (); } [Compact] - [CCode (copy_function = "gtk_tree_row_reference_copy", cheader_filename = "gtk/gtk.h")] + [CCode (copy_function = "gtk_tree_row_reference_copy", type_id = "GTK_TYPE_TREE_ROW_REFERENCE", cheader_filename = "gtk/gtk.h")] public class TreeRowReference { public unowned Gtk.TreeRowReference copy (); public static void deleted (GLib.Object proxy, Gtk.TreePath path); diff --git a/vapi/pango.vapi b/vapi/pango.vapi index 95874e120..24be8bb29 100644 --- a/vapi/pango.vapi +++ b/vapi/pango.vapi @@ -68,7 +68,7 @@ namespace Pango { public AttrLanguage (Pango.Language language); } [Compact] - [CCode (ref_function = "pango_attr_list_ref", unref_function = "pango_attr_list_unref", cheader_filename = "pango/pango.h")] + [CCode (ref_function = "pango_attr_list_ref", unref_function = "pango_attr_list_unref", type_id = "PANGO_TYPE_ATTR_LIST", cheader_filename = "pango/pango.h")] public class AttrList { public void change (Pango.Attribute attr); public unowned Pango.AttrList copy (); @@ -176,7 +176,7 @@ namespace Pango { public unowned Pango.FontMetrics get_metrics (Pango.Language language); } [Compact] - [CCode (copy_function = "pango_font_description_copy", cheader_filename = "pango/pango.h")] + [CCode (copy_function = "pango_font_description_copy", type_id = "PANGO_TYPE_FONT_DESCRIPTION", cheader_filename = "pango/pango.h")] public class FontDescription { public bool better_match (Pango.FontDescription old_match, Pango.FontDescription new_match); public unowned Pango.FontDescription copy (); @@ -230,7 +230,7 @@ namespace Pango { public unowned Pango.Fontset load_fontset (Pango.Context context, Pango.FontDescription desc, Pango.Language language); } [Compact] - [CCode (ref_function = "pango_font_metrics_ref", unref_function = "pango_font_metrics_unref", cheader_filename = "pango/pango.h")] + [CCode (ref_function = "pango_font_metrics_ref", unref_function = "pango_font_metrics_unref", type_id = "PANGO_TYPE_FONT_METRICS", cheader_filename = "pango/pango.h")] public class FontMetrics { public int get_approximate_char_width (); public int get_approximate_digit_width (); @@ -266,7 +266,7 @@ namespace Pango { public weak Pango.Glyph glyph; } [Compact] - [CCode (copy_function = "pango_glyph_item_copy", cheader_filename = "pango/pango.h")] + [CCode (copy_function = "pango_glyph_item_copy", type_id = "PANGO_TYPE_GLYPH_ITEM", cheader_filename = "pango/pango.h")] public class GlyphItem { public weak Pango.GlyphString glyphs; public weak Pango.Item item; @@ -276,7 +276,7 @@ namespace Pango { public unowned Pango.GlyphItem split (string text, int split_index); } [Compact] - [CCode (copy_function = "pango_glyph_string_copy", cheader_filename = "pango/pango.h")] + [CCode (copy_function = "pango_glyph_string_copy", type_id = "PANGO_TYPE_GLYPH_STRING", cheader_filename = "pango/pango.h")] public class GlyphString { public weak Pango.GlyphInfo glyphs; public int log_clusters; @@ -303,7 +303,7 @@ namespace Pango { public uint is_cluster_start; } [Compact] - [CCode (copy_function = "pango_item_copy", cheader_filename = "pango/pango.h")] + [CCode (copy_function = "pango_item_copy", type_id = "PANGO_TYPE_ITEM", cheader_filename = "pango/pango.h")] public class Item { public weak Pango.Analysis analysis; public int length; @@ -386,7 +386,7 @@ namespace Pango { public class LayoutClass { } [Compact] - [CCode (copy_function = "pango_layout_iter_copy", cheader_filename = "pango/pango.h")] + [CCode (copy_function = "pango_layout_iter_copy", type_id = "PANGO_TYPE_LAYOUT_ITER", cheader_filename = "pango/pango.h")] public class LayoutIter { public bool at_last_line (); public unowned Pango.LayoutIter copy (); @@ -409,7 +409,7 @@ namespace Pango { public bool next_run (); } [Compact] - [CCode (ref_function = "pango_layout_line_ref", unref_function = "pango_layout_line_unref", cheader_filename = "pango/pango.h")] + [CCode (ref_function = "pango_layout_line_ref", unref_function = "pango_layout_line_unref", type_id = "PANGO_TYPE_LAYOUT_LINE", cheader_filename = "pango/pango.h")] public class LayoutLine { public uint is_paragraph_start; public weak Pango.Layout layout; @@ -467,7 +467,7 @@ namespace Pango { public bool next (); } [Compact] - [CCode (copy_function = "pango_tab_array_copy", cheader_filename = "pango/pango.h")] + [CCode (copy_function = "pango_tab_array_copy", type_id = "PANGO_TYPE_TAB_ARRAY", cheader_filename = "pango/pango.h")] public class TabArray { public unowned Pango.TabArray copy (); public bool get_positions_in_pixels (); |