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#include "config.h"
21
22#include "gtknomediafileprivate.h"
23
24#include "gtkintl.h"
25
26struct _GtkNoMediaFile
27{
28 GtkMediaFile parent_instance;
29};
30
31struct _GtkNoMediaFileClass
32{
33 GtkMediaFileClass parent_class;
34};
35
36G_DEFINE_TYPE_WITH_CODE (GtkNoMediaFile, gtk_no_media_file, GTK_TYPE_MEDIA_FILE,
37 g_io_extension_point_implement (GTK_MEDIA_FILE_EXTENSION_POINT_NAME,
38 g_define_type_id,
39 "none",
40 G_MININT);)
41
42static void
43gtk_no_media_file_open (GtkMediaFile *file)
44{
45 gtk_media_stream_error (self: GTK_MEDIA_STREAM (ptr: file),
46 G_IO_ERROR,
47 code: G_IO_ERROR_NOT_SUPPORTED,
48 _("GTK could not find a media module. Check your installation."));
49}
50
51static void
52gtk_no_media_file_class_init (GtkNoMediaFileClass *klass)
53{
54 GtkMediaFileClass *file_class = GTK_MEDIA_FILE_CLASS (ptr: klass);
55
56 file_class->open = gtk_no_media_file_open;
57}
58
59static void
60gtk_no_media_file_init (GtkNoMediaFile *video)
61{
62}
63
64

source code of gtk/gtk/gtknomediafile.c