vala r2417 - in trunk: . vala vapi



Author: juergbi
Date: Mon Feb  2 22:31:02 2009
New Revision: 2417
URL: http://svn.gnome.org/viewvc/vala?rev=2417&view=rev

Log:
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


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

Modified: trunk/vala/valacodewriter.vala
==============================================================================
--- trunk/vala/valacodewriter.vala	(original)
+++ trunk/vala/valacodewriter.vala	Mon Feb  2 22:31:02 2009
@@ -159,6 +159,10 @@
 			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 ()));

Modified: trunk/vapi/gdk-2.0.vapi
==============================================================================
--- trunk/vapi/gdk-2.0.vapi	(original)
+++ trunk/vapi/gdk-2.0.vapi	Mon Feb  2 22:31:02 2009
@@ -36,7 +36,7 @@
 		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 @@
 		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;

Modified: trunk/vapi/gtk+-2.0.vapi
==============================================================================
--- trunk/vapi/gtk+-2.0.vapi	(original)
+++ trunk/vapi/gtk+-2.0.vapi	Mon Feb  2 22:31:02 2009
@@ -1603,7 +1603,7 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 	}
 	[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 @@
 		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);

Modified: trunk/vapi/pango.vapi
==============================================================================
--- trunk/vapi/pango.vapi	(original)
+++ trunk/vapi/pango.vapi	Mon Feb  2 22:31:02 2009
@@ -68,7 +68,7 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 	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 @@
 		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 @@
 		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 ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]