[gtk] video: Add gtk_video_get_file()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] video: Add gtk_video_get_file()
- Date: Mon, 19 Mar 2018 02:03:16 +0000 (UTC)
commit 2aee39d12cae1c5b5966dba9379366f01743bcfb
Author: Benjamin Otte <otte redhat com>
Date: Mon Mar 19 00:25:17 2018 +0100
video: Add gtk_video_get_file()
That function was missing.
gtk/gtkvideo.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c
index b6c1edd690..eb13ead95e 100644
--- a/gtk/gtkvideo.c
+++ b/gtk/gtkvideo.c
@@ -542,6 +542,23 @@ gtk_video_set_media_stream (GtkVideo *self,
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MEDIA_STREAM]);
}
+/**
+ * gtk_video_get_file:
+ * @self: a #GtkVideo
+ *
+ * Gets the file played by @self or %NULL if not playing back
+ * a file.
+ *
+ * Returns: (nullable) (transfer none): The file played by @self
+ **/
+GFile *
+gtk_video_get_file (GtkVideo *self)
+{
+ g_return_val_if_fail (GTK_IS_VIDEO (self), NULL);
+
+ return self->file;
+}
+
/**
* gtk_video_set_file:
* @self: a #GtkVideo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]