checkWidget(); if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT); int  selection_data = 0; int[] typeIds = transfer.getTypeIds(); for (int i = 0; i < typeIds.length; i++) { selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, typeIds[i]); if( selection_data != 0) break; } if (selection_data == 0) return null;  GtkSelectionData gtkSelectionData = new GtkSelectionData(); OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof); TransferData tdata = new TransferData(); tdata.type = gtkSelectionData.target; tdata.pValue = gtkSelectionData.data; tdata.length = gtkSelectionData.length; tdata.format = gtkSelectionData.format; Object result = transfer.nativeToJava(tdata); OS.gtk_selection_data_free(selection_data); return result;
return getContents(transfer, DND.CLIPBOARD);
public Object getContents(Transfer transfer) {	checkWidget();	if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT);	int /*long*/ selection_data = 0;	int[] typeIds = transfer.getTypeIds();	for (int i = 0; i < typeIds.length; i++) {		selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, typeIds[i]);		if( selection_data != 0) break;	}	if (selection_data == 0) return null;		GtkSelectionData gtkSelectionData = new GtkSelectionData();	OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);	TransferData tdata = new TransferData();	tdata.type = gtkSelectionData.target;	tdata.pValue = gtkSelectionData.data;	tdata.length = gtkSelectionData.length;	tdata.format = gtkSelectionData.format;	Object result = transfer.nativeToJava(tdata);	OS.gtk_selection_data_free(selection_data);	return result;}