[vala/0.44] gtk4: Constructors of Gtk.MediaFile needs to be static functions
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.44] gtk4: Constructors of Gtk.MediaFile needs to be static functions
- Date: Sat, 5 Oct 2019 12:09:29 +0000 (UTC)
commit bc42910d12c0ae257e7015d8ed25fbaf27486a0d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jul 15 15:22:40 2019 +0200
gtk4: Constructors of Gtk.MediaFile needs to be static functions
vapi/gtk4.vapi | 22 ++++++++++++----------
vapi/metadata/Gtk-4.0.metadata | 5 +++++
2 files changed, 17 insertions(+), 10 deletions(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]