[vala] gtk+-2.0: Hide many unwanted user data and destroy notify arguments



commit bdde8687937ef1ff16af3d8daa743cf75222cb51
Author: Evan Nemerson <evan coeus-group com>
Date:   Sat Mar 13 19:51:12 2010 -0800

    gtk+-2.0: Hide many unwanted user data and destroy notify arguments
    
    Fixes bug 611021.

 vapi/gtk+-2.0.vapi                       |   34 ++++++++++++------------
 vapi/packages/gtk+-2.0/gtk+-2.0.metadata |   40 +++++++++++++++++++++++++++++-
 2 files changed, 56 insertions(+), 18 deletions(-)
---
diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi
index 66c9d68..f14830a 100644
--- a/vapi/gtk+-2.0.vapi
+++ b/vapi/gtk+-2.0.vapi
@@ -221,7 +221,7 @@ namespace Gtk {
 		public GLib.List<weak Gtk.Action> list_actions ();
 		public void remove_action (Gtk.Action action);
 		public void set_sensitive (bool sensitive);
-		public void set_translate_func (Gtk.TranslateFunc func, void* data, GLib.DestroyNotify notify);
+		public void set_translate_func (owned Gtk.TranslateFunc func);
 		public void set_translation_domain (string domain);
 		public void set_visible (bool visible);
 		public unowned string translate_string (string str);
@@ -1476,7 +1476,7 @@ namespace Gtk {
 	public class FileFilter : Gtk.Object {
 		[CCode (has_construct_function = false)]
 		public FileFilter ();
-		public void add_custom (Gtk.FileFilterFlags needed, Gtk.FileFilterFunc func, void* data, GLib.DestroyNotify notify);
+		public void add_custom (Gtk.FileFilterFlags needed, owned Gtk.FileFilterFunc func);
 		public void add_mime_type (string mime_type);
 		public void add_pattern (string pattern);
 		public void add_pixbuf_formats ();
@@ -2574,7 +2574,7 @@ namespace Gtk {
 		public void set_tab_label_text (Gtk.Widget child, string tab_text);
 		public void set_tab_pos (Gtk.PositionType pos);
 		public void set_tab_reorderable (Gtk.Widget child, bool reorderable);
-		public static void set_window_creation_hook (Gtk.NotebookWindowCreationFunc func, void* data, GLib.DestroyNotify destroy);
+		public static void set_window_creation_hook (owned Gtk.NotebookWindowCreationFunc func);
 		[NoAccessorMethod]
 		public bool enable_popup { get; set; }
 		public void* group { get; set; }
@@ -3184,7 +3184,7 @@ namespace Gtk {
 		public RecentFilter ();
 		public void add_age (int days);
 		public void add_application (string application);
-		public void add_custom (Gtk.RecentFilterFlags needed, Gtk.RecentFilterFunc func, void* data, GLib.DestroyNotify data_destroy);
+		public void add_custom (Gtk.RecentFilterFlags needed, owned Gtk.RecentFilterFunc func);
 		public void add_group (string group);
 		public void add_mime_type (string mime_type);
 		public void add_pattern (string pattern);
@@ -4057,9 +4057,9 @@ namespace Gtk {
 		public void move_mark_by_name (string name, Gtk.TextIter where);
 		public void paste_clipboard (Gtk.Clipboard clipboard, Gtk.TextIter? override_location, bool default_editable);
 		public void place_cursor (Gtk.TextIter where);
-		public Gdk.Atom register_deserialize_format (string mime_type, Gtk.TextBufferDeserializeFunc function, GLib.DestroyNotify user_data_destroy);
+		public Gdk.Atom register_deserialize_format (string mime_type, owned Gtk.TextBufferDeserializeFunc function);
 		public Gdk.Atom register_deserialize_tagset (string tagset_name);
-		public Gdk.Atom register_serialize_format (string mime_type, Gtk.TextBufferSerializeFunc function, GLib.DestroyNotify user_data_destroy);
+		public Gdk.Atom register_serialize_format (string mime_type, owned Gtk.TextBufferSerializeFunc function);
 		public Gdk.Atom register_serialize_tagset (string tagset_name);
 		public void remove_all_tags (Gtk.TextIter start, Gtk.TextIter end);
 		public void remove_selection_clipboard (Gtk.Clipboard clipboard);
@@ -4592,7 +4592,7 @@ namespace Gtk {
 		public unowned Gtk.TreePath convert_path_to_child_path (Gtk.TreePath filter_path);
 		public unowned Gtk.TreeModel get_model ();
 		public void refilter ();
-		public void set_modify_func (int n_columns, GLib.Type[] types, Gtk.TreeModelFilterModifyFunc func, void* data, GLib.DestroyNotify destroy);
+		public void set_modify_func (int n_columns, GLib.Type[] types, owned Gtk.TreeModelFilterModifyFunc func);
 		public void set_visible_column (int column);
 		public void set_visible_func (owned Gtk.TreeModelFilterVisibleFunc func);
 		[NoAccessorMethod]
@@ -4695,7 +4695,7 @@ namespace Gtk {
 		public void select_range (Gtk.TreePath start_path, Gtk.TreePath end_path);
 		public void selected_foreach (Gtk.TreeSelectionForeachFunc func);
 		public void set_mode (Gtk.SelectionMode type);
-		public void set_select_function (Gtk.TreeSelectionFunc func, GLib.DestroyNotify? destroy);
+		public void set_select_function (owned Gtk.TreeSelectionFunc func);
 		public void unselect_all ();
 		public void unselect_iter (Gtk.TreeIter iter);
 		public void unselect_path (Gtk.TreePath path);
@@ -4812,10 +4812,10 @@ namespace Gtk {
 		public int remove_column (Gtk.TreeViewColumn column);
 		public void scroll_to_cell (Gtk.TreePath? path, Gtk.TreeViewColumn? column, bool use_align, float row_align, float col_align);
 		public void scroll_to_point (int tree_x, int tree_y);
-		public void set_column_drag_function (Gtk.TreeViewColumnDropFunc func, GLib.DestroyNotify destroy);
+		public void set_column_drag_function (owned Gtk.TreeViewColumnDropFunc func);
 		public void set_cursor (Gtk.TreePath path, Gtk.TreeViewColumn? focus_column, bool start_editing);
 		public void set_cursor_on_cell (Gtk.TreePath path, Gtk.TreeViewColumn focus_column, Gtk.CellRenderer focus_cell, bool start_editing);
-		public void set_destroy_count_func (Gtk.TreeDestroyCountFunc func, void* data, GLib.DestroyNotify destroy);
+		public void set_destroy_count_func (owned Gtk.TreeDestroyCountFunc func);
 		public void set_drag_dest_row (Gtk.TreePath? path, Gtk.TreeViewDropPosition pos);
 		public void set_enable_search (bool enable_search);
 		public void set_enable_tree_lines (bool enabled);
@@ -4836,7 +4836,7 @@ namespace Gtk {
 		public void set_search_column (int column);
 		public void set_search_entry (Gtk.Entry entry);
 		public void set_search_equal_func (owned Gtk.TreeViewSearchEqualFunc search_equal_func);
-		public void set_search_position_func (Gtk.TreeViewSearchPositionFunc func, void* data, GLib.DestroyNotify destroy);
+		public void set_search_position_func (owned Gtk.TreeViewSearchPositionFunc func);
 		public void set_show_expanders (bool enabled);
 		public void set_tooltip_cell (Gtk.Tooltip tooltip, Gtk.TreePath path, Gtk.TreeViewColumn column, Gtk.CellRenderer cell);
 		public void set_tooltip_column (int column);
@@ -5741,7 +5741,7 @@ namespace Gtk {
 		public void set_show_not_found (bool show_not_found);
 		public void set_show_private (bool show_private);
 		public void set_show_tips (bool show_tips);
-		public abstract void set_sort_func (Gtk.RecentSortFunc sort_func, void* sort_data, GLib.DestroyNotify data_destroy);
+		public abstract void set_sort_func (owned Gtk.RecentSortFunc sort_func);
 		public void set_sort_type (Gtk.RecentSortType sort_type);
 		public abstract void unselect_all ();
 		public abstract void unselect_uri (string uri);
@@ -7059,16 +7059,16 @@ namespace Gtk {
 	public delegate bool RecentFilterFunc (Gtk.RecentFilterInfo filter_info);
 	[CCode (cheader_filename = "gtk/gtk.h")]
 	public delegate int RecentSortFunc (Gtk.RecentInfo a, Gtk.RecentInfo b);
-	[CCode (cheader_filename = "gtk/gtk.h", has_target = false)]
-	public delegate bool TextBufferDeserializeFunc (Gtk.TextBuffer register_buffer, Gtk.TextBuffer content_buffer, Gtk.TextIter iter, uchar data, size_t length, bool create_tags, void* user_data, GLib.Error error);
+	[CCode (cheader_filename = "gtk/gtk.h")]
+	public delegate bool TextBufferDeserializeFunc (Gtk.TextBuffer register_buffer, Gtk.TextBuffer content_buffer, Gtk.TextIter iter, uchar data, size_t length, bool create_tags, 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, size_t length);
 	[CCode (cheader_filename = "gtk/gtk.h")]
 	public delegate bool TextCharPredicate (unichar ch);
 	[CCode (cheader_filename = "gtk/gtk.h")]
 	public delegate void TextTagTableForeach (Gtk.TextTag tag);
-	[CCode (cheader_filename = "gtk/gtk.h", has_target = false)]
-	public delegate unowned string TranslateFunc (string path, void* func_data);
+	[CCode (cheader_filename = "gtk/gtk.h")]
+	public delegate unowned string TranslateFunc (string path);
 	[CCode (cheader_filename = "gtk/gtk.h")]
 	public delegate void TreeCellDataFunc (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter);
 	[CCode (cheader_filename = "gtk/gtk.h")]
@@ -7708,7 +7708,7 @@ namespace Gtk {
 	[CCode (cheader_filename = "gtk/gtk.h")]
 	public static bool stock_lookup (string stock_id, Gtk.StockItem item);
 	[CCode (cheader_filename = "gtk/gtk.h")]
-	public static void stock_set_translate_func (string domain, Gtk.TranslateFunc func, void* data, GLib.DestroyNotify notify);
+	public static void stock_set_translate_func (string domain, owned Gtk.TranslateFunc func);
 	[CCode (cheader_filename = "gtk/gtk.h")]
 	public static void target_table_free (Gtk.TargetEntry[] targets);
 	[CCode (cheader_filename = "gtk/gtk.h")]
diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
index 1210297..896453d 100644
--- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
+++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
@@ -30,6 +30,9 @@ gtk_action_group_add_radio_actions_full.destroy nullable="1"
 gtk_action_group_add_toggle_actions.user_data hidden="0"
 gtk_action_group_add_toggle_actions_full.user_data hidden="0"
 gtk_action_group_add_toggle_actions_full.destroy nullable="1"
+gtk_action_group_set_translate_func.func transfer_ownership="1"
+gtk_action_group_set_translate_func.data hidden="1"
+gtk_action_group_set_translate_func.notify hidden="1"
 gtk_action_group_list_actions transfer_ownership="1" type_arguments="unowned Action"
 GtkAdjustment::changed has_emitter="1"
 GtkAdjustment::value_changed has_emitter="1"
@@ -168,6 +171,9 @@ gtk_file_chooser_dialog_new.title nullable="1"
 gtk_file_chooser_dialog_new.parent nullable="1"
 gtk_file_chooser_dialog_new_with_backend.title nullable="1"
 gtk_file_chooser_dialog_new_with_backend.parent nullable="1"
+gtk_file_filter_add_custom.func transfer_ownership="1"
+gtk_file_filter_add_custom.data hidden="1"
+gtk_file_filter_add_custom.notify hidden="1"
 gtk_file_chooser_list_filters transfer_ownership="1" type_arguments="unowned FileFilter"
 gtk_file_chooser_list_shortcut_folder_uris nullable="1" transfer_ownership="1" type_arguments="string"
 gtk_file_chooser_list_shortcut_folders nullable="1" transfer_ownership="1" type_arguments="string"
@@ -296,6 +302,9 @@ gtk_notebook_append_page_menu.menu_label nullable="1"
 gtk_notebook_prepend_page.tab_label nullable="1"
 gtk_notebook_prepend_page_menu.tab_label nullable="1"
 gtk_notebook_prepend_page_menu.menu_label nullable="1"
+gtk_notebook_set_window_creation_hook.func transfer_ownership="1"
+gtk_notebook_set_window_creation_hook.data hidden="1"
+gtk_notebook_set_window_creation_hook.destroy hidden="1"
 gtk_notebook_insert_page virtual="0"
 gtk_notebook_insert_page.tab_label nullable="1"
 gtk_notebook_insert_page_menu virtual="1" vfunc_name="insert_page"
@@ -403,6 +412,9 @@ gtk_radio_tool_button_get_group type_arguments="RadioToolButton"
 gtk_radio_tool_button_new.group nullable="1" type_arguments="RadioToolButton"
 gtk_radio_tool_button_new_from_stock.group nullable="1" type_arguments="RadioToolButton"
 gtk_radio_tool_button_set_group.group type_arguments="RadioToolButton"
+gtk_recent_chooser_set_sort_func.sort_func transfer_ownership="1"
+gtk_recent_chooser_set_sort_func.sort_data hidden="1"
+gtk_recent_chooser_set_sort_func.data_destroy hidden="1"
 gtk_recent_chooser_get_items transfer_ownership="1" type_arguments="RecentInfo"
 gtk_recent_chooser_list_filters transfer_ownership="1" type_arguments="unowned RecentFilter"
 gtk_recent_manager_get_items transfer_ownership="1" type_arguments="RecentInfo"
@@ -413,6 +425,9 @@ GtkRecentData.mime_type weak="0"
 GtkRecentData.app_name weak="0"
 GtkRecentData.app_exec weak="0"
 GtkRecentData.groups is_array="1" weak="0" array_null_terminated="1"
+gtk_recent_filter_add_custom.func transfer_ownership="1"
+gtk_recent_filter_add_custom.data hidden="1"
+gtk_recent_filter_add_custom.data_destroy hidden="1"
 GtkRequisition is_value_type="1"
 gtk_rc_get_style_by_paths nullable="1"
 gtk_rc_get_style_by_paths.widget_path nullable="1"
@@ -446,6 +461,9 @@ GtkStatusIcon::button_release_event.event namespace_name="Gdk" type_name="EventB
 gtk_status_icon_get_geometry.area is_out="1"
 gtk_status_icon_get_geometry.orientation is_out="1"
 gtk_status_icon_position_menu hidden="1"
+gtk_stock_set_translate_func.func transfer_ownership="1"
+gtk_stock_set_translate_func.data hidden="1"
+gtk_stock_set_translate_func.notify hidden="1"
 gtk_stock_list_ids transfer_ownership="1" type_arguments="string"
 GtkStockItem is_value_type="1"
 GtkStyle.fg weak="0"
@@ -495,7 +513,13 @@ gtk_text_buffer_get_selection_bounds.start is_out="1"
 gtk_text_buffer_get_selection_bounds.end is_out="1"
 gtk_text_buffer_get_start_iter.iter is_out="1"
 gtk_text_buffer_paste_clipboard.override_location nullable="1"
+gtk_text_buffer_register_deserialize_format.function transfer_ownership="1"
+gtk_text_buffer_register_deserialize_format.user_data_destroy hidden="1"
+gtk_text_buffer_register_serialize_format.function transfer_ownership="1"
+gtk_text_buffer_register_serialize_format.user_data_destroy hidden="1"
 gtk_text_buffer_new.table nullable="1"
+GtkTextBufferDeserializeFunc.user_data hidden="1"
+GtkTextBufferDeserializeFunc has_target="1"
 GtkTextIter is_value_type="1"
 gtk_text_iter_get_marks transfer_ownership="1" type_arguments="unowned TextMark"
 gtk_text_iter_get_tags transfer_ownership="1" type_arguments="unowned TextTag"
@@ -539,6 +563,8 @@ gtk_tool_button_new.icon_widget nullable="1"
 gtk_tool_button_new.label nullable="1"
 gtk_tool_item_toolbar_reconfigured hidden="1"
 GtkToolItem::set_tooltip hidden="1"
+GtkTranslateFunc has_target="1"
+GtkTranslateFunc.func_data hidden="1"
 GtkTreeIter is_value_type="1"
 GtkTreeRowReference is_value_type="0" is_immutable="1"
 gtk_tree_row_reference_copy transfer_ownership="1"
@@ -564,6 +590,9 @@ GtkTreeModel::row_inserted has_emitter="1"
 GtkTreeModel::rows_reordered has_emitter="1"
 gtk_tree_model_filter_convert_child_iter_to_iter.filter_iter is_out="1"
 gtk_tree_model_filter_convert_iter_to_child_iter.child_iter is_out="1"
+gtk_tree_model_filter_set_modify_func.func transfer_ownership="1"
+gtk_tree_model_filter_set_modify_func.data hidden="1"
+gtk_tree_model_filter_set_modify_func.destroy hidden="1"
 gtk_tree_model_filter_set_visible_func.func transfer_ownership="1"
 gtk_tree_model_filter_set_visible_func.data hidden="1"
 gtk_tree_model_filter_set_visible_func.destroy hidden="1"
@@ -580,8 +609,9 @@ gtk_tree_row_reference_get_path transfer_ownership="1"
 gtk_tree_selection_get_selected.iter is_out="1"
 gtk_tree_selection_get_selected_rows transfer_ownership="1" type_arguments="TreePath"
 gtk_tree_selection_selected_foreach.data hidden="1"
+gtk_tree_selection_set_select_function.func transfer_ownership="1"
 gtk_tree_selection_set_select_function.data hidden="1"
-gtk_tree_selection_set_select_function.destroy nullable="1"
+gtk_tree_selection_set_select_function.destroy hidden="1"
 gtk_tree_store_new ellipsis="1"
 gtk_tree_store_newv.n_columns hidden="1"
 gtk_tree_store_newv.types array_length_pos="0.9"
@@ -662,6 +692,11 @@ gtk_tree_view_insert_column_with_data_func.func transfer_ownership="1"
 gtk_tree_view_insert_column_with_data_func.data hidden="1"
 gtk_tree_view_insert_column_with_data_func.dnotify hidden="1"
 gtk_tree_view_row_expanded name="is_row_expanded"
+gtk_tree_view_set_column_drag_function.func transfer_ownership="1"
+gtk_tree_view_set_column_drag_function.destroy hidden="1"
+gtk_tree_view_set_destroy_count_func.func transfer_ownership="1"
+gtk_tree_view_set_destroy_count_func.data hidden="1"
+gtk_tree_view_set_destroy_count_func.destroy hidden="1"
 gtk_tree_view_set_model.model nullable="1"
 gtk_tree_view_set_row_separator_func.func transfer_ownership="1"
 gtk_tree_view_set_row_separator_func.data hidden="1"
@@ -669,6 +704,9 @@ gtk_tree_view_set_row_separator_func.destroy hidden="1"
 gtk_tree_view_set_search_equal_func.search_equal_func transfer_ownership="1"
 gtk_tree_view_set_search_equal_func.search_user_data hidden="1"
 gtk_tree_view_set_search_equal_func.search_destroy hidden="1"
+gtk_tree_view_set_search_position_func.func transfer_ownership="1"
+gtk_tree_view_set_search_position_func.data hidden="1"
+gtk_tree_view_set_search_position_func.destroy hidden="1"
 gtk_tree_view_scroll_to_cell.path nullable="1"
 gtk_tree_view_scroll_to_cell.column nullable="1"
 gtk_tree_view_set_cursor.focus_column nullable="1"



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