/** * @since Available in iOS 3.2 and later. */ public CTFontDescriptor createMatchingFontDescriptor(List<CTFontAttribute> mandatoryAttributes) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return createMatchingFontDescriptor(set); } /**
public boolean contains(NativeObject value) { return containsValue(value.as(VoidPtr.class)); }
public static CFSet create(NSObject ... objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.length == 0) { return create(null, null, 0, getTypeCallBacks()); } NSObjectPtr values = Struct.allocate(NSObjectPtr.class, objects.length); values.set(objects); return create(null, values.as(VoidPtr.VoidPtrPtr.class), objects.length, getTypeCallBacks()); } public static CFSet create(CFType ... objects) {
public static <T extends NativeObject> CFSet create(Collection<T> objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.size() == 0 || objects.iterator().next() instanceof CFType) { return create(objects.toArray(new CFType[objects.size()])); } if (objects.iterator().next() instanceof NSObject) { return create(objects.toArray(new NSObject[objects.size()])); } throw new IllegalArgumentException("items can only be of type CFType or NSObject!"); } public static CFSet create(NSObject ... objects) {
public static <T extends NativeObject> CFSet create(Collection<T> objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.size() == 0 || objects.iterator().next() instanceof CFType) { return create(objects.toArray(new CFType[objects.size()])); } if (objects.iterator().next() instanceof NSObject) { return create(objects.toArray(new NSObject[objects.size()])); } throw new IllegalArgumentException("items can only be of type CFType or NSObject!"); } public static CFSet create(NSObject ... objects) {
public static CFSet create(CFType ... objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.length == 0) { return create(null, null, 0, getTypeCallBacks()); } CFTypePtr values = Struct.allocate(CFTypePtr.class, objects.length); values.set(objects); return create(null, values.as(VoidPtr.VoidPtrPtr.class), objects.length, getTypeCallBacks()); }
/** * @since Available in iOS 3.2 and later. */ public List<CTFontDescriptor> createMatchingFontDescriptors(List<CTFontAttribute> mandatoryAttributes) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return createMatchingFontDescriptors(set).toList(CTFontDescriptor.class); } /**
public static <T extends NativeObject> CFSet create(Collection<T> objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.size() == 0 || objects.iterator().next() instanceof CFType) { return create(objects.toArray(new CFType[objects.size()])); } if (objects.iterator().next() instanceof NSObject) { return create(objects.toArray(new NSObject[objects.size()])); } throw new IllegalArgumentException("items can only be of type CFType or NSObject!"); } public static CFSet create(NSObject ... objects) {
public boolean contains(NativeObject value) { return containsValue(value.as(VoidPtr.class)); }
public static CFSet create(CFType ... objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.length == 0) { return create(null, null, 0, getTypeCallBacks()); } CFTypePtr values = Struct.allocate(CFTypePtr.class, objects.length); values.set(objects); return create(null, values.as(VoidPtr.VoidPtrPtr.class), objects.length, getTypeCallBacks()); }
/** * @since Available in iOS 6.0 and later. */ public static boolean matchFontDescriptors(List<CTFontDescriptor> descriptors, List<CTFontAttribute> mandatoryAttributes, ProgressHandler progressHandler) { CTFontDescriptor.progressHandler = progressHandler; CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return matchFontDescriptors(CFArray.create(descriptors), set, new FunctionPtr(cbProgress)); } /**
public boolean contains(NativeObject value) { return containsValue(value.as(VoidPtr.class)); }
public static CFSet create(CFType ... objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.length == 0) { return create(null, null, 0, getTypeCallBacks()); } CFTypePtr values = Struct.allocate(CFTypePtr.class, objects.length); values.set(objects); return create(null, values.as(VoidPtr.VoidPtrPtr.class), objects.length, getTypeCallBacks()); }
/** * @since Available in iOS 3.2 and later. */ public CTFontDescriptor createMatchingFontDescriptor(List<CTFontAttribute> mandatoryAttributes) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return createMatchingFontDescriptor(set); } /**
public static CFSet create(NSObject ... objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.length == 0) { return create(null, null, 0, getTypeCallBacks()); } NSObjectPtr values = Struct.allocate(NSObjectPtr.class, objects.length); values.set(objects); return create(null, values.as(VoidPtr.VoidPtrPtr.class), objects.length, getTypeCallBacks()); } public static CFSet create(CFType ... objects) {
/** * @since Available in iOS 3.2 and later. */ public CTFontDescriptor createMatchingFontDescriptor(List<CTFontAttribute> mandatoryAttributes) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return createMatchingFontDescriptor(set); } /**
public static CFSet create(NSObject ... objects) { if (objects == null) { throw new NullPointerException("objects"); } if (objects.length == 0) { return create(null, null, 0, getTypeCallBacks()); } NSObjectPtr values = Struct.allocate(NSObjectPtr.class, objects.length); values.set(objects); return create(null, values.as(VoidPtr.VoidPtrPtr.class), objects.length, getTypeCallBacks()); } public static CFSet create(CFType ... objects) {
/** * @since Available in iOS 3.2 and later. */ public List<CTFontDescriptor> createMatchingFontDescriptors(List<CTFontAttribute> mandatoryAttributes) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return createMatchingFontDescriptors(set).toList(CTFontDescriptor.class); } /**
/** * @since Available in iOS 3.2 and later. */ public List<CTFontDescriptor> createMatchingFontDescriptors(List<CTFontAttribute> mandatoryAttributes) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return createMatchingFontDescriptors(set).toList(CTFontDescriptor.class); } /**
/** * @since Available in iOS 6.0 and later. */ public static boolean matchFontDescriptors(List<CTFontDescriptor> descriptors, List<CTFontAttribute> mandatoryAttributes, @Block Block2<CTFontDescriptorMatchingState, NSDictionary, Boolean> progressBlock) { CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return matchFontDescriptors(CFArray.create(descriptors), set, progressBlock); } /**