if (display == null) DND.error(SWT.ERROR_WIDGET_DISPOSED); if (display.isDisposed()) DND.error(SWT.ERROR_DEVICE_DISPOSED);
checkWidget();
public Object getContents(Transfer transfer) {	if (display == null) DND.error(SWT.ERROR_WIDGET_DISPOSED);	if (display.isDisposed()) DND.error(SWT.ERROR_DEVICE_DISPOSED);	if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT);		Object result = null;		int ig = OS.PhInputGroup(0);	int cbdata = OS.PhClipboardPasteStart((short)ig);	if (cbdata == 0) return result;	try {		String[] names = transfer.getTypeNames();		int[] ids = transfer.getTypeIds();		for (int i = 0; i < names.length; i++) {			byte[] name = Converter.wcsToMbcs(null, names[i], true);			name [Math.min(8, name.length) - 1] = (byte)0;			int pClipHeader = OS.PhClipboardPasteType(cbdata, name);			if (pClipHeader != 0) {				PhClipHeader clipHeader = new PhClipHeader();				OS.memmove(clipHeader, pClipHeader, PhClipHeader.sizeof);				TransferData data = new TransferData();				data.pData = clipHeader.data;				data.length = clipHeader.length;				data.type = ids[i];				result = transfer.nativeToJava(data);				break;			}		}	} finally {		OS.PhClipboardPasteFinish(cbdata);	}		return result;}