mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-27 07:55:37 +00:00
9ad6d1b6a4
use when the IntPtr is NULL. * generator/SignalHandler.cs, generator/CallbackGen.cs: removed call to Initialize for structs * gtk/Clipboard.custom, gtk/ClipboardClearFunc.cs, gtk/ClipboardGetFunc.cs, gtk/GtkSharp.GtkClipboardClearFuncNative.cs, gtk/GtkSharp.ClipboardGetFuncNative.cs, SelectionData.custom: Hand-wrapped selection handling stuff, along with relevant signals and the like. * gnome/voidObjectAffineSVPintSignal.cs: removed Initialize for hand-wrapped signal * sample/GnomeHelloWorld.cs, sample/Size.cs: compare against .Zero instead of using IsNull * api/gtk-api.xml, sources/Gtk.metadata: metadata updates for hiding some manually-wrapped stuff svn path=/trunk/gtk-sharp/; revision=8912
30 lines
826 B
Plaintext
30 lines
826 B
Plaintext
|
|
[DllImport("gtk-x11-2.0")]
|
|
private static extern string gtk_selection_data_get_text (ref Gtk.SelectionData selection_data);
|
|
|
|
[DllImport("gtk-x11-2.0")]
|
|
private static extern void gtk_selection_data_set_text (ref Gtk.SelectionData selection_data, string str, int len);
|
|
|
|
public string Text {
|
|
get {
|
|
return gtk_selection_data_get_text (ref this);
|
|
}
|
|
set {
|
|
gtk_selection_data_set_text (ref this, value, value.Length);
|
|
}
|
|
}
|
|
|
|
[DllImport("gtk-x11-2.0")]
|
|
static extern void gtk_selection_data_set (ref Gtk.SelectionData raw, IntPtr type, int format, byte[] data, int length);
|
|
|
|
public byte[] Data {
|
|
get {
|
|
byte[] ret = new byte[length];
|
|
Marshal.Copy (_data, ret, 0, length);
|
|
return ret;
|
|
}
|
|
set {
|
|
gtk_selection_data_set (ref this, _type, format, value, value.Length);
|
|
}
|
|
}
|