+2007-08-31 Jürg Billeter <j@bitron.ch>
+
+ * vala/valaclass.vala, vala/valastruct.vala: use G_TYPE_POINTER for
+ not registered classes, add has_type_id attribute
+
+ * vapigen/valagidlparser.vala: use GLib.Boxed as base type of boxed
+ types
+
+ * vapi/glib-2.0.vala: use has_type_id attribute and GLib.Boxed
+
+ * vapi/gconf-2.0.vala, vapi/gdk-2.0.vala, vapi/gnome-desktop-2.0.vala,
+ vapi/gnome-vfs-2.0.vala, vapi/gstreamer-0.10.vala, vapi/gtk+-2.0.vala,
+ vapi/libglade-2.0.vala, vapi/libgnome-2.0.vala, vapi/libsoup-2.2.vala,
+ vapi/pango.vala, vapi/poppler-glib.vala: regenerated
+
2007-08-30 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* vapi/packages/gtksourceview-2.0/gtksourceview-2.0.metadata:
private string const_cname;
private string lower_case_cprefix;
private string lower_case_csuffix;
+ private bool has_type_id;
private string type_id;
private string ref_function;
private string unref_function;
if (a.has_argument ("free_function")) {
set_free_function (a.get_string ("free_function"));
}
+ if (a.has_argument ("has_type_id")) {
+ has_type_id = a.get_bool ("has_type_id");
+ }
if (a.has_argument ("type_id")) {
type_id = a.get_string ("type_id");
}
}
}
+ private bool get_has_type_id () {
+ return has_type_id || (base_class != null && base_class.get_has_type_id ());
+ }
+
public override string get_type_id () {
if (type_id == null) {
- type_id = get_upper_case_cname ("TYPE_");
+ if (get_has_type_id ()) {
+ type_id = get_upper_case_cname ("TYPE_");
+ } else {
+ type_id = "G_TYPE_POINTER";
+ }
}
return type_id;
public override string get_type_id () {
if (type_id == null) {
- if (is_reference_type ()) {
- type_id = "G_TYPE_POINTER";
- } else {
- Report.error (source_reference, "The type `%s` doesn't declare a type id".printf (get_full_name ()));
- }
+ Report.error (source_reference, "The type `%s` doesn't declare a type id".printf (get_full_name ()));
}
return type_id;
}
public ulong vtable_size;
}
[CCode (ref_function = "gconf_change_set_ref", unref_function = "gconf_change_set_unref", cheader_filename = "gconf/gconf.h")]
- public class ChangeSet {
+ public class ChangeSet : GLib.Boxed {
public bool check_value (string key, GConf.Value value_retloc);
public void clear ();
public void @foreach (GConf.ChangeSetForeachFunc func, pointer user_data);
public void set_mod_user (string mod_user);
public void set_schema (string schema_name);
}
- [CCode (cheader_filename = "gconf/gconf.h")]
+ [CCode (copy_function = "gconf_schema_copy", cheader_filename = "gconf/gconf.h")]
public class Schema {
public weak GConf.Schema copy ();
public GConf.ValueType get_car_type ();
public weak GConf.Sources modified_sources;
public weak string key;
}
- [CCode (cheader_filename = "gconf/gconf.h")]
+ [CCode (copy_function = "gconf_value_copy", cheader_filename = "gconf/gconf.h")]
public class Value {
public GConf.ValueType type;
public int compare (GConf.Value value_b);
public static weak Gdk.Bitmap create_from_data (Gdk.Drawable drawable, string data, int width, int height);
}
[CCode (ref_function = "gdk_cursor_ref", unref_function = "gdk_cursor_unref", cheader_filename = "gdk/gdk.h")]
- public class Cursor {
+ public class Cursor : GLib.Boxed {
public Gdk.CursorType type;
public weak Gdk.Display get_display ();
public weak Gdk.Pixbuf get_image ();
public Gdk.WindowState new_window_state;
}
[CCode (ref_function = "gdk_font_ref", unref_function = "gdk_font_unref", cheader_filename = "gdk/gdk.h")]
- public class Font {
+ public class Font : GLib.Boxed {
public Gdk.FontType type;
public int ascent;
public int descent;
[CCode (cheader_filename = "gdk/gdk.h")]
public class PointerHooks {
}
- [CCode (cheader_filename = "gdk/gdk.h")]
+ [CCode (copy_function = "gdk_region_copy", free_function = "gdk_region_destroy", cheader_filename = "gdk/gdk.h")]
public class Region {
public long size;
public long numRects;
public weak Gdk.RegionBox rects;
public weak Gdk.RegionBox extents;
public weak Gdk.Region copy ();
- public void destroy ();
public bool empty ();
public bool equal (Gdk.Region region2);
public void get_clipbox (out Gdk.Rectangle rectangle);
public static int trap_pop ();
public static void trap_push ();
}
- [CCode (cheader_filename = "gdk/gdk.h")]
+ [CCode (copy_function = "gdk_event_copy", cheader_filename = "gdk/gdk.h")]
public class Event {
public weak Gdk.Event copy ();
public static weak Gdk.Event get ();
}
+ [CCode (has_type_id = true)]
public class TypeInstance {
}
public class InitiallyUnowned : Object {
}
- public /* static */ interface Boxed<G> {
- public abstract G copy ();
- public abstract void free ();
+ [CCode (cname = "gpointer", has_type_id = true, type_id = "G_TYPE_BOXED", marshaller_type_name = "BOXED", get_value_function = "g_value_get_boxed", set_value_function = "g_value_set_boxed")]
+ public abstract class Boxed {
}
[CCode (free_function = "g_free", type_id = "G_TYPE_VALUE")]
public static delegate void Callback ();
- [CCode (type_id = "G_TYPE_CLOSURE")]
- public class Closure {
+ public class Closure : Boxed {
}
public static delegate void ClosureNotify (pointer data, Closure closure);
/* IO Channels */
- [CCode (ref_function = "g_io_channel_ref", unref_function = "g_io_channel_unref", type_id = "G_TYPE_IO_CHANNEL")]
- public class IOChannel {
+ [CCode (ref_function = "g_io_channel_ref", unref_function = "g_io_channel_unref")]
+ public class IOChannel : Boxed {
public IOChannel.file (string! filename, string! mode) throws FileError;
[CCode (cname = "g_io_channel_unix_new")]
public IOChannel.unix_new (int fd);
public bool valid ();
}
- [CCode (free_function = "g_date_free", type_id = "G_TYPE_DATE")]
- public class Date {
+ [CCode (free_function = "g_date_free")]
+ public class Date : Boxed {
public Date ();
public Date.dmy (DateDay day, DateMonth month, DateYear year);
public Date.julian (uint julian_day);
NEWLINE_ANY
}
- [CCode (ref_function = "g_regex_ref", unref_function = "g_regex_unref", type_id = "G_TYPE_REGEX")]
- public class Regex {
+ [CCode (ref_function = "g_regex_ref", unref_function = "g_regex_unref")]
+ public class Regex : Boxed {
public Regex (string! pattern, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0) throws RegexError;
public string! get_pattern ();
public int get_max_backref ();
/* Hash Tables */
- [CCode (ref_function = "g_hash_table_ref", unref_function = "g_hash_table_unref", type_id = "G_TYPE_HASH_TABLE")]
- public class HashTable<K,V> {
+ [CCode (ref_function = "g_hash_table_ref", unref_function = "g_hash_table_unref")]
+ public class HashTable<K,V> : Boxed {
public HashTable (HashFunc hash_func, EqualFunc key_equal_func);
public HashTable.full (HashFunc hash_func, EqualFunc key_equal_func, DestroyNotify key_destroy_func, DestroyNotify value_destroy_func);
public void insert (K# key, V# value);
/* Strings */
[CCode (free_function = "g_string_free", type_id = "G_TYPE_GSTRING")]
- public class String {
+ public class String : Boxed {
public String (string init = "");
[CCode (cname = "g_string_sized_new")]
public String.sized (ulong dfl_size);
public class Hint : Gtk.Dialog {
}
[CCode (ref_function = "gnome_desktop_item_ref", unref_function = "gnome_desktop_item_unref", cheader_filename = "libgnome/gnome-desktop-item.h")]
- public class DesktopItem {
+ public class DesktopItem : GLib.Boxed {
public bool attr_exists (string attr);
public void clear_localestring (string attr);
public void clear_section (string section);
public signal void drive_disconnected (GnomeVFS.Drive drive);
}
[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
- public class Address {
+ public class Address : GLib.Boxed {
public weak GnomeVFS.Address dup ();
public bool equal (GnomeVFS.Address b);
public int get_family_type ();
[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
public class AsyncHandle {
}
- [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
+ [CCode (free_function = "gnome_vfs_cancellation_destroy", cheader_filename = "libgnomevfs/gnome-vfs.h")]
public class Cancellation {
public void ack ();
public void cancel ();
public bool check ();
- public void destroy ();
public int get_fd ();
public Cancellation ();
}
public class InetConnection {
public GnomeVFS.Result create (string host_name, uint host_port, GnomeVFS.Cancellation cancellation);
public GnomeVFS.Result create_from_address (GnomeVFS.Address address, uint host_port, GnomeVFS.Cancellation cancellation);
- public void destroy (GnomeVFS.Cancellation cancellation);
public weak GnomeVFS.Address get_address ();
public int get_fd ();
public weak string get_ip ();
public weak GLib.List list;
public uint entries_read;
}
- [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
+ [CCode (copy_function = "gnome_vfs_mime_application_copy", cheader_filename = "libgnomevfs/gnome-vfs.h")]
public class MimeApplication {
public weak string id;
public weak string name;
[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
public class ResolveHandle {
}
- [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
+ [CCode (free_function = "gnome_vfs_ssl_destroy", cheader_filename = "libgnomevfs/gnome-vfs.h")]
public class SSL {
public GnomeVFS.Result create (string host, uint port, GnomeVFS.Cancellation cancellation);
public GnomeVFS.Result create_from_fd (int fd, GnomeVFS.Cancellation cancellation);
- public void destroy (GnomeVFS.Cancellation cancellation);
public static bool enabled ();
public GnomeVFS.Result read (pointer buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_read, GnomeVFS.Cancellation cancellation);
public GnomeVFS.Result set_timeout (out GLib.TimeVal timeout, GnomeVFS.Cancellation cancellation);
public GnomeVFS.Result read (pointer buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_read, GnomeVFS.Cancellation cancellation);
public GnomeVFS.Result write (pointer buffer, int bytes, out GnomeVFS.FileSize bytes_written, GnomeVFS.Cancellation cancellation);
}
- [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
+ [CCode (free_function = "gnome_vfs_socket_buffer_destroy", cheader_filename = "libgnomevfs/gnome-vfs.h")]
public class SocketBuffer {
- public GnomeVFS.Result destroy (bool close_socket, GnomeVFS.Cancellation cancellation);
public GnomeVFS.Result flush (GnomeVFS.Cancellation cancellation);
public SocketBuffer (GnomeVFS.Socket socket);
public GnomeVFS.Result peekc (string character, GnomeVFS.Cancellation cancellation);
public class BinaryTypeFindFactory {
}
[CCode (ref_function = "gst_caps_ref", unref_function = "gst_caps_unref", cheader_filename = "gst/gst.h")]
- public class Caps {
+ public class Caps : GLib.Boxed {
public GLib.Type type;
public int refcount;
public Gst.CapsFlags flags;
public Gst.Format format;
public int64 value;
}
- [CCode (cheader_filename = "gst/gst.h")]
- public class IndexEntry {
+ [CCode (copy_function = "gst_index_entry_copy", cheader_filename = "gst/gst.h")]
+ public class IndexEntry : GLib.Boxed {
public bool assoc_map (Gst.Format format, int64 value);
public weak Gst.IndexEntry copy ();
public static GLib.Type get_type ();
public GLib.Quark quark;
}
[CCode (cheader_filename = "gst/gst.h")]
- public class Segment {
+ public class Segment : GLib.Boxed {
public double rate;
public double abs_rate;
public Gst.Format format;
public weak Gst.Caps get_caps ();
public static GLib.Type get_type ();
}
- [CCode (cheader_filename = "gst/gst.h")]
- public class Structure {
+ [CCode (copy_function = "gst_structure_copy", cheader_filename = "gst/gst.h")]
+ public class Structure : GLib.Boxed {
public GLib.Type type;
public weak Gst.Structure copy ();
public static weak Gst.Structure empty_new (string name);
public void set_value (string fieldname, GLib.Value value);
public weak string to_string ();
}
- [CCode (cheader_filename = "gst/gst.h")]
- public class TagList {
+ [CCode (copy_function = "gst_tag_list_copy", cheader_filename = "gst/gst.h")]
+ public class TagList : GLib.Boxed {
public GLib.Type type;
public void add (Gst.TagMergeMode mode, string tag);
public void add_valist (Gst.TagMergeMode mode, string tag, pointer var_args);
public TagList ();
public void remove_tag (string tag);
}
- [CCode (cheader_filename = "gst/gst.h")]
+ [CCode (free_function = "gst_trace_destroy", cheader_filename = "gst/gst.h")]
public class Trace {
- public void destroy ();
public void flush ();
public Trace (string filename, int size);
public static void read_tsc (int64 dst);
public weak string domain_dirname;
public weak string default_locales;
}
- [CCode (cheader_filename = "gtk/gtk.h")]
- public class IconInfo {
+ [CCode (copy_function = "gtk_icon_info_copy", cheader_filename = "gtk/gtk.h")]
+ public class IconInfo : GLib.Boxed {
public weak Gtk.IconInfo copy ();
[NoArrayLength]
public bool get_attach_points (Gdk.Point[] points, int n_points);
public void set_raw_coordinates (bool raw_coordinates);
}
[CCode (ref_function = "gtk_icon_set_ref", unref_function = "gtk_icon_set_unref", cheader_filename = "gtk/gtk.h")]
- public class IconSet {
+ public class IconSet : GLib.Boxed {
public void add_source (Gtk.IconSource source);
public weak Gtk.IconSet copy ();
[NoArrayLength]
public IconSet.from_pixbuf (Gdk.Pixbuf pixbuf);
public weak Gdk.Pixbuf render_icon (Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail);
}
- [CCode (cheader_filename = "gtk/gtk.h")]
- public class IconSource {
+ [CCode (copy_function = "gtk_icon_source_copy", cheader_filename = "gtk/gtk.h")]
+ public class IconSource : GLib.Boxed {
public weak Gtk.IconSource copy ();
public Gtk.TextDirection get_direction ();
public bool get_direction_wildcarded ();
public int start;
public int end;
}
- [CCode (cheader_filename = "gtk/gtk.h")]
- public class PaperSize {
+ [CCode (copy_function = "gtk_paper_size_copy", cheader_filename = "gtk/gtk.h")]
+ public class PaperSize : GLib.Boxed {
public weak Gtk.PaperSize copy ();
public static weak string get_default ();
public double get_default_bottom_margin (Gtk.Unit unit);
public int age;
}
[CCode (ref_function = "gtk_recent_info_ref", unref_function = "gtk_recent_info_unref", cheader_filename = "gtk/gtk.h")]
- public class RecentInfo {
+ public class RecentInfo : GLib.Boxed {
public bool exists ();
public ulong get_added ();
public int get_age ();
public double ruler_scale;
public int subdivide;
}
- [CCode (cheader_filename = "gtk/gtk.h")]
- public class SelectionData {
+ [CCode (copy_function = "gtk_selection_data_copy", cheader_filename = "gtk/gtk.h")]
+ public class SelectionData : GLib.Boxed {
public Gdk.Atom selection;
public Gdk.Atom target;
public Gdk.Atom type;
public weak string origin;
public weak GLib.Value value;
}
- [CCode (cheader_filename = "gtk/gtk.h")]
+ [CCode (copy_function = "gtk_stock_item_copy", cheader_filename = "gtk/gtk.h")]
public class StockItem {
public weak string stock_id;
public weak string label;
public uint info;
}
[CCode (ref_function = "gtk_target_list_ref", unref_function = "gtk_target_list_unref", cheader_filename = "gtk/gtk.h")]
- public class TargetList {
+ public class TargetList : GLib.Boxed {
public weak GLib.List list;
public uint ref_count;
public void add (Gdk.Atom target, uint flags, uint info);
public uint is_text;
}
[CCode (ref_function = "gtk_text_attributes_ref", unref_function = "gtk_text_attributes_unref", cheader_filename = "gtk/gtk.h")]
- public class TextAttributes {
+ public class TextAttributes : GLib.Boxed {
public weak Gtk.TextAppearance appearance;
public Gtk.Justification justification;
public Gtk.TextDirection direction;
[CCode (cheader_filename = "gtk/gtk.h")]
public class ThemeEngine {
}
- [CCode (cheader_filename = "gtk/gtk.h")]
- public class TreePath {
+ [CCode (copy_function = "gtk_tree_path_copy", cheader_filename = "gtk/gtk.h")]
+ public class TreePath : GLib.Boxed {
public void append_index (int index_);
public int compare (Gtk.TreePath b);
public weak Gtk.TreePath copy ();
public weak string to_string ();
public bool up ();
}
- [CCode (cheader_filename = "gtk/gtk.h")]
- public class TreeRowReference {
+ [CCode (copy_function = "gtk_tree_row_reference_copy", cheader_filename = "gtk/gtk.h")]
+ public class TreeRowReference : GLib.Boxed {
public weak Gtk.TreeRowReference copy ();
public static void deleted (GLib.Object proxy, Gtk.TreePath path);
public weak Gtk.TreeModel get_model ();
public weak Glade.WidgetInfo child;
public weak string internal_child;
}
- [CCode (cheader_filename = "glade/glade.h")]
+ [CCode (free_function = "glade_interface_destroy", cheader_filename = "glade/glade.h")]
public class Interface {
public weak string requires;
public uint n_requires;
public uint n_toplevels;
public weak GLib.HashTable names;
public weak GLib.HashTable strings;
- public void destroy ();
public void dump (string filename);
}
[CCode (cheader_filename = "glade/glade.h")]
public weak string espeaker { get; set; }
}
[CCode (cheader_filename = "libgnome/libgnome.h")]
- public class ModuleInfo {
+ public class ModuleInfo : GLib.Boxed {
public weak string name;
public weak string version;
public weak string description;
public uchar @in;
public bool doByteReverse;
}
- [CCode (cheader_filename = "libsoup/soup.h")]
+ [CCode (free_function = "soup_message_queue_destroy", cheader_filename = "libsoup/soup.h")]
public class MessageQueue {
public void append (Soup.Message msg);
- public void destroy ();
public weak Soup.Message first (Soup.MessageQueueIter iter);
public void free_iter (Soup.MessageQueueIter iter);
public MessageQueue ();
public Soup.ServerUnregisterFn unregister;
public pointer user_data;
}
- [CCode (cheader_filename = "libsoup/soup.h")]
+ [CCode (copy_function = "soup_uri_copy", cheader_filename = "libsoup/soup.h")]
public class Uri {
public GLib.Quark protocol;
public weak string user;
WORD_CHAR,
}
[CCode (cheader_filename = "pango/pango.h")]
- public class Language {
+ public class Language : GLib.Boxed {
public weak string! to_string ();
public static weak Pango.Language from_string (string language);
public static weak Pango.Language get_default ();
public weak Pango.Attribute attr;
public int value;
}
- [CCode (cheader_filename = "pango/pango.h")]
+ [CCode (copy_function = "pango_attr_iterator_copy", free_function = "pango_attr_iterator_destroy", cheader_filename = "pango/pango.h")]
public class AttrIterator {
public weak Pango.AttrIterator copy ();
- public void destroy ();
public weak Pango.Attribute get (Pango.AttrType type);
public weak GLib.SList get_attrs ();
public void get_font (Pango.FontDescription desc, Pango.Language language, GLib.SList extra_attrs);
public AttrLanguage (Pango.Language language);
}
[CCode (ref_function = "pango_attr_list_ref", unref_function = "pango_attr_list_unref", cheader_filename = "pango/pango.h")]
- public class AttrList {
+ public class AttrList : GLib.Boxed {
public void change (Pango.Attribute attr);
public weak Pango.AttrList copy ();
public weak Pango.AttrList filter (Pango.AttrFilterFunc func, pointer data);
public weak Pango.Attribute attr;
public weak string value;
}
- [CCode (cheader_filename = "pango/pango.h")]
+ [CCode (copy_function = "pango_attribute_copy", free_function = "pango_attribute_destroy", cheader_filename = "pango/pango.h")]
public class Attribute {
public pointer klass;
public uint start_index;
public uint end_index;
public weak Pango.Attribute copy ();
- public void destroy ();
public bool equal (Pango.Attribute attr2);
}
[CCode (ref_function = "pango_coverage_ref", unref_function = "pango_coverage_unref", cheader_filename = "pango/pango.h")]
[CCode (cheader_filename = "pango/pango.h")]
public class EngineShape {
}
- [CCode (cheader_filename = "pango/pango.h")]
- public class FontDescription {
+ [CCode (copy_function = "pango_font_description_copy", cheader_filename = "pango/pango.h")]
+ public class FontDescription : GLib.Boxed {
public bool better_match (Pango.FontDescription old_match, Pango.FontDescription new_match);
public weak Pango.FontDescription copy ();
public weak Pango.FontDescription copy_static ();
public void unset_fields (Pango.FontMask to_unset);
}
[CCode (ref_function = "pango_font_metrics_ref", unref_function = "pango_font_metrics_unref", cheader_filename = "pango/pango.h")]
- public class FontMetrics {
+ public class FontMetrics : GLib.Boxed {
public int get_approximate_char_width ();
public int get_approximate_digit_width ();
public int get_ascent ();
public void letter_space (string text, Pango.LogAttr log_attrs, int letter_spacing);
public weak Pango.GlyphItem split (string text, int split_index);
}
- [CCode (cheader_filename = "pango/pango.h")]
- public class GlyphString {
+ [CCode (copy_function = "pango_glyph_string_copy", cheader_filename = "pango/pango.h")]
+ public class GlyphString : GLib.Boxed {
public int num_glyphs;
public weak Pango.GlyphInfo glyphs;
public int log_clusters;
public class GlyphVisAttr {
public uint is_cluster_start;
}
- [CCode (cheader_filename = "pango/pango.h")]
- public class Item {
+ [CCode (copy_function = "pango_item_copy", cheader_filename = "pango/pango.h")]
+ public class Item : GLib.Boxed {
public int offset;
public int length;
public int num_chars;
public weak Pango.Item split (int split_index, int split_offset);
}
[CCode (cheader_filename = "pango/pango.h")]
- public class LayoutIter {
+ public class LayoutIter : GLib.Boxed {
public bool at_last_line ();
public int get_baseline ();
public void get_char_extents (out Pango.Rectangle logical_rect);
public bool next_run ();
}
[CCode (ref_function = "pango_layout_line_ref", unref_function = "pango_layout_line_unref", cheader_filename = "pango/pango.h")]
- public class LayoutLine {
+ public class LayoutLine : GLib.Boxed {
public weak Pango.Layout layout;
public int start_index;
public int length;
public ScriptIter (string text, int length);
public bool next ();
}
- [CCode (cheader_filename = "pango/pango.h")]
- public class TabArray {
+ [CCode (copy_function = "pango_tab_array_copy", cheader_filename = "pango/pango.h")]
+ public class TabArray : GLib.Boxed {
public weak Pango.TabArray copy ();
public bool get_positions_in_pixels ();
public int get_size ();
public weak string title;
public weak string uri;
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_dest_copy", cheader_filename = "poppler.h")]
public class Dest {
public Poppler.DestType type;
public int page_num;
public weak Poppler.Dest copy ();
public static GLib.Type get_type ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_fonts_iter_copy", cheader_filename = "poppler.h")]
public class FontsIter {
public weak Poppler.FontsIter copy ();
public weak string get_file_name ();
public bool is_subset ();
public bool next ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_form_field_mapping_copy", cheader_filename = "poppler.h")]
public class FormFieldMapping {
public weak Poppler.Rectangle area;
public weak Poppler.FormField field;
public static GLib.Type get_type ();
public FormFieldMapping ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_image_mapping_copy", cheader_filename = "poppler.h")]
public class ImageMapping {
public weak Poppler.Rectangle area;
public weak Gdk.Pixbuf image;
public static GLib.Type get_type ();
public ImageMapping ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_index_iter_copy", cheader_filename = "poppler.h")]
public class IndexIter {
public weak Poppler.IndexIter copy ();
public weak Poppler.Action get_action ();
public IndexIter (Poppler.Document document);
public bool next ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_link_mapping_copy", cheader_filename = "poppler.h")]
public class LinkMapping {
public weak Poppler.Rectangle area;
public weak Poppler.Action action;
public static GLib.Type get_type ();
public LinkMapping ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_page_transition_copy", cheader_filename = "poppler.h")]
public class PageTransition {
public Poppler.PageTransitionType type;
public Poppler.PageTransitionAlignment alignment;
public static GLib.Type get_type ();
public PageTransition ();
}
- [CCode (cheader_filename = "poppler.h")]
+ [CCode (copy_function = "poppler_rectangle_copy", cheader_filename = "poppler.h")]
public class Rectangle {
public double x1;
public double y1;
string ref_function = null;
string unref_function = null;
+ string copy_function = null;
string free_function = null;
foreach (weak IdlNode member in st_node.members) {
ref_function = ((IdlNodeFunction) member).symbol;
} else if (member.name == "unref") {
unref_function = ((IdlNodeFunction) member).symbol;
- } else if (member.name == "free") {
+ } else if (member.name == "free" || member.name == "destroy") {
free_function = ((IdlNodeFunction) member).symbol;
} else {
+ if (member.name == "copy") {
+ copy_function = ((IdlNodeFunction) member).symbol;
+ }
var m = parse_function ((IdlNodeFunction) member);
if (m != null) {
cl.add_method (m);
if (ref_function != null) {
cl.set_ref_function (ref_function);
}
+ if (copy_function != null) {
+ cl.set_dup_function (copy_function);
+ }
if (unref_function != null) {
cl.set_unref_function (unref_function);
} else if (free_function != null) {
cl.set_type_id (cl.get_upper_case_cname ("TYPE_"));
current_source_file.add_node (cl);
}
-
+
+ var parent = new TypeReference ();
+ parent.namespace_name = "GLib";
+ parent.type_name = "Boxed";
+ cl.add_base_type (parent);
+
current_data_type = cl;
string ref_function = null;
string unref_function = null;
+ string copy_function = null;
string free_function = null;
foreach (weak IdlNode member in boxed_node.members) {
ref_function = ((IdlNodeFunction) member).symbol;
} else if (member.name == "unref") {
unref_function = ((IdlNodeFunction) member).symbol;
- } else if (member.name == "free") {
+ } else if (member.name == "free" || member.name == "destroy") {
free_function = ((IdlNodeFunction) member).symbol;
} else {
+ if (member.name == "copy") {
+ copy_function = ((IdlNodeFunction) member).symbol;
+ }
var m = parse_function ((IdlNodeFunction) member);
if (m != null) {
cl.add_method (m);
if (ref_function != null) {
cl.set_ref_function (ref_function);
}
+ if (copy_function != null) {
+ cl.set_dup_function (copy_function);
+ }
if (unref_function != null) {
cl.set_unref_function (unref_function);
} else if (free_function != null) {