1
/* LIBGIMP - The GIMP Library
2
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
29
gimp_plugin_icon_register (const gchar *procedure_name,
30
GimpIconType icon_type,
31
const guint8 *icon_data)
33
gint icon_data_length;
35
g_return_val_if_fail (procedure_name != NULL, FALSE);
36
g_return_val_if_fail (icon_data != NULL, FALSE);
40
case GIMP_ICON_TYPE_STOCK_ID:
41
case GIMP_ICON_TYPE_IMAGE_FILE:
42
icon_data_length = strlen (icon_data) + 1;
45
case GIMP_ICON_TYPE_INLINE_PIXBUF:
46
g_return_val_if_fail (g_ntohl (*((gint32 *) icon_data)) == 0x47646b50,
49
icon_data_length = g_ntohl (*((gint32 *) (icon_data + 4)));
53
g_return_val_if_reached (FALSE);
56
return _gimp_plugin_icon_register (procedure_name,
57
icon_type, icon_data_length, icon_data);