2004-01-27 Mike Kestner <mkestner@ximian.com>

* glue/selectiondata.c : expose data field.
	* gtk/SelectionData.custom : add Data property.
	[Fixes #53397]

svn path=/trunk/gtk-sharp/; revision=22563
This commit is contained in:
Mike Kestner 2004-01-28 04:50:19 +00:00
parent 0dac8ebd48
commit 37aad1b278
3 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-01-27 Mike Kestner <mkestner@ximian.com>
* glue/selectiondata.c : expose data field.
* gtk/SelectionData.custom : add Data property.
[Fixes #53397]
2004-01-27 John Luke <jluke@cfl.rr.com>
* gtk/AccelKey.custom: add convenience ctor

View file

@ -10,6 +10,13 @@
gint gtksharp_gtk_selection_data_get_length (GtkSelectionData *data);
gint gtksharp_gtk_selection_data_get_format (GtkSelectionData *data);
guchar *gtksharp_gtk_selection_data_get_data_pointer (GtkSelectionData *data);
guchar *
gtksharp_gtk_selection_data_get_data_pointer (GtkSelectionData *data)
{
return data->data;
}
gint
gtksharp_gtk_selection_data_get_length (GtkSelectionData *data)

View file

@ -31,3 +31,14 @@
}
}
[DllImport("gtksharpglue")]
private static extern IntPtr gtksharp_selection_data_get_data_pointer (IntPtr selection_data);
public byte[] Data {
get {
IntPtr data_ptr = gtksharp_selection_data_get_data_pointer (Handle);
byte[] result = new byte [Length];
Marshal.Copy (data_ptr, result, 0, Length);
return result;
}
}