]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Write type_id attribute for GBoxed compact classes
authorJürg Billeter <j@bitron.ch>
Mon, 2 Feb 2009 22:31:02 +0000 (22:31 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 2 Feb 2009 22:31:02 +0000 (22:31 +0000)
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

ChangeLog
vala/valacodewriter.vala
vapi/gdk-2.0.vapi
vapi/gtk+-2.0.vapi
vapi/pango.vapi

index abf1698f53851e1184fd6e02befde323c58e980d..01045d22be13e1c820e6d97b9939a20fa34f42c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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:
index 9e82047edd0fad137bb6bf9bc5551931aa9f8841..0023fad7db4b39018b46a63b6fee5b95d0a1aaf8 100644 (file)
@@ -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 ()));
index a011ce6ecd952205bb4db2d2b6817a2934bfc838..5b45aac0334e3fafdd2e50008ed13278681b7d00 100644 (file)
@@ -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;
index 785e53d082e97cee64cf8e94d5296d7944d62514..bcf07039097715d7823bf168787ffaca62388ec6 100644 (file)
@@ -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);
index 95874e120879bca595c82f1d1cd7d1f7018411e1..24be8bb294ef14288b8d5a9ecdaaef5dca9c99ac 100644 (file)
@@ -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 ();