1/*
2 * Copyright © 2018 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20#ifndef __GTK_MEDIA_FILE_H__
21#define __GTK_MEDIA_FILE_H__
22
23#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24#error "Only <gtk/gtk.h> can be included directly."
25#endif
26
27#include <gtk/gtkmediastream.h>
28
29G_BEGIN_DECLS
30
31#define GTK_MEDIA_FILE_EXTENSION_POINT_NAME "gtk-media-file"
32
33#define GTK_TYPE_MEDIA_FILE (gtk_media_file_get_type ())
34
35GDK_AVAILABLE_IN_ALL
36G_DECLARE_DERIVABLE_TYPE (GtkMediaFile, gtk_media_file, GTK, MEDIA_FILE, GtkMediaStream)
37
38struct _GtkMediaFileClass
39{
40 GtkMediaStreamClass parent_class;
41
42 void (* open) (GtkMediaFile *self);
43 void (* close) (GtkMediaFile *self);
44
45 /* Padding for future expansion */
46 void (*_gtk_reserved1) (void);
47 void (*_gtk_reserved2) (void);
48 void (*_gtk_reserved3) (void);
49 void (*_gtk_reserved4) (void);
50};
51
52GDK_AVAILABLE_IN_ALL
53GtkMediaStream * gtk_media_file_new (void);
54GDK_AVAILABLE_IN_ALL
55GtkMediaStream * gtk_media_file_new_for_filename (const char *filename);
56GDK_AVAILABLE_IN_ALL
57GtkMediaStream * gtk_media_file_new_for_resource (const char *resource_path);
58GDK_AVAILABLE_IN_ALL
59GtkMediaStream * gtk_media_file_new_for_file (GFile *file);
60GDK_AVAILABLE_IN_ALL
61GtkMediaStream * gtk_media_file_new_for_input_stream (GInputStream *stream);
62
63GDK_AVAILABLE_IN_ALL
64void gtk_media_file_clear (GtkMediaFile *self);
65
66GDK_AVAILABLE_IN_ALL
67void gtk_media_file_set_filename (GtkMediaFile *self,
68 const char *filename);
69GDK_AVAILABLE_IN_ALL
70void gtk_media_file_set_resource (GtkMediaFile *self,
71 const char *resource_path);
72GDK_AVAILABLE_IN_ALL
73void gtk_media_file_set_file (GtkMediaFile *self,
74 GFile *file);
75GDK_AVAILABLE_IN_ALL
76GFile * gtk_media_file_get_file (GtkMediaFile *self);
77GDK_AVAILABLE_IN_ALL
78void gtk_media_file_set_input_stream (GtkMediaFile *self,
79 GInputStream *stream);
80GDK_AVAILABLE_IN_ALL
81GInputStream * gtk_media_file_get_input_stream (GtkMediaFile *self);
82
83
84G_END_DECLS
85
86#endif /* __GTK_MEDIA_FILE_H__ */
87

source code of gtk/gtk/gtkmediafile.h