[gtkmm] Gtk::MediaStream: Ignore more deprecations



commit b827c939d6e3446d7538bde7ff014eab2887af65
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sat Jun 26 11:30:06 2021 +0200

    Gtk::MediaStream: Ignore more deprecations
    
    * gtk/src/mediastream.[ccg|hg]: Ignore deprecation of
    gtk_media_stream_ended().
    
    The replacement can be wrapped only when gtkmm requires gtk > 4.3.1.

 gtk/src/mediastream.ccg | 13 +++++++++----
 gtk/src/mediastream.hg  | 16 +++++++++++-----
 2 files changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/gtk/src/mediastream.ccg b/gtk/src/mediastream.ccg
index 102d20af..c328ea0c 100644
--- a/gtk/src/mediastream.ccg
+++ b/gtk/src/mediastream.ccg
@@ -19,10 +19,10 @@
 namespace Gtk
 {
 
-// We hand-code prepared() and unprepared(). gtk_media_stream_prepared() and
-// gtk_media_stream_unprepared() are deprecated in gtk 4.4.
-// We can't use the replacements gtk_media_stream_set_prepared() and gtk_media_stream_unset_prepared(),
-// which are new in gtk 4.4. This version of gtkmm does not require gtk 4.4.
+// We hand-code prepared(), unprepared() and ended(). gtk_media_stream_prepared(),
+// gtk_media_stream_unprepared() and gtk_media_stream_ended() are deprecated in gtk 4.4.
+// We can't use the replacements gtk_media_stream_set_prepared(), gtk_media_stream_unset_prepared()
+// and gtk_media_stream_set_ended(), which are new in gtk 4.4. This version of gtkmm does not require gtk 
4.4.
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 void MediaStream::prepared(bool has_audio, bool has_video, bool seekable, gint64 duration)
 {
@@ -33,6 +33,11 @@ void MediaStream::unprepared()
 {
   gtk_media_stream_unprepared(gobj());
 }
+
+void MediaStream::ended()
+{
+  gtk_media_stream_ended(gobj());
+}
 G_GNUC_END_IGNORE_DEPRECATIONS
 
 } // namesoace Gtk
diff --git a/gtk/src/mediastream.hg b/gtk/src/mediastream.hg
index 99fb0b56..ef8fa815 100644
--- a/gtk/src/mediastream.hg
+++ b/gtk/src/mediastream.hg
@@ -83,10 +83,10 @@ public:
   // For implementations only
 
   //TODO: Update in gtkmm 4.4.
-  // We hand-code prepared() and unprepared(). gtk_media_stream_prepared() and
-  // gtk_media_stream_unprepared() are deprecated in gtk 4.4.
-  // We can't use the replacements gtk_media_stream_set_prepared() and gtk_media_stream_unset_prepared(),
-  // which are new in gtk 4.4. This version of gtkmm does not require gtk 4.4.
+  // We hand-code prepared(), unprepared() and ended(). gtk_media_stream_prepared(),
+  // gtk_media_stream_unprepared() and gtk_media_stream_ended() are deprecated in gtk 4.4.
+  // We can't use the replacements gtk_media_stream_set_prepared(), gtk_media_stream_unset_prepared()
+  // and gtk_media_stream_set_ended(), which are new in gtk 4.4. This version of gtkmm does not require gtk 
4.4.
   //_WRAP_METHOD(void prepared(bool has_audio, bool has_video, bool seekable, gint64 duration),
   //  gtk_media_stream_prepared, deprecated "Use set_prepared() instead.")
   //_WRAP_METHOD(void unprepared(), gtk_media_stream_unprepared, deprecated "Use unset_prepared() instead.")
@@ -100,7 +100,13 @@ public:
   void unprepared();
 
   _WRAP_METHOD(void update(gint64 timestamp), gtk_media_stream_update)
-  _WRAP_METHOD(void ended(), gtk_media_stream_ended)
+
+  //TODO: Update in gtkmm 4.4.
+  //_WRAP_METHOD(void ended(), gtk_media_stream_ended, deprecated "Use set_ended() instead.")
+  //_WRAP_METHOD(void set_ended(), gtk_media_stream_set_ended, newin "4,4")
+  _WRAP_METHOD_DOCS_ONLY(gtk_media_stream_ended)
+  void ended();
+
   _WRAP_METHOD(void seek_success(), gtk_media_stream_seek_success)
   _WRAP_METHOD(void seek_failed(), gtk_media_stream_seek_failed)
 #m4 _CONVERSION(`const Glib::Error&',`GError*',`g_error_copy(($3).gobj())')


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