changed unused SVG dnd API to speak in terms of "guchar *data", "gint

2003-12-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: changed unused SVG dnd API to speak in
	terms of "guchar *data", "gint data_len" instead of GimpVectors.
This commit is contained in:
Michael Natterer 2003-12-20 21:59:52 +00:00 committed by Michael Natterer
parent 3fb7d2b325
commit e5dd444762
3 changed files with 20 additions and 21 deletions

View file

@ -1,3 +1,8 @@
2003-12-20 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdnd.[ch]: changed unused SVG dnd API to speak in
terms of "guchar *data", "gint data_len" instead of GimpVectors.
2003-12-20 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdnd.h: sanitized DND identifiers

View file

@ -1406,17 +1406,16 @@ gimp_dnd_get_svg_data (GtkWidget *widget,
gint *format,
gint *length)
{
GimpVectors *vectors;
guint8 *vals;
guchar *svg_data;
gint svg_data_length;
vectors = (* (GimpDndDragSvgFunc) get_svg_func) (widget, get_svg_data);
svg_data = (* (GimpDndDragSvgFunc) get_svg_func) (widget, &svg_data_length,
get_svg_data);
vals = NULL;
*format = 8;
*length = svg_data_length;
*format = 0;
*length = 0;
return (guchar *) vals;
return svg_data;
}
static void
@ -1427,20 +1426,13 @@ gimp_dnd_set_svg_data (GtkWidget *widget,
gint format,
gint length)
{
GimpVectors *vectors;
guint8 *svg_data;
if (format != 8)
{
g_warning ("Received invalid SVG data!");
return;
}
svg_data = (guint8 *) vals;
vectors = NULL;
(* (GimpDndDropSvgFunc) set_svg_func) (widget, vectors, set_svg_data);
(* (GimpDndDropSvgFunc) set_svg_func) (widget, vals, length, set_svg_data);
}
void

View file

@ -168,11 +168,13 @@ void gimp_dnd_color_dest_remove (GtkWidget *widget);
/* svg dnd functions */
typedef GimpVectors * (* GimpDndDragSvgFunc) (GtkWidget *widget,
gpointer data);
typedef void (* GimpDndDropSvgFunc) (GtkWidget *widget,
GimpVectors *vectors,
gpointer data);
typedef guchar * (* GimpDndDragSvgFunc) (GtkWidget *widget,
gint *svg_data_len,
gpointer data);
typedef void (* GimpDndDropSvgFunc) (GtkWidget *widget,
const guchar *svg_data,
gint svg_data_len,
gpointer data);
void gimp_dnd_svg_source_add (GtkWidget *widget,
GimpDndDragSvgFunc get_svg_func,