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 | |
29 | G_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 | |
35 | GDK_AVAILABLE_IN_ALL |
36 | G_DECLARE_DERIVABLE_TYPE (GtkMediaFile, gtk_media_file, GTK, MEDIA_FILE, GtkMediaStream) |
37 | |
38 | struct _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 | |
52 | GDK_AVAILABLE_IN_ALL |
53 | GtkMediaStream * gtk_media_file_new (void); |
54 | GDK_AVAILABLE_IN_ALL |
55 | GtkMediaStream * gtk_media_file_new_for_filename (const char *filename); |
56 | GDK_AVAILABLE_IN_ALL |
57 | GtkMediaStream * gtk_media_file_new_for_resource (const char *resource_path); |
58 | GDK_AVAILABLE_IN_ALL |
59 | GtkMediaStream * gtk_media_file_new_for_file (GFile *file); |
60 | GDK_AVAILABLE_IN_ALL |
61 | GtkMediaStream * gtk_media_file_new_for_input_stream (GInputStream *stream); |
62 | |
63 | GDK_AVAILABLE_IN_ALL |
64 | void gtk_media_file_clear (GtkMediaFile *self); |
65 | |
66 | GDK_AVAILABLE_IN_ALL |
67 | void gtk_media_file_set_filename (GtkMediaFile *self, |
68 | const char *filename); |
69 | GDK_AVAILABLE_IN_ALL |
70 | void gtk_media_file_set_resource (GtkMediaFile *self, |
71 | const char *resource_path); |
72 | GDK_AVAILABLE_IN_ALL |
73 | void gtk_media_file_set_file (GtkMediaFile *self, |
74 | GFile *file); |
75 | GDK_AVAILABLE_IN_ALL |
76 | GFile * gtk_media_file_get_file (GtkMediaFile *self); |
77 | GDK_AVAILABLE_IN_ALL |
78 | void gtk_media_file_set_input_stream (GtkMediaFile *self, |
79 | GInputStream *stream); |
80 | GDK_AVAILABLE_IN_ALL |
81 | GInputStream * gtk_media_file_get_input_stream (GtkMediaFile *self); |
82 | |
83 | |
84 | G_END_DECLS |
85 | |
86 | #endif /* __GTK_MEDIA_FILE_H__ */ |
87 | |