summaryrefslogtreecommitdiff
path: root/gdk/gdkcontentformats.h
blob: a530325f02470bd1732961e65cbdb7a27eddee6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/* GTK - The GIMP Toolkit
 * Copyright (C) 2017 Benjamin Otte
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __GTK_CONTENT_FORMATS_H__
#define __GTK_CONTENT_FORMATS_H__

#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif


#include <gdk/gdkversionmacros.h>
#include <gdk/gdktypes.h>

G_BEGIN_DECLS

#define GDK_TYPE_CONTENT_FORMATS    (gdk_content_formats_get_type ())

GDK_AVAILABLE_IN_ALL
const char *            gdk_intern_mime_type                    (const char                     *string);

GDK_AVAILABLE_IN_ALL
GType                   gdk_content_formats_get_type            (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkContentFormats *     gdk_content_formats_new                 (const char                    **mime_types,
                                                                 guint                           n_mime_types);
GDK_AVAILABLE_IN_ALL
GdkContentFormats *     gdk_content_formats_new_for_gtype       (GType                           type);
GDK_AVAILABLE_IN_ALL
GdkContentFormats *     gdk_content_formats_ref                 (GdkContentFormats              *formats);
GDK_AVAILABLE_IN_ALL
void                    gdk_content_formats_unref               (GdkContentFormats              *formats);

GDK_AVAILABLE_IN_ALL
void                    gdk_content_formats_print               (GdkContentFormats              *formats,
                                                                 GString                        *string);
GDK_AVAILABLE_IN_ALL
char *                  gdk_content_formats_to_string           (GdkContentFormats              *formats);

GDK_AVAILABLE_IN_ALL
const GType *           gdk_content_formats_get_gtypes          (GdkContentFormats              *formats,
                                                                 gsize                          *n_gtypes);
GDK_AVAILABLE_IN_ALL
const char * const *    gdk_content_formats_get_mime_types      (GdkContentFormats              *formats,
                                                                 gsize                          *n_mime_types);

GDK_AVAILABLE_IN_ALL
GdkContentFormats *     gdk_content_formats_union               (GdkContentFormats              *first,
                                                                 const GdkContentFormats        *second) G_GNUC_WARN_UNUSED_RESULT;
GDK_AVAILABLE_IN_ALL
gboolean                gdk_content_formats_match               (const GdkContentFormats        *first,
                                                                 const GdkContentFormats        *second);
GDK_AVAILABLE_IN_ALL
GType                   gdk_content_formats_match_gtype         (const GdkContentFormats        *first,
                                                                 const GdkContentFormats        *second);
GDK_AVAILABLE_IN_ALL
const char *            gdk_content_formats_match_mime_type     (const GdkContentFormats        *first,
                                                                 const GdkContentFormats        *second);
GDK_AVAILABLE_IN_ALL
gboolean                gdk_content_formats_contain_gtype       (const GdkContentFormats        *formats,
                                                                 GType                           type);
GDK_AVAILABLE_IN_ALL
gboolean                gdk_content_formats_contain_mime_type   (const GdkContentFormats        *formats,
                                                                 const char                     *mime_type);

#define GDK_TYPE_CONTENT_FORMATS_BUILDER (gdk_content_formats_builder_get_type ())

typedef struct _GdkContentFormatsBuilder GdkContentFormatsBuilder;

GDK_AVAILABLE_IN_ALL
GType                   gdk_content_formats_builder_get_type    (void) G_GNUC_CONST;

GDK_AVAILABLE_IN_ALL
GdkContentFormatsBuilder *gdk_content_formats_builder_new        (void);
GDK_AVAILABLE_IN_ALL
GdkContentFormatsBuilder *gdk_content_formats_builder_ref       (GdkContentFormatsBuilder       *builder);
GDK_AVAILABLE_IN_ALL
void                    gdk_content_formats_builder_unref       (GdkContentFormatsBuilder       *builder);
GDK_AVAILABLE_IN_ALL
GdkContentFormats *     gdk_content_formats_builder_free_to_formats (GdkContentFormatsBuilder  *builder) G_GNUC_WARN_UNUSED_RESULT;
GDK_AVAILABLE_IN_ALL
GdkContentFormats *     gdk_content_formats_builder_to_formats  (GdkContentFormatsBuilder  *builder) G_GNUC_WARN_UNUSED_RESULT;
GDK_AVAILABLE_IN_ALL
void                    gdk_content_formats_builder_add_formats (GdkContentFormatsBuilder       *builder,
                                                                 const GdkContentFormats        *formats);
GDK_AVAILABLE_IN_ALL
void                    gdk_content_formats_builder_add_mime_type(GdkContentFormatsBuilder      *builder,
                                                                 const char                     *mime_type);
GDK_AVAILABLE_IN_ALL
void                    gdk_content_formats_builder_add_gtype   (GdkContentFormatsBuilder       *builder,
                                                                 GType                           type);

/* dunno where else to put this */
#define GDK_TYPE_FILE_LIST (gdk_file_list_get_type ())
GDK_AVAILABLE_IN_ALL
GType     gdk_file_list_get_type  (void) G_GNUC_CONST;


G_END_DECLS

#endif /* __GTK_CONTENT_FORMATS_H__ */