byte[][] types = _getAvailableTypes(); String[] names = new String[types.length]; for (int i = 0; i < names.length; i++) {
int xDisplay = OS.XtDisplay (shellHandle); if (xDisplay == 0) return new String[0]; int[] types = getAvailableTypes(xDisplay, clipboardAtom); int[] primaryTypes = getAvailableTypes(xDisplay, primaryAtom); String[] names = new String[types.length + primaryTypes.length]; int index = 0; for (int i = 0; i < types.length; i++) { int ptr = OS.XmGetAtomName(xDisplay, types[i]); int length = OS.strlen(ptr); byte[] nameBuf = new byte[length]; OS.memmove(nameBuf, ptr, length); OS.XtFree(ptr);
public String[] getAvailableTypeNames() {	checkWidget();	byte[][] types = _getAvailableTypes();	String[] names = new String[types.length];	for (int i = 0; i < names.length; i++) {		/* Use the character encoding for the default locale */		names[i] = new String(Converter.mbcsToWcs(null, types[i]));	}	return names;}