From: Juerg Billeter Date: Sat, 8 Mar 2008 14:58:23 +0000 (+0000) Subject: improve instance delegate detection X-Git-Tag: VALA_0_2_0~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8fad171aa1eb0cef7c8622d9b99baeb0128a33e;p=platform%2Fupstream%2Fvala.git improve instance delegate detection 2008-03-08 Juerg Billeter * vapigen/valagidlparser.vala: improve instance delegate detection * vapi/atk.vapi, vapi/gdk-2.0.vapi, vapi/gdk-pixbuf-2.0.vapi, vapi/gnet-2.0.vapi, vapi/gnome-vfs-2.0.vapi, vapi/gstreamer-0.10.vapi, vapi/gstreamer-audio-0.10.vapi, vapi/gstreamer-base-0.10.vapi, vapi/gtk+-2.0.vapi, vapi/libgnomeui-2.0.vapi, vapi/liboobs-1.vapi, vapi/libsoup-2.2.vapi, vapi/libsoup-2.4.vapi, vapi/libwnck-1.0.vapi, vapi/pango.vapi, vapi/pangocairo.vapi:regenerated svn path=/trunk/; revision=1107 --- diff --git a/ChangeLog b/ChangeLog index a9649c1..bfeac0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-03-08 Jürg Billeter + + * vapigen/valagidlparser.vala: improve instance delegate detection + + * vapi/atk.vapi, vapi/gdk-2.0.vapi, vapi/gdk-pixbuf-2.0.vapi, + vapi/gnet-2.0.vapi, vapi/gnome-vfs-2.0.vapi, + vapi/gstreamer-0.10.vapi, vapi/gstreamer-audio-0.10.vapi, + vapi/gstreamer-base-0.10.vapi, vapi/gtk+-2.0.vapi, + vapi/libgnomeui-2.0.vapi, vapi/liboobs-1.vapi, + vapi/libsoup-2.2.vapi, vapi/libsoup-2.4.vapi, vapi/libwnck-1.0.vapi, + vapi/pango.vapi, vapi/pangocairo.vapi:regenerated + 2008-03-06 Jürg Billeter * vala/valainterfacewriter.vala: tiny code improvement diff --git a/vapi/atk.vapi b/vapi/atk.vapi index d44d1a1..b11fd61 100644 --- a/vapi/atk.vapi +++ b/vapi/atk.vapi @@ -649,7 +649,7 @@ namespace Atk { [CCode (cheader_filename = "atk/atk.h")] public static delegate void FocusHandler (Atk.Object p1, bool p2); [CCode (cheader_filename = "atk/atk.h")] - public static delegate bool Function (pointer data); + public delegate bool Function (); [CCode (cheader_filename = "atk/atk.h")] public static delegate int KeySnoopFunc (Atk.KeyEventStruct event, pointer func_data); [CCode (cheader_filename = "atk/atk.h")] diff --git a/vapi/gdk-2.0.vapi b/vapi/gdk-2.0.vapi index b7f5b7f..9f4577a 100644 --- a/vapi/gdk-2.0.vapi +++ b/vapi/gdk-2.0.vapi @@ -1447,15 +1447,15 @@ namespace Gdk { public void union (Gdk.Rectangle src2, out Gdk.Rectangle dest); } [CCode (cheader_filename = "gdk/gdk.h")] - public static delegate void DestroyNotify (pointer data); + public delegate void DestroyNotify (); [CCode (cheader_filename = "gdk/gdk.h")] - public static delegate void EventFunc (Gdk.Event event, pointer data); + public delegate void EventFunc (Gdk.Event event); [CCode (cheader_filename = "gdk/gdk.h")] - public static delegate Gdk.FilterReturn FilterFunc (Gdk.XEvent xevent, Gdk.Event event, pointer data); + public delegate Gdk.FilterReturn FilterFunc (Gdk.XEvent xevent, Gdk.Event event); [CCode (cheader_filename = "gdk/gdk.h")] public static delegate void InputFunction (pointer data, int source, Gdk.InputCondition condition); [CCode (cheader_filename = "gdk/gdk.h")] - public static delegate void SpanFunc (Gdk.Span span, pointer data); + public delegate void SpanFunc (Gdk.Span span); public const int CURRENT_TIME; public const int MAX_TIMECOORD_AXES; public const int PARENT_RELATIVE; diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi index f693913..2618f13 100644 --- a/vapi/gdk-pixbuf-2.0.vapi +++ b/vapi/gdk-pixbuf-2.0.vapi @@ -186,9 +186,9 @@ namespace Gdk { public weak GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type); } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")] - public static delegate void PixbufDestroyNotify (uchar[] pixels, pointer data); + public delegate void PixbufDestroyNotify (uchar[] pixels); [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")] - public static delegate bool PixbufSaveFunc (string buf, ulong count, GLib.Error error, pointer data); + public delegate bool PixbufSaveFunc (string buf, ulong count, GLib.Error error); public const int PIXBUF_FEATURES_H; public const int PIXBUF_MAGIC_NUMBER; public const int PIXBUF_MAJOR; diff --git a/vapi/gnet-2.0.vapi b/vapi/gnet-2.0.vapi index 3c9b562..881c53d 100644 --- a/vapi/gnet-2.0.vapi +++ b/vapi/gnet-2.0.vapi @@ -219,19 +219,19 @@ namespace GNet { [CCode (cheader_filename = "gnet.h")] public delegate void ConnHttpFunc (GNet.ConnHttp conn, GNet.ConnHttpEvent event); [CCode (cheader_filename = "gnet.h")] - public static delegate void InetAddrGetNameAsyncFunc (string hostname, pointer data); + public delegate void InetAddrGetNameAsyncFunc (string hostname); [CCode (cheader_filename = "gnet.h")] - public static delegate void InetAddrNewAsyncFunc (GNet.InetAddr inetaddr, pointer data); + public delegate void InetAddrNewAsyncFunc (GNet.InetAddr inetaddr); [CCode (cheader_filename = "gnet.h")] - public static delegate void InetAddrNewListAsyncFunc (GLib.List list, pointer data); + public delegate void InetAddrNewListAsyncFunc (GLib.List list); [CCode (cheader_filename = "gnet.h")] public delegate void ServerFunc (GNet.Server server, GNet.Conn conn); [CCode (cheader_filename = "gnet.h")] - public static delegate void TcpSocketAcceptFunc (GNet.TcpSocket server, GNet.TcpSocket client, pointer data); + public delegate void TcpSocketAcceptFunc (GNet.TcpSocket server, GNet.TcpSocket client); [CCode (cheader_filename = "gnet.h")] - public static delegate void TcpSocketConnectAsyncFunc (GNet.TcpSocket socket, GNet.TcpSocketConnectAsyncStatus status, pointer data); + public delegate void TcpSocketConnectAsyncFunc (GNet.TcpSocket socket, GNet.TcpSocketConnectAsyncStatus status); [CCode (cheader_filename = "gnet.h")] - public static delegate void TcpSocketNewAsyncFunc (GNet.TcpSocket socket, pointer data); + public delegate void TcpSocketNewAsyncFunc (GNet.TcpSocket socket); public const int INETADDR_MAX_LEN; public const int MD5_HASH_LENGTH; public const int SHA_HASH_LENGTH; diff --git a/vapi/gnome-vfs-2.0.vapi b/vapi/gnome-vfs-2.0.vapi index 88c7615..299c1bf 100644 --- a/vapi/gnome-vfs-2.0.vapi +++ b/vapi/gnome-vfs-2.0.vapi @@ -869,7 +869,7 @@ namespace GnomeVFS { [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] public static delegate void AsyncFileControlCallback (GnomeVFS.AsyncHandle handle, GnomeVFS.Result result, pointer operation_data, pointer callback_data); [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public static delegate void AsyncFindDirectoryCallback (GnomeVFS.AsyncHandle handle, GLib.List results, pointer data); + public delegate void AsyncFindDirectoryCallback (GnomeVFS.AsyncHandle handle, GLib.List results); [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] public static delegate void AsyncGetFileInfoCallback (GnomeVFS.AsyncHandle handle, GLib.List results, pointer callback_data); [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] @@ -893,7 +893,7 @@ namespace GnomeVFS { [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] public static delegate void DNSSDResolveCallback (GnomeVFS.DNSSDResolveHandle handle, GnomeVFS.Result result, GnomeVFS.DNSSDService service, string host, int port, GLib.HashTable text, int text_raw_len, string text_raw, pointer callback_data); [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] - public delegate bool DirectoryVisitFunc (string rel_path, GnomeVFS.FileInfo info, bool recursing_will_loop, bool recurse); + public static delegate bool DirectoryVisitFunc (string rel_path, GnomeVFS.FileInfo info, bool recursing_will_loop, pointer user_data, bool recurse); [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] public static delegate void ModuleCallback (pointer @in, ulong in_size, pointer @out, ulong out_size, pointer callback_data); [CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")] diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi index feea2a9..c2a3d1a 100644 --- a/vapi/gstreamer-0.10.vapi +++ b/vapi/gstreamer-0.10.vapi @@ -709,14 +709,14 @@ namespace Gst { public void parse_clock_lost (out weak Gst.Clock clock); public void parse_clock_provide (out weak Gst.Clock clock, bool ready); public void parse_duration (Gst.Format format, int64 duration); - public void parse_error (GLib.Error gerror, out weak string debug); - public void parse_info (GLib.Error gerror, out weak string debug); + public void parse_error (out GLib.Error gerror, out weak string debug); + public void parse_info (out GLib.Error gerror, out weak string debug); public void parse_new_clock (out weak Gst.Clock clock); public void parse_segment_done (Gst.Format format, int64 position); public void parse_segment_start (Gst.Format format, int64 position); public void parse_state_changed (out Gst.State oldstate, out Gst.State newstate, out Gst.State pending); public void parse_tag (out weak Gst.TagList tag_list); - public void parse_warning (GLib.Error gerror, out weak string debug); + public void parse_warning (out GLib.Error gerror, out weak string debug); public static weak string type_get_name (Gst.MessageType type); public static GLib.Quark type_to_quark (Gst.MessageType type); } @@ -1712,9 +1712,9 @@ namespace Gst { public signal void new_uri (string uri); } [CCode (cheader_filename = "gst/gst.h")] - public static delegate bool BusFunc (Gst.Bus bus, Gst.Message message, pointer data); + public delegate bool BusFunc (Gst.Bus bus, Gst.Message message); [CCode (cheader_filename = "gst/gst.h")] - public static delegate Gst.BusSyncReply BusSyncHandler (Gst.Bus bus, Gst.Message message, pointer data); + public delegate Gst.BusSyncReply BusSyncHandler (Gst.Bus bus, Gst.Message message); [CCode (cheader_filename = "gst/gst.h")] public delegate bool ClockCallback (Gst.Clock clock, Gst.ClockTime time, Gst.ClockID id); [CCode (cheader_filename = "gst/gst.h")] @@ -1738,7 +1738,7 @@ namespace Gst { [CCode (cheader_filename = "gst/gst.h")] public static delegate void IteratorResyncFunction (Gst.Iterator it); [CCode (cheader_filename = "gst/gst.h")] - public static delegate void LogFunction (Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object object, Gst.DebugMessage message, pointer data); + public delegate void LogFunction (Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object object, Gst.DebugMessage message); [CCode (cheader_filename = "gst/gst.h")] public static delegate weak Gst.MiniObject MiniObjectCopyFunction (Gst.MiniObject obj); [CCode (cheader_filename = "gst/gst.h")] @@ -1758,7 +1758,7 @@ namespace Gst { [CCode (cheader_filename = "gst/gst.h")] public static delegate bool PadCheckGetRangeFunction (Gst.Pad pad); [CCode (cheader_filename = "gst/gst.h")] - public static delegate bool PadDispatcherFunction (Gst.Pad pad, pointer data); + public delegate bool PadDispatcherFunction (Gst.Pad pad); [CCode (cheader_filename = "gst/gst.h")] public static delegate bool PadEventFunction (Gst.Pad pad, Gst.Event event); [CCode (cheader_filename = "gst/gst.h")] @@ -1794,9 +1794,9 @@ namespace Gst { [CCode (cheader_filename = "gst/gst.h")] public static delegate void TagMergeFunc (GLib.Value dest, GLib.Value src); [CCode (cheader_filename = "gst/gst.h")] - public static delegate void TaskFunction (pointer data); + public delegate void TaskFunction (); [CCode (cheader_filename = "gst/gst.h")] - public static delegate void TypeFindFunction (Gst.TypeFind find, pointer data); + public delegate void TypeFindFunction (Gst.TypeFind find); [CCode (cheader_filename = "gst/gst.h")] public static delegate int ValueCompareFunc (GLib.Value value1, GLib.Value value2); [CCode (cheader_filename = "gst/gst.h")] diff --git a/vapi/gstreamer-audio-0.10.vapi b/vapi/gstreamer-audio-0.10.vapi index b433e1e..04f9705 100644 --- a/vapi/gstreamer-audio-0.10.vapi +++ b/vapi/gstreamer-audio-0.10.vapi @@ -244,11 +244,11 @@ namespace Gst { public virtual bool start (); public virtual bool stop (); } - [CCode (cheader_filename = "gst/audio/audio.h")] + [CCode (cheader_filename = "gst/audio/gstaudioclock.h")] public delegate weak Gst.ClockTime AudioClockGetTimeFunc (Gst.Clock clock); - [CCode (cheader_filename = "gst/audio/audio.h")] + [CCode (cheader_filename = "gst/audio/mixerutils.h")] public delegate bool AudioMixerFilterFunc (Gst.Mixer mixer); - [CCode (cheader_filename = "gst/audio/audio.h")] + [CCode (cheader_filename = "gst/audio/gstringbuffer.h")] public delegate void RingBufferCallback (Gst.RingBuffer rbuf, uchar data, uint len); public const int AUDIO_DEF_RATE; public const string AUDIO_FLOAT_PAD_TEMPLATE_CAPS; diff --git a/vapi/gstreamer-base-0.10.vapi b/vapi/gstreamer-base-0.10.vapi index 6c6c6d2..0b12736 100644 --- a/vapi/gstreamer-base-0.10.vapi +++ b/vapi/gstreamer-base-0.10.vapi @@ -312,13 +312,13 @@ namespace Gst { [NoWrapper] public virtual Gst.FlowReturn create (out weak Gst.Buffer buf); } - [CCode (cheader_filename = "gst/gst.h")] - public static delegate void CollectDataDestroyNotify (Gst.CollectData data); + [CCode (cheader_filename = "gst/base/gstcollectpads.h")] + public delegate void CollectDataDestroyNotify (); [CCode (cheader_filename = "gst/gst.h")] public delegate Gst.FlowReturn CollectPadsFunction (Gst.CollectPads pads); - [CCode (cheader_filename = "gst/gst.h")] + [CCode (cheader_filename = "gst/base/gstdataqueue.h")] public static delegate bool DataQueueCheckFullFunction (Gst.DataQueue queue, uint visible, uint bytes, uint64 time, pointer checkdata); - [CCode (cheader_filename = "gst/gst.h")] + [CCode (cheader_filename = "gst/base/gsttypefindhelper.h")] public static delegate Gst.FlowReturn TypeFindHelperGetRangeFunction (Gst.Object obj, uint64 offset, uint length, out weak Gst.Buffer buffer); public const string BASE_TRANSFORM_SINK_NAME; public const string BASE_TRANSFORM_SRC_NAME; diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi index 6eafa87..4e6148d 100644 --- a/vapi/gtk+-2.0.vapi +++ b/vapi/gtk+-2.0.vapi @@ -6271,49 +6271,49 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void CallbackMarshal (Gtk.Object object, pointer data, Gtk.Arg[] args); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void AboutDialogActivateLinkFunc (Gtk.AboutDialog about, string link_, pointer data); + public delegate void AboutDialogActivateLinkFunc (Gtk.AboutDialog about, string link_); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate bool AccelGroupActivate (Gtk.AccelGroup accel_group, GLib.Object acceleratable, uint keyval, Gdk.ModifierType modifier); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool AccelGroupFindFunc (Gtk.AccelKey key, GLib.Closure closure, pointer data); + public delegate bool AccelGroupFindFunc (Gtk.AccelKey key, GLib.Closure closure); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void AccelMapForeach (pointer data, string accel_path, uint accel_key, Gdk.ModifierType accel_mods, bool changed); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate int AssistantPageFunc (int current_page, pointer data); + public delegate int AssistantPageFunc (int current_page); [CCode (cheader_filename = "gtk/gtk.h")] public delegate void BuilderConnectFunc (Gtk.Builder builder, GLib.Object object, string signal_name, string handler_name, GLib.Object connect_object, GLib.ConnectFlags flags); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void Callback (Gtk.Widget widget, pointer data); + public delegate void Callback (Gtk.Widget widget); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void CellLayoutDataFunc (Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter, pointer data); + public delegate void CellLayoutDataFunc (Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void ClipboardClearFunc (Gtk.Clipboard clipboard, pointer user_data_or_owner); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void ClipboardGetFunc (Gtk.Clipboard clipboard, Gtk.SelectionData selection_data, uint info, pointer user_data_or_owner); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void ClipboardImageReceivedFunc (Gtk.Clipboard clipboard, Gdk.Pixbuf pixbuf, pointer data); + public delegate void ClipboardImageReceivedFunc (Gtk.Clipboard clipboard, Gdk.Pixbuf pixbuf); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void ClipboardReceivedFunc (Gtk.Clipboard clipboard, Gtk.SelectionData selection_data, pointer data); + public delegate void ClipboardReceivedFunc (Gtk.Clipboard clipboard, Gtk.SelectionData selection_data); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void ClipboardRichTextReceivedFunc (Gtk.Clipboard clipboard, Gdk.Atom format, uchar text, ulong length, pointer data); + public delegate void ClipboardRichTextReceivedFunc (Gtk.Clipboard clipboard, Gdk.Atom format, uchar text, ulong length); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void ClipboardTargetsReceivedFunc (Gtk.Clipboard clipboard, out Gdk.Atom atoms, int n_atoms, pointer data); + public delegate void ClipboardTargetsReceivedFunc (Gtk.Clipboard clipboard, out Gdk.Atom atoms, int n_atoms); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void ClipboardTextReceivedFunc (Gtk.Clipboard clipboard, string text, pointer data); + public delegate void ClipboardTextReceivedFunc (Gtk.Clipboard clipboard, string text); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void ColorSelectionChangePaletteFunc (Gdk.Color colors, int n_colors); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void ColorSelectionChangePaletteWithScreenFunc (Gdk.Screen screen, Gdk.Color colors, int n_colors); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void DestroyNotify (pointer data); + public delegate void DestroyNotify (); [CCode (cheader_filename = "gtk/gtk.h")] public delegate bool EntryCompletionMatchFunc (Gtk.EntryCompletion completion, string key, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool FileFilterFunc (Gtk.FileFilterInfo filter_info, pointer data); + public delegate bool FileFilterFunc (Gtk.FileFilterInfo filter_info); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool Function (pointer data); + public delegate bool Function (); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void IconViewForeachFunc (Gtk.IconView icon_view, Gtk.TreePath path, pointer data); + public delegate void IconViewForeachFunc (Gtk.IconView icon_view, Gtk.TreePath path); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate int KeySnoopFunc (Gtk.Widget grab_widget, Gdk.EventKey event, pointer func_data); [CCode (cheader_filename = "gtk/gtk.h")] @@ -6327,9 +6327,9 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void ModuleInitFunc (int argc, string argv); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate weak Gtk.Notebook NotebookWindowCreationFunc (Gtk.Notebook source, Gtk.Widget page, int x, int y, pointer data); + public delegate weak Gtk.Notebook NotebookWindowCreationFunc (Gtk.Notebook source, Gtk.Widget page, int x, int y); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void PageSetupDoneFunc (Gtk.PageSetup page_setup, pointer data); + public delegate void PageSetupDoneFunc (Gtk.PageSetup page_setup); [CCode (cheader_filename = "gtk/gtk.h")] public delegate void PrintSettingsFunc (string key, string value); [CCode (cheader_filename = "gtk/gtk.h")] @@ -6341,43 +6341,43 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public static delegate void SignalFunc (); [CCode (cheader_filename = "gtk/gtk.h")] - public delegate bool TextBufferDeserializeFunc (Gtk.TextBuffer register_buffer, Gtk.TextBuffer content_buffer, Gtk.TextIter iter, uchar data, ulong length, bool create_tags, GLib.Error error); + public static delegate bool TextBufferDeserializeFunc (Gtk.TextBuffer register_buffer, Gtk.TextBuffer content_buffer, Gtk.TextIter iter, uchar data, ulong length, bool create_tags, pointer user_data, GLib.Error error); [CCode (cheader_filename = "gtk/gtk.h")] public delegate uchar TextBufferSerializeFunc (Gtk.TextBuffer register_buffer, Gtk.TextBuffer content_buffer, Gtk.TextIter start, Gtk.TextIter end, ulong length); [CCode (cheader_filename = "gtk/gtk.h")] public delegate bool TextCharPredicate (unichar ch); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void TextTagTableForeach (Gtk.TextTag tag, pointer data); + public delegate void TextTagTableForeach (Gtk.TextTag tag); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate weak string TranslateFunc (string path, pointer func_data); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void TreeCellDataFunc (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter, pointer data); + public delegate void TreeCellDataFunc (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] public delegate void TreeDestroyCountFunc (Gtk.TreeView tree_view, Gtk.TreePath path, int children); [CCode (cheader_filename = "gtk/gtk.h")] public delegate int TreeIterCompareFunc (Gtk.TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void TreeModelFilterModifyFunc (Gtk.TreeModel model, Gtk.TreeIter iter, GLib.Value value, int column, pointer data); + public delegate void TreeModelFilterModifyFunc (Gtk.TreeModel model, Gtk.TreeIter iter, GLib.Value value, int column); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool TreeModelFilterVisibleFunc (Gtk.TreeModel model, Gtk.TreeIter iter, pointer data); + public delegate bool TreeModelFilterVisibleFunc (Gtk.TreeModel model, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool TreeModelForeachFunc (Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter, pointer data); + public delegate bool TreeModelForeachFunc (Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void TreeSelectionForeachFunc (Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter, pointer data); + public delegate void TreeSelectionForeachFunc (Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool TreeSelectionFunc (Gtk.TreeSelection selection, Gtk.TreeModel model, Gtk.TreePath path, bool path_currently_selected, pointer data); + public delegate bool TreeSelectionFunc (Gtk.TreeSelection selection, Gtk.TreeModel model, Gtk.TreePath path, bool path_currently_selected); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool TreeViewColumnDropFunc (Gtk.TreeView tree_view, Gtk.TreeViewColumn column, Gtk.TreeViewColumn prev_column, Gtk.TreeViewColumn next_column, pointer data); + public delegate bool TreeViewColumnDropFunc (Gtk.TreeView tree_view, Gtk.TreeViewColumn column, Gtk.TreeViewColumn prev_column, Gtk.TreeViewColumn next_column); [CCode (cheader_filename = "gtk/gtk.h")] public delegate void TreeViewMappingFunc (Gtk.TreeView tree_view, Gtk.TreePath path); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate bool TreeViewRowSeparatorFunc (Gtk.TreeModel model, Gtk.TreeIter iter, pointer data); + public delegate bool TreeViewRowSeparatorFunc (Gtk.TreeModel model, Gtk.TreeIter iter); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate bool TreeViewSearchEqualFunc (Gtk.TreeModel model, int column, string key, Gtk.TreeIter iter, pointer search_data); [CCode (cheader_filename = "gtk/gtk.h")] public delegate void TreeViewSearchPositionFunc (Gtk.TreeView tree_view, Gtk.Widget search_dialog); [CCode (cheader_filename = "gtk/gtk.h")] - public static delegate void WindowKeysForeachFunc (Gtk.Window window, uint keyval, Gdk.ModifierType modifiers, bool is_mnemonic, pointer data); + public delegate void WindowKeysForeachFunc (Gtk.Window window, uint keyval, Gdk.ModifierType modifiers, bool is_mnemonic); public const int ARG_READWRITE; public const int BINARY_AGE; public const int BUTTONBOX_DEFAULT; diff --git a/vapi/libgnomeui-2.0.vapi b/vapi/libgnomeui-2.0.vapi index c8eec47..b5fb384 100644 --- a/vapi/libgnomeui-2.0.vapi +++ b/vapi/libgnomeui-2.0.vapi @@ -485,13 +485,13 @@ namespace Gnome { [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] public static delegate void GdkPixbufLoadCallback (Gnome.GdkPixbufAsyncHandle handle, GnomeVFS.Result error, Gdk.Pixbuf pixbuf, pointer cb_data); [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public static delegate void InteractFunction (Gnome.Client client, int key, Gnome.DialogType dialog_type, pointer data); + public delegate void InteractFunction (Gnome.Client client, int key, Gnome.DialogType dialog_type); [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] public delegate double PasswordDialogQualityFunc (Gnome.PasswordDialog password_dialog, string password); [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public static delegate void ReplyCallback (int reply, pointer data); + public delegate void ReplyCallback (int reply); [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] - public static delegate void StringCallback (string str, pointer data); + public delegate void StringCallback (string str); [CCode (cheader_filename = "libgnomeui/libgnomeui.h")] public static delegate void UISignalConnectFunc (Gnome.UIInfo uiinfo, string signal_name, Gnome.UIBuilderData uibdata); public const string GNOMEUIINFO_KEY_UIBDATA; diff --git a/vapi/liboobs-1.vapi b/vapi/liboobs-1.vapi index ddc1326..d3ac5fe 100644 --- a/vapi/liboobs-1.vapi +++ b/vapi/liboobs-1.vapi @@ -454,5 +454,5 @@ namespace Oobs { public weak bool use_md5 { get; } } [CCode (cheader_filename = "oobs/oobs.h")] - public static delegate void ObjectAsyncFunc (Oobs.Object object, Oobs.Result result, pointer data); + public delegate void ObjectAsyncFunc (Oobs.Object object, Oobs.Result result); } diff --git a/vapi/libsoup-2.2.vapi b/vapi/libsoup-2.2.vapi index f4176f8..133fef8 100644 --- a/vapi/libsoup-2.2.vapi +++ b/vapi/libsoup-2.2.vapi @@ -529,13 +529,13 @@ namespace Soup { public uint length; } [CCode (cheader_filename = "libsoup/soup.h")] - public static delegate void AddressCallback (Soup.Address addr, uint status, pointer data); + public delegate void AddressCallback (Soup.Address addr, uint status); [CCode (cheader_filename = "libsoup/soup.h")] - public static delegate void ConnectionCallback (Soup.Connection conn, uint status, pointer data); + public delegate void ConnectionCallback (Soup.Connection conn, uint status); [CCode (cheader_filename = "libsoup/soup.h")] public delegate void MessageCallbackFn (Soup.Message req); [CCode (cheader_filename = "libsoup/soup.h")] - public static delegate bool ServerAuthCallbackFn (Soup.ServerAuthContext auth_ctx, Soup.ServerAuth auth, Soup.Message msg, pointer data); + public delegate bool ServerAuthCallbackFn (Soup.ServerAuthContext auth_ctx, Soup.ServerAuth auth, Soup.Message msg); [CCode (cheader_filename = "libsoup/soup.h")] public delegate void ServerCallbackFn (Soup.ServerContext context, Soup.Message msg); [CCode (cheader_filename = "libsoup/soup.h")] diff --git a/vapi/libsoup-2.4.vapi b/vapi/libsoup-2.4.vapi index 737dc26..ed342fd 100644 --- a/vapi/libsoup-2.4.vapi +++ b/vapi/libsoup-2.4.vapi @@ -520,7 +520,7 @@ namespace Soup { public signal void writable (); } [CCode (cheader_filename = "libsoup/soup.h")] - public static delegate void AddressCallback (Soup.Address addr, uint status, pointer data); + public delegate void AddressCallback (Soup.Address addr, uint status); [CCode (cheader_filename = "libsoup/soup.h")] public delegate bool AuthDomainBasicAuthCallback (Soup.AuthDomain domain, Soup.Message msg, string username, string password); [CCode (cheader_filename = "libsoup/soup.h")] diff --git a/vapi/libwnck-1.0.vapi b/vapi/libwnck-1.0.vapi index 370d84c..71743c4 100644 --- a/vapi/libwnck-1.0.vapi +++ b/vapi/libwnck-1.0.vapi @@ -416,7 +416,7 @@ namespace Wnck { public signal void name_changed (); } [CCode (cheader_filename = "libwnck/libwnck.h")] - public static delegate weak Gdk.Pixbuf LoadIconFunction (string icon_name, int size, uint flags, pointer data); + public delegate weak Gdk.Pixbuf LoadIconFunction (string icon_name, int size, uint flags); [CCode (cheader_filename = "libwnck/libwnck.h")] public static weak Gtk.Widget create_window_action_menu (Wnck.Window window); [CCode (cheader_filename = "libwnck/libwnck.h")] diff --git a/vapi/pango.vapi b/vapi/pango.vapi index fe4e73d..812c467 100644 --- a/vapi/pango.vapi +++ b/vapi/pango.vapi @@ -697,11 +697,11 @@ namespace Pango { public void translate (double tx, double ty); } [CCode (cheader_filename = "pango/pango.h")] - public static delegate pointer AttrDataCopyFunc (pointer data); + public delegate pointer AttrDataCopyFunc (); [CCode (cheader_filename = "pango/pango.h")] - public static delegate bool AttrFilterFunc (Pango.Attribute attribute, pointer data); + public delegate bool AttrFilterFunc (Pango.Attribute attribute); [CCode (cheader_filename = "pango/pango.h")] - public static delegate bool FontsetForeachFunc (Pango.Fontset fontset, Pango.Font font, pointer data); + public delegate bool FontsetForeachFunc (Pango.Fontset fontset, Pango.Font font); public const int ANALYSIS_FLAG_CENTERED_BASELINE; public const string ENGINE_TYPE_LANG; public const string ENGINE_TYPE_SHAPE; diff --git a/vapi/pangocairo.vapi b/vapi/pangocairo.vapi index ef9351b..3e1500a 100644 --- a/vapi/pangocairo.vapi +++ b/vapi/pangocairo.vapi @@ -17,7 +17,7 @@ namespace Pango { public void set_resolution (double dpi); } [CCode (cheader_filename = "pango/pangocairo.h")] - public static delegate void CairoShapeRendererFunc (Cairo.Context cr, Pango.AttrShape attr, bool do_path, pointer data); + public delegate void CairoShapeRendererFunc (Cairo.Context cr, Pango.AttrShape attr, bool do_path); [CCode (cheader_filename = "pango/pangocairo.h")] public static weak Cairo.FontOptions cairo_context_get_font_options (Pango.Context context); [CCode (cheader_filename = "pango/pangocairo.h")] diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 87edd2d..1b9cae7 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -300,10 +300,11 @@ public class Vala.GIdlParser : CodeVisitor { } } + uint remaining_params = f_node.parameters.length (); foreach (weak IdlNodeParam param in f_node.parameters) { weak IdlNode param_node = (IdlNode) param; - if (param_node.name == "user_data") { + if (remaining_params == 1 && (param_node.name == "user_data" || param_node.name == "data")) { // hide user_data parameter for instance delegates cb.instance = true; } else { @@ -316,6 +317,8 @@ public class Vala.GIdlParser : CodeVisitor { var p = new FormalParameter (param_name, parse_param (param)); cb.add_parameter (p); } + + remaining_params--; } return cb;