diff --git a/ChangeLog b/ChangeLog index b94a1d2bfa..730123e5dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-20 Michael Natterer + + * 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 * app/widgets/gimpdnd.h: sanitized DND identifiers diff --git a/app/widgets/gimpdnd.c b/app/widgets/gimpdnd.c index 4a4daf1fba..28c3202208 100644 --- a/app/widgets/gimpdnd.c +++ b/app/widgets/gimpdnd.c @@ -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 diff --git a/app/widgets/gimpdnd.h b/app/widgets/gimpdnd.h index e37b0e31f9..6510bb3a84 100644 --- a/app/widgets/gimpdnd.h +++ b/app/widgets/gimpdnd.h @@ -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,