[vala/0.38] gtk+-4.0: Add some fixes from gtk+-3.0



commit 356ef67a2df9e28e48ef71b9a9c96d7ed150b5c4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Dec 8 09:59:11 2017 +0100

    gtk+-4.0: Add some fixes from gtk+-3.0

 vapi/gtk+-4.0.vapi             |   49 +++++++++++++++++++++------------------
 vapi/metadata/Gtk-4.0.metadata |   41 +++++++++++++++++++++++++++++++-
 2 files changed, 65 insertions(+), 25 deletions(-)
---
diff --git a/vapi/gtk+-4.0.vapi b/vapi/gtk+-4.0.vapi
index 1f83048..19ed85d 100644
--- a/vapi/gtk+-4.0.vapi
+++ b/vapi/gtk+-4.0.vapi
@@ -7043,7 +7043,7 @@ namespace Gtk {
        [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_accel_label_get_type ()")]
        public class AccelLabel : Gtk.Widget, Atk.Implementor, Gtk.Buildable {
                [CCode (has_construct_function = false, type = "GtkWidget*")]
-               public AccelLabel (string string);
+               public AccelLabel (string str);
                [Version (since = "3.12")]
                public void get_accel (out uint accelerator_key, out Gdk.ModifierType accelerator_mods);
                public unowned Gtk.Widget? get_accel_widget ();
@@ -7517,7 +7517,7 @@ namespace Gtk {
                public Builder.from_resource (string resource_path);
                [CCode (has_construct_function = false)]
                [Version (since = "3.10")]
-               public Builder.from_string (string string, ssize_t length);
+               public Builder.from_string (string str, ssize_t length);
                [Version (since = "3.10")]
                public unowned Gtk.Application? get_application ();
                [Version (since = "2.12")]
@@ -7535,9 +7535,9 @@ namespace Gtk {
                [Version (since = "2.12")]
                public void set_translation_domain (string? domain);
                [Version (since = "2.12")]
-               public bool value_from_string (GLib.ParamSpec pspec, string string, out GLib.Value value) 
throws GLib.Error;
+               public bool value_from_string (GLib.ParamSpec pspec, string str, out GLib.Value value) throws 
GLib.Error;
                [Version (since = "2.12")]
-               public bool value_from_string_type (GLib.Type type, string string, out GLib.Value value) 
throws GLib.Error;
+               public bool value_from_string_type (GLib.Type type, string str, out GLib.Value value) throws 
GLib.Error;
                [Version (since = "2.12")]
                public string translation_domain { get; set; }
        }
@@ -7555,7 +7555,7 @@ namespace Gtk {
                public bool get_use_underline ();
                [Version (since = "3.90")]
                public void set_icon_name (string icon_name);
-               public void set_label (string label);
+               public void set_label (string? label);
                public void set_relief (Gtk.ReliefStyle relief);
                public void set_use_underline (bool use_underline);
                [CCode (has_construct_function = false, type = "GtkWidget*")]
@@ -7563,7 +7563,7 @@ namespace Gtk {
                [CCode (has_construct_function = false, type = "GtkWidget*")]
                public Button.with_mnemonic (string label);
                public string icon_name { get; set; }
-               public string label { get; set; }
+               public string? label { get; set; }
                public Gtk.ReliefStyle relief { get; set; }
                public bool use_underline { get; set; }
                public virtual signal void activate ();
@@ -8884,7 +8884,7 @@ namespace Gtk {
                public virtual signal void insert_at_cursor (string str);
                public virtual signal void move_cursor (Gtk.MovementStep step, int count, bool 
extend_selection);
                public virtual signal void paste_clipboard ();
-               public virtual signal void populate_popup (Gtk.Widget popup);
+               public virtual signal void populate_popup (Gtk.Menu popup);
                [Version (since = "2.20")]
                public signal void preedit_changed (string preedit);
                public virtual signal void toggle_overwrite ();
@@ -8911,8 +8911,11 @@ namespace Gtk {
                public virtual uint get_length ();
                [Version (since = "2.18")]
                public int get_max_length ();
+               [Version (since = "2.18")]
+               public unowned string get_text ();
+               [CCode (vfunc_name = "get_text")]
                [NoWrapper]
-               public virtual unowned string get_text (out size_t n_bytes = null);
+               public virtual unowned string get_text_internal (out size_t n_bytes = null);
                [Version (since = "2.18")]
                public virtual uint insert_text (uint position, [CCode (array_length_cname = "n_chars", 
array_length_pos = 2.1, array_length_type = "guint", type = "const gchar*")] uint8[] chars);
                [Version (since = "2.18")]
@@ -8923,9 +8926,8 @@ namespace Gtk {
                public uint length { get; }
                [Version (since = "2.18")]
                public int max_length { get; set; }
-               [NoAccessorMethod]
                [Version (since = "2.18")]
-               public string text { owned get; set; }
+               public string text { get; set; }
                [Version (since = "2.18")]
                public virtual signal void deleted_text (uint position, uint n_chars);
                [Version (since = "2.18")]
@@ -9149,8 +9151,8 @@ namespace Gtk {
                public void set_accept_label (string? accept_label);
                [Version (since = "3.20")]
                public void set_cancel_label (string? cancel_label);
-               public string accept_label { get; set; }
-               public string cancel_label { get; set; }
+               public string? accept_label { get; set; }
+               public string? cancel_label { get; set; }
        }
        [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_file_chooser_widget_get_type ()")]
        public class FileChooserWidget : Gtk.Widget, Atk.Implementor, Gtk.Buildable, Gtk.FileChooser {
@@ -10894,7 +10896,7 @@ namespace Gtk {
                [Version (since = "3.20")]
                public void set_modal (bool modal);
                [Version (since = "3.20")]
-               public void set_title (string title);
+               public void set_title (string? title);
                [Version (since = "3.20")]
                public void set_transient_for (Gtk.Window? parent);
                [Version (since = "3.20")]
@@ -10902,9 +10904,9 @@ namespace Gtk {
                [Version (since = "3.20")]
                public bool modal { get; set; }
                [Version (since = "3.20")]
-               public string title { get; set; }
+               public string? title { get; set; }
                [Version (since = "3.20")]
-               public Gtk.Window transient_for { get; set construct; }
+               public Gtk.Window? transient_for { get; set construct; }
                [NoAccessorMethod]
                [Version (since = "3.20")]
                public bool visible { get; set; }
@@ -11155,6 +11157,7 @@ namespace Gtk {
                [CCode (has_construct_function = false)]
                [Version (since = "2.10")]
                public PaperSize.custom (string name, string display_name, double width, double height, 
Gtk.Unit unit);
+               [DestroysInstance]
                [Version (since = "2.10")]
                public void free ();
                [CCode (has_construct_function = false)]
@@ -12211,6 +12214,7 @@ namespace Gtk {
        [Compact]
        public class SelectionData {
                public Gtk.SelectionData copy ();
+               [DestroysInstance]
                public void free ();
                [CCode (array_length = false)]
                [Version (since = "2.14")]
@@ -13378,7 +13382,7 @@ namespace Gtk {
                public virtual signal void move_cursor (Gtk.MovementStep step, int count, bool 
extend_selection);
                public signal void move_viewport (Gtk.ScrollStep step, int count);
                public virtual signal void paste_clipboard ();
-               public virtual signal void populate_popup (Gtk.Widget popup);
+               public virtual signal void populate_popup (Gtk.Menu popup);
                [Version (since = "2.20")]
                public signal void preedit_changed (string preedit);
                public signal void select_all (bool select);
@@ -13735,6 +13739,7 @@ namespace Gtk {
                public void down ();
                [CCode (has_construct_function = false)]
                public TreePath.first ();
+               [DestroysInstance]
                public void free ();
                [CCode (has_construct_function = false, sentinel = "-1")]
                [Version (since = "2.2")]
@@ -13765,6 +13770,7 @@ namespace Gtk {
                public Gtk.TreeRowReference copy ();
                [CCode (cheader_filename = "gtk/gtk.h")]
                public static void deleted (GLib.Object proxy, Gtk.TreePath path);
+               [DestroysInstance]
                public void free ();
                [Version (since = "2.8")]
                public unowned Gtk.TreeModel get_model ();
@@ -13926,7 +13932,7 @@ namespace Gtk {
                public bool get_visible_range (out Gtk.TreePath start_path, out Gtk.TreePath end_path);
                public void get_visible_rect (out Gdk.Rectangle visible_rect);
                public int insert_column (Gtk.TreeViewColumn column, int position);
-               public int insert_column_with_attributes (int position, string title, Gtk.CellRenderer cell, 
...);
+               public int insert_column_with_attributes (int position, string? title, Gtk.CellRenderer cell, 
...);
                public int insert_column_with_data_func (int position, string title, Gtk.CellRenderer cell, 
owned Gtk.TreeCellDataFunc func);
                [Version (since = "3.0")]
                public bool is_blank_at_pos (int x, int y, out Gtk.TreePath path, out Gtk.TreeViewColumn 
column, out int cell_x, out int cell_y);
@@ -14090,7 +14096,7 @@ namespace Gtk {
                [Version (since = "3.0")]
                public TreeViewColumn.with_area (Gtk.CellArea area);
                [CCode (has_construct_function = false)]
-               public TreeViewColumn.with_attributes (string title, Gtk.CellRenderer cell, ...);
+               public TreeViewColumn.with_attributes (string? title, Gtk.CellRenderer cell, ...);
                public float alignment { get; set; }
                [NoAccessorMethod]
                [Version (since = "3.0")]
@@ -14589,6 +14595,7 @@ namespace Gtk {
                public int append_with_siblings (Gtk.WidgetPath siblings, uint sibling_index);
                [Version (since = "3.0")]
                public Gtk.WidgetPath copy ();
+               [DestroysInstance]
                [Version (since = "3.0")]
                public void free ();
                [Version (since = "3.0")]
@@ -15014,7 +15021,7 @@ namespace Gtk {
        [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_file_chooser_get_type ()")]
        public interface FileChooser : GLib.Object {
                [Version (since = "3.22")]
-               public void add_choice (string id, string label, string options, string option_labels);
+               public void add_choice (string id, string label, [CCode (array_length = false, 
array_null_terminated = true, type = "const char**")] string[]? options, [CCode (array_length = false, 
array_null_terminated = true, type = "const char**")] string[]? option_labels);
                [Version (since = "2.4")]
                public void add_filter (owned Gtk.FileFilter filter);
                [Version (since = "2.4")]
@@ -17189,8 +17196,6 @@ namespace Gtk {
        [CCode (cheader_filename = "gtk/gtk.h")]
        public static bool events_pending ();
        [CCode (cheader_filename = "gtk/gtk.h")]
-       public static bool @false ();
-       [CCode (cheader_filename = "gtk/gtk.h")]
        [Version (since = "3.0")]
        public static uint get_binary_age ();
        [CCode (cheader_filename = "gtk/gtk.h")]
@@ -17315,6 +17320,4 @@ namespace Gtk {
        public static bool tree_get_row_drag_data (Gtk.SelectionData selection_data, out unowned 
Gtk.TreeModel? tree_model, out Gtk.TreePath? path);
        [CCode (cheader_filename = "gtk/gtk.h")]
        public static bool tree_set_row_drag_data (Gtk.SelectionData selection_data, Gtk.TreeModel 
tree_model, Gtk.TreePath path);
-       [CCode (cheader_filename = "gtk/gtk.h")]
-       public static bool @true ();
 }
diff --git a/vapi/metadata/Gtk-4.0.metadata b/vapi/metadata/Gtk-4.0.metadata
index a820b52..a95ba59 100644
--- a/vapi/metadata/Gtk-4.0.metadata
+++ b/vapi/metadata/Gtk-4.0.metadata
@@ -29,6 +29,7 @@ AccelLabel
 
 // Bug #: Virtual methods without invokers
 EntryBuffer
+  .get_text#virtual_method name="get_text_internal"
   .get_text#virtual_method.n_bytes out default=null
 Range
   .get_range_border.* out
@@ -245,8 +246,6 @@ TreeSelection
   .get_user_data skip=false
 
 // Symbol name conflicts
-EntryBuffer
-  .get_text#method skip
 EntryCompletion
   .insert_prefix#method name="request_prefix_insertion"
 Notebook
@@ -310,7 +309,10 @@ ListStore
   .move_before.iter ref
   .prepend return_void
   .remove.iter ref
+PaperSize
+  .free destroys_instance
 SelectionData
+  .free destroys_instance
   .get_data skip=false
 render_* parent="Gtk.StyleContext"
 render_* symbol_type="method" instance_idx=0
@@ -333,9 +335,12 @@ ToolPalette
   .get_icon_size type="Gtk.IconSize"
   .set_icon_size.icon_size type="Gtk.IconSize"
 TreePath
+  .free destroys_instance
   .get_indices skip
   .get_indices_with_depth name="get_indices"
 tree_row_reference_reordered skip=false name="reordered" parent="Gtk.TreeRowReference"
+TreeRowReference
+  .free destroys_instance
 TreeStore
   .move_after.iter ref
   .move_before.iter ref
@@ -355,6 +360,8 @@ Widget
   .intersect.intersection unowned=false nullable default=null
   .touch_event.event type="Gdk.EventTouch"
   .size_allocate return_void
+WidgetPath
+  .free destroys_instance
 TreeModel
   .get_value return_void
   .rows_reordered skip
@@ -367,6 +374,11 @@ test_init skip=false
 
 test_init.argvp unowned
 
+@false skip
+@true skip
+
+*.*.string name="str"
+
 // Forward upstream
 ///////////////////
 GLArea
@@ -380,11 +392,30 @@ Widget
   .drag_source_set.targets array_length_idx=3
 
 // Not completely sure
+Button
+  .get_label nullable
+  .label nullable
+  .set_label.label nullable
 ComboBox
   .get_row_separator_func skip=false
+Entry
+  .populate_popup#signal.widget type="Gtk.Menu"
+FileChooser
+  .add_choice.options array nullable array_null_terminated
+  .add_choice.option_labels array nullable array_null_terminated
+FileChooserNative
+  .accept_label nullable
+  .cancel_label nullable
 Menu
   .get_for_attach_widget type="unowned GLib.List<Gtk.Menu>"
   .popped_up.*_rect type="Gdk.Rectangle"
+NativeDialog
+  .title nullable
+  .transient_for nullable
+  .get_title nullable
+  .get_transient_for nullable
+  .set_title.title nullable
+  .set_transient_for.parent nullable
 Window
   .list_toplevels type="GLib.List<unowned Gtk.Window>"
   .set_focus#signal.object nullable
@@ -393,6 +424,12 @@ TreeModel
   .iter_next.iter ref
   .iter_previous.iter ref
 TreeView
+  .insert_column_with_attributes.title nullable
+TreeViewColumn
+  .new_with_attributes.title nullable
+TextView
+  .populate_popup.popup type="Gtk.Menu"
+TreeView
   .get_*_func skip=false
 
 // Sure


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