|
Packit |
a4058c |
/*
|
|
Packit |
a4058c |
* Copyright (C) 2016 Bastien Nocera <hadess@hadess.net>
|
|
Packit |
a4058c |
*
|
|
Packit |
a4058c |
* Authors: Bastien Nocera <hadess@hadess.net>
|
|
Packit |
a4058c |
*
|
|
Packit |
a4058c |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
a4058c |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
a4058c |
* the Free Software Foundation; either version 2 of the License, or
|
|
Packit |
a4058c |
* (at your option) any later version.
|
|
Packit |
a4058c |
*
|
|
Packit |
a4058c |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
a4058c |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
a4058c |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
a4058c |
* GNU General Public License for more details.
|
|
Packit |
a4058c |
*
|
|
Packit |
a4058c |
* You should have received a copy of the GNU General Public License
|
|
Packit |
a4058c |
* along with this program; if not, write to the Free Software
|
|
Packit |
a4058c |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
a4058c |
*
|
|
Packit |
a4058c |
*/
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
int main (int argc, char **argv)
|
|
Packit |
a4058c |
{
|
|
Packit |
a4058c |
GSList *formats, *l;
|
|
Packit |
a4058c |
GString *s;
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
formats = gdk_pixbuf_get_formats ();
|
|
Packit |
a4058c |
s = g_string_new (NULL);
|
|
Packit |
a4058c |
for (l = formats; l != NULL; l = l->next) {
|
|
Packit |
a4058c |
GdkPixbufFormat *format = l->data;
|
|
Packit |
a4058c |
char **mime_types;
|
|
Packit |
a4058c |
guint i;
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
mime_types = gdk_pixbuf_format_get_mime_types (format);
|
|
Packit |
a4058c |
for (i = 0; mime_types[i] != NULL; i++) {
|
|
Packit |
a4058c |
g_string_append (s, mime_types[i]);
|
|
Packit |
a4058c |
g_string_append (s, ";");
|
|
Packit |
a4058c |
}
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
g_strfreev (mime_types);
|
|
Packit |
a4058c |
}
|
|
Packit |
a4058c |
g_slist_free (formats);
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
g_print ("%s", s->str);
|
|
Packit |
a4058c |
g_string_free (s, TRUE);
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
return 0;
|
|
Packit |
a4058c |
}
|