From: Rico Tzschichholz Date: Mon, 15 Jul 2019 13:22:40 +0000 (+0200) Subject: gtk4: Constructors of Gtk.MediaFile needs to be static functions X-Git-Tag: 0.44.9~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc42910d12c0ae257e7015d8ed25fbaf27486a0d;p=thirdparty%2Fvala.git gtk4: Constructors of Gtk.MediaFile needs to be static functions --- diff --git a/vapi/gtk4.vapi b/vapi/gtk4.vapi index 5532c94e2..b22b49732 100644 --- a/vapi/gtk4.vapi +++ b/vapi/gtk4.vapi @@ -8992,19 +8992,21 @@ namespace Gtk { } [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_media_file_get_type ()")] public abstract class MediaFile : Gtk.MediaStream, Gdk.Paintable { - [CCode (has_construct_function = false, type = "GtkMediaStream*")] - public MediaFile (); + [CCode (has_construct_function = false)] + protected MediaFile (); public void clear (); [NoWrapper] public virtual void close (); - [CCode (has_construct_function = false, type = "GtkMediaStream*")] - public MediaFile.for_file (GLib.File file); - [CCode (has_construct_function = false, type = "GtkMediaStream*")] - public MediaFile.for_filename (string filename); - [CCode (has_construct_function = false, type = "GtkMediaStream*")] - public MediaFile.for_input_stream (GLib.InputStream stream); - [CCode (has_construct_function = false, type = "GtkMediaStream*")] - public MediaFile.for_resource (string resource_path); + [CCode (cname = "gtk_media_file_new")] + public static Gtk.MediaFile empty (); + [CCode (cname = "gtk_media_file_new_for_file")] + public static Gtk.MediaFile for_file (GLib.File file); + [CCode (cname = "gtk_media_file_new_for_filename")] + public static Gtk.MediaFile for_filename (string filename); + [CCode (cname = "gtk_media_file_new_for_input_stream")] + public static Gtk.MediaFile for_input_stream (GLib.InputStream stream); + [CCode (cname = "gtk_media_file_new_for_resource")] + public static Gtk.MediaFile for_resource (string resource_path); public unowned GLib.File? get_file (); public unowned GLib.InputStream? get_input_stream (); [NoWrapper] diff --git a/vapi/metadata/Gtk-4.0.metadata b/vapi/metadata/Gtk-4.0.metadata index eee9e8e2c..b43896b5a 100644 --- a/vapi/metadata/Gtk-4.0.metadata +++ b/vapi/metadata/Gtk-4.0.metadata @@ -61,6 +61,11 @@ TreeStore CellRenderer .get_size replacement="get_preferred_size" +// Factory method of abstract type +MediaFile + .new* symbol_type="function" name="new_(.+)" ctype="GtkMediaStream*" + .new name="empty" + // G-I cannot deprecate whole types // G-I cannot handle returning non-boxed types