Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSUnit.h | /*
NSUnit.h
Copyright (c) 2015-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/NSObject.h>
NS_ASSUME_NONNULL_BEGIN
#pragma mark Unit Converters
/*
NSUnitConverter describes how to convert a unit to and from the base unit of its dimension. Subclass NSUnitConverter to implement new ways of converting a unit.
*/
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitConverter : NSObject
/*
The following methods perform conversions to and from the base unit of a unit class's dimension. Each unit is defined against the base unit for the dimension to which the unit belongs.
These methods are implemented differently depending on the type of conversion. The default implementation in NSUnitConverter simply returns the value.
These methods exist for the sole purpose of creating custom conversions for units in order to support converting a value from one kind of unit to another in the same dimension. NSUnitConverter is an abstract class that is meant to be subclassed. There is no need to call these methods directly to do a conversion -- the correct way to convert a measurement is to use [NSMeasurement measurementByConvertingToUnit:]. measurementByConvertingToUnit: uses the following 2 methods internally to perform the conversion.
When creating a custom unit converter, you must override these two methods to implement the conversion to and from a value in terms of a unit and the corresponding value in terms of the base unit of that unit's dimension in order for conversion to work correctly.
*/
/*
This method takes a value in terms of a unit and returns the corresponding value in terms of the base unit of the original unit's dimension.
@param value Value in terms of the unit class
@return Value in terms of the base unit
*/
- (double)baseUnitValueFromValue:(double)value;
/*
This method takes in a value in terms of the base unit of a unit's dimension and returns the equivalent value in terms of the unit.
@param baseUnitValue Value in terms of the base unit
@return Value in terms of the unit class
*/
- (double)valueFromBaseUnitValue:(double)baseUnitValue;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitConverterLinear : NSUnitConverter <NSSecureCoding> {
@private
double _coefficient;
double _constant;
}
/*
For units that require linear conversion, the methods perform calculations in the form of y = ax + b, where
- x is the value in terms of the unit on which this method is called
- y is the value in terms of the base unit of the dimension
- a is the known coefficient used for this unit's conversion
- b is the known constant used for this unit's conversion
baseUnitValueFromValue: performs the conversion in the form of y = ax + b, where x represents the value passed in and y represents the value returned.
valueFromBaseUnitValue: performs the inverse conversion in the form of x = (y + (-1 * b))/a, where y represents the value passed in and x represents the value returned.
An example of this is NSUnitTemperature. For Celsius, baseUnitValueFromValue: calculates the value in Kelvin using the formula
K = 1 * °C + 273.15
and valueFromBaseUnitValue: calculates the value in Celsius using the formula
C° = (K + (-1 * 273.15))/1
where the coefficient is 1 and the constant is 273.15.
For units that only require conversion by scale factor, the coefficient is the scale factor and the constant is always 0. baseUnitValueFromValue: calculates the value in meters using the formula
valueInMeters = 1000 * valueInKilometers + 0
and valueFromBaseUnitValue: calculates the value in kilometers using the formula
valueInKilometers = valueInMeters / 1000
where the coefficient is 1000 and the constant is 0. This API provides a convenience initializer initWithCoefficient: that assumes the constant is 0.
*/
@property (readonly) double coefficient;
@property (readonly) double constant;
- (instancetype)initWithCoefficient:(double)coefficient;
- (instancetype)initWithCoefficient:(double)coefficient constant:(double)constant NS_DESIGNATED_INITIALIZER;
@end
#pragma mark Unit
/*
NSUnit is the base class for all unit types (dimensional and dimensionless).
*/
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnit : NSObject <NSCopying, NSSecureCoding> {
@private
NSString *_symbol;
}
@property (readonly, copy) NSString *symbol;
- (instancetype)init API_UNAVAILABLE(macos, ios, watchos, tvos);
+ (instancetype)new API_UNAVAILABLE(macos, ios, watchos, tvos);
- (instancetype)initWithSymbol:(NSString *)symbol NS_DESIGNATED_INITIALIZER;
@end
#pragma mark Dimensions
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSDimension : NSUnit <NSSecureCoding> {
@private
NSUInteger _reserved;
@protected
NSUnitConverter *_converter;
}
@property (readonly, copy) NSUnitConverter *converter;
- (instancetype)initWithSymbol:(NSString *)symbol converter:(NSUnitConverter *)converter NS_DESIGNATED_INITIALIZER;
/*
This class method returns an instance of the dimension class that represents the base unit of that dimension.
e.g.
NSUnitSpeed *metersPerSecond = [NSUnitSpeed baseUnit];
*/
+ (instancetype)baseUnit;
@end
#pragma mark - Predefined Dimensions
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitAcceleration : NSDimension <NSSecureCoding>
/*
Base unit - metersPerSecondSquared
*/
@property (class, readonly, copy) NSUnitAcceleration *metersPerSecondSquared;
@property (class, readonly, copy) NSUnitAcceleration *gravity;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitAngle : NSDimension <NSSecureCoding>
/*
Base unit - degrees
*/
@property (class, readonly, copy) NSUnitAngle *degrees;
@property (class, readonly, copy) NSUnitAngle *arcMinutes;
@property (class, readonly, copy) NSUnitAngle *arcSeconds;
@property (class, readonly, copy) NSUnitAngle *radians;
@property (class, readonly, copy) NSUnitAngle *gradians;
@property (class, readonly, copy) NSUnitAngle *revolutions;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitArea : NSDimension <NSSecureCoding>
/*
Base unit - squareMeters
*/
@property (class, readonly, copy) NSUnitArea *squareMegameters;
@property (class, readonly, copy) NSUnitArea *squareKilometers;
@property (class, readonly, copy) NSUnitArea *squareMeters;
@property (class, readonly, copy) NSUnitArea *squareCentimeters;
@property (class, readonly, copy) NSUnitArea *squareMillimeters;
@property (class, readonly, copy) NSUnitArea *squareMicrometers;
@property (class, readonly, copy) NSUnitArea *squareNanometers;
@property (class, readonly, copy) NSUnitArea *squareInches;
@property (class, readonly, copy) NSUnitArea *squareFeet;
@property (class, readonly, copy) NSUnitArea *squareYards;
@property (class, readonly, copy) NSUnitArea *squareMiles;
@property (class, readonly, copy) NSUnitArea *acres;
@property (class, readonly, copy) NSUnitArea *ares;
@property (class, readonly, copy) NSUnitArea *hectares;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitConcentrationMass : NSDimension <NSSecureCoding>
/*
Base unit - gramsPerLiter
*/
@property (class, readonly, copy) NSUnitConcentrationMass *gramsPerLiter;
@property (class, readonly, copy) NSUnitConcentrationMass *milligramsPerDeciliter;
+ (NSUnitConcentrationMass *)millimolesPerLiterWithGramsPerMole:(double)gramsPerMole;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitDispersion : NSDimension <NSSecureCoding>
/*
Base unit - partsPerMillion
*/
@property (class, readonly, copy) NSUnitDispersion *partsPerMillion;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitDuration : NSDimension <NSSecureCoding> // Note: This class is not meant to be used for date calculation. Use NSDate/NSCalendar/NSDateComponents for calendrical date and time operations.
/*
Base unit - seconds
*/
@property (class, readonly, copy) NSUnitDuration *hours;
@property (class, readonly, copy) NSUnitDuration *minutes;
@property (class, readonly, copy) NSUnitDuration *seconds;
@property (class, readonly, copy) NSUnitDuration *milliseconds API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
@property (class, readonly, copy) NSUnitDuration *microseconds API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
@property (class, readonly, copy) NSUnitDuration *nanoseconds API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
@property (class, readonly, copy) NSUnitDuration *picoseconds API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitElectricCharge : NSDimension <NSSecureCoding>
/*
Base unit - coulombs
*/
@property (class, readonly, copy) NSUnitElectricCharge *coulombs;
@property (class, readonly, copy) NSUnitElectricCharge *megaampereHours;
@property (class, readonly, copy) NSUnitElectricCharge *kiloampereHours;
@property (class, readonly, copy) NSUnitElectricCharge *ampereHours;
@property (class, readonly, copy) NSUnitElectricCharge *milliampereHours;
@property (class, readonly, copy) NSUnitElectricCharge *microampereHours;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitElectricCurrent : NSDimension <NSSecureCoding>
/*
Base unit - amperes
*/
@property (class, readonly, copy) NSUnitElectricCurrent *megaamperes;
@property (class, readonly, copy) NSUnitElectricCurrent *kiloamperes;
@property (class, readonly, copy) NSUnitElectricCurrent *amperes;
@property (class, readonly, copy) NSUnitElectricCurrent *milliamperes;
@property (class, readonly, copy) NSUnitElectricCurrent *microamperes;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitElectricPotentialDifference : NSDimension <NSSecureCoding>
/*
Base unit - volts
*/
@property (class, readonly, copy) NSUnitElectricPotentialDifference *megavolts;
@property (class, readonly, copy) NSUnitElectricPotentialDifference *kilovolts;
@property (class, readonly, copy) NSUnitElectricPotentialDifference *volts;
@property (class, readonly, copy) NSUnitElectricPotentialDifference *millivolts;
@property (class, readonly, copy) NSUnitElectricPotentialDifference *microvolts;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitElectricResistance : NSDimension <NSSecureCoding>
/*
Base unit - ohms
*/
@property (class, readonly, copy) NSUnitElectricResistance *megaohms;
@property (class, readonly, copy) NSUnitElectricResistance *kiloohms;
@property (class, readonly, copy) NSUnitElectricResistance *ohms;
@property (class, readonly, copy) NSUnitElectricResistance *milliohms;
@property (class, readonly, copy) NSUnitElectricResistance *microohms;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitEnergy : NSDimension <NSSecureCoding>
/*
Base unit - joules
*/
@property (class, readonly, copy) NSUnitEnergy *kilojoules;
@property (class, readonly, copy) NSUnitEnergy *joules;
@property (class, readonly, copy) NSUnitEnergy *kilocalories;
@property (class, readonly, copy) NSUnitEnergy *calories;
@property (class, readonly, copy) NSUnitEnergy *kilowattHours;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitFrequency : NSDimension <NSSecureCoding>
/*
Base unit - hertz
*/
@property (class, readonly, copy) NSUnitFrequency *terahertz;
@property (class, readonly, copy) NSUnitFrequency *gigahertz;
@property (class, readonly, copy) NSUnitFrequency *megahertz;
@property (class, readonly, copy) NSUnitFrequency *kilohertz;
@property (class, readonly, copy) NSUnitFrequency *hertz;
@property (class, readonly, copy) NSUnitFrequency *millihertz;
@property (class, readonly, copy) NSUnitFrequency *microhertz;
@property (class, readonly, copy) NSUnitFrequency *nanohertz;
// 1 FPS ≡ 1 Hertz
@property (class, readonly, copy) NSUnitFrequency *framesPerSecond API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitFuelEfficiency : NSDimension <NSSecureCoding>
/*
Base unit - litersPer100Kilometers
*/
@property (class, readonly, copy) NSUnitFuelEfficiency *litersPer100Kilometers;
@property (class, readonly, copy) NSUnitFuelEfficiency *milesPerImperialGallon;
@property (class, readonly, copy) NSUnitFuelEfficiency *milesPerGallon;
@end
/*
A dimension for representing amounts of digital information.
Base Unit: Byte
The values of the below follow IEC 80000-13 definitions and conventions.
*/
API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0))
NS_SWIFT_NAME(UnitInformationStorage)
@interface NSUnitInformationStorage : NSDimension <NSSecureCoding>
// Bytes are defined by IEC 80000-13: one byte is 8 bits.
@property (readonly, class, copy) NSUnitInformationStorage *bytes;
// One byte is 8 bits; one nibble is 4 bits.
@property (readonly, class, copy) NSUnitInformationStorage *bits;
@property (readonly, class, copy) NSUnitInformationStorage *nibbles;
// SI-prefixed units (i.e. base 10):
// 1 kilobyte = 1000¹ bytes; 1 megabyte = 1000² bytes; etc.
@property (readonly, class, copy) NSUnitInformationStorage *yottabytes;
@property (readonly, class, copy) NSUnitInformationStorage *zettabytes;
@property (readonly, class, copy) NSUnitInformationStorage *exabytes;
@property (readonly, class, copy) NSUnitInformationStorage *petabytes;
@property (readonly, class, copy) NSUnitInformationStorage *terabytes;
@property (readonly, class, copy) NSUnitInformationStorage *gigabytes;
@property (readonly, class, copy) NSUnitInformationStorage *megabytes;
@property (readonly, class, copy) NSUnitInformationStorage *kilobytes;
@property (readonly, class, copy) NSUnitInformationStorage *yottabits;
@property (readonly, class, copy) NSUnitInformationStorage *zettabits;
@property (readonly, class, copy) NSUnitInformationStorage *exabits;
@property (readonly, class, copy) NSUnitInformationStorage *petabits;
@property (readonly, class, copy) NSUnitInformationStorage *terabits;
@property (readonly, class, copy) NSUnitInformationStorage *gigabits;
@property (readonly, class, copy) NSUnitInformationStorage *megabits;
@property (readonly, class, copy) NSUnitInformationStorage *kilobits;
// IEC-prefixed units (i.e. base 2):
// 1 kibibyte = 1024¹ bytes; 1 mebibyte = 1024² bytes; etc.
@property (readonly, class, copy) NSUnitInformationStorage *yobibytes;
@property (readonly, class, copy) NSUnitInformationStorage *zebibytes;
@property (readonly, class, copy) NSUnitInformationStorage *exbibytes;
@property (readonly, class, copy) NSUnitInformationStorage *pebibytes;
@property (readonly, class, copy) NSUnitInformationStorage *tebibytes;
@property (readonly, class, copy) NSUnitInformationStorage *gibibytes;
@property (readonly, class, copy) NSUnitInformationStorage *mebibytes;
@property (readonly, class, copy) NSUnitInformationStorage *kibibytes;
@property (readonly, class, copy) NSUnitInformationStorage *yobibits;
@property (readonly, class, copy) NSUnitInformationStorage *zebibits;
@property (readonly, class, copy) NSUnitInformationStorage *exbibits;
@property (readonly, class, copy) NSUnitInformationStorage *pebibits;
@property (readonly, class, copy) NSUnitInformationStorage *tebibits;
@property (readonly, class, copy) NSUnitInformationStorage *gibibits;
@property (readonly, class, copy) NSUnitInformationStorage *mebibits;
@property (readonly, class, copy) NSUnitInformationStorage *kibibits;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitLength : NSDimension <NSSecureCoding>
/*
Base unit - meters
*/
@property (class, readonly, copy) NSUnitLength *megameters;
@property (class, readonly, copy) NSUnitLength *kilometers;
@property (class, readonly, copy) NSUnitLength *hectometers;
@property (class, readonly, copy) NSUnitLength *decameters;
@property (class, readonly, copy) NSUnitLength *meters;
@property (class, readonly, copy) NSUnitLength *decimeters;
@property (class, readonly, copy) NSUnitLength *centimeters;
@property (class, readonly, copy) NSUnitLength *millimeters;
@property (class, readonly, copy) NSUnitLength *micrometers;
@property (class, readonly, copy) NSUnitLength *nanometers;
@property (class, readonly, copy) NSUnitLength *picometers;
@property (class, readonly, copy) NSUnitLength *inches;
@property (class, readonly, copy) NSUnitLength *feet;
@property (class, readonly, copy) NSUnitLength *yards;
@property (class, readonly, copy) NSUnitLength *miles;
@property (class, readonly, copy) NSUnitLength *scandinavianMiles;
@property (class, readonly, copy) NSUnitLength *lightyears;
@property (class, readonly, copy) NSUnitLength *nauticalMiles;
@property (class, readonly, copy) NSUnitLength *fathoms;
@property (class, readonly, copy) NSUnitLength *furlongs;
@property (class, readonly, copy) NSUnitLength *astronomicalUnits;
@property (class, readonly, copy) NSUnitLength *parsecs;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitIlluminance : NSDimension <NSSecureCoding>
/*
Base unit - lux
*/
@property (class, readonly, copy) NSUnitIlluminance *lux;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitMass : NSDimension <NSSecureCoding>
/*
Base unit - kilograms
*/
@property (class, readonly, copy) NSUnitMass *kilograms;
@property (class, readonly, copy) NSUnitMass *grams;
@property (class, readonly, copy) NSUnitMass *decigrams;
@property (class, readonly, copy) NSUnitMass *centigrams;
@property (class, readonly, copy) NSUnitMass *milligrams;
@property (class, readonly, copy) NSUnitMass *micrograms;
@property (class, readonly, copy) NSUnitMass *nanograms;
@property (class, readonly, copy) NSUnitMass *picograms;
@property (class, readonly, copy) NSUnitMass *ounces;
@property (class, readonly, copy) NSUnitMass *poundsMass;
@property (class, readonly, copy) NSUnitMass *stones;
@property (class, readonly, copy) NSUnitMass *metricTons;
@property (class, readonly, copy) NSUnitMass *shortTons;
@property (class, readonly, copy) NSUnitMass *carats;
@property (class, readonly, copy) NSUnitMass *ouncesTroy;
@property (class, readonly, copy) NSUnitMass *slugs;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitPower : NSDimension <NSSecureCoding>
/*
Base unit - watts
*/
@property (class, readonly, copy) NSUnitPower *terawatts;
@property (class, readonly, copy) NSUnitPower *gigawatts;
@property (class, readonly, copy) NSUnitPower *megawatts;
@property (class, readonly, copy) NSUnitPower *kilowatts;
@property (class, readonly, copy) NSUnitPower *watts;
@property (class, readonly, copy) NSUnitPower *milliwatts;
@property (class, readonly, copy) NSUnitPower *microwatts;
@property (class, readonly, copy) NSUnitPower *nanowatts;
@property (class, readonly, copy) NSUnitPower *picowatts;
@property (class, readonly, copy) NSUnitPower *femtowatts;
@property (class, readonly, copy) NSUnitPower *horsepower;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitPressure : NSDimension <NSSecureCoding>
/*
Base unit - newtonsPerMetersSquared (equivalent to 1 pascal)
*/
@property (class, readonly, copy) NSUnitPressure *newtonsPerMetersSquared;
@property (class, readonly, copy) NSUnitPressure *gigapascals;
@property (class, readonly, copy) NSUnitPressure *megapascals;
@property (class, readonly, copy) NSUnitPressure *kilopascals;
@property (class, readonly, copy) NSUnitPressure *hectopascals;
@property (class, readonly, copy) NSUnitPressure *inchesOfMercury;
@property (class, readonly, copy) NSUnitPressure *bars;
@property (class, readonly, copy) NSUnitPressure *millibars;
@property (class, readonly, copy) NSUnitPressure *millimetersOfMercury;
@property (class, readonly, copy) NSUnitPressure *poundsForcePerSquareInch;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitSpeed : NSDimension <NSSecureCoding>
/*
Base unit - metersPerSecond
*/
@property (class, readonly, copy) NSUnitSpeed *metersPerSecond;
@property (class, readonly, copy) NSUnitSpeed *kilometersPerHour;
@property (class, readonly, copy) NSUnitSpeed *milesPerHour;
@property (class, readonly, copy) NSUnitSpeed *knots;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitTemperature : NSDimension <NSSecureCoding>
/*
Base unit - kelvin
*/
@property (class, readonly, copy) NSUnitTemperature *kelvin;
@property (class, readonly, copy) NSUnitTemperature *celsius;
@property (class, readonly, copy) NSUnitTemperature *fahrenheit;
@end
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSUnitVolume : NSDimension <NSSecureCoding>
/*
Base unit - liters
*/
@property (class, readonly, copy) NSUnitVolume *megaliters;
@property (class, readonly, copy) NSUnitVolume *kiloliters;
@property (class, readonly, copy) NSUnitVolume *liters;
@property (class, readonly, copy) NSUnitVolume *deciliters;
@property (class, readonly, copy) NSUnitVolume *centiliters;
@property (class, readonly, copy) NSUnitVolume *milliliters;
@property (class, readonly, copy) NSUnitVolume *cubicKilometers;
@property (class, readonly, copy) NSUnitVolume *cubicMeters;
@property (class, readonly, copy) NSUnitVolume *cubicDecimeters;
@property (class, readonly, copy) NSUnitVolume *cubicCentimeters;
@property (class, readonly, copy) NSUnitVolume *cubicMillimeters;
@property (class, readonly, copy) NSUnitVolume *cubicInches;
@property (class, readonly, copy) NSUnitVolume *cubicFeet;
@property (class, readonly, copy) NSUnitVolume *cubicYards;
@property (class, readonly, copy) NSUnitVolume *cubicMiles;
@property (class, readonly, copy) NSUnitVolume *acreFeet;
@property (class, readonly, copy) NSUnitVolume *bushels;
@property (class, readonly, copy) NSUnitVolume *teaspoons;
@property (class, readonly, copy) NSUnitVolume *tablespoons;
@property (class, readonly, copy) NSUnitVolume *fluidOunces;
@property (class, readonly, copy) NSUnitVolume *cups;
@property (class, readonly, copy) NSUnitVolume *pints;
@property (class, readonly, copy) NSUnitVolume *quarts;
@property (class, readonly, copy) NSUnitVolume *gallons;
@property (class, readonly, copy) NSUnitVolume *imperialTeaspoons;
@property (class, readonly, copy) NSUnitVolume *imperialTablespoons;
@property (class, readonly, copy) NSUnitVolume *imperialFluidOunces;
@property (class, readonly, copy) NSUnitVolume *imperialPints;
@property (class, readonly, copy) NSUnitVolume *imperialQuarts;
@property (class, readonly, copy) NSUnitVolume *imperialGallons;
@property (class, readonly, copy) NSUnitVolume *metricCups;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSTimeZone.h | /* NSTimeZone.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSDate.h>
#import <Foundation/NSNotification.h>
@class NSString, NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSDate, NSData, NSLocale;
NS_ASSUME_NONNULL_BEGIN
@interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
@property (readonly, copy) NSString *name;
@property (readonly, copy) NSData *data;
- (NSInteger)secondsFromGMTForDate:(NSDate *)aDate;
- (nullable NSString *)abbreviationForDate:(NSDate *)aDate;
- (BOOL)isDaylightSavingTimeForDate:(NSDate *)aDate;
- (NSTimeInterval)daylightSavingTimeOffsetForDate:(NSDate *)aDate API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
- (nullable NSDate *)nextDaylightSavingTimeTransitionAfterDate:(NSDate *)aDate API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@end
@interface NSTimeZone (NSExtendedTimeZone)
@property (class, readonly, copy) NSTimeZone *systemTimeZone;
+ (void)resetSystemTimeZone;
@property (class, copy) NSTimeZone *defaultTimeZone;
@property (class, readonly, copy) NSTimeZone *localTimeZone;
@property (class, readonly, copy) NSArray<NSString *> *knownTimeZoneNames;
@property (class, copy) NSDictionary<NSString *, NSString *> *abbreviationDictionary API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
+ (NSDictionary<NSString *, NSString *> *)abbreviationDictionary;
@property (class, readonly, copy) NSString *timeZoneDataVersion API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
@property (readonly) NSInteger secondsFromGMT;
@property (nullable, readonly, copy) NSString *abbreviation;
@property (readonly, getter=isDaylightSavingTime) BOOL daylightSavingTime;
@property (readonly) NSTimeInterval daylightSavingTimeOffset API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // for current instant
@property (nullable, readonly, copy) NSDate *nextDaylightSavingTimeTransition API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // after current instant
@property (readonly, copy) NSString *description;
- (BOOL)isEqualToTimeZone:(NSTimeZone *)aTimeZone;
typedef NS_ENUM(NSInteger, NSTimeZoneNameStyle) {
NSTimeZoneNameStyleStandard, // Central Standard Time
NSTimeZoneNameStyleShortStandard, // CST
NSTimeZoneNameStyleDaylightSaving, // Central Daylight Time
NSTimeZoneNameStyleShortDaylightSaving, // CDT
NSTimeZoneNameStyleGeneric, // Central Time
NSTimeZoneNameStyleShortGeneric // CT
};
- (nullable NSString *)localizedName:(NSTimeZoneNameStyle)style locale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@end
@interface NSTimeZone (NSTimeZoneCreation)
// Primary creation method is +timeZoneWithName:; the
// data-taking variants should rarely be used directly
+ (nullable instancetype)timeZoneWithName:(NSString *)tzName;
+ (nullable instancetype)timeZoneWithName:(NSString *)tzName data:(nullable NSData *)aData;
- (nullable instancetype)initWithName:(NSString *)tzName;
- (nullable instancetype)initWithName:(NSString *)tzName data:(nullable NSData *)aData;
// Time zones created with this never have daylight savings and the
// offset is constant no matter the date; the name and abbreviation
// do NOT follow the POSIX convention (of minutes-west).
+ (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
+ (nullable instancetype)timeZoneWithAbbreviation:(NSString *)abbreviation;
@end
FOUNDATION_EXPORT NSNotificationName const NSSystemTimeZoneDidChangeNotification API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSDebug.h | /* NSDebug.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
/**************************************************************************
WARNING: Unsupported API.
This module contains material that is only partially supported -- if
at all. Do not depend on the existance of any of these symbols in your
code in future releases of this software. Certainly, do not depend on
the symbols in this header in production code. The format of any data
produced by the functions in this header may also change at any time.
However, it should be noted that the features (but not necessarily the
exact implementation) in this file have been found to be generally useful,
and in some cases invaluable, and are not likely to go away anytime soon.
**************************************************************************/
#import <Foundation/NSObject.h>
#import <Foundation/NSAutoreleasePool.h>
/* The environment component of this API
The boolean- and integer-valued variables declared in this header,
plus some values set by methods, read starting values from the
process's environment at process startup. This is mostly a benefit
if you need to initialize these variables to some non-default value
before your program's main() routine gets control, but it also
allows you to change the value without modifying your program's
source.
The initialization from the environment happens very early, but may
not have happened yet at the time of a +load method statically linked
into an application (as opposed to one in a dynamically loaded module).
But as noted in the "Foundation Release Notes", +load methods that are
statically linked into an application are tricky to use and are not
recommended.
Here is a table of the variables/values initialized from the environment
at startup. Some of these just set variables, others call methods to
set the values.
NAME OF ENV. VARIABLE DEFAULT SET TO...
NSDebugEnabled NO "YES"
NSZombieEnabled NO "YES"
NSDeallocateZombies NO "YES"
*/
/**************** General ****************/
FOUNDATION_EXPORT BOOL NSDebugEnabled;
// General-purpose global boolean. Applications and frameworks
// may choose to do some extra checking, or use different
// algorithms, or log informational messages, or whatever, if
// this variable is true (ex: if (NSDebugEnabled) { ... }).
FOUNDATION_EXPORT BOOL NSZombieEnabled;
// Enable object zombies. When an object is deallocated, its isa
// pointer is modified to be that of a "zombie" class (whether or
// not the storage is then freed can be controlled by the
// NSDeallocateZombies variable). Messages sent to the zombie
// object cause logged messages and can be broken on in a debugger.
// The default is NO. Note that changing this variable's value
// has no effect.
FOUNDATION_EXPORT BOOL NSDeallocateZombies;
// Determines whether the storage of objects that have been
// "zombified" is then freed or not. The default value (NO)
// is most suitable for debugging messages sent to zombie
// objects. And since the memory is never freed, storage
// allocated to an object will never be reused, either (which
// is sometimes useful otherwise). Note that changing this
// variable's value has no effect.
FOUNDATION_EXPORT BOOL NSIsFreedObject(id anObject);
// Returns YES if the value passed as the parameter is a pointer
// to a freed object. Note that memory allocation packages will
// eventually reuse freed memory blocks to satisfy a request.
// NSZombieEnabled and NSDeallocateZombies can be used to prevent
// reuse of allocated objects.
/**************** Stack processing ****************/
FOUNDATION_EXPORT void *NSFrameAddress(NSUInteger frame);
FOUNDATION_EXPORT void *NSReturnAddress(NSUInteger frame);
// Returns the value of the frame pointer or return address,
// respectively, of the specified frame. Frames are numbered
// sequentially, with the "current" frame being zero, the
// previous frame being 1, etc. The current frame is the
// frame in which either of these functions is called. For
// example, NSReturnAddress(0) returns an address near where
// this function was called, NSReturnAddress(1) returns the
// address to which control will return when current frame
// exits, etc. If the requested frame does not exist, then
// NULL is returned. The behavior of these functions is
// undefined in the presence of code which has been compiled
// without frame pointers.
FOUNDATION_EXPORT NSUInteger NSCountFrames(void);
// Returns the number of call frames on the stack. The behavior
// of this functions is undefined in the presence of code which
// has been compiled without frame pointers.
/**************** Autorelease pool debugging ****************/
// Functions used as interesting breakpoints in a debugger
// void __NSAutoreleaseNoPool(void *object);
// Called to log the "Object X of class Y autoreleased with no
// pool in place - just leaking" message. If an environment
// variable named "NSAutoreleaseHaltOnNoPool" is set with string
// value "YES", the function will automatically break in the
// debugger (or terminate the process).
// void __NSAutoreleaseFreedObject(void *freedObject);
// Called when a previously freed object would be released
// by an autorelease pool. If an environment variable named
// "NSAutoreleaseHaltOnFreedObject" is set with string value
// "YES", the function will automatically break in the debugger
// (or terminate the process).
@interface NSAutoreleasePool (NSAutoreleasePoolDebugging)
+ (void)showPools;
// Displays to stderr the state of the current thread's
// autorelease pool stack.
/* DTrace static probes for autorelease pool performance analysis and debugging
provider Cocoa_Autorelease {
probe pool_push(unsigned long value); // arg is a token representing pool
probe pool_pop_start(unsigned long value); // arg is a token representing pool
probe pool_pop_end(unsigned long value); // arg is a token representing pool
probe autorelease(unsigned long value); // arg is object pointer
probe error_no_pool(unsigned long value); // arg is object pointer
probe error_freed_object(unsigned long value); // arg is object pointer
};
*/
@end
/**************** Allocation statistics ****************/
// The statistics-keeping facilities generate output on various types of
// events. Currently, output logs can be generated for use of the zone
// allocation functions (NSZoneMalloc(), etc.), and allocation and
// deallocation of objects (and other types of lifetime-related events).
// This boolean is obsolete and unused; don't use this.
FOUNDATION_EXPORT BOOL NSKeepAllocationStatistics;
// Object allocation event types
#define NSObjectAutoreleasedEvent 3
#define NSObjectExtraRefIncrementedEvent 4
#define NSObjectExtraRefDecrementedEvent 5
#define NSObjectInternalRefIncrementedEvent 6
#define NSObjectInternalRefDecrementedEvent 7
FOUNDATION_EXPORT void NSRecordAllocationEvent(int eventType, id object);
// Notes an object or zone allocation event and various other
// statistics, such as the time and current thread.
// The behavior is undefined (and likely catastrophic) if
// the correct arguments for 'eventType' are not provided.
//
// The parameter prototypes for each event type are shown below.
// NSRecordAllocationEvent(NSObjectAutoreleasedEvent, curObj)
// NSRecordAllocationEvent(NSObjectExtraRefIncrementedEvent, curObj)
// NSRecordAllocationEvent(NSObjectExtraRefDecrementedEvent, curObj)
// NSRecordAllocationEvent(NSObjectInternalRefIncrementedEvent, curObj)
// NSRecordAllocationEvent(NSObjectInternalRefDecrementedEvent, curObj)
//
// Only the Foundation should have reason to use many of these.
// The only common use of this function should be with these two events:
// NSObjectInternalRefIncrementedEvent
// NSObjectInternalRefDecrementedEvent
// when a class overrides -retain and -release to do its own
// reference counting.
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h | /*
NSUserNotification.h
Copyright (c) 2011-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
@protocol NSUserNotificationCenterDelegate;
NS_ASSUME_NONNULL_BEGIN
/* All NSUserNotifications API are deprecated. Please switch to the UserNotifications.framework for all notifications work. */
// Used to describe the method in which the user activated the user notification. Alerts can be activated by either clicking on the body of the alert or the action button.
typedef NS_ENUM(NSInteger, NSUserNotificationActivationType) {
NSUserNotificationActivationTypeNone = 0,
NSUserNotificationActivationTypeContentsClicked = 1,
NSUserNotificationActivationTypeActionButtonClicked = 2,
NSUserNotificationActivationTypeReplied API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, watchos, tvos) = 3,
NSUserNotificationActivationTypeAdditionalActionClicked API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, watchos, tvos) = 4,
} API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos);
API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos)
@interface NSUserNotification : NSObject <NSCopying> {
@private
id _internal;
}
- (instancetype)init NS_DESIGNATED_INITIALIZER;
// -----------------------
// These properties are used to configure the notification before it is scheduled.
// The title of the notification. Must be localized as it will be presented to the user. String will be truncated to a length appropriate for display.
@property (nullable, copy) NSString *title;
// The subtitle displayed in the notification. Must be localized as it will be presented to the user. String will be truncated to a length appropriate for display.
@property (nullable, copy) NSString *subtitle;
// The body of the notification. Must be localized as it will be presented to the user. String will be truncated to a length appropriate for display.
@property (nullable, copy) NSString *informativeText;
// The title of the button displayed in the notification. Must be localized as it will be presented to the user. String will be truncated to a length appropriate for display.
@property (copy) NSString *actionButtonTitle;
// Application-specific user info that may be retrieved later. All items must be property list types or an exception will be thrown. The userInfo should be of reasonable serialized size or an exception will be thrown.
@property (nullable, copy) NSDictionary<NSString *, id> *userInfo;
// Specifies when (in an absolute time) the notification should be delivered. After a notification is delivered, it may be presented to the user.
@property (nullable, copy) NSDate *deliveryDate;
// Set the time zone to interpret the delivery date in. If this value is nil and the user switches time zones, the notification center will adjust the time of presentation to account for the time zone change. If a notification should be delivered at a time in a specific time zone (regardless if the user switches time zones), set this value to that time zone. One common value may be the current time zone.
@property (nullable, copy) NSTimeZone *deliveryTimeZone;
// The date components that specify how a notification is to be repeated. This value may be nil if the notification should not repeat. The date component values are relative to the date the notification was delivered. If the calendar value of the deliveryRepeatInterval is nil, the current calendar will be used to calculate the repeat interval. For example, if a notification should repeat every hour, set the 'hour' property of the deliveryRepeatInterval to 1.
@property (nullable, copy) NSDateComponents *deliveryRepeatInterval;
// The date at which this notification was actually delivered. The notification center will set this value if a notification is put in the scheduled list and the delivery time arrives. If the notification is delivered directly using the 'deliverNotification:' method on NSUserNotificationCenter, this value will be set to the deliveryDate value (unless deliveryDate is nil, in which case this value is set to the current date). This value is used to sort the list of notifications in the user interface.
@property (nullable, readonly, copy) NSDate *actualDeliveryDate;
// In some cases, e.g. when your application is frontmost, the notification center may decide not to actually present a delivered notification. In that case, the value of this property will be NO. It will be set to YES if the notification was presented according to user preferences (note: this can mean no dialog, animation, or sound, if the user has turned off notifications completely for your application).
@property (readonly, getter=isPresented) BOOL presented;
// This property will be YES if the user notification is from a remote (push) notification.
@property (readonly, getter=isRemote) BOOL remote;
// The name of the sound file in the resources of the application bundle to play when the notification is delivered. NSUserNotificationDefaultSoundName can be used to play the default Notification Center sound. A value of 'nil' means no sound.
@property (nullable, copy) NSString *soundName;
// Set to NO if the notification has no action button. This will be the case for notifications that are purely for informational purposes and have no user action. The default value is YES.
@property BOOL hasActionButton;
// This property describes how notifications sent to the didActivateNotification were activated.
@property (readonly) NSUserNotificationActivationType activationType;
// Set this property to a localized string to customize the title of the 'Close' button in an alert-style notification. An empty string will cause the default localized text to be used. A nil value is invalid.
@property (copy) NSString *otherButtonTitle;
// This identifier is used to uniquely identify a notification. A notification delivered with the same identifier as an existing notification will replace that notification, rather then display a new one.
@property (nullable, copy) NSString *identifier API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, watchos, tvos);
// NSImage shown in the content of the notification.
@property (nullable, copy) NSImage *contentImage API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, watchos, tvos);
// Set to YES if the notification has a reply button. The default value is NO. If both this and hasActionButton are YES, the reply button will be shown.
@property BOOL hasReplyButton API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, watchos, tvos);
// Optional placeholder for inline reply field.
@property (nullable, copy) NSString *responsePlaceholder API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, watchos, tvos);
// When a notification has been responded to, the NSUserNotificationCenter delegate didActivateNotification: will be called with the notification with the activationType set to NSUserNotificationActivationTypeReplied and the response set on the response property
@property (nullable, readonly, copy) NSAttributedString *response API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, watchos, tvos);
// An array of NSUserNotificationAction objects that describe the different actions that can be taken on a notification in addition to the default action described by actionButtonTitle
@property (nullable, copy) NSArray<NSUserNotificationAction *> *additionalActions API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, watchos, tvos);
// When a user selects an additional action that action will be set on the notification's additionalActivationAction property when passed into the delegate callback didActivateNotification
@property (nullable, readonly, copy) NSUserNotificationAction *additionalActivationAction API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, watchos, tvos);
@end
// An action shown to the user as part of a NSUserNotification in the additionalActions property.
API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.10, 11.0)) API_UNAVAILABLE(ios, watchos, tvos)
@interface NSUserNotificationAction : NSObject <NSCopying>
+ (instancetype)actionWithIdentifier:(nullable NSString *)identifier title:(nullable NSString *)title;
@property (nullable, readonly, copy) NSString *identifier;
// The localized title of the action.
@property (nullable, readonly, copy) NSString *title;
@end
FOUNDATION_EXPORT NSString * const NSUserNotificationDefaultSoundName API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos);
API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos)
@interface NSUserNotificationCenter : NSObject {
@private
id _internal;
}
// Get a singleton user notification center that posts notifications for this process.
@property (class, readonly, strong) NSUserNotificationCenter *defaultUserNotificationCenter;
@property (nullable, assign) id <NSUserNotificationCenterDelegate> delegate;
/*
Notifications that the NSUserNotificationCenter is tracking will be in one of two states: scheduled or delivered.
A scheduled notification has a deliveryDate. On that delivery date, the notification will move from being scheduled to being delivered.
A delivered notification has an actualDeliveryDate. That is the date when it moved from being scheduled to delivered, or when it was manually delivered (using the deliverNotification: method).
The notification center reserves the right to decide if a delivered notification is presented on screen to the user. For example, it may supress the notification if the application is already frontmost. The application may check the result of this decision by examining the 'presented' property of a delivered notification.
The application and the notification center are both ultimately subject to user preferences. If the user decides to hide all alerts from your application, the presented property will still behave as above, but the user will not see any animation or hear any sound.
*/
// Get a list of notifications that are scheduled but have not yet been presented. Newly scheduled notifications are added to the end of the array. You may also bulk-schedule notifications by setting this array.
@property (copy) NSArray<NSUserNotification *> *scheduledNotifications;
// Add a notification to the center for scheduling.
- (void)scheduleNotification:(NSUserNotification *)notification;
// Cancels a notification. If the deliveryDate occurs before the cancellation finishes, the notification may still be delivered. If the notification is not in the scheduled list, nothing happens.
- (void)removeScheduledNotification:(NSUserNotification *)notification;
// Get a list of notifications that have been delivered to the Notification Center. The number of notifications the user actually sees in the user interface may be less than the size of this array. Note that these may or may not have been actually presented to the user (see the presented property on the NSUserNotification).
@property (readonly, copy) NSArray<NSUserNotification *> *deliveredNotifications;
// Deliver a notification immediately, including animation or sound alerts. It will be presented to the user (subject to user preferences). The 'presented' property will always be set to YES if a notification is delivered using this method.
- (void)deliverNotification:(NSUserNotification *)notification;
// Clear a delivered notification from the notification center. If the notification is not in the delivered list, nothing happens.
- (void)removeDeliveredNotification:(NSUserNotification *)notification;
// Clear all delivered notifications for this application from the notification center.
- (void)removeAllDeliveredNotifications;
@end
/* All NSUserNotifications API are deprecated. Please switch to the UserNotifications.framework for all notifications work. */
@protocol NSUserNotificationCenterDelegate <NSObject>
@optional
// Sent to the delegate when a notification delivery date has arrived. At this time, the notification has either been presented to the user or the notification center has decided not to present it because your application was already frontmost.
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didDeliverNotification:(NSUserNotification *)notification API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos);
// Sent to the delegate when a user clicks on a notification in the notification center. This would be a good time to take action in response to user interacting with a specific notification.
// Important: If want to take an action when your application is launched as a result of a user clicking on a notification, be sure to implement the applicationDidFinishLaunching: method on your NSApplicationDelegate. The notification parameter to that method has a userInfo dictionary, and that dictionary has the NSApplicationLaunchUserNotificationKey key. The value of that key is the NSUserNotification that caused the application to launch. The NSUserNotification is delivered to the NSApplication delegate because that message will be sent before your application has a chance to set a delegate for the NSUserNotificationCenter.
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos);
// Sent to the delegate when the Notification Center has decided not to present your notification, for example when your application is front most. If you want the notification to be displayed anyway, return YES.
- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification API_DEPRECATED("All NSUserNotifications API should be replaced with UserNotifications.frameworks API", macos(10.8, 11.0)) API_UNAVAILABLE(ios, watchos, tvos);
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSHFSFileTypes.h | /*
NSHFSFileTypes.h
Copyright (c) 2000-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObjCRuntime.h>
#import <CoreFoundation/CFBase.h>
@class NSString;
// Given an HFS file type code, return a string that represents the file type. The string will have been autoreleased. The format of the string is a private implementation detail, but such strings are suitable for inclusion in arrays that also contain file name extension strings. Several Cocoa API methods take such arrays.
FOUNDATION_EXPORT NSString *NSFileTypeForHFSTypeCode(OSType hfsFileTypeCode);
// Given a string of the sort encoded by NSFileTypeForHFSTypeCode(), return the corresponding HFS file type code. Return zero otherwise.
FOUNDATION_EXPORT OSType NSHFSTypeCodeFromFileType(NSString *fileTypeString);
// Given the full absolute path of a file, return a string that represents the file's HFS file type as described above, or nil if the operation is not successful. The string will have been autoreleased.
FOUNDATION_EXPORT NSString *NSHFSTypeOfFile(NSString *fullFilePath);
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h | /* NSOrderedSet.h
Copyright (c) 2007-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSRange.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSOrderedCollectionDifference.h>
@class NSArray, NSIndexSet, NSSet<ObjectType>, NSString;
/**************** Immutable Ordered Set ****************/
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0))
@interface NSOrderedSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
@property (readonly) NSUInteger count;
- (ObjectType)objectAtIndex:(NSUInteger)idx;
- (NSUInteger)indexOfObject:(ObjectType)object;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end
@interface NSOrderedSet<ObjectType> (NSExtendedOrderedSet)
- (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nullable])objects range:(NSRange)range NS_SWIFT_UNAVAILABLE("Use 'array' instead");
- (NSArray<ObjectType> *)objectsAtIndexes:(NSIndexSet *)indexes;
@property (nullable, nonatomic, readonly) ObjectType firstObject;
@property (nullable, nonatomic, readonly) ObjectType lastObject;
- (BOOL)isEqualToOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (BOOL)containsObject:(ObjectType)object;
- (BOOL)intersectsOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (BOOL)intersectsSet:(NSSet<ObjectType> *)set;
- (BOOL)isSubsetOfOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (BOOL)isSubsetOfSet:(NSSet<ObjectType> *)set;
- (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
- (NSEnumerator<ObjectType> *)objectEnumerator;
- (NSEnumerator<ObjectType> *)reverseObjectEnumerator;
@property (readonly, copy) NSOrderedSet<ObjectType> *reversedOrderedSet;
// These two methods return a facade object for the receiving ordered set,
// which acts like an immutable array or set (respectively). Note that
// while you cannot mutate the ordered set through these facades, mutations
// to the original ordered set will "show through" the facade and it will
// appear to change spontaneously, since a copy of the ordered set is not
// being made.
@property (readonly, strong) NSArray<ObjectType> *array;
@property (readonly, strong) NSSet<ObjectType> *set;
- (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block;
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block;
- (void)enumerateObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block;
- (NSUInteger)indexOfObjectPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate;
- (NSUInteger)indexOfObjectWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate;
- (NSUInteger)indexOfObjectAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate;
- (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate;
- (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate;
- (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate;
- (NSUInteger)indexOfObject:(ObjectType)object inSortedRange:(NSRange)range options:(NSBinarySearchingOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmp; // binary search
- (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
- (NSArray<ObjectType> *)sortedArrayWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr;
@property (readonly, copy) NSString *description;
- (NSString *)descriptionWithLocale:(nullable id)locale;
- (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level;
@end
@interface NSOrderedSet<ObjectType> (NSOrderedSetCreation)
+ (instancetype)orderedSet;
+ (instancetype)orderedSetWithObject:(ObjectType)object;
+ (instancetype)orderedSetWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt;
+ (instancetype)orderedSetWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
+ (instancetype)orderedSetWithOrderedSet:(NSOrderedSet<ObjectType> *)set;
+ (instancetype)orderedSetWithOrderedSet:(NSOrderedSet<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag;
+ (instancetype)orderedSetWithArray:(NSArray<ObjectType> *)array;
+ (instancetype)orderedSetWithArray:(NSArray<ObjectType> *)array range:(NSRange)range copyItems:(BOOL)flag;
+ (instancetype)orderedSetWithSet:(NSSet<ObjectType> *)set;
+ (instancetype)orderedSetWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag;
- (instancetype)initWithObject:(ObjectType)object;
- (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
- (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set;
- (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set copyItems:(BOOL)flag;
- (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag;
- (instancetype)initWithArray:(NSArray<ObjectType> *)array;
- (instancetype)initWithArray:(NSArray<ObjectType> *)set copyItems:(BOOL)flag;
- (instancetype)initWithArray:(NSArray<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag;
- (instancetype)initWithSet:(NSSet<ObjectType> *)set;
- (instancetype)initWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag;
@end
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
NS_SWIFT_UNAVAILABLE("NSOrderedSet diffing methods are not available in Swift, use Collection.difference(from:) instead")
@interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing)
- (NSOrderedCollectionDifference<ObjectType> *)differenceFromOrderedSet:(NSOrderedSet<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options usingEquivalenceTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj1, ObjectType obj2))block;
- (NSOrderedCollectionDifference<ObjectType> *)differenceFromOrderedSet:(NSOrderedSet<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options;
// Uses isEqual: to determine the difference between the parameter and the receiver
- (NSOrderedCollectionDifference<ObjectType> *)differenceFromOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (nullable NSOrderedSet<ObjectType> *)orderedSetByApplyingDifference:(NSOrderedCollectionDifference<ObjectType> *)difference;
@end
/**************** Mutable Ordered Set ****************/
API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0))
@interface NSMutableOrderedSet<ObjectType> : NSOrderedSet<ObjectType>
- (void)insertObject:(ObjectType)object atIndex:(NSUInteger)idx;
- (void)removeObjectAtIndex:(NSUInteger)idx;
- (void)replaceObjectAtIndex:(NSUInteger)idx withObject:(ObjectType)object;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
@end
@interface NSMutableOrderedSet<ObjectType> (NSExtendedMutableOrderedSet)
- (void)addObject:(ObjectType)object;
- (void)addObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)count;
- (void)addObjectsFromArray:(NSArray<ObjectType> *)array;
- (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2;
- (void)moveObjectsAtIndexes:(NSIndexSet *)indexes toIndex:(NSUInteger)idx;
- (void)insertObjects:(NSArray<ObjectType> *)objects atIndexes:(NSIndexSet *)indexes;
- (void)setObject:(ObjectType)obj atIndex:(NSUInteger)idx;
- (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
- (void)replaceObjectsInRange:(NSRange)range withObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)count;
- (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withObjects:(NSArray<ObjectType> *)objects;
- (void)removeObjectsInRange:(NSRange)range;
- (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
- (void)removeAllObjects;
- (void)removeObject:(ObjectType)object;
- (void)removeObjectsInArray:(NSArray<ObjectType> *)array;
- (void)intersectOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (void)minusOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (void)unionOrderedSet:(NSOrderedSet<ObjectType> *)other;
- (void)intersectSet:(NSSet<ObjectType> *)other;
- (void)minusSet:(NSSet<ObjectType> *)other;
- (void)unionSet:(NSSet<ObjectType> *)other;
- (void)sortUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
- (void)sortWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr;
- (void)sortRange:(NSRange)range options:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr;
@end
@interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetCreation)
+ (instancetype)orderedSetWithCapacity:(NSUInteger)numItems;
@end
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
NS_SWIFT_UNAVAILABLE("NSMutableOrderedSet diffing methods are not available in Swift")
@interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing)
- (void)applyDifference:(NSOrderedCollectionDifference<ObjectType> *)difference;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSXMLDocument.h | /* NSXMLDocument.h
Copyright (c) 2004-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSXMLNode.h>
@class NSData, NSXMLDTD, NSXMLDocument, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>;
NS_ASSUME_NONNULL_BEGIN
// Input options
// NSXMLNodeOptionsNone
// NSXMLNodePreserveAll
// NSXMLNodePreserveNamespaceOrder
// NSXMLNodePreserveAttributeOrder
// NSXMLNodePreserveEntities
// NSXMLNodePreservePrefixes
// NSXMLNodePreserveCDATA
// NSXMLNodePreserveEmptyElements
// NSXMLNodePreserveQuotes
// NSXMLNodePreserveWhitespace
// NSXMLNodeLoadExternalEntities
// NSXMLNodeLoadExternalEntitiesSameOriginOnly
// NSXMLDocumentTidyHTML
// NSXMLDocumentTidyXML
// NSXMLDocumentValidate
// Output options
// NSXMLNodePrettyPrint
// NSXMLDocumentIncludeContentTypeDeclaration
/*!
@typedef NSXMLDocumentContentKind
@abstract Define what type of document this is.
@constant NSXMLDocumentXMLKind The default document type
@constant NSXMLDocumentXHTMLKind Set if NSXMLDocumentTidyHTML is set and HTML is detected
@constant NSXMLDocumentHTMLKind Outputs empty tags without a close tag, eg <br>
@constant NSXMLDocumentTextKind Output the string value of the document
*/
typedef NS_ENUM(NSUInteger, NSXMLDocumentContentKind) {
NSXMLDocumentXMLKind = 0,
NSXMLDocumentXHTMLKind,
NSXMLDocumentHTMLKind,
NSXMLDocumentTextKind
};
/*!
@class NSXMLDocument
@abstract An XML Document
@discussion Note: if the application of a method would result in more than one element in the children array, an exception is thrown. Trying to add a document, namespace, attribute, or node with a parent also throws an exception. To add a node with a parent first detach or create a copy of it.
*/
@interface NSXMLDocument : NSXMLNode {
@protected
NSString *_encoding;
NSString *_version;
NSXMLDTD *_docType;
NSArray *_children;
BOOL _childrenHaveMutated;
BOOL _standalone;
int8_t padding[2];
NSXMLElement *_rootElement;
NSString *_URI;
id _extraIvars;
NSUInteger _fidelityMask;
NSXMLDocumentContentKind _contentKind;
}
- (instancetype)init NS_DESIGNATED_INITIALIZER;
/*!
@method initWithXMLString:options:error:
@abstract Returns a document created from either XML or HTML, if the HTMLTidy option is set. Parse errors are returned in <tt>error</tt>.
*/
- (nullable instancetype)initWithXMLString:(NSString *)string options:(NSXMLNodeOptions)mask error:(NSError **)error;
/*!
@method initWithContentsOfURL:options:error:
@abstract Returns a document created from the contents of an XML or HTML URL. Connection problems such as 404, parse errors are returned in <tt>error</tt>.
*/
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSXMLNodeOptions)mask error:(NSError **)error;
/*!
@method initWithData:options:error:
@abstract Returns a document created from data. Parse errors are returned in <tt>error</tt>.
*/
- (nullable instancetype)initWithData:(NSData *)data options:(NSXMLNodeOptions)mask error:(NSError **)error NS_DESIGNATED_INITIALIZER; //primitive
/*!
@method initWithRootElement:
@abstract Returns a document with a single child, the root element.
*/
- (instancetype)initWithRootElement:(nullable NSXMLElement *)element NS_DESIGNATED_INITIALIZER;
#if 0
#pragma mark --- Properties ---
#endif
+ (Class)replacementClassForClass:(Class)cls;
/*!
@abstract Sets the character encoding to an IANA type.
*/
@property (nullable, copy) NSString *characterEncoding; //primitive
/*!
@abstract Sets the XML version. Should be 1.0 or 1.1.
*/
@property (nullable, copy) NSString *version; //primitive
/*!
@abstract Set whether this document depends on an external DTD. If this option is set the standalone declaration will appear on output.
*/
@property (getter=isStandalone) BOOL standalone; //primitive
/*!
@abstract The kind of document.
*/
@property NSXMLDocumentContentKind documentContentKind; //primitive
/*!
@abstract Set the MIME type, eg text/xml.
*/
@property (nullable, copy) NSString *MIMEType; //primitive
/*!
@abstract Set the associated DTD. This DTD will be output with the document.
*/
@property (nullable, copy) NSXMLDTD *DTD; //primitive
/*!
@method setRootElement:
@abstract Set the root element. Removes all other children including comments and processing-instructions.
*/
- (void)setRootElement:(NSXMLElement *)root;
/*!
@method rootElement
@abstract The root element.
*/
- (nullable NSXMLElement *)rootElement; //primitive
#if 0
#pragma mark --- Children ---
#endif
/*!
@method insertChild:atIndex:
@abstract Inserts a child at a particular index.
*/
- (void)insertChild:(NSXMLNode *)child atIndex:(NSUInteger)index; //primitive
/*!
@method insertChildren:atIndex:
@abstract Insert several children at a particular index.
*/
- (void)insertChildren:(NSArray<NSXMLNode *> *)children atIndex:(NSUInteger)index;
/*!
@method removeChildAtIndex:atIndex:
@abstract Removes a child at a particular index.
*/
- (void)removeChildAtIndex:(NSUInteger)index; //primitive
/*!
@method setChildren:
@abstract Removes all existing children and replaces them with the new children. Set children to nil to simply remove all children.
*/
- (void)setChildren:(nullable NSArray<NSXMLNode *> *)children; //primitive
/*!
@method addChild:
@abstract Adds a child to the end of the existing children.
*/
- (void)addChild:(NSXMLNode *)child;
/*!
@method replaceChildAtIndex:withNode:
@abstract Replaces a child at a particular index with another child.
*/
- (void)replaceChildAtIndex:(NSUInteger)index withNode:(NSXMLNode *)node;
#if 0
#pragma mark --- Output ---
#endif
/*!
@abstract Invokes XMLDataWithOptions with NSXMLNodeOptionsNone.
*/
@property (readonly, copy) NSData *XMLData;
/*!
@method XMLDataWithOptions:
@abstract The representation of this node as it would appear in an XML document, encoded based on characterEncoding.
*/
- (NSData *)XMLDataWithOptions:(NSXMLNodeOptions)options;
#if 0
#pragma mark --- XSLT ---
#endif
/*!
@method objectByApplyingXSLT:arguments:error:
@abstract Applies XSLT with arguments (NSString key/value pairs) to this document, returning a new document.
*/
- (nullable id)objectByApplyingXSLT:(NSData *)xslt arguments:(nullable NSDictionary<NSString *, NSString *> *)arguments error:(NSError **)error;
/*!
@method objectByApplyingXSLTString:arguments:error:
@abstract Applies XSLT as expressed by a string with arguments (NSString key/value pairs) to this document, returning a new document.
*/
- (nullable id)objectByApplyingXSLTString:(NSString *)xslt arguments:(nullable NSDictionary<NSString *, NSString *> *)arguments error:(NSError **)error;
/*!
@method objectByApplyingXSLTAtURL:arguments:error:
@abstract Applies the XSLT at a URL with arguments (NSString key/value pairs) to this document, returning a new document. Error may contain a connection error from the URL.
*/
- (nullable id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(nullable NSDictionary<NSString *, NSString *> *)argument error:(NSError **)error;
#if 0
#pragma mark --- Validation ---
#endif
- (BOOL)validateAndReturnError:(NSError **)error;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSPortMessage.h | /* NSPortMessage.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSPort, NSDate, NSArray, NSMutableArray;
NS_ASSUME_NONNULL_BEGIN
@interface NSPortMessage : NSObject {
@private
NSPort *localPort;
NSPort *remotePort;
NSMutableArray *components;
uint32_t msgid;
void *reserved2;
void *reserved;
}
- (instancetype)initWithSendPort:(nullable NSPort *)sendPort receivePort:(nullable NSPort *)replyPort components:(nullable NSArray *)components NS_DESIGNATED_INITIALIZER;
@property (nullable, readonly, copy) NSArray *components;
@property (nullable, readonly, retain) NSPort *receivePort;
@property (nullable, readonly, retain) NSPort *sendPort;
- (BOOL)sendBeforeDate:(NSDate *)date;
@property uint32_t msgid;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSDistributedNotificationCenter.h | /* NSDistributedNotificationCenter.h
Copyright (c) 1996-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSNotification.h>
@class NSString, NSDictionary;
NS_ASSUME_NONNULL_BEGIN
typedef NSString * NSDistributedNotificationCenterType NS_TYPED_EXTENSIBLE_ENUM;
FOUNDATION_EXPORT NSDistributedNotificationCenterType const NSLocalNotificationCenterType;
// Distributes notifications to all tasks on the sender's machine.
typedef NS_ENUM(NSUInteger, NSNotificationSuspensionBehavior) {
NSNotificationSuspensionBehaviorDrop = 1,
// The server will not queue any notifications with this name and object until setSuspended:NO is called.
NSNotificationSuspensionBehaviorCoalesce = 2,
// The server will only queue the last notification of the specified name and object; earlier notifications are dropped. In cover methods for which suspension behavior is not an explicit argument, NSNotificationSuspensionBehaviorCoalesce is the default.
NSNotificationSuspensionBehaviorHold = 3,
// The server will hold all matching notifications until the queue has been filled (queue size determined by the server) at which point the server may flush queued notifications.
NSNotificationSuspensionBehaviorDeliverImmediately = 4
// The server will deliver notifications matching this registration irrespective of whether setSuspended:YES has been called. When a notification with this suspension behavior is matched, it has the effect of first flushing
// any queued notifications. The effect is somewhat as if setSuspended:NO were first called if the app is suspended, followed by
// the notification in question being delivered, followed by a transition back to the previous suspended or unsuspended state.
};
typedef NS_OPTIONS(NSUInteger, NSDistributedNotificationOptions) {
NSDistributedNotificationDeliverImmediately = (1UL << 0),
NSDistributedNotificationPostToAllSessions = (1UL << 1)
};
static const NSDistributedNotificationOptions NSNotificationDeliverImmediately = NSDistributedNotificationDeliverImmediately;
static const NSDistributedNotificationOptions NSNotificationPostToAllSessions = NSDistributedNotificationPostToAllSessions;
@interface NSDistributedNotificationCenter : NSNotificationCenter
+ (NSDistributedNotificationCenter *)notificationCenterForType:(NSDistributedNotificationCenterType)notificationCenterType;
// Currently there is only one type.
+ (NSDistributedNotificationCenter *)defaultCenter;
// Returns the default distributed notification center - cover for [NSDistributedNotificationCenter notificationCenterForType:NSLocalNotificationCenterType]
- (void)addObserver:(id)observer selector:(SEL)selector name:(nullable NSNotificationName)name object:(nullable NSString *)object suspensionBehavior:(NSNotificationSuspensionBehavior)suspensionBehavior;
// All other registration methods are covers of this one, with the default for suspensionBehavior = NSNotificationSuspensionBehaviorCoalesce.
- (void)postNotificationName:(NSNotificationName)name object:(nullable NSString *)object userInfo:(nullable NSDictionary *)userInfo deliverImmediately:(BOOL)deliverImmediately;
// All other posting methods are covers of this one. The deliverImmediately argument causes the notification to be received in the same manner as if matching registrants had registered with suspension
// behavior NSNotificationSuspensionBehaviorDeliverImmediately. The default in covers is deliverImmediately = NO (respect suspension behavior of registrants).
- (void)postNotificationName:(NSNotificationName)name object:(nullable NSString *)object userInfo:(nullable NSDictionary *)userInfo options:(NSDistributedNotificationOptions)options;
// Called with suspended = YES, enables the variety of suspension behaviors enumerated above. Called with suspended = NO disables them (immediate delivery of notifications is resumed).
@property BOOL suspended;
// Methods from NSNotificationCenter that are re-declared in part because the anObject argument is typed to be an NSString.
- (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable NSString *)anObject;
- (void)postNotificationName:(NSNotificationName)aName object:(nullable NSString *)anObject;
- (void)postNotificationName:(NSNotificationName)aName object:(nullable NSString *)anObject userInfo:(nullable NSDictionary *)aUserInfo;
- (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable NSString *)anObject;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSHashTable.h | /* NSHashTable.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSPointerFunctions.h>
#import <Foundation/NSString.h>
#import <Foundation/NSEnumerator.h>
#if !defined(__FOUNDATION_NSHASHTABLE__)
#define __FOUNDATION_NSHASHTABLE__ 1
@class NSArray<ObjectType>, NSSet<ObjectType>, NSHashTable;
NS_ASSUME_NONNULL_BEGIN
/* An NSHashTable is modeled after a set, although, because of its options, is not a set because it can behave differently (for example, if pointer equality is specified two isEqual strings will both be entered). The major option is to provide for "weak" references that are removed automatically, but at some indefinite point in the future.
An NSHashTable can also be configured to operate on arbitrary pointers and not just objects. We recommend the C function API for "void *" access. To configure for pointer use, consult and choose the appropriate NSPointerFunctionsOptions or configure or use an NSPointerFunctions object itself for initialization.
*/
static const NSPointerFunctionsOptions NSHashTableStrongMemory API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsStrongMemory;
static const NSPointerFunctionsOptions NSHashTableZeroingWeakMemory API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos) = NSPointerFunctionsZeroingWeakMemory;
static const NSPointerFunctionsOptions NSHashTableCopyIn API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsCopyIn;
static const NSPointerFunctionsOptions NSHashTableObjectPointerPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsObjectPointerPersonality;
static const NSPointerFunctionsOptions NSHashTableWeakMemory API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsWeakMemory;
typedef NSUInteger NSHashTableOptions;
API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0))
@interface NSHashTable<ObjectType> : NSObject <NSCopying, NSSecureCoding, NSFastEnumeration>
- (instancetype)initWithOptions:(NSPointerFunctionsOptions)options capacity:(NSUInteger)initialCapacity NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithPointerFunctions:(NSPointerFunctions *)functions capacity:(NSUInteger)initialCapacity NS_DESIGNATED_INITIALIZER;
// conveniences
+ (NSHashTable<ObjectType> *)hashTableWithOptions:(NSPointerFunctionsOptions)options;
+ (id)hashTableWithWeakObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos); // GC zeroing, otherwise unsafe unretained
+ (NSHashTable<ObjectType> *)weakObjectsHashTable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)); // entries are not necessarily purged right away when the weak object is reclaimed
/* return an NSPointerFunctions object reflecting the functions in use. This is a new autoreleased object that can be subsequently modified and/or used directly in the creation of other pointer "collections". */
@property (readonly, copy) NSPointerFunctions *pointerFunctions;
@property (readonly) NSUInteger count;
- (nullable ObjectType)member:(nullable ObjectType)object;
- (NSEnumerator<ObjectType> *)objectEnumerator;
- (void)addObject:(nullable ObjectType)object;
- (void)removeObject:(nullable ObjectType)object;
- (void)removeAllObjects;
@property (readonly, copy) NSArray<ObjectType> *allObjects; // convenience
@property (nullable, nonatomic, readonly) ObjectType anyObject;
- (BOOL)containsObject:(nullable ObjectType)anObject;
- (BOOL)intersectsHashTable:(NSHashTable<ObjectType> *)other;
- (BOOL)isEqualToHashTable:(NSHashTable<ObjectType> *)other;
- (BOOL)isSubsetOfHashTable:(NSHashTable<ObjectType> *)other;
- (void)intersectHashTable:(NSHashTable<ObjectType> *)other;
- (void)unionHashTable:(NSHashTable<ObjectType> *)other;
- (void)minusHashTable:(NSHashTable<ObjectType> *)other;
@property (readonly, copy) NSSet<ObjectType> *setRepresentation; // create a set of the contents
@end
/**************** (void *) Hash table operations ****************/
typedef struct {NSUInteger _pi; NSUInteger _si; void * _Nullable _bs;} NSHashEnumerator;
FOUNDATION_EXPORT void NSFreeHashTable(NSHashTable *table);
FOUNDATION_EXPORT void NSResetHashTable(NSHashTable *table);
FOUNDATION_EXPORT BOOL NSCompareHashTables(NSHashTable *table1, NSHashTable *table2);
FOUNDATION_EXPORT NSHashTable *NSCopyHashTableWithZone(NSHashTable *table, NSZone * _Nullable zone);
FOUNDATION_EXPORT void *NSHashGet(NSHashTable *table, const void * _Nullable pointer);
FOUNDATION_EXPORT void NSHashInsert(NSHashTable *table, const void * _Nullable pointer);
FOUNDATION_EXPORT void NSHashInsertKnownAbsent(NSHashTable *table, const void * _Nullable pointer);
FOUNDATION_EXPORT void * _Nullable NSHashInsertIfAbsent(NSHashTable *table, const void * _Nullable pointer);
FOUNDATION_EXPORT void NSHashRemove(NSHashTable *table, const void * _Nullable pointer);
FOUNDATION_EXPORT NSHashEnumerator NSEnumerateHashTable(NSHashTable *table);
FOUNDATION_EXPORT void * _Nullable NSNextHashEnumeratorItem(NSHashEnumerator *enumerator);
FOUNDATION_EXPORT void NSEndHashTableEnumeration(NSHashEnumerator *enumerator);
FOUNDATION_EXPORT NSUInteger NSCountHashTable(NSHashTable *table);
FOUNDATION_EXPORT NSString *NSStringFromHashTable(NSHashTable *table);
FOUNDATION_EXPORT NSArray *NSAllHashTableObjects(NSHashTable *table);
/**************** Legacy ****************/
typedef struct {
NSUInteger (* _Nullable hash)(NSHashTable *table, const void *);
BOOL (* _Nullable isEqual)(NSHashTable *table, const void *, const void *);
void (* _Nullable retain)(NSHashTable *table, const void *);
void (* _Nullable release)(NSHashTable *table, void *);
NSString * _Nullable (* _Nullable describe)(NSHashTable *table, const void *);
} NSHashTableCallBacks;
FOUNDATION_EXPORT NSHashTable *NSCreateHashTableWithZone(NSHashTableCallBacks callBacks, NSUInteger capacity, NSZone * _Nullable zone);
FOUNDATION_EXPORT NSHashTable *NSCreateHashTable(NSHashTableCallBacks callBacks, NSUInteger capacity);
FOUNDATION_EXPORT const NSHashTableCallBacks NSIntegerHashCallBacks API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
FOUNDATION_EXPORT const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks;
FOUNDATION_EXPORT const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks;
FOUNDATION_EXPORT const NSHashTableCallBacks NSObjectHashCallBacks;
FOUNDATION_EXPORT const NSHashTableCallBacks NSOwnedObjectIdentityHashCallBacks;
FOUNDATION_EXPORT const NSHashTableCallBacks NSOwnedPointerHashCallBacks;
FOUNDATION_EXPORT const NSHashTableCallBacks NSPointerToStructHashCallBacks;
FOUNDATION_EXPORT const NSHashTableCallBacks NSIntHashCallBacks API_DEPRECATED("Not supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, watchos, tvos);
NS_ASSUME_NONNULL_END
#endif // defined __FOUNDATION_NSHASHTABLE__
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSURLCache.h | /*
NSURLCache.h
Copyright (c) 2003-2019, Apple Inc. All rights reserved.
Public header file.
*/
#import <Foundation/NSObject.h>
NS_ASSUME_NONNULL_BEGIN
/*!
@enum NSURLCacheStoragePolicy
@discussion The NSURLCacheStoragePolicy enum defines constants that
can be used to specify the type of storage that is allowable for an
NSCachedURLResponse object that is to be stored in an NSURLCache.
@constant NSURLCacheStorageAllowed Specifies that storage in an
NSURLCache is allowed without restriction.
@constant NSURLCacheStorageAllowedInMemoryOnly Specifies that
storage in an NSURLCache is allowed; however storage should be
done in memory only, no disk storage should be done.
@constant NSURLCacheStorageNotAllowed Specifies that storage in an
NSURLCache is not allowed in any fashion, either in memory or on
disk.
*/
typedef NS_ENUM(NSUInteger, NSURLCacheStoragePolicy)
{
NSURLCacheStorageAllowed,
NSURLCacheStorageAllowedInMemoryOnly,
NSURLCacheStorageNotAllowed,
};
@class NSCachedURLResponseInternal;
@class NSData;
@class NSDictionary;
@class NSURLRequest;
@class NSURLResponse;
@class NSDate;
@class NSURLSessionDataTask;
/*!
@class NSCachedURLResponse
NSCachedURLResponse is a class whose objects functions as a wrapper for
objects that are stored in the framework's caching system.
It is used to maintain characteristics and attributes of a cached
object.
*/
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
@interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
{
@private
NSCachedURLResponseInternal *_internal;
}
/*!
@method initWithResponse:data
@abstract Initializes an NSCachedURLResponse with the given
response and data.
@discussion A default NSURLCacheStoragePolicy is used for
NSCachedURLResponse objects initialized with this method:
NSURLCacheStorageAllowed.
@param response a NSURLResponse object.
@param data an NSData object representing the URL content
corresponding to the given response.
@result an initialized NSCachedURLResponse.
*/
- (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data;
/*!
@method initWithResponse:data:userInfo:storagePolicy:
@abstract Initializes an NSCachedURLResponse with the given
response, data, user-info dictionary, and storage policy.
@param response a NSURLResponse object.
@param data an NSData object representing the URL content
corresponding to the given response.
@param userInfo a dictionary user-specified information to be
stored with the NSCachedURLResponse.
@param storagePolicy an NSURLCacheStoragePolicy constant.
@result an initialized NSCachedURLResponse.
*/
- (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data userInfo:(nullable NSDictionary *)userInfo storagePolicy:(NSURLCacheStoragePolicy)storagePolicy;
/*!
@abstract Returns the response wrapped by this instance.
@result The response wrapped by this instance.
*/
@property (readonly, copy) NSURLResponse *response;
/*!
@abstract Returns the data of the receiver.
@result The data of the receiver.
*/
@property (readonly, copy) NSData *data;
/*!
@abstract Returns the userInfo dictionary of the receiver.
@result The userInfo dictionary of the receiver.
*/
@property (nullable, readonly, copy) NSDictionary *userInfo;
/*!
@abstract Returns the NSURLCacheStoragePolicy constant of the receiver.
@result The NSURLCacheStoragePolicy constant of the receiver.
*/
@property (readonly) NSURLCacheStoragePolicy storagePolicy;
@end
@class NSURLRequest;
@class NSURLCacheInternal;
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
@interface NSURLCache : NSObject
{
@private
NSURLCacheInternal *_internal;
}
/*!
@property sharedURLCache
@abstract Returns the shared NSURLCache instance or
sets the NSURLCache instance shared by all clients of
the current process. This will be the new object returned when
calls to the <tt>sharedURLCache</tt> method are made.
@discussion Unless set explicitly through a call to
<tt>+setSharedURLCache:</tt>, this method returns an NSURLCache
instance created with the following default values:
<ul>
<li>Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes)
<li>Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes)
<li>Disk path: <nobr>(user home directory)/Library/Caches/(application bundle id)</nobr>
</ul>
<p>Users who do not have special caching requirements or
constraints should find the default shared cache instance
acceptable. If this default shared cache instance is not
acceptable, <tt>+setSharedURLCache:</tt> can be called to set a
different NSURLCache instance to be returned from this method.
Callers should take care to ensure that the setter is called
at a time when no other caller has a reference to the previously-set
shared URL cache. This is to prevent storing cache data from
becoming unexpectedly unretrievable.
@result the shared NSURLCache instance.
*/
@property (class, strong) NSURLCache *sharedURLCache;
/*!
@method initWithMemoryCapacity:diskCapacity:diskPath:
@abstract Initializes an NSURLCache with the given capacity and
path.
@discussion The returned NSURLCache is backed by disk, so
developers can be more liberal with space when choosing the
capacity for this kind of cache. A disk cache measured in the tens
of megabytes should be acceptable in most cases.
@param memoryCapacity the capacity, measured in bytes, for the cache in memory.
@param diskCapacity the capacity, measured in bytes, for the cache on disk.
@param path the path on disk where the cache data is stored.
@result an initialized NSURLCache, with the given capacity, backed
by disk.
*/
- (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity diskPath:(nullable NSString *)path API_DEPRECATED_WITH_REPLACEMENT("initWithMemoryCapacity:diskCapacity:directoryURL:", macos(10.2, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
/*!
@method initWithMemoryCapacity:diskCapacity:directoryURL:
@abstract Initializes an NSURLCache with the given capacity and directory.
@param memoryCapacity the capacity, measured in bytes, for the cache in memory. Or 0 to disable memory cache.
@param diskCapacity the capacity, measured in bytes, for the cache on disk. Or 0 to disable disk cache.
@param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory.
@result an initialized NSURLCache, with the given capacity, optionally backed by disk.
*/
- (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity directoryURL:(nullable NSURL *)directoryURL API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/*!
@method cachedResponseForRequest:
@abstract Returns the NSCachedURLResponse stored in the cache with
the given request.
@discussion The method returns nil if there is no
NSCachedURLResponse stored using the given request.
@param request the NSURLRequest to use as a key for the lookup.
@result The NSCachedURLResponse stored in the cache with the given
request, or nil if there is no NSCachedURLResponse stored with the
given request.
*/
- (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request;
/*!
@method storeCachedResponse:forRequest:
@abstract Stores the given NSCachedURLResponse in the cache using
the given request.
@param cachedResponse The cached response to store.
@param request the NSURLRequest to use as a key for the storage.
*/
- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request;
/*!
@method removeCachedResponseForRequest:
@abstract Removes the NSCachedURLResponse from the cache that is
stored using the given request.
@discussion No action is taken if there is no NSCachedURLResponse
stored with the given request.
@param request the NSURLRequest to use as a key for the lookup.
*/
- (void)removeCachedResponseForRequest:(NSURLRequest *)request;
/*!
@method removeAllCachedResponses
@abstract Clears the given cache, removing all NSCachedURLResponse
objects that it stores.
*/
- (void)removeAllCachedResponses;
/*!
@method removeCachedResponsesSince:
@abstract Clears the given cache of any cached responses since the provided date.
*/
- (void)removeCachedResponsesSinceDate:(NSDate *)date API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
/*!
@abstract In-memory capacity of the receiver.
@discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary.
@result The in-memory capacity, measured in bytes, for the receiver.
*/
@property NSUInteger memoryCapacity;
/*!
@abstract The on-disk capacity of the receiver.
@discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary.
*/
@property NSUInteger diskCapacity;
/*!
@abstract Returns the current amount of space consumed by the
in-memory cache of the receiver.
@discussion This size, measured in bytes, indicates the current
usage of the in-memory cache.
@result the current usage of the in-memory cache of the receiver.
*/
@property (readonly) NSUInteger currentMemoryUsage;
/*!
@abstract Returns the current amount of space consumed by the
on-disk cache of the receiver.
@discussion This size, measured in bytes, indicates the current
usage of the on-disk cache.
@result the current usage of the on-disk cache of the receiver.
*/
@property (readonly) NSUInteger currentDiskUsage;
@end
@interface NSURLCache (NSURLSessionTaskAdditions)
- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forDataTask:(NSURLSessionDataTask *)dataTask API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
- (void)getCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask completionHandler:(void (^) (NSCachedURLResponse * _Nullable cachedResponse))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
- (void)removeCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSIndexPath.h | /* NSIndexPath.h
Copyright (c) 2003-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSRange.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSIndexPath : NSObject <NSCopying, NSSecureCoding> {
@private
NSUInteger *_indexes;
#if !__OBJC2__
NSUInteger _hash;
#endif
NSUInteger _length;
void *_reserved;
}
+ (instancetype)indexPathWithIndex:(NSUInteger)index;
+ (instancetype)indexPathWithIndexes:(const NSUInteger [_Nullable])indexes length:(NSUInteger)length;
- (instancetype)initWithIndexes:(const NSUInteger [_Nullable])indexes length:(NSUInteger)length NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithIndex:(NSUInteger)index;
- (NSIndexPath *)indexPathByAddingIndex:(NSUInteger)index;
- (NSIndexPath *)indexPathByRemovingLastIndex;
- (NSUInteger)indexAtPosition:(NSUInteger)position;
@property (readonly) NSUInteger length;
/*!
@abstract Copies the indexes stored in this index path from the positions specified by positionRange into indexes.
@param indexes Buffer of at least as many NSUIntegers as specified by the length of positionRange. On return, this memory will hold the index path's indexes.
@param positionRange A range of valid positions within this index path. If the location plus the length of positionRange is greater than the length of this index path, this method raises an NSRangeException.
@discussion
It is the developer’s responsibility to allocate the memory for the C array.
*/
- (void)getIndexes:(NSUInteger *)indexes range:(NSRange)positionRange API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
// comparison support
- (NSComparisonResult)compare:(NSIndexPath *)otherObject; // sorting an array of indexPaths using this comparison results in an array representing nodes in depth-first traversal order
@end
@interface NSIndexPath (NSDeprecated)
/// This method is unsafe because it could potentially cause buffer overruns. You should use -getIndexes:range: instead.
- (void)getIndexes:(NSUInteger *)indexes API_DEPRECATED_WITH_REPLACEMENT("getIndexes:range:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)); // use -getIndexes:range: instead
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSRelativeDateTimeFormatter.h | /* NSRelativeDateTimeFormatter.h
Copyright (c) 2018-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSDate.h>
#import <Foundation/NSFormatter.h>
@class NSCalendar, NSLocale, NSDateComponents;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, NSRelativeDateTimeFormatterStyle) {
NSRelativeDateTimeFormatterStyleNumeric = 0, // "1 day ago", "2 days ago", "1 week ago", "in 1 week"
NSRelativeDateTimeFormatterStyleNamed, // “yesterday”, "2 days ago", "last week", "next week"; falls back to the numeric style if no name is available
} API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0));
typedef NS_ENUM(NSInteger, NSRelativeDateTimeFormatterUnitsStyle) {
NSRelativeDateTimeFormatterUnitsStyleFull = 0, // "2 months ago"
NSRelativeDateTimeFormatterUnitsStyleSpellOut, // "two months ago"
NSRelativeDateTimeFormatterUnitsStyleShort, // "2 mo. ago"
NSRelativeDateTimeFormatterUnitsStyleAbbreviated, // "2 mo. ago"; might give different results in languages other than English
} API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/* NSRelativeDateTimeFormatter provides locale-aware formatting of a relative date or time, such as "1 hour ago", "in 2 weeks", "yesterday", and "tomorrow." Note that the string produced by the formatter should only be used in a standalone manner as it may not be grammatically correct to embed the string in longer strings.
*/
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
@interface NSRelativeDateTimeFormatter : NSFormatter
#if !__OBJC2__
{
@private
void * _formatter;
NSRelativeDateTimeFormatterStyle _dateTimeStyle;
NSRelativeDateTimeFormatterUnitsStyle _unitsStyle;
NSFormattingContext _formattingContext;
NSCalendar *_calendar;
NSLocale *_locale;
}
#endif // !__OBJC2__
/* Specifies how to describe a relative date. For example, "yesterday" vs "1 day ago" in English. Default is NSRelativeDateTimeFormatterStyleNumeric.
*/
@property NSRelativeDateTimeFormatterStyle dateTimeStyle;
/* Specifies how to format the quantity or the name of the unit. For example, "1 day ago" vs "one day ago" in English. Default is NSRelativeDateTimeFormatterUnitsStyleFull.
*/
@property NSRelativeDateTimeFormatterUnitsStyle unitsStyle;
/* Specifies the formatting context of the output. Default is NSFormattingContextUnknown.
*/
@property NSFormattingContext formattingContext;
/* Specifies the calendar to use for formatting values that do not have an inherent calendar of their own. Defaults to autoupdatingCurrentCalendar. Also resets to autoupdatingCurrentCalendar on assignment of nil.
*/
@property (null_resettable, copy) NSCalendar *calendar;
/* Specifies the locale of the output string. Defaults to and resets on assignment of nil to the calendar's locale.
*/
@property (null_resettable, copy) NSLocale *locale;
/* Convenience method for formatting a relative time represented by an NSDateComponents object. Negative component values are evaluated as a date in the past. This method formats the value of the least granular unit in the NSDateComponents object, and does not provide a compound format of the date component.
Note this method only supports the following components: year, month, week of month, day, hour, minute, and second. The rest will be ignored.
*/
- (NSString *)localizedStringFromDateComponents:(NSDateComponents *)dateComponents;
/* Convenience method for formatting a time interval using the formatter's calendar. Negative time interval is evaluated as a date in the past.
*/
- (NSString *)localizedStringFromTimeInterval:(NSTimeInterval)timeInterval;
/* Formats the date interval from the reference date to the given date using the formatter's calendar.
*/
- (NSString *)localizedStringForDate:(NSDate *)date relativeToDate:(NSDate *)referenceDate;
/* Inherited from NSFormatter. 'obj' must be an instance of NSDate. Returns nil otherwise. When formatting a relative date using this method, the class uses -[NSDate date] as the reference date.
*/
- (nullable NSString *)stringForObjectValue:(nullable id)obj;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSScriptClassDescription.h | /*
NSScriptClassDescription.h
Copyright (c) 1997-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/NSClassDescription.h>
@class NSScriptCommandDescription;
NS_ASSUME_NONNULL_BEGIN
@interface NSScriptClassDescription : NSClassDescription {
@private
NSString *_suiteName;
NSString *_objcClassName;
FourCharCode _appleEventCode;
NSObject *_superclassNameOrDescription;
NSArray *_attributeDescriptions;
NSArray *_toOneRelationshipDescriptions;
NSArray *_toManyRelationshipDescriptions;
NSDictionary *_commandMethodSelectorsByName;
id _moreVars;
}
/* Return the class description for a class or, if it is not scriptable, the first superclass that is.
*/
+ (nullable NSScriptClassDescription *)classDescriptionForClass:(Class)aClass;
/* Initialize, given a scripting suite name, class name, and class declaration dictionary of the sort that is valid in .scriptSuite property list files.
*/
- (nullable instancetype)initWithSuiteName:(NSString *)suiteName className:(NSString *)className dictionary:(nullable NSDictionary *)classDeclaration NS_DESIGNATED_INITIALIZER;
/* Return the suite name or class name provided at initialization time.
*/
@property (nullable, readonly, copy) NSString *suiteName;
@property (nullable, readonly, copy) NSString *className;
/* Return the name of the Objective-C that implements the described scriptable class.
*/
@property (nullable, readonly, copy) NSString *implementationClassName;
/* Return the scripting class description of the superclass of the class described by the receiver.
*/
@property (nullable, readonly, retain) NSScriptClassDescription *superclassDescription;
/* Return the primary four character code used to identify the described class in Apple events.
*/
@property (readonly) FourCharCode appleEventCode;
/* Return YES if the four character code identifies the described class in Apple events. Return NO otherwise.
*/
- (BOOL)matchesAppleEventCode:(FourCharCode)appleEventCode;
/* Return YES if the described class or one of its superclasses is explicitly declared to support the described command, NO otherwise.
*/
- (BOOL)supportsCommand:(NSScriptCommandDescription *)commandDescription;
/* If the described class or one of its superclasses is explicitly declared to support the described command and the declaration includes a method name, return the selector for the class' handler method for the command. Return NULL otherwise.
*/
- (nullable SEL)selectorForCommand:(NSScriptCommandDescription *)commandDescription;
/* Return the name of the declared type of the keyed attribute, to-one relationship, or to-many relationship.
*/
- (nullable NSString *)typeForKey:(NSString *)key;
/* Return the class description for the keyed attribute, to-one relationship, or to-many relationship.
*/
- (nullable NSScriptClassDescription *)classDescriptionForKey:(NSString *)key;
/* Return the four character code that identifies the keyed attribute, to-one relationship, or to-many relationship in Apple events.
*/
- (FourCharCode)appleEventCodeForKey:(NSString *)key;
/* Given a four character code used to identify a property or element class in Apple events, return the key identifying the corresponding attribute, to-one relationship or to-many relationship.
*/
- (nullable NSString *)keyWithAppleEventCode:(FourCharCode)appleEventCode;
/* Return the value of the DefaultSubcontainerAttribute entry of the class declaration dictionary provided when the receiver was instantiated, or nil if there was no such entry.
*/
@property (nullable, readonly, copy) NSString *defaultSubcontainerAttributeKey;
/* Return YES if creation of objects for the relationship specified by the key, in containers of the class described by the receiver, requires an explicitly specified insertion location. Return NO otherwise. For example, NSCreateCommand uses this method to determine whether or not a specific Make command must have an at parameter.
*/
- (BOOL)isLocationRequiredToCreateForKey:(NSString *)toManyRelationshipKey;
/* Return whether the described class has a property identified by the key, whether it's a to-many relationship, whether it's readable, or whether it's writable, respectively.
*/
- (BOOL)hasPropertyForKey:(NSString *)key API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
- (BOOL)hasOrderedToManyRelationshipForKey:(NSString *)key API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
- (BOOL)hasReadablePropertyForKey:(NSString *)key API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
- (BOOL)hasWritablePropertyForKey:(NSString *)key API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
@end
@interface NSScriptClassDescription(NSDeprecated)
/* A method that was deprecated in Mac OS 10.5. You should use -hasWritablePropertyForKey: instead.
*/
- (BOOL)isReadOnlyKey:(NSString *)key API_DEPRECATED_WITH_REPLACEMENT("-hasWritablePropertyForKey:", macos(10.0, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
@end
@interface NSObject(NSScriptClassDescription)
/* Return the four character code identifying the receiver's class in Apple events.
*/
@property (readonly) FourCharCode classCode;
/* Return the Objective-C name of the receiver's class.
*/
@property (readonly, copy) NSString *className;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSData.h | /* NSData.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSRange.h>
@class NSString, NSURL, NSError;
NS_ASSUME_NONNULL_BEGIN
/**************** Read/Write Options ****************/
typedef NS_OPTIONS(NSUInteger, NSDataReadingOptions) {
NSDataReadingMappedIfSafe = 1UL << 0, // Hint to map the file in if possible and safe
NSDataReadingUncached = 1UL << 1, // Hint to get the file not to be cached in the kernel
NSDataReadingMappedAlways API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = 1UL << 3, // Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given.
// Options with old names for NSData reading methods. Please stop using these old names.
NSDataReadingMapped API_DEPRECATED_WITH_REPLACEMENT("NSDataReadingMappedIfSafe", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataReadingMappedIfSafe, // Deprecated name for NSDataReadingMappedIfSafe
NSMappedRead API_DEPRECATED_WITH_REPLACEMENT("NSDataReadingMapped", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataReadingMapped, // Deprecated name for NSDataReadingMapped
NSUncachedRead API_DEPRECATED_WITH_REPLACEMENT("NSDataReadingUncached", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataReadingUncached // Deprecated name for NSDataReadingUncached
};
typedef NS_OPTIONS(NSUInteger, NSDataWritingOptions) {
NSDataWritingAtomic = 1UL << 0, // Hint to use auxiliary file when saving; equivalent to atomically:YES
NSDataWritingWithoutOverwriting API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) = 1UL << 1, // Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic.
NSDataWritingFileProtectionNone API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0x10000000,
NSDataWritingFileProtectionComplete API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0x20000000,
NSDataWritingFileProtectionCompleteUnlessOpen API_AVAILABLE(macos(11.0), ios(5.0), watchos(2.0), tvos(9.0)) = 0x30000000,
NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication API_AVAILABLE(macos(11.0), ios(5.0), watchos(2.0), tvos(9.0)) = 0x40000000,
NSDataWritingFileProtectionMask API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0xf0000000,
// Options with old names for NSData writing methods. Please stop using these old names.
NSAtomicWrite API_DEPRECATED_WITH_REPLACEMENT("NSDataWritingAtomic", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataWritingAtomic // Deprecated name for NSDataWritingAtomic
};
/**************** Data Search Options ****************/
typedef NS_OPTIONS(NSUInteger, NSDataSearchOptions) {
NSDataSearchBackwards = 1UL << 0,
NSDataSearchAnchored = 1UL << 1
} API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
/**************** Base 64 Options ****************/
typedef NS_OPTIONS(NSUInteger, NSDataBase64EncodingOptions) {
// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default.
NSDataBase64Encoding64CharacterLineLength = 1UL << 0,
NSDataBase64Encoding76CharacterLineLength = 1UL << 1,
// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF.
NSDataBase64EncodingEndLineWithCarriageReturn = 1UL << 4,
NSDataBase64EncodingEndLineWithLineFeed = 1UL << 5,
} API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
typedef NS_OPTIONS(NSUInteger, NSDataBase64DecodingOptions) {
// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters.
NSDataBase64DecodingIgnoreUnknownCharacters = 1UL << 0
} API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
/**************** Immutable Data ****************/
@interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
@property (readonly) NSUInteger length;
/*
The -bytes method returns a pointer to a contiguous region of memory managed by the receiver.
If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer
Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data.
*/
@property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
@end
@interface NSData (NSExtendedData)
@property (readonly, copy) NSString *description;
- (void)getBytes:(void *)buffer length:(NSUInteger)length;
- (void)getBytes:(void *)buffer range:(NSRange)range;
- (BOOL)isEqualToData:(NSData *)other;
- (NSData *)subdataWithRange:(NSRange)range;
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically; // the atomically flag is ignored if the url is not of a type the supports atomic writes
- (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
- (BOOL)writeToURL:(NSURL *)url options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
- (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
/*
'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES.
*/
- (void) enumerateByteRangesUsingBlock:(void (NS_NOESCAPE ^)(const void *bytes, NSRange byteRange, BOOL *stop))block API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
@end
@interface NSData (NSDataCreation)
+ (instancetype)data;
+ (instancetype)dataWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
+ (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
+ (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
+ (nullable instancetype)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
+ (nullable instancetype)dataWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
+ (nullable instancetype)dataWithContentsOfFile:(NSString *)path;
+ (nullable instancetype)dataWithContentsOfURL:(NSURL *)url;
- (instancetype)initWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
- (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
- (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
- (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length deallocator:(nullable void (^)(void *bytes, NSUInteger length))deallocator API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
- (nullable instancetype)initWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
- (nullable instancetype)initWithContentsOfFile:(NSString *)path;
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url;
- (instancetype)initWithData:(NSData *)data;
+ (instancetype)dataWithData:(NSData *)data;
@end
@interface NSData (NSDataBase64Encoding)
/* Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64.
*/
- (nullable instancetype)initWithBase64EncodedString:(NSString *)base64String options:(NSDataBase64DecodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
/* Create a Base-64 encoded NSString from the receiver's contents using the given options.
*/
- (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
/* Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64.
*/
- (nullable instancetype)initWithBase64EncodedData:(NSData *)base64Data options:(NSDataBase64DecodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
/* Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options.
*/
- (NSData *)base64EncodedDataWithOptions:(NSDataBase64EncodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
@end
/* Various algorithms provided for compression APIs. See NSData and NSMutableData.
*/
typedef NS_ENUM(NSInteger, NSDataCompressionAlgorithm) {
// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4.
NSDataCompressionAlgorithmLZFSE = 0,
// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed.
// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in <compression.h>.
NSDataCompressionAlgorithmLZ4,
// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA.
// Encoding uses LZMA level 6 only, but decompression works with any compression level.
NSDataCompressionAlgorithmLZMA,
// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib.
// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951.
NSDataCompressionAlgorithmZlib,
} API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
@interface NSData (NSDataCompression)
/* These methods return a compressed or decompressed version of the receiver using the specified algorithm.
*/
- (nullable instancetype)decompressedDataUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
- (nullable instancetype)compressedDataUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
@end
@interface NSData (NSDeprecated)
- (void)getBytes:(void *)buffer API_DEPRECATED("This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead.", macos(10.0,10.10), ios(2.0,8.0), watchos(2.0,2.0), tvos(9.0,9.0));
+ (nullable id)dataWithContentsOfMappedFile:(NSString *)path API_DEPRECATED("Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.", macos(10.0,10.10), ios(2.0,8.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable id)initWithContentsOfMappedFile:(NSString *)path API_DEPRECATED("Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.", macos(10.0,10.10), ios(2.0,8.0), watchos(2.0,2.0), tvos(9.0,9.0));
/* These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0.
*/
- (nullable id)initWithBase64Encoding:(NSString *)base64String API_DEPRECATED("Use initWithBase64EncodedString:options: instead", macos(10.6,10.9), ios(4.0,7.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (NSString *)base64Encoding API_DEPRECATED("Use base64EncodedStringWithOptions: instead", macos(10.6,10.9), ios(4.0,7.0), watchos(2.0,2.0), tvos(9.0,9.0));
@end
/**************** Mutable Data ****************/
@interface NSMutableData : NSData
@property (readonly) void *mutableBytes NS_RETURNS_INNER_POINTER;
@property NSUInteger length;
@end
@interface NSMutableData (NSExtendedMutableData)
- (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
- (void)appendData:(NSData *)other;
- (void)increaseLengthBy:(NSUInteger)extraLength;
- (void)replaceBytesInRange:(NSRange)range withBytes:(const void *)bytes;
- (void)resetBytesInRange:(NSRange)range;
- (void)setData:(NSData *)data;
- (void)replaceBytesInRange:(NSRange)range withBytes:(nullable const void *)replacementBytes length:(NSUInteger)replacementLength;
@end
@interface NSMutableData (NSMutableDataCreation)
+ (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
+ (nullable instancetype)dataWithLength:(NSUInteger)length;
- (nullable instancetype)initWithCapacity:(NSUInteger)capacity;
- (nullable instancetype)initWithLength:(NSUInteger)length;
@end
@interface NSMutableData (NSMutableDataCompression)
/* These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged..
*/
- (BOOL)decompressUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
- (BOOL)compressUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
@end
/**************** Purgeable Data ****************/
API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
@interface NSPurgeableData : NSMutableData <NSDiscardableContent> {
@private
NSUInteger _length;
int32_t _accessCount;
uint8_t _private[32];
void *_reserved;
}
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSMapTable.h | /* NSMapTable.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSPointerFunctions.h>
#import <Foundation/NSString.h>
#import <Foundation/NSEnumerator.h>
#if !defined(__FOUNDATION_NSMAPTABLE__)
#define __FOUNDATION_NSMAPTABLE__ 1
@class NSArray, NSDictionary<KeyType, ObjectType>, NSMapTable;
NS_ASSUME_NONNULL_BEGIN
/**************** Class ****************/
/* An NSMapTable is modeled after a dictionary, although, because of its options, is not a dictionary because it will behave differently. The major option is to have keys and/or values held "weakly" in a manner that entries will be removed at some indefinite point after one of the objects is reclaimed. In addition to being held weakly, keys or values may be copied on input or may use pointer identity for equality and hashing.
An NSMapTable can also be configured to operate on arbitrary pointers and not just objects. We recommend the C function API for "void *" access. To configure for pointer use, consult and choose the appropriate NSPointerFunction options or configure and use NSPointerFunctions objects directly for initialization.
*/
static const NSPointerFunctionsOptions NSMapTableStrongMemory API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsStrongMemory;
static const NSPointerFunctionsOptions NSMapTableZeroingWeakMemory API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos) = NSPointerFunctionsZeroingWeakMemory;
static const NSPointerFunctionsOptions NSMapTableCopyIn API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsCopyIn;
static const NSPointerFunctionsOptions NSMapTableObjectPointerPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsObjectPointerPersonality;
static const NSPointerFunctionsOptions NSMapTableWeakMemory API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) = NSPointerFunctionsWeakMemory;
typedef NSUInteger NSMapTableOptions;
API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0))
@interface NSMapTable<KeyType, ObjectType> : NSObject <NSCopying, NSSecureCoding, NSFastEnumeration>
- (instancetype)initWithKeyOptions:(NSPointerFunctionsOptions)keyOptions valueOptions:(NSPointerFunctionsOptions)valueOptions capacity:(NSUInteger)initialCapacity NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithKeyPointerFunctions:(NSPointerFunctions *)keyFunctions valuePointerFunctions:(NSPointerFunctions *)valueFunctions capacity:(NSUInteger)initialCapacity NS_DESIGNATED_INITIALIZER;
+ (NSMapTable<KeyType, ObjectType> *)mapTableWithKeyOptions:(NSPointerFunctionsOptions)keyOptions valueOptions:(NSPointerFunctionsOptions)valueOptions;
+ (id)mapTableWithStrongToStrongObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos);
+ (id)mapTableWithWeakToStrongObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos);
+ (id)mapTableWithStrongToWeakObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos);
+ (id)mapTableWithWeakToWeakObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos);
+ (NSMapTable<KeyType, ObjectType> *)strongToStrongObjectsMapTable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
+ (NSMapTable<KeyType, ObjectType> *)weakToStrongObjectsMapTable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)); // entries are not necessarily purged right away when the weak key is reclaimed
+ (NSMapTable<KeyType, ObjectType> *)strongToWeakObjectsMapTable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
+ (NSMapTable<KeyType, ObjectType> *)weakToWeakObjectsMapTable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)); // entries are not necessarily purged right away when the weak key or object is reclaimed
/* return an NSPointerFunctions object reflecting the functions in use. This is a new autoreleased object that can be subsequently modified and/or used directly in the creation of other pointer "collections". */
@property (readonly, copy) NSPointerFunctions *keyPointerFunctions;
@property (readonly, copy) NSPointerFunctions *valuePointerFunctions;
- (nullable ObjectType)objectForKey:(nullable KeyType)aKey;
- (void)removeObjectForKey:(nullable KeyType)aKey;
- (void)setObject:(nullable ObjectType)anObject forKey:(nullable KeyType)aKey; // add/replace value (CFDictionarySetValue, NSMapInsert)
@property (readonly) NSUInteger count;
- (NSEnumerator<KeyType> *)keyEnumerator;
- (nullable NSEnumerator<ObjectType> *)objectEnumerator;
- (void)removeAllObjects;
- (NSDictionary<KeyType, ObjectType> *)dictionaryRepresentation; // create a dictionary of contents
@end
/**************** void * Map table operations ****************/
typedef struct {NSUInteger _pi; NSUInteger _si; void * _Nullable _bs;} NSMapEnumerator;
FOUNDATION_EXPORT void NSFreeMapTable(NSMapTable *table);
FOUNDATION_EXPORT void NSResetMapTable(NSMapTable *table);
FOUNDATION_EXPORT BOOL NSCompareMapTables(NSMapTable *table1, NSMapTable *table2);
FOUNDATION_EXPORT NSMapTable *NSCopyMapTableWithZone(NSMapTable *table, NSZone * _Nullable zone);
FOUNDATION_EXPORT BOOL NSMapMember(NSMapTable *table, const void *key, void * _Nullable * _Nullable originalKey, void * _Nullable * _Nullable value);
FOUNDATION_EXPORT void * _Nullable NSMapGet(NSMapTable *table, const void * _Nullable key);
FOUNDATION_EXPORT void NSMapInsert(NSMapTable *table, const void * _Nullable key, const void * _Nullable value);
FOUNDATION_EXPORT void NSMapInsertKnownAbsent(NSMapTable *table, const void * _Nullable key, const void * _Nullable value);
FOUNDATION_EXPORT void * _Nullable NSMapInsertIfAbsent(NSMapTable *table, const void * _Nullable key, const void * _Nullable value);
FOUNDATION_EXPORT void NSMapRemove(NSMapTable *table, const void * _Nullable key);
FOUNDATION_EXPORT NSMapEnumerator NSEnumerateMapTable(NSMapTable *table);
FOUNDATION_EXPORT BOOL NSNextMapEnumeratorPair(NSMapEnumerator *enumerator, void * _Nullable * _Nullable key, void * _Nullable * _Nullable value);
FOUNDATION_EXPORT void NSEndMapTableEnumeration(NSMapEnumerator *enumerator);
FOUNDATION_EXPORT NSUInteger NSCountMapTable(NSMapTable *table);
FOUNDATION_EXPORT NSString *NSStringFromMapTable(NSMapTable *table);
FOUNDATION_EXPORT NSArray *NSAllMapTableKeys(NSMapTable *table);
FOUNDATION_EXPORT NSArray *NSAllMapTableValues(NSMapTable *table);
/**************** Legacy ***************************************/
typedef struct {
NSUInteger (* _Nullable hash)(NSMapTable *table, const void *);
BOOL (* _Nullable isEqual)(NSMapTable *table, const void *, const void *);
void (* _Nullable retain)(NSMapTable *table, const void *);
void (* _Nullable release)(NSMapTable *table, void *);
NSString * _Nullable (* _Nullable describe)(NSMapTable *table, const void *);
const void * _Nullable notAKeyMarker;
} NSMapTableKeyCallBacks;
#define NSNotAnIntMapKey ((const void *)NSIntegerMin)
#define NSNotAnIntegerMapKey ((const void *)NSIntegerMin)
#define NSNotAPointerMapKey ((const void *)UINTPTR_MAX)
typedef struct {
void (* _Nullable retain)(NSMapTable *table, const void *);
void (* _Nullable release)(NSMapTable *table, void *);
NSString * _Nullable(* _Nullable describe)(NSMapTable *table, const void *);
} NSMapTableValueCallBacks;
FOUNDATION_EXPORT NSMapTable *NSCreateMapTableWithZone(NSMapTableKeyCallBacks keyCallBacks, NSMapTableValueCallBacks valueCallBacks, NSUInteger capacity, NSZone * _Nullable zone);
FOUNDATION_EXPORT NSMapTable *NSCreateMapTable(NSMapTableKeyCallBacks keyCallBacks, NSMapTableValueCallBacks valueCallBacks, NSUInteger capacity);
/**************** Common map table key callbacks ****************/
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSIntegerMapKeyCallBacks API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks;
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks;
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks;
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks;
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks;
FOUNDATION_EXPORT const NSMapTableKeyCallBacks NSIntMapKeyCallBacks API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0, 2.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
/**************** Common map table value callbacks ****************/
FOUNDATION_EXPORT const NSMapTableValueCallBacks NSIntegerMapValueCallBacks API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
FOUNDATION_EXPORT const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks;
FOUNDATION_EXPORT const NSMapTableValueCallBacks NSObjectMapValueCallBacks;
FOUNDATION_EXPORT const NSMapTableValueCallBacks NSNonRetainedObjectMapValueCallBacks;
FOUNDATION_EXPORT const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks;
FOUNDATION_EXPORT const NSMapTableValueCallBacks NSIntMapValueCallBacks API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0, 2.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
NS_ASSUME_NONNULL_END
#endif // defined __FOUNDATION_NSMAPTABLE__
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h | /* NSZone.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObjCRuntime.h>
#include <CoreFoundation/CFBase.h>
#include <stddef.h>
@class NSString;
NS_ASSUME_NONNULL_BEGIN
typedef struct _NSZone NSZone;
FOUNDATION_EXPORT NSZone *NSDefaultMallocZone(void) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT NSZone *NSCreateZone(NSUInteger startSize, NSUInteger granularity, BOOL canFree) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT void NSRecycleZone(NSZone *zone)NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT void NSSetZoneName(NSZone * _Nullable zone, NSString *name)NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT NSString *NSZoneName(NSZone * _Nullable zone) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT NSZone * _Nullable NSZoneFromPointer(void *ptr) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT void *NSZoneMalloc(NSZone * _Nullable zone, NSUInteger size) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT void *NSZoneCalloc(NSZone * _Nullable zone, NSUInteger numElems, NSUInteger byteSize) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT void *NSZoneRealloc(NSZone * _Nullable zone, void * _Nullable ptr, NSUInteger size) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
FOUNDATION_EXPORT void NSZoneFree(NSZone * _Nullable zone, void *ptr) NS_SWIFT_UNAVAILABLE("Zone-based memory management is unavailable");
#if TARGET_OS_OSX
/* Garbage Collected memory allocation. Garbage Collection is deprecated. */
NS_ENUM(NSUInteger) {
NSScannedOption = (1UL << 0),
NSCollectorDisabledOption = (1UL << 1),
};
FOUNDATION_EXPORT void *NSAllocateCollectable(NSUInteger size, NSUInteger options) NS_SWIFT_UNAVAILABLE("Garbage Collection is not supported");
FOUNDATION_EXPORT void *NSReallocateCollectable(void * _Nullable ptr, NSUInteger size, NSUInteger options) NS_SWIFT_UNAVAILABLE("Garbage Collection is not supported");
#endif
#ifndef CF_CONSUMED
#if __has_feature(attribute_cf_consumed)
#define CF_CONSUMED __attribute__((cf_consumed))
#else
#define CF_CONSUMED
#endif
#endif
/*
NSMakeCollectable
CFTypeRef style objects are garbage collected, yet only sometime after the last CFRelease() is performed. Particulary for fully-bridged CFTypeRef objects such as CFStrings and collections (CFDictionaryRef et alia) it is imperative that either CFMakeCollectable or the more type safe NSMakeCollectable be performed, preferably right upon allocation. Conceptually, this moves them from a "C" style opaque pointer into an "id" style object.
This function is unavailable in ARC mode. Use CFBridgingRelease instead.
*/
NS_INLINE NS_RETURNS_RETAINED id _Nullable NSMakeCollectable(CFTypeRef _Nullable CF_CONSUMED cf) NS_AUTOMATED_REFCOUNT_UNAVAILABLE NS_SWIFT_UNAVAILABLE("Garbage Collection is not supported");
NS_INLINE NS_RETURNS_RETAINED id _Nullable NSMakeCollectable(CFTypeRef _Nullable CF_CONSUMED cf) {
#if __has_feature(objc_arc)
return nil;
#else
return (id)cf;
#endif
}
FOUNDATION_EXPORT NSUInteger NSPageSize(void);
FOUNDATION_EXPORT NSUInteger NSLogPageSize(void);
FOUNDATION_EXPORT NSUInteger NSRoundUpToMultipleOfPageSize(NSUInteger bytes);
FOUNDATION_EXPORT NSUInteger NSRoundDownToMultipleOfPageSize(NSUInteger bytes);
FOUNDATION_EXPORT void *NSAllocateMemoryPages(NSUInteger bytes);
FOUNDATION_EXPORT void NSDeallocateMemoryPages(void *ptr, NSUInteger bytes);
FOUNDATION_EXPORT void NSCopyMemoryPages(const void *source, void *dest, NSUInteger bytes);
FOUNDATION_EXPORT NSUInteger NSRealMemoryAvailable(void) API_DEPRECATED("Use NSProcessInfo instead", macos(10.0,10.8), ios(2.0,6.0), watchos(2.0,2.0), tvos(9.0,9.0)); // see NSProcessInfo.h instead
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSLocale.h | /* NSLocale.h
Copyright (c) 2003-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <CoreFoundation/CFLocale.h>
#import <Foundation/NSNotification.h>
@class NSCalendar;
typedef NSString * NSLocaleKey NS_TYPED_ENUM;
@class NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSString;
// Toll-free bridged with CFLocaleRef
NS_ASSUME_NONNULL_BEGIN
@interface NSLocale : NSObject <NSCopying, NSSecureCoding>
- (nullable id)objectForKey:(NSLocaleKey)key;
- (nullable NSString *)displayNameForKey:(NSLocaleKey)key value:(id)value;
- (instancetype)initWithLocaleIdentifier:(NSString *)string NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end
@interface NSLocale (NSExtendedLocale)
@property (readonly, copy) NSString *localeIdentifier; // same as NSLocaleIdentifier
- (NSString *)localizedStringForLocaleIdentifier:(NSString *)localeIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *languageCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForLanguageCode:(NSString *)languageCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (nullable, readonly, copy) NSString *countryCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForCountryCode:(NSString *)countryCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (nullable, readonly, copy) NSString *scriptCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForScriptCode:(NSString *)scriptCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (nullable, readonly, copy) NSString *variantCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForVariantCode:(NSString *)variantCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSCharacterSet *exemplarCharacterSet API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *calendarIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForCalendarIdentifier:(NSString *)calendarIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (nullable, readonly, copy) NSString *collationIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForCollationIdentifier:(NSString *)collationIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly) BOOL usesMetricSystem API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *decimalSeparator API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *groupingSeparator API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *currencySymbol API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (nullable, readonly, copy) NSString *currencyCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForCurrencyCode:(NSString *)currencyCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *collatorIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (nullable NSString *)localizedStringForCollatorIdentifier:(NSString *)collatorIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *quotationBeginDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *quotationEndDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *alternateQuotationBeginDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@property (readonly, copy) NSString *alternateQuotationEndDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
@end
@interface NSLocale (NSLocaleCreation)
@property (class, readonly, strong) NSLocale *autoupdatingCurrentLocale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // generally you should use this property
@property (class, readonly, copy) NSLocale *currentLocale; // an object representing the user's current locale
@property (class, readonly, copy) NSLocale *systemLocale; // the default generic root locale with little localization
+ (instancetype)localeWithLocaleIdentifier:(NSString *)ident API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (instancetype)init API_UNAVAILABLE(macos, ios, watchos, tvos); /* do not invoke; not a valid initializer for this class */
@end
@interface NSLocale (NSLocaleGeneralInfo)
@property (class, readonly, copy) NSArray<NSString *> *availableLocaleIdentifiers;
@property (class, readonly, copy) NSArray<NSString *> *ISOLanguageCodes;
@property (class, readonly, copy) NSArray<NSString *> *ISOCountryCodes;
@property (class, readonly, copy) NSArray<NSString *> *ISOCurrencyCodes;
@property (class, readonly, copy) NSArray<NSString *> *commonISOCurrencyCodes API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (class, readonly, copy) NSArray<NSString *> *preferredLanguages API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // note that this list does not indicate what language the app is actually running in; the NSBundle.mainBundle object determines that at launch and knows that information
+ (NSDictionary<NSString *, NSString *> *)componentsFromLocaleIdentifier:(NSString *)string;
+ (NSString *)localeIdentifierFromComponents:(NSDictionary<NSString *, NSString *> *)dict;
+ (NSString *)canonicalLocaleIdentifierFromString:(NSString *)string;
+ (NSString *)canonicalLanguageIdentifierFromString:(NSString *)string;
+ (nullable NSString *)localeIdentifierFromWindowsLocaleCode:(uint32_t)lcid API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
+ (uint32_t)windowsLocaleCodeFromLocaleIdentifier:(NSString *)localeIdentifier API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
typedef NS_ENUM(NSUInteger, NSLocaleLanguageDirection) {
NSLocaleLanguageDirectionUnknown = kCFLocaleLanguageDirectionUnknown,
NSLocaleLanguageDirectionLeftToRight = kCFLocaleLanguageDirectionLeftToRight,
NSLocaleLanguageDirectionRightToLeft = kCFLocaleLanguageDirectionRightToLeft,
NSLocaleLanguageDirectionTopToBottom = kCFLocaleLanguageDirectionTopToBottom,
NSLocaleLanguageDirectionBottomToTop = kCFLocaleLanguageDirectionBottomToTop
};
+ (NSLocaleLanguageDirection)characterDirectionForLanguage:(NSString *)isoLangCode API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
+ (NSLocaleLanguageDirection)lineDirectionForLanguage:(NSString *)isoLangCode API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
@end
FOUNDATION_EXPORT NSNotificationName const NSCurrentLocaleDidChangeNotification API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSLocaleKey const NSLocaleIdentifier; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleLanguageCode; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCountryCode; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleScriptCode; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleVariantCode; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleExemplarCharacterSet;// NSCharacterSet
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCalendar; // NSCalendar
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCollationIdentifier; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleUsesMetricSystem; // NSNumber boolean
FOUNDATION_EXPORT NSLocaleKey const NSLocaleMeasurementSystem; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleDecimalSeparator; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleGroupingSeparator; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCurrencySymbol; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCurrencyCode; // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleCollatorIdentifier API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleQuotationBeginDelimiterKey API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleQuotationEndDelimiterKey API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleAlternateQuotationBeginDelimiterKey API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // NSString
FOUNDATION_EXPORT NSLocaleKey const NSLocaleAlternateQuotationEndDelimiterKey API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // NSString
#if !defined(NS_CALENDAR_ENUM_DEPRECATED)
#if 1 || NS_ENABLE_CALENDAR_DEPRECATIONS
#define NS_CALENDAR_ENUM_DEPRECATED(A, B, C, D, ...) NS_ENUM_DEPRECATED(A, B, C, D, __VA_ARGS__)
#define NS_CALENDAR_DEPRECATED(A, B, C, D, ...) NS_DEPRECATED(A, B, C, D, __VA_ARGS__)
#define NS_CALENDAR_DEPRECATED_MAC(A, B, ...) NS_DEPRECATED_MAC(A, B, __VA_ARGS__)
#else
#define NS_CALENDAR_ENUM_DEPRECATED(A, B, C, D, ...) NS_ENUM_AVAILABLE(A, C)
#define NS_CALENDAR_DEPRECATED(A, B, C, D, ...) NS_AVAILABLE(A, C)
#define NS_CALENDAR_DEPRECATED_MAC(A, B, ...) NS_AVAILABLE_MAC(A)
#endif
#endif
// Values for NSCalendar identifiers (not the NSLocaleCalendar property key)
FOUNDATION_EXPORT NSString * const NSGregorianCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierGregorian", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSBuddhistCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierBuddhist", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSChineseCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierChinese", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSHebrewCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierHebrew", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSIslamicCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierIslamic", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSIslamicCivilCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierIslamicCivil", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSJapaneseCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierJapanese", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSRepublicOfChinaCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierRepublicOfChina", macos(10.6, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSPersianCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierPersian", macos(10.6, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSIndianCalendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierIndian", macos(10.6, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
FOUNDATION_EXPORT NSString * const NSISO8601Calendar API_DEPRECATED_WITH_REPLACEMENT("NSCalendarIdentifierISO8601", macos(10.6, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSURLDownload.h | /*
NSURLDownload.h
Copyright (c) 2003-2019, Apple Inc. All rights reserved.
Public header file.
*/
#import <Foundation/NSObject.h>
@class NSError;
@class NSString;
@class NSData;
@class NSURLAuthenticationChallenge;
@class NSURLDownloadInternal;
@class NSURLRequest;
@class NSURLResponse;
@class NSURLProtectionSpace;
@protocol NSURLDownloadDelegate;
NS_ASSUME_NONNULL_BEGIN
/*** DEPRECATED: The NSURLDownload class should no longer be used. NSURLSession is the replacement for NSURLDownload ***/
/*!
@class NSURLDownload
@discussion A NSURLDownload loads a request and saves the downloaded data to a file. The progress of the download
is reported via the NSURLDownloadDelegate protocol. Note: The word "download" is used to refer to the process
of loading data off a network, decoding the data if necessary and saving the data to a file.
*/
API_AVAILABLE(macos(10.2)) API_UNAVAILABLE(watchos, ios, tvos)
@interface NSURLDownload : NSObject
{
@private
NSURLDownloadInternal *_internal;
}
/*!
@method canResumeDownloadDecodedWithEncodingMIMEType:
@abstract Returns whether or not NSURLDownload can resume a download that was decoded with a given encoding MIME type.
@param MIMEType The encoding MIME type.
@description canResumeDownloadDecodedWithEncodingMIMEType: returns whether or not NSURLDownload can resume a download
that was decoded with a given encoding MIME type. NSURLDownload cannot resume a download that was partially decoded
in the gzip format for example. In order to ensure that a download can be later resumed,
canResumeDownloadDecodedWithEncodingMIMEType: should be used when download:shouldDecodeSourceDataOfMIMEType: is called.
*/
+ (BOOL)canResumeDownloadDecodedWithEncodingMIMEType:(NSString *)MIMEType;
/*!
@method initWithRequest:delegate:
@abstract Initializes a NSURLDownload object and starts the download.
@param request The request to download. Must not be nil.
@param delegate The delegate of the download.
@result An initialized NSURLDownload object.
*/
- (instancetype)initWithRequest:(NSURLRequest *)request delegate:(nullable id <NSURLDownloadDelegate>)delegate API_DEPRECATED("Use NSURLSession downloadTask (see NSURLSession.h)", macos(10.3,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
/*!
@method initWithResumeData:delegate:path:
@abstract Initializes a NSURLDownload object for resuming a previous download.
@param resumeData The resume data from the previous download.
@param delegate The delegate of the download.
@param path The path of the incomplete downloaded file.
@result An initialized NSURLDownload object.
*/
- (instancetype)initWithResumeData:(NSData *)resumeData delegate:(nullable id <NSURLDownloadDelegate>)delegate path:(NSString *)path API_DEPRECATED("Use NSURLSession downloadTask (see NSURLSession.h)", macos(10.3,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
/*!
@method cancel
@abstract Cancels the download and deletes the downloaded file.
*/
- (void)cancel;
/*!
@method setDestination:allowOverwrite:
@abstract Sets the destination path of the downloaded file.
@param path The destination path of the downloaded file.
@param allowOverwrite Allows a file of the same path to be overwritten.
@discussion This method can be called after the download is created or in response to the
decideDestinationWithSuggestedFilename: delegate method. It should only be called once.
If NO is passed for allowOverwrite and a file of the same path exists, a number will be
appended to the filename to prevent the overwrite. Because of this, use the path
passed with didCreateDestination: to determine the actual path of the downloaded file.
*/
- (void)setDestination:(NSString *)path allowOverwrite:(BOOL)allowOverwrite;
/*!
@abstract Returns the request of the download.
@result The request of the download.
*/
@property (readonly, copy) NSURLRequest *request;
/*!
@abstract Returns the resume data of a download that is incomplete.
@result The resume data.
@description resumeData returns the resume data of a download that is incomplete. This data represents the necessary
state information that NSURLDownload needs to resume a download. The resume data can later be used when initializing
a download with initWithResumeData:delegate:path:. Non-nil is returned if resuming the download seems possible.
Non-nil is returned if the download was cancelled or ended in error after some but not all data has been received.
The protocol of the download as well as the server must support resuming for non-nil to be returned.
In order to later resume a download, be sure to call setDeletesFileUponFailure: with NO.
*/
@property (nullable, readonly, copy) NSData *resumeData;
/*!
@abstract Sets whether or not the downloaded file should be deleted upon failure.
1 @description To allow the download to be resumed in case the download ends prematurely,
deletesFileUponFailure must be set to NO as soon as possible to prevent the downloaded file
from being deleted. deletesFileUponFailure is YES by default.
*/
@property BOOL deletesFileUponFailure;
@end
/*!
@protocol NSURLDownloadDelegate
@discussion The NSURLDownloadDelegate delegate is used to report the progress of the download.
*/
API_AVAILABLE(macos(10.2)) API_UNAVAILABLE(watchos, ios, tvos)
@protocol NSURLDownloadDelegate <NSObject>
@optional
/*!
@method downloadDidBegin:
@abstract This method is called immediately after the download has started.
@param download The download that just started downloading.
*/
- (void)downloadDidBegin:(NSURLDownload *)download;
/*!
@method download:willSendRequest:redirectResponse:
@abstract This method is called if the download must load another request because the previous
request was redirected.
@param download The download that will send the request.
@param request The request that will be used to continue loading.
@result The request to be used; either the request parameter or a replacement. If nil is returned,
the download is cancelled.
@discussion This method gives the delegate an opportunity to inspect the request
that will be used to continue loading the request, and modify it if necessary.
*/
- (nullable NSURLRequest *)download:(NSURLDownload *)download willSendRequest:(NSURLRequest *)request redirectResponse:(nullable NSURLResponse *)redirectResponse;
/*!
@method download:canAuthenticateAgainstProtectionSpace:
@abstract This method gives the delegate an opportunity to inspect an NSURLProtectionSpace before an authentication attempt is made.
@discussion If implemented, will be called before connection:didReceiveAuthenticationChallenge
to give the delegate a chance to inspect the protection space that will be authenticated against. Delegates should determine
if they are prepared to respond to the authentication method of the protection space and if so, return YES, or NO to
allow default processing to handle the authentication. If this delegate is not implemented, then default
processing will occur (typically, consulting
the user's keychain and/or failing the connection attempt.
@param connection an NSURLConnection that has an NSURLProtectionSpace ready for inspection
@param protectionSpace an NSURLProtectionSpace that will be used to generate an authentication challenge
@result a boolean value that indicates the willingness of the delegate to handle the authentication
*/
- (BOOL)download:(NSURLDownload *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace;
/*!
@method download:didReceiveAuthenticationChallenge:
@abstract Start authentication for a given challenge
@param download The download that needs authentication.
@param challenge The NSURLAuthenticationChallenge for which to start authentication.
@discussion Call useCredential:forAuthenticationChallenge:,
continueWithoutCredentialForAuthenticationChallenge: or cancel on
the connection sender when done.
*/
- (void)download:(NSURLDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
/*!
@method download:didCancelAuthenticationChallenge:
@abstract Cancel authentication for a given request
@param download The download that's cancelling
@param challenge The NSURLAuthenticationChallenge to cancel authentication for
*/
- (void)download:(NSURLDownload *)download didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
/*!
@method downloadShouldUseCredentialStorage
@abstract This method allows the delegate to inform the url loader that it
should not consult the credential storage for the download.
@discussion This method will be called before any attempt to authenticate is
attempted on a download. By returning NO the delegate is telling the
download to not consult the credential storage and taking responsiblity
for providing any credentials for authentication challenges. Not implementing
this method is the same as returing YES. The delegate is free to consult the
credential storage itself when it receives a didReceiveAuthenticationChallenge
message.
@param download the NSURLDownload object asking if it should consult the credential storage.
@result NO if the download should not consult the credential storage, Yes if it should.
*/
- (BOOL)downloadShouldUseCredentialStorage:(NSURLDownload *)download;
/*!
@method download:didReceiveResponse:
@abstract This method is called when the download has received a response from the server.
@param download The download that now has a NSURLResponse available for inspection.
@param response The NSURLResponse object for the given download.
@discussion In some rare cases, multiple responses may be received for a single download.
This occurs with multipart/x-mixed-replace, or "server push". In this case, the client
should assume that each new response resets progress so far for the resource back to 0,
and should check the new response for the expected content length.
*/
- (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response;
/*!
@method download:willResumeWithResponse:fromByte:
@abstract This method is called when the download has received a response from the server after attempting to
resume a download.
@param download The download that now has a NSURLResponse available for inspection.
@param response The NSURLResponse object for the given download.
@param startingByte The number of bytes from where the download will resume. 0 indicates that the download will
restart from the beginning.
@discussion download:willResumeWithResponse:fromByte: is called instead of download:didReceiveResponse:
when a download is initialized with initWithResumeData:delegate:path:.
*/
- (void)download:(NSURLDownload *)download willResumeWithResponse:(NSURLResponse *)response fromByte:(long long)startingByte;
/*!
@method download:didReceiveDataOfLength:
@abstract This method is called when the download has loaded data.
@param download The download that has received data.
@param length The length of the received data.
@discussion This method will be called one or more times.
*/
- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length;
/*!
@method download:shouldDecodeSourceDataOfMIMEType:
@abstract This method is called if the download detects that the downloading file is encoded.
@param download The download that has detected that the downloading file is encoded.
@param encodingType A MIME type expressing the encoding type.
@result Return YES to decode the file, NO to not decode the file.
@discussion An encoded file is encoded in MacBinary, BinHex or gzip format. This method may be
called more than once if the file is encoded multiple times. This method is not called if the
download is not encoded.
*/
- (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType;
/*!
@method download:decideDestinationWithSuggestedFilename:
@abstract This method is called when enough information has been loaded to decide a destination
for the downloaded file.
@param download The download that requests the download path.
@param filename The suggested filename for deciding the path of the downloaded file. The filename is either
derived from the last path component of the URL and the MIME type or if the download was encoded,
it is the filename specified in the encoding.
@discussion Once the delegate has decided a path, it should call setDestination:allowOverwrite:.
The delegate may respond immediately or later. This method is not called if
setDestination:allowOverwrite: has already been called.
*/
- (void)download:(NSURLDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename;
/*!
@method download:didCreateDestination:
@abstract This method is called after the download creates the downloaded file.
@param download The download that created the downloaded file.
@param path The path of the downloaded file.
*/
- (void)download:(NSURLDownload *)download didCreateDestination:(NSString *)path;
/*!
@method downloadDidFinish:
@abstract This method is called when the download has finished downloading.
@param download The download that has finished downloading.
@discussion This method is called after all the data has been received and written to disk.
This method or download:didFailWithError: will only be called once.
*/
- (void)downloadDidFinish:(NSURLDownload *)download;
/*!
@method download:didFailWithError:
@abstract This method is called when the download has failed.
@param download The download that ended in error.
@param error The error caused the download to fail.
@discussion This method is called when the download encounters a network or file I/O related error.
This method or downloadDidFinish: will only be called once.
*/
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSString.h | /* NSString.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
/*
An NSString object encodes a Unicode-compliant text string, represented as a sequence of UTF–16 code units. All lengths, character indexes, and ranges are expressed in terms of UTF–16 code units, with index values starting at 0. The length property of an NSString returns the number of UTF-16 code units in an NSString, and the characterAtIndex: method retrieves a specific UTF-16 code unit. These two "primitive" methods provide basic access to the contents of a string object.
Most use of strings, however, is at a higher level, with the strings being treated as single entities: Using the APIs in NSString, you can compare strings against one another, search them for substrings, combine them into new strings, and so on. In cases where locale settings may make a difference, use the localized... API variants to perform the operations using the current user's locale, or use the locale: variants that take an explicit NSLocale argument.
If you do need to access individual characters in a string, you need to consider whether you want to access the individual UTF-16 code points (referred to as "characters" in APIs, and represented with the "unichar" type), or human-readable characters (referred to as "composed character sequences" or "grapheme clusters"). Composed character sequences can span multiple UTF-16 characters, when representing a base letter plus an accent, for example, or Emoji.
To access composed character sequences, use APIs such as rangeOfComposedCharacterSequenceAtIndex:, or enumerate the whole or part of the string with enumerateSubstringsInRange:options:usingBlock:, supplying NSStringEnumerationByComposedCharacterSequences as the enumeration option.
For instance, to extract the composed character sequence at a given index (where index is a valid location in the string, 0..length-1):
NSString *substr = [string substringWithRange:[string rangeOfComposedCharacterSequenceAtIndex:index]];
And to enumerate composed character sequences in a string:
[string enumerateSubstringsInRange:NSMakeRange(0, string.length) // enumerate the whole range of the string
options:NSStringEnumerationByComposedCharacterSequences // by composed character sequences
usingBlock:^(NSString * substr, NSRange substrRange, NSRange enclosingRange, BOOL *stop) {
... use substr, whose range in string is substrRange ...
}];
NSStrings can be immutable or mutable. The contents of an immutable string is defined when it is created and subsequently cannot be changed. To construct and manage a string that can be changed after it has been created, use NSMutableString, which is a subclass of NSString.
An NSString object can be initialized using a number of ways: From a traditional (char *) C-string, a sequence of bytes, an NSData object, the contents of an NSURL, etc, with the character contents specified in a variety of string encodings, such as ASCII, ISOLatin1, UTF–8, UTF–16, etc.
*/
/* The unichar type represents a single UTF-16 code unit in an NSString. Although many human-readable characters are representable with a single unichar, some such as Emoji may span multiple unichars. See discussion above.
*/
typedef unsigned short unichar;
#import <limits.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSRange.h>
#import <Foundation/NSItemProvider.h>
#import <stdarg.h>
@class NSData, NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSCharacterSet, NSURL, NSError, NSLocale;
NS_ASSUME_NONNULL_BEGIN
/* These options apply to the various search/find and comparison methods (except where noted).
*/
typedef NS_OPTIONS(NSUInteger, NSStringCompareOptions) {
NSCaseInsensitiveSearch = 1,
NSLiteralSearch = 2, /* Exact character-by-character equivalence */
NSBackwardsSearch = 4, /* Search from end of source string */
NSAnchoredSearch = 8, /* Search is limited to start (or end, if NSBackwardsSearch) of source string */
NSNumericSearch = 64, /* Added in 10.2; Numbers within strings are compared using numeric value, that is, Foo2.txt < Foo7.txt < Foo25.txt; only applies to compare methods, not find */
NSDiacriticInsensitiveSearch API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 128, /* If specified, ignores diacritics (o-umlaut == o) */
NSWidthInsensitiveSearch API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 256, /* If specified, ignores width differences ('a' == UFF41) */
NSForcedOrderingSearch API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 512, /* If specified, comparisons are forced to return either NSOrderedAscending or NSOrderedDescending if the strings are equivalent but not strictly equal, for stability when sorting (e.g. "aaa" > "AAA" with NSCaseInsensitiveSearch specified) */
NSRegularExpressionSearch API_AVAILABLE(macos(10.7), ios(3.2), watchos(2.0), tvos(9.0)) = 1024 /* Applies to rangeOfString:..., stringByReplacingOccurrencesOfString:..., and replaceOccurrencesOfString:... methods only; the search string is treated as an ICU-compatible regular expression; if set, no other options can apply except NSCaseInsensitiveSearch and NSAnchoredSearch */
};
/* Note that in addition to the values explicitly listed below, NSStringEncoding supports encodings provided by CFString.
See CFStringEncodingExt.h for a list of these encodings.
See CFString.h for functions which convert between NSStringEncoding and CFStringEncoding.
*/
typedef NSUInteger NSStringEncoding;
NS_ENUM(NSStringEncoding) {
NSASCIIStringEncoding = 1, /* 0..127 only */
NSNEXTSTEPStringEncoding = 2,
NSJapaneseEUCStringEncoding = 3,
NSUTF8StringEncoding = 4,
NSISOLatin1StringEncoding = 5,
NSSymbolStringEncoding = 6,
NSNonLossyASCIIStringEncoding = 7,
NSShiftJISStringEncoding = 8, /* kCFStringEncodingDOSJapanese */
NSISOLatin2StringEncoding = 9,
NSUnicodeStringEncoding = 10,
NSWindowsCP1251StringEncoding = 11, /* Cyrillic; same as AdobeStandardCyrillic */
NSWindowsCP1252StringEncoding = 12, /* WinLatin1 */
NSWindowsCP1253StringEncoding = 13, /* Greek */
NSWindowsCP1254StringEncoding = 14, /* Turkish */
NSWindowsCP1250StringEncoding = 15, /* WinLatin2 */
NSISO2022JPStringEncoding = 21, /* ISO 2022 Japanese encoding for e-mail */
NSMacOSRomanStringEncoding = 30,
NSUTF16StringEncoding = NSUnicodeStringEncoding, /* An alias for NSUnicodeStringEncoding */
NSUTF16BigEndianStringEncoding = 0x90000100, /* NSUTF16StringEncoding encoding with explicit endianness specified */
NSUTF16LittleEndianStringEncoding = 0x94000100, /* NSUTF16StringEncoding encoding with explicit endianness specified */
NSUTF32StringEncoding = 0x8c000100,
NSUTF32BigEndianStringEncoding = 0x98000100, /* NSUTF32StringEncoding encoding with explicit endianness specified */
NSUTF32LittleEndianStringEncoding = 0x9c000100 /* NSUTF32StringEncoding encoding with explicit endianness specified */
};
typedef NS_OPTIONS(NSUInteger, NSStringEncodingConversionOptions) {
NSStringEncodingConversionAllowLossy = 1,
NSStringEncodingConversionExternalRepresentation = 2
};
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
#pragma mark *** String funnel methods ***
/* NSString primitives. A minimal subclass of NSString just needs to implement these two, along with an init method appropriate for that subclass. We also recommend overriding getCharacters:range: for performance.
*/
@property (readonly) NSUInteger length;
- (unichar)characterAtIndex:(NSUInteger)index;
/* The initializers available to subclasses. See further below for additional init methods.
*/
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end
@interface NSString (NSStringExtensionMethods)
#pragma mark *** Substrings ***
/* To avoid breaking up character sequences such as Emoji, you can do:
[str substringFromIndex:[str rangeOfComposedCharacterSequenceAtIndex:index].location]
[str substringToIndex:NSMaxRange([str rangeOfComposedCharacterSequenceAtIndex:index])]
[str substringWithRange:[str rangeOfComposedCharacterSequencesForRange:range]
*/
- (NSString *)substringFromIndex:(NSUInteger)from;
- (NSString *)substringToIndex:(NSUInteger)to;
- (NSString *)substringWithRange:(NSRange)range; // Use with rangeOfComposedCharacterSequencesForRange: to avoid breaking up character sequences
- (void)getCharacters:(unichar *)buffer range:(NSRange)range; // Use with rangeOfComposedCharacterSequencesForRange: to avoid breaking up character sequences
#pragma mark *** String comparison and equality ***
/* In the compare: methods, the range argument specifies the subrange, rather than the whole, of the receiver to use in the comparison. The range is not applied to the search string. For example, [@"AB" compare:@"ABC" options:0 range:NSMakeRange(0,1)] compares "A" to "ABC", not "A" to "A", and will return NSOrderedAscending. It is an error to specify a range that is outside of the receiver's bounds, and an exception may be raised.
*/
- (NSComparisonResult)compare:(NSString *)string;
- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask;
- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare;
- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare locale:(nullable id)locale; // locale arg used to be a dictionary pre-Leopard. We now accept NSLocale. Assumes the current locale if non-nil and non-NSLocale. nil continues to mean canonical compare, which doesn't depend on user's locale choice.
- (NSComparisonResult)caseInsensitiveCompare:(NSString *)string;
- (NSComparisonResult)localizedCompare:(NSString *)string;
- (NSComparisonResult)localizedCaseInsensitiveCompare:(NSString *)string;
/* localizedStandardCompare:, added in 10.6, should be used whenever file names or other strings are presented in lists and tables where Finder-like sorting is appropriate. The exact behavior of this method may be tweaked in future releases, and will be different under different localizations, so clients should not depend on the exact sorting order of the strings.
*/
- (NSComparisonResult)localizedStandardCompare:(NSString *)string API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (BOOL)isEqualToString:(NSString *)aString;
#pragma mark *** String searching ***
/* These perform locale unaware prefix or suffix match. If you need locale awareness, use rangeOfString:options:range:locale:, passing NSAnchoredSearch (or'ed with NSBackwardsSearch for suffix, and NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch if needed) for options, NSMakeRange(0, [receiver length]) for range, and [NSLocale currentLocale] for locale.
*/
- (BOOL)hasPrefix:(NSString *)str;
- (BOOL)hasSuffix:(NSString *)str;
- (NSString *)commonPrefixWithString:(NSString *)str options:(NSStringCompareOptions)mask;
/* Simple convenience methods for string searching. containsString: returns YES if the target string is contained within the receiver. Same as calling rangeOfString:options: with no options, thus doing a case-sensitive, locale-unaware search. localizedCaseInsensitiveContainsString: is the case-insensitive variant which also takes the current locale into effect. Starting in 10.11 and iOS9, the new localizedStandardRangeOfString: or localizedStandardContainsString: APIs are even better convenience methods for user level searching. More sophisticated needs can be achieved by calling rangeOfString:options:range:locale: directly.
*/
- (BOOL)containsString:(NSString *)str API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
- (BOOL)localizedCaseInsensitiveContainsString:(NSString *)str API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
/* The following two are the most appropriate methods for doing user-level string searches, similar to how searches are done generally in the system. The search is locale-aware, case and diacritic insensitive. As with other APIs, "standard" in the name implies "system default behavior," so the exact list of search options applied may change over time. If you need more control over the search options, please use the rangeOfString:options:range:locale: method. You can pass [NSLocale currentLocale] for searches in user's locale.
*/
- (BOOL)localizedStandardContainsString:(NSString *)str API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
- (NSRange)localizedStandardRangeOfString:(NSString *)str API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
/* These methods perform string search, looking for the searchString within the receiver string. These return length==0 if the target string is not found. So, to check for containment: ([str rangeOfString:@"target"].length > 0). Note that the length of the range returned by these methods might be different than the length of the target string, due composed characters and such.
Note that the first three methods do not take locale arguments, and perform the search in a non-locale aware fashion, which is not appropriate for user-level searching. To do user-level string searching, use the last method, specifying locale:[NSLocale currentLocale], or better yet, use localizedStandardRangeOfString: or localizedStandardContainsString:.
The range argument specifies the subrange, rather than the whole, of the receiver to use in the search. It is an error to specify a range that is outside of the receiver's bounds, and an exception may be raised.
*/
- (NSRange)rangeOfString:(NSString *)searchString;
- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask;
- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch;
- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch locale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* These return the range of the first character from the set in the string, not the range of a sequence of characters.
The range argument specifies the subrange, rather than the whole, of the receiver to use in the search. It is an error to specify a range that is outside of the receiver's bounds, and an exception may be raised.
*/
- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet;
- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask;
- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch;
- (NSRange)rangeOfComposedCharacterSequenceAtIndex:(NSUInteger)index;
- (NSRange)rangeOfComposedCharacterSequencesForRange:(NSRange)range API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
- (NSString *)stringByAppendingString:(NSString *)aString;
- (NSString *)stringByAppendingFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
#pragma mark *** Extracting numeric values ***
/* The following convenience methods all skip initial space characters (whitespaceSet) and ignore trailing characters. They are not locale-aware. NSScanner or NSNumberFormatter can be used for more powerful and locale-aware parsing of numbers.
*/
@property (readonly) double doubleValue;
@property (readonly) float floatValue;
@property (readonly) int intValue;
@property (readonly) NSInteger integerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (readonly) long long longLongValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (readonly) BOOL boolValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // Skips initial space characters (whitespaceSet), or optional -/+ sign followed by zeroes. Returns YES on encountering one of "Y", "y", "T", "t", or a digit 1-9. It ignores any trailing characters.
#pragma mark *** Case changing ***
/* The following three return the canonical (non-localized) mappings. They are suitable for programming operations that require stable results not depending on the user's locale preference. For locale-aware case mapping for strings presented to users, use the "localized" methods below.
*/
@property (readonly, copy) NSString *uppercaseString;
@property (readonly, copy) NSString *lowercaseString;
@property (readonly, copy) NSString *capitalizedString;
/* The following three return the locale-aware case mappings. They are suitable for strings presented to the user.
*/
@property (readonly, copy) NSString *localizedUppercaseString API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
@property (readonly, copy) NSString *localizedLowercaseString API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
@property (readonly, copy) NSString *localizedCapitalizedString API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
/* The following methods perform localized case mappings based on the locale specified. Passing nil indicates the canonical mapping. For the user preference locale setting, specify +[NSLocale currentLocale].
*/
- (NSString *)uppercaseStringWithLocale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
- (NSString *)lowercaseStringWithLocale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
- (NSString *)capitalizedStringWithLocale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
#pragma mark *** Finding lines, sentences, words, etc ***
- (void)getLineStart:(nullable NSUInteger *)startPtr end:(nullable NSUInteger *)lineEndPtr contentsEnd:(nullable NSUInteger *)contentsEndPtr forRange:(NSRange)range;
- (NSRange)lineRangeForRange:(NSRange)range;
- (void)getParagraphStart:(nullable NSUInteger *)startPtr end:(nullable NSUInteger *)parEndPtr contentsEnd:(nullable NSUInteger *)contentsEndPtr forRange:(NSRange)range;
- (NSRange)paragraphRangeForRange:(NSRange)range;
typedef NS_OPTIONS(NSUInteger, NSStringEnumerationOptions) {
// Pass in one of the "By" options:
NSStringEnumerationByLines = 0, // Equivalent to lineRangeForRange:
NSStringEnumerationByParagraphs = 1, // Equivalent to paragraphRangeForRange:
NSStringEnumerationByComposedCharacterSequences = 2, // Equivalent to rangeOfComposedCharacterSequencesForRange:
NSStringEnumerationByWords = 3,
NSStringEnumerationBySentences = 4,
NSStringEnumerationByCaretPositions API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) = 5, // Enumerate text editing cursor positions. It could separate characters within a grapheme cluster.
NSStringEnumerationByDeletionClusters API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) = 6, // Enumerate text editing positions for backwards deletion. It could separate characters within a grapheme cluster.
// ...and combine any of the desired additional options:
NSStringEnumerationReverse = 1UL << 8,
NSStringEnumerationSubstringNotRequired = 1UL << 9,
NSStringEnumerationLocalized = 1UL << 10 // User's default locale
};
/* In the enumerate methods, the blocks will be invoked inside an autorelease pool, so any values assigned inside the block should be retained.
*/
- (void)enumerateSubstringsInRange:(NSRange)range options:(NSStringEnumerationOptions)opts usingBlock:(void (^)(NSString * _Nullable substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (void)enumerateLinesUsingBlock:(void (^)(NSString *line, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
#pragma mark *** Character encoding and converting to/from c-string representations ***
@property (nullable, readonly) const char *UTF8String NS_RETURNS_INNER_POINTER; // Convenience to return null-terminated UTF8 representation
@property (readonly) NSStringEncoding fastestEncoding; // Result in O(1) time; a rough estimate
@property (readonly) NSStringEncoding smallestEncoding; // Result in O(n) time; the encoding in which the string is most compact
- (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding allowLossyConversion:(BOOL)lossy; // External representation
- (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding; // External representation
- (BOOL)canBeConvertedToEncoding:(NSStringEncoding)encoding;
/* Methods to convert NSString to a NULL-terminated cString using the specified encoding. Note, these are the "new" cString methods, and are not deprecated like the older cString methods which do not take encoding arguments. Also, cString methods should be used just with 8-bit encodings, and not encodings such as UTF-16 or UTF-32. For those, use methods such as getCharacters:range: (for UTF-16 characters in system endianness) or getBytes:... (which can take any encoding).
*/
- (nullable const char *)cStringUsingEncoding:(NSStringEncoding)encoding NS_RETURNS_INNER_POINTER; // "Autoreleased"; NULL return if encoding conversion not possible; for performance reasons, lifetime of this should not be considered longer than the lifetime of the receiving string (if the receiver string is freed, this might go invalid then, before the end of the autorelease scope). Use only with 8-bit encodings, and not encodings such as UTF-16 or UTF-32.
- (BOOL)getCString:(char *)buffer maxLength:(NSUInteger)maxBufferCount encoding:(NSStringEncoding)encoding; // NO return if conversion not possible due to encoding errors or too small of a buffer. The buffer should include room for maxBufferCount bytes; this number should accomodate the expected size of the return value plus the NULL termination character, which this method adds. (So note that the maxLength passed to this method is one more than the one you would have passed to the deprecated getCString:maxLength:.) Use only with 8-bit encodings, and not encodings such as UTF-16 or UTF-32.
/* Use this to convert string section at a time into a fixed-size buffer, without any allocations. Does not NULL-terminate.
buffer is the buffer to write to; if NULL, this method can be used to computed size of needed buffer.
maxBufferCount is the length of the buffer in bytes. It's a good idea to make sure this is at least enough to hold one character's worth of conversion.
usedBufferCount is the length of the buffer used up by the current conversion. Can be NULL.
encoding is the encoding to convert to.
options specifies the options to apply.
range is the range to convert.
leftOver is the remaining range. Can be NULL.
YES return indicates some characters were converted. Conversion might usually stop when the buffer fills,
but it might also stop when the conversion isn't possible due to the chosen encoding.
*/
- (BOOL)getBytes:(nullable void *)buffer maxLength:(NSUInteger)maxBufferCount usedLength:(nullable NSUInteger *)usedBufferCount encoding:(NSStringEncoding)encoding options:(NSStringEncodingConversionOptions)options range:(NSRange)range remainingRange:(nullable NSRangePointer)leftover;
/* These return the maximum and exact number of bytes needed to store the receiver in the specified encoding in non-external representation. The first one is O(1), while the second one is O(n). These do not include space for a terminating null.
*/
- (NSUInteger)maximumLengthOfBytesUsingEncoding:(NSStringEncoding)enc; // Result in O(1) time; the estimate may be way over what's needed. Returns 0 on error (overflow)
- (NSUInteger)lengthOfBytesUsingEncoding:(NSStringEncoding)enc; // Result in O(n) time; the result is exact. Returns 0 on error (cannot convert to specified encoding, or overflow)
@property (class, readonly) const NSStringEncoding *availableStringEncodings;
+ (NSString *)localizedNameOfStringEncoding:(NSStringEncoding)encoding;
/* User-dependent encoding whose value is derived from user's default language and potentially other factors. The use of this encoding might sometimes be needed when interpreting user documents with unknown encodings, in the absence of other hints. This encoding should be used rarely, if at all. Note that some potential values here might result in unexpected encoding conversions of even fairly straightforward NSString content --- for instance, punctuation characters with a bidirectional encoding.
*/
@property (class, readonly) NSStringEncoding defaultCStringEncoding; // Should be rarely used
#pragma mark *** Other ***
@property (readonly, copy) NSString *decomposedStringWithCanonicalMapping;
@property (readonly, copy) NSString *precomposedStringWithCanonicalMapping;
@property (readonly, copy) NSString *decomposedStringWithCompatibilityMapping;
@property (readonly, copy) NSString *precomposedStringWithCompatibilityMapping;
- (NSArray<NSString *> *)componentsSeparatedByString:(NSString *)separator;
- (NSArray<NSString *> *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)separator API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
- (NSString *)stringByTrimmingCharactersInSet:(NSCharacterSet *)set;
- (NSString *)stringByPaddingToLength:(NSUInteger)newLength withString:(NSString *)padString startingAtIndex:(NSUInteger)padIndex;
/* Returns a string with the character folding options applied. theOptions is a mask of compare flags with *InsensitiveSearch suffix.
*/
- (NSString *)stringByFoldingWithOptions:(NSStringCompareOptions)options locale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Replace all occurrences of the target string in the specified range with replacement. Specified compare options are used for matching target. If NSRegularExpressionSearch is specified, the replacement is treated as a template, as in the corresponding NSRegularExpression methods, and no other options can apply except NSCaseInsensitiveSearch and NSAnchoredSearch.
*/
- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Replace all occurrences of the target string with replacement. Invokes the above method with 0 options and range of the whole string.
*/
- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Replace characters in range with the specified string, returning new string.
*/
- (NSString *)stringByReplacingCharactersInRange:(NSRange)range withString:(NSString *)replacement API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
typedef NSString *NSStringTransform NS_TYPED_EXTENSIBLE_ENUM;
/* Perform string transliteration. The transformation represented by transform is applied to the receiver. reverse indicates that the inverse transform should be used instead, if it exists. Attempting to use an invalid transform identifier or reverse an irreversible transform will return nil; otherwise the transformed string value is returned (even if no characters are actually transformed). You can pass one of the predefined transforms below (NSStringTransformLatinToKatakana, etc), or any valid ICU transform ID as defined in the ICU User Guide. Arbitrary ICU transform rules are not supported.
*/
- (nullable NSString *)stringByApplyingTransform:(NSStringTransform)transform reverse:(BOOL)reverse API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)); // Returns nil if reverse not applicable or transform is invalid
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToKatakana API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToHiragana API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToHangul API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToArabic API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToHebrew API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToThai API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToCyrillic API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToGreek API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformToLatin API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformMandarinToLatin API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformHiraganaToKatakana API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformFullwidthToHalfwidth API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformToXMLHex API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformToUnicodeName API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformStripCombiningMarks API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSStringTransform const NSStringTransformStripDiacritics API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
/* Write to specified url or path using the specified encoding. The optional error return is to indicate file system or encoding errors.
*/
- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error;
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error;
@property (readonly, copy) NSString *description;
@property (readonly) NSUInteger hash;
#pragma mark *** Initializers ***
/* In general creation methods in NSString do not apply to subclassers, as subclassers are assumed to provide their own init methods which create the string in the way the subclass wishes. Designated initializers of NSString are thus init and initWithCoder:.
*/
- (instancetype)initWithCharactersNoCopy:(unichar *)characters length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer; /* "NoCopy" is a hint */
- (instancetype)initWithCharactersNoCopy:(unichar *)chars length:(NSUInteger)len deallocator:(void(^_Nullable)(unichar *, NSUInteger))deallocator;
- (instancetype)initWithCharacters:(const unichar *)characters length:(NSUInteger)length;
- (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString;
- (instancetype)initWithString:(NSString *)aString;
- (instancetype)initWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
- (instancetype)initWithFormat:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
- (instancetype)initWithFormat:(NSString *)format locale:(nullable id)locale, ... NS_FORMAT_FUNCTION(1,3);
- (instancetype)initWithFormat:(NSString *)format locale:(nullable id)locale arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
- (nullable instancetype)initWithData:(NSData *)data encoding:(NSStringEncoding)encoding;
- (nullable instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding;
- (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer; /* "NoCopy" is a hint */
- (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding deallocator:(void(^_Nullable)(void *, NSUInteger))deallocator;
+ (instancetype)string;
+ (instancetype)stringWithString:(NSString *)string;
+ (instancetype)stringWithCharacters:(const unichar *)characters length:(NSUInteger)length;
+ (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString;
+ (instancetype)stringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
+ (instancetype)localizedStringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
- (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding;
+ (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc;
/* These use the specified encoding. If nil is returned, the optional error return indicates problem that was encountered (for instance, file system or encoding errors).
*/
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error;
- (nullable instancetype)initWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error;
+ (nullable instancetype)stringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error;
+ (nullable instancetype)stringWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error;
/* These try to determine the encoding, and return the encoding which was used. Note that these methods might get "smarter" in subsequent releases of the system, and use additional techniques for recognizing encodings. If nil is returned, the optional error return indicates problem that was encountered (for instance, file system or encoding errors).
*/
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
- (nullable instancetype)initWithContentsOfFile:(NSString *)path usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
+ (nullable instancetype)stringWithContentsOfURL:(NSURL *)url usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
+ (nullable instancetype)stringWithContentsOfFile:(NSString *)path usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
@end
typedef NSString * NSStringEncodingDetectionOptionsKey NS_TYPED_ENUM;
@interface NSString (NSStringEncodingDetection)
#pragma mark *** Encoding detection ***
/* This API is used to detect the string encoding of a given raw data. It can also do lossy string conversion. It converts the data to a string in the detected string encoding. The data object contains the raw bytes, and the option dictionary contains the hints and parameters for the analysis. The opts dictionary can be nil. If the string parameter is not NULL, the string created by the detected string encoding is returned. The lossy substitution string is emitted in the output string for characters that could not be converted when lossy conversion is enabled. The usedLossyConversion indicates if there is any lossy conversion in the resulted string. If no encoding can be detected, 0 is returned.
The possible items for the dictionary are:
1) an array of suggested string encodings (without specifying the 3rd option in this list, all string encodings are considered but the ones in the array will have a higher preference; moreover, the order of the encodings in the array is important: the first encoding has a higher preference than the second one in the array)
2) an array of string encodings not to use (the string encodings in this list will not be considered at all)
3) a boolean option indicating whether only the suggested string encodings are considered
4) a boolean option indicating whether lossy is allowed
5) an option that gives a specific string to substitude for mystery bytes
6) the current user's language
7) a boolean option indicating whether the data is generated by Windows
If the values in the dictionary have wrong types (for example, the value of NSStringEncodingDetectionSuggestedEncodingsKey is not an array), an exception is thrown.
If the values in the dictionary are unknown (for example, the value in the array of suggested string encodings is not a valid encoding), the values will be ignored.
*/
+ (NSStringEncoding)stringEncodingForData:(NSData *)data
encodingOptions:(nullable NSDictionary<NSStringEncodingDetectionOptionsKey, id> *)opts
convertedString:(NSString * _Nullable * _Nullable)string
usedLossyConversion:(nullable BOOL *)usedLossyConversion API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
/* The following keys are for the option dictionary for the string encoding detection API.
*/
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionSuggestedEncodingsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSArray of NSNumbers which contain NSStringEncoding values; if this key is not present in the dictionary, all encodings are weighted the same
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionDisallowedEncodingsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSArray of NSNumbers which contain NSStringEncoding values; if this key is not present in the dictionary, all encodings are considered
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionUseOnlySuggestedEncodingsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSNumber boolean value; if this key is not present in the dictionary, the default value is NO
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionAllowLossyKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSNumber boolean value; if this key is not present in the dictionary, the default value is YES
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionFromWindowsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSNumber boolean value; if this key is not present in the dictionary, the default value is NO
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionLossySubstitutionKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSString value; if this key is not present in the dictionary, the default value is U+FFFD
FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionLikelyLanguageKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // NSString value; ISO language code; if this key is not present in the dictionary, no such information is considered
@end
@interface NSString (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
@end
@interface NSMutableString : NSString
#pragma mark *** Mutable string ***
/* NSMutableString primitive (funnel) method. See below for the other mutation methods.
*/
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;
@end
@interface NSMutableString (NSMutableStringExtensionMethods)
/* Additional mutation methods. For subclassers these are all available implemented in terms of the primitive replaceCharactersInRange:range: method.
*/
- (void)insertString:(NSString *)aString atIndex:(NSUInteger)loc;
- (void)deleteCharactersInRange:(NSRange)range;
- (void)appendString:(NSString *)aString;
- (void)appendFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
- (void)setString:(NSString *)aString;
/* This method replaces all occurrences of the target string with the replacement string, in the specified range of the receiver string, and returns the number of replacements. NSBackwardsSearch means the search is done from the end of the range (the results could be different); NSAnchoredSearch means only anchored (but potentially multiple) instances will be replaced. NSLiteralSearch and NSCaseInsensitiveSearch also apply. NSNumericSearch is ignored. Use NSMakeRange(0, [receiver length]) to process whole string. If NSRegularExpressionSearch is specified, the replacement is treated as a template, as in the corresponding NSRegularExpression methods, and no other options can apply except NSCaseInsensitiveSearch and NSAnchoredSearch.
*/
- (NSUInteger)replaceOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange;
/* Perform string transliteration. The transformation represented by transform is applied to the given range of string in place. Only the specified range will be modified, but the transform may look at portions of the string outside that range for context. If supplied, resultingRange is modified to reflect the new range corresponding to the original range. reverse indicates that the inverse transform should be used instead, if it exists. Attempting to use an invalid transform identifier or reverse an irreversible transform will return NO; otherwise YES is returned, even if no characters are actually transformed. You can pass one of the predefined transforms listed above (NSStringTransformLatinToKatakana, etc), or any valid ICU transform ID as defined in the ICU User Guide. Arbitrary ICU transform rules are not supported.
*/
- (BOOL)applyTransform:(NSStringTransform)transform reverse:(BOOL)reverse range:(NSRange)range updatedRange:(nullable NSRangePointer)resultingRange API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
/* In addition to these two, NSMutableString responds properly to all NSString creation methods.
*/
- (NSMutableString *)initWithCapacity:(NSUInteger)capacity;
+ (NSMutableString *)stringWithCapacity:(NSUInteger)capacity;
@end
FOUNDATION_EXPORT NSExceptionName const NSCharacterConversionException;
FOUNDATION_EXPORT NSExceptionName const NSParseErrorException; // raised by -propertyList
#define NSMaximumStringLength (INT_MAX-1)
#pragma mark *** Deprecated/discouraged APIs ***
@interface NSString (NSExtendedStringPropertyListParsing)
/* These methods are no longer recommended since they do not work with property lists and strings files in binary plist format. Please use the APIs in NSPropertyList.h instead.
*/
- (id)propertyList;
- (nullable NSDictionary *)propertyListFromStringsFileFormat;
@end
@interface NSString (NSStringDeprecated)
/* The following methods are deprecated and will be removed from this header file in the near future. These methods use NSString.defaultCStringEncoding as the encoding to convert to, which means the results depend on the user's language and potentially other settings. This might be appropriate in some cases, but often these methods are misused, resulting in issues when running in languages other then English. UTF8String in general is a much better choice when converting arbitrary NSStrings into 8-bit representations. Additional potential replacement methods are being introduced in NSString as appropriate.
*/
- (nullable const char *)cString NS_RETURNS_INNER_POINTER API_DEPRECATED("Use -cStringUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable const char *)lossyCString NS_RETURNS_INNER_POINTER API_DEPRECATED("Use -cStringUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (NSUInteger)cStringLength API_DEPRECATED("Use -lengthOfBytesUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (void)getCString:(char *)bytes API_DEPRECATED("Use -getCString:maxLength:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (void)getCString:(char *)bytes maxLength:(NSUInteger)maxLength API_DEPRECATED("Use -getCString:maxLength:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (void)getCString:(char *)bytes maxLength:(NSUInteger)maxLength range:(NSRange)aRange remainingRange:(nullable NSRangePointer)leftoverRange API_DEPRECATED("Use -getCString:maxLength:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile API_DEPRECATED("Use -writeToFile:atomically:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically API_DEPRECATED("Use -writeToURL:atomically:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable id)initWithContentsOfFile:(NSString *)path API_DEPRECATED("Use -initWithContentsOfFile:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable id)initWithContentsOfURL:(NSURL *)url API_DEPRECATED("Use -initWithContentsOfURL:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
+ (nullable id)stringWithContentsOfFile:(NSString *)path API_DEPRECATED("Use +stringWithContentsOfFile:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
+ (nullable id)stringWithContentsOfURL:(NSURL *)url API_DEPRECATED("Use +stringWithContentsOfURL:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable id)initWithCStringNoCopy:(char *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer API_DEPRECATED("Use -initWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable id)initWithCString:(const char *)bytes length:(NSUInteger)length API_DEPRECATED("Use -initWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (nullable id)initWithCString:(const char *)bytes API_DEPRECATED("Use -initWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
+ (nullable id)stringWithCString:(const char *)bytes length:(NSUInteger)length API_DEPRECATED("Use +stringWithCString:encoding:", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
+ (nullable id)stringWithCString:(const char *)bytes API_DEPRECATED("Use +stringWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
/* This method is unsafe because it could potentially cause buffer overruns. You should use -getCharacters:range: instead.
*/
- (void)getCharacters:(unichar *)buffer;
@end
NS_ENUM(NSStringEncoding) {
NSProprietaryStringEncoding = 65536 /* Installation-specific encoding */
};
/* The rest of this file is bookkeeping stuff that has to be here. Don't use this stuff, don't refer to it.
*/
#if !defined(_OBJC_UNICHAR_H_)
#define _OBJC_UNICHAR_H_
#endif
#define NS_UNICHAR_IS_EIGHT_BIT 0
NS_SWIFT_UNAVAILABLE("Use String or NSString instead.")
@interface NSSimpleCString : NSString {
@package
char *bytes;
int numBytes;
#if __LP64__
int _unused;
#endif
}
@end
NS_SWIFT_UNAVAILABLE("Use String or NSString instead.")
@interface NSConstantString : NSSimpleCString
@end
#if __OBJC2__
#else
extern void *_NSConstantStringClassReference;
#endif
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h | /* NSObject.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#include <TargetConditionals.h>
#import <objc/NSObject.h>
#import <Foundation/NSObjCRuntime.h>
#import <Foundation/NSZone.h>
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
@class Protocol;
NS_ASSUME_NONNULL_BEGIN
/*************** Basic protocols ***************/
@protocol NSCopying
- (id)copyWithZone:(nullable NSZone *)zone;
@end
@protocol NSMutableCopying
- (id)mutableCopyWithZone:(nullable NSZone *)zone;
@end
@protocol NSCoding
- (void)encodeWithCoder:(NSCoder *)coder;
- (nullable instancetype)initWithCoder:(NSCoder *)coder; // NS_DESIGNATED_INITIALIZER
@end
// Objects which are safe to be encoded and decoded across privilege boundaries should adopt NSSecureCoding instead of NSCoding. Secure coders (those that respond YES to requiresSecureCoding) will only encode objects that adopt the NSSecureCoding protocol.
// NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
@protocol NSSecureCoding <NSCoding>
@required
// This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
// The Secure Coding Guide should be consulted when writing methods that decode data.
@property (class, readonly) BOOL supportsSecureCoding;
@end
/*********** Base class ***********/
@interface NSObject (NSCoderMethods)
+ (NSInteger)version;
+ (void)setVersion:(NSInteger)aVersion;
@property (readonly) Class classForCoder;
- (nullable id)replacementObjectForCoder:(NSCoder *)coder;
- (nullable id)awakeAfterUsingCoder:(NSCoder *)coder NS_REPLACES_RECEIVER;
@end
#if TARGET_OS_OSX
@interface NSObject (NSDeprecatedMethods)
+ (void)poseAsClass:(Class)aClass API_DEPRECATED("Posing no longer supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0))
#if __OBJC2__
UNAVAILABLE_ATTRIBUTE
#endif
;
@end
#endif
/*********** Discardable Content ***********/
@protocol NSDiscardableContent
@required
- (BOOL)beginContentAccess;
- (void)endContentAccess;
- (void)discardContentIfPossible;
- (BOOL)isContentDiscarded;
@end
@interface NSObject (NSDiscardableContentProxy)
@property (readonly, retain) id autoContentAccessingProxy API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
@end
/*********** Object Allocation / Deallocation *******/
// For ARC code that needs this functionality, consider using class_createInstance directly.
FOUNDATION_EXPORT id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone * _Nullable zone) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
FOUNDATION_EXPORT void NSDeallocateObject(id object) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
FOUNDATION_EXPORT id NSCopyObject(id object, NSUInteger extraBytes, NSZone * _Nullable zone) NS_AUTOMATED_REFCOUNT_UNAVAILABLE API_DEPRECATED("Not supported", macos(10.0,10.8), ios(2.0,6.0), watchos(2.0,2.0), tvos(9.0,9.0));
FOUNDATION_EXPORT BOOL NSShouldRetainWithZone(id anObject, NSZone * _Nullable requestedZone) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
FOUNDATION_EXPORT void NSIncrementExtraRefCount(id object) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
FOUNDATION_EXPORT BOOL NSDecrementExtraRefCountWasZero(id object) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
FOUNDATION_EXPORT NSUInteger NSExtraRefCount(id object) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
#if __has_feature(objc_arc)
// After using a CFBridgingRetain on an NSObject, the caller must take responsibility for calling CFRelease at an appropriate time.
NS_INLINE CF_RETURNS_RETAINED CFTypeRef _Nullable CFBridgingRetain(id _Nullable X) {
return (__bridge_retained CFTypeRef)X;
}
NS_INLINE id _Nullable CFBridgingRelease(CFTypeRef CF_CONSUMED _Nullable X) {
return (__bridge_transfer id)X;
}
#else
// This function is intended for use while converting to ARC mode only.
NS_INLINE CF_RETURNS_RETAINED CFTypeRef _Nullable CFBridgingRetain(id _Nullable X) {
return X ? CFRetain((CFTypeRef)X) : NULL;
}
// Casts a CoreFoundation object to an Objective-C object, transferring ownership to ARC (ie. no need to CFRelease to balance a prior +1 CFRetain count). NS_RETURNS_RETAINED is used to indicate that the Objective-C object returned has +1 retain count. So the object is 'released' as far as CoreFoundation reference counting semantics are concerned, but retained (and in need of releasing) in the view of ARC. This function is intended for use while converting to ARC mode only.
NS_INLINE id _Nullable CFBridgingRelease(CFTypeRef CF_CONSUMED _Nullable X) NS_RETURNS_RETAINED {
return [(id)CFMakeCollectable(X) autorelease];
}
#endif
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSScriptWhoseTests.h | /*
NSScriptWhoseTests.h
Copyright (c) 1997-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSArray<ObjectType>;
@class NSScriptObjectSpecifier;
@class NSSpecifierTest;
@class NSString;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, NSTestComparisonOperation) {
NSEqualToComparison = 0,
NSLessThanOrEqualToComparison,
NSLessThanComparison,
NSGreaterThanOrEqualToComparison,
NSGreaterThanComparison,
NSBeginsWithComparison,
NSEndsWithComparison,
NSContainsComparison
};
@interface NSScriptWhoseTest : NSObject <NSCoding> {}
- (BOOL)isTrue;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)inCoder NS_DESIGNATED_INITIALIZER;
@end
@interface NSLogicalTest : NSScriptWhoseTest {
@private
int _operator;
id _subTests;
}
- (instancetype)initAndTestWithTests:(NSArray<NSSpecifierTest *> *)subTests NS_DESIGNATED_INITIALIZER;
- (instancetype)initOrTestWithTests:(NSArray<NSSpecifierTest *> *)subTests NS_DESIGNATED_INITIALIZER;
- (instancetype)initNotTestWithTest:(NSScriptWhoseTest *)subTest NS_DESIGNATED_INITIALIZER;
@end
// Given a comparison operator selector and an object specifier and either another object specifier or an actual value object this class can perform the test.
// The specifiers are evaluated normally (using the top-level container stack) before the comparison operator is evaluated. If _object1 or _object2 is nil, the objectBeingTested is used.
@interface NSSpecifierTest : NSScriptWhoseTest {
@private
NSTestComparisonOperation _comparisonOperator;
NSScriptObjectSpecifier *_object1;
id _object2;
}
- (instancetype)init API_UNAVAILABLE(macos, ios, watchos, tvos);
- (nullable instancetype)initWithCoder:(NSCoder *)inCoder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithObjectSpecifier:(nullable NSScriptObjectSpecifier *)obj1 comparisonOperator:(NSTestComparisonOperation)compOp testObject:(nullable id)obj2 NS_DESIGNATED_INITIALIZER;
@end
@interface NSObject (NSComparisonMethods)
- (BOOL)isEqualTo:(nullable id)object;
// Implemented using isEqual:. Returns NO if receiver is nil.
- (BOOL)isLessThanOrEqualTo:(nullable id)object;
// Implemented using compare. Returns NO if receiver is nil.
- (BOOL)isLessThan:(nullable id)object;
// Implemented using compare. Returns NO if receiver is nil.
- (BOOL)isGreaterThanOrEqualTo:(nullable id)object;
// Implemented using compare. Returns NO if receiver is nil.
- (BOOL)isGreaterThan:(nullable id)object;
// Implemented using compare. Returns NO if receiver is nil.
- (BOOL)isNotEqualTo:(nullable id)object;
// Implemented using compare. Returns NO if receiver is nil.
- (BOOL)doesContain:(id)object;
// Returns nil if receiver is not an NSArray or if array doesn't contain object.
// This operator is not working against the database.
- (BOOL)isLike:(NSString *)object;
// argument should be a string using simple shell wildcards (* and ?).
// (e.g. "Stev*" or "N?XT").
// Returns NO if receiver is not an NSString.
- (BOOL)isCaseInsensitiveLike:(NSString *)object;
@end
@interface NSObject (NSScriptingComparisonMethods)
// Often the correct way to compare two objects for scripting is different from the correct way to compare objects programmatically. This category defines a set of methods that can be implemented to perform the comparison appropriate for scripting that is independant of other existing methods for doing comparisons, like those defined in EOQualifier.h
// If the object1 implements the appropriate one of these methods for the comparison operation, these methods will be used. If object1 does not implement the appropriate one of these, and object2 the inverted version, and the comparison operator is one of the first five, then the comparison operator is inverted (ie scriptingIsGreaterThan: -> scriptingIsLessThanOrEqualTo:).
// If neither object1 or object2 implement the appropriate one of these selectors, we will fall back on trying to use standard EOQualifier-type methods like isEqualto:, isGreaterThan:, etc... for the first five.
- (BOOL)scriptingIsEqualTo:(id)object;
- (BOOL)scriptingIsLessThanOrEqualTo:(id)object;
- (BOOL)scriptingIsLessThan:(id)object;
- (BOOL)scriptingIsGreaterThanOrEqualTo:(id)object;
- (BOOL)scriptingIsGreaterThan:(id)object;
- (BOOL)scriptingBeginsWith:(id)object;
- (BOOL)scriptingEndsWith:(id)object;
- (BOOL)scriptingContains:(id)object;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventManager.h | /*
NSAppleEventManager.h
Copyright (c) 1997-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <CoreServices/CoreServices.h>
#import <Foundation/NSNotification.h>
@class NSAppleEventDescriptor;
NS_ASSUME_NONNULL_BEGIN
typedef const struct __NSAppleEventManagerSuspension* NSAppleEventManagerSuspensionID;
extern const double NSAppleEventTimeOutDefault;
extern const double NSAppleEventTimeOutNone;
extern NSNotificationName NSAppleEventManagerWillProcessFirstEventNotification;
@interface NSAppleEventManager : NSObject {
@private
BOOL _isPreparedForDispatch;
char _padding[3];
}
// Get the pointer to the program's single NSAppleEventManager.
+ (NSAppleEventManager *)sharedAppleEventManager;
// Set or remove a handler for a specific kind of Apple Event. The handler method should have the same signature as:
// - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
// When it is invoked, the value of the first parameter will be the event to be handled. The value of the second parameter will be the reply event to fill in. A reply event object will always be passed in (replyEvent will never be nil), but it should not be touched if the event sender has not requested a reply, which is indicated by [replyEvent descriptorType]==typeNull.
- (void)setEventHandler:(id)handler andSelector:(SEL)handleEventSelector forEventClass:(AEEventClass)eventClass andEventID:(AEEventID)eventID;
- (void)removeEventHandlerForEventClass:(AEEventClass)eventClass andEventID:(AEEventID)eventID;
// Given an event, reply event, and refCon of the sort passed into Apple event handler functions that can be registered with AEInstallEventHandler(), dispatch the event to a handler that has been registered with -setEventHandler:andSelector:forEventClass:andEventID:.
// This method is primarily meant for Cocoa's internal use. It does not send events to other applications!
- (OSErr)dispatchRawAppleEvent:(const AppleEvent *)theAppleEvent withRawReply:(AppleEvent *)theReply handlerRefCon:(SRefCon)handlerRefCon;
// If an Apple event is being handled on the current thread (i.e., a handler that was registered with -setEventHandler:andSelector:forEventClass:andEventID: is being messaged at this instant or -setCurrentAppleEventAndReplyEventWithSuspensionID: has just been invoked), return the descriptor for the event. Return nil otherwise. The effects of mutating or retaining the returned descriptor are undefined, though it may be copied.
@property (nullable, readonly, retain) NSAppleEventDescriptor *currentAppleEvent;
// If an Apple event is being handled on the current thread (i.e., -currentAppleEvent would not return nil), return the corresponding reply event descriptor. Return nil otherwise. This descriptor, including any mutatations, will be returned to the sender of the current event when all handling of the event has been completed, if the sender has requested a reply. The effects of retaining the descriptor are undefined; it may be copied, but mutations of the copy will not be returned to the sender of the current event.
@property (nullable, readonly, retain) NSAppleEventDescriptor *currentReplyAppleEvent;
// If an Apple event is being handled on the current thread (i.e., -currentAppleEvent would not return nil), suspend the handling of the event, returning an ID that must be used to resume the handling of the event. Return zero otherwise. The suspended event will no longer be the current event after this method has returned.
- (nullable NSAppleEventManagerSuspensionID)suspendCurrentAppleEvent NS_RETURNS_INNER_POINTER;
// Given a nonzero suspension ID returned by an invocation of -suspendCurrentAppleEvent, return the descriptor for the event whose handling was suspended. The effects of mutating or retaining the returned descriptor are undefined, though it may be copied. This method may be invoked in any thread, not just the one in which the corresponding invocation of -suspendCurrentAppleEvent occurred.
- (NSAppleEventDescriptor *)appleEventForSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID;
// Given a nonzero suspension ID returned by an invocation of -suspendCurrentAppleEvent, return the corresponding reply event descriptor. This descriptor, including any mutatations, will be returned to the sender of the suspended event when handling of the event is resumed, if the sender has requested a reply. The effects of retaining the descriptor are undefined; it may be copied, but mutations of the copy will not be returned to the sender of the suspended event. This method may be invoked in any thread, not just the one in which the corresponding invocation of -suspendCurrentAppleEvent occurred.
- (NSAppleEventDescriptor *)replyAppleEventForSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID;
// Given a nonzero suspension ID returned by an invocation of -suspendCurrentAppleEvent, set the values that will be returned by subsequent invocations of -currentAppleEvent and -currentReplyAppleEvent to be the event whose handling was suspended and its corresponding reply event, respectively. Redundant invocations of this method will be ignored.
- (void)setCurrentAppleEventAndReplyEventWithSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID;
// Given a nonzero suspension ID returned by an invocation of -suspendCurrentAppleEvent, signal that handling of the suspended event may now continue. This may result in the immediate sending of the reply event to the sender of the suspended event, if the sender has requested a reply. If the suspension ID has been used in a previous invocation of -setCurrentAppleEventAndReplyEventWithSuspensionID: the effects of that invocation will be completely undone. Subsequent invocations of other NSAppleEventManager methods using the same suspension ID are invalid. This method may be invoked in any thread, not just the one in which the corresponding invocation of -suspendCurrentAppleEvent occurred.
- (void)resumeWithSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSPointerFunctions.h | /*
* NSPointerFunctions.h
*
* Copyright (c) 2005-2019, Apple Inc. All rights reserved.
*
*/
#import <Foundation/NSObject.h>
#if !defined(__FOUNDATION_NSPOINTERFUNCTIONS__)
#define __FOUNDATION_NSPOINTERFUNCTIONS__ 1
NS_ASSUME_NONNULL_BEGIN
/*
NSPointerFunctions
This object defines callout functions appropriate for managing a pointer reference held somewhere else.
Used by NSHashTable, NSMapTable, and NSPointerArray, this object defines the acquision and retention behavior for the pointers provided to these collection objects.
The functions are separated into two clusters - those that define "personality", such as object or cString, and those that describe memory management issues such as a memory deallocation function. Common personalities and memory manager selections are provided as enumerations, and further customization is provided by methods such that the composition of the actual list of functions is done opaquely such that they can be extended in the future.
The pointer collections copy NSPointerFunctions objects on input and output, and so NSPointerFunctions is not usefully subclassed.
*/
typedef NS_OPTIONS(NSUInteger, NSPointerFunctionsOptions) {
// Memory options are mutually exclusive
// default is strong
NSPointerFunctionsStrongMemory API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (0UL << 0), // use strong write-barrier to backing store; use GC memory on copyIn
NSPointerFunctionsZeroingWeakMemory API_DEPRECATED("GC no longer supported", macos(10.5, 10.8)) API_UNAVAILABLE(ios, watchos, tvos) = (1UL << 0), // deprecated; uses GC weak read and write barriers, and dangling pointer behavior otherwise
NSPointerFunctionsOpaqueMemory API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (2UL << 0),
NSPointerFunctionsMallocMemory API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (3UL << 0), // free() will be called on removal, calloc on copyIn
NSPointerFunctionsMachVirtualMemory API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (4UL << 0),
NSPointerFunctionsWeakMemory API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) = (5UL << 0), // uses weak read and write barriers appropriate for ARC
// Personalities are mutually exclusive
// default is object. As a special case, 'strong' memory used for Objects will do retain/release under non-GC
NSPointerFunctionsObjectPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (0UL << 8), // use -hash and -isEqual, object description
NSPointerFunctionsOpaquePersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (1UL << 8), // use shifted pointer hash and direct equality
NSPointerFunctionsObjectPointerPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (2UL << 8), // use shifted pointer hash and direct equality, object description
NSPointerFunctionsCStringPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (3UL << 8), // use a string hash and strcmp, description assumes UTF-8 contents; recommended for UTF-8 (or ASCII, which is a subset) only cstrings
NSPointerFunctionsStructPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (4UL << 8), // use a memory hash and memcmp (using size function you must set)
NSPointerFunctionsIntegerPersonality API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (5UL << 8), // use unshifted value as hash & equality
NSPointerFunctionsCopyIn API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = (1UL << 16), // the memory acquire function will be asked to allocate and copy items on input
};
API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0))
@interface NSPointerFunctions : NSObject <NSCopying>
// construction
- (instancetype)initWithOptions:(NSPointerFunctionsOptions)options NS_DESIGNATED_INITIALIZER;
+ (NSPointerFunctions *)pointerFunctionsWithOptions:(NSPointerFunctionsOptions)options;
// pointer personality functions
@property (nullable) NSUInteger (*hashFunction)(const void *item, NSUInteger (* _Nullable size)(const void *item));
@property (nullable) BOOL (*isEqualFunction)(const void *item1, const void*item2, NSUInteger (* _Nullable size)(const void *item));
@property (nullable) NSUInteger (*sizeFunction)(const void *item);
@property (nullable) NSString * _Nullable (*descriptionFunction)(const void *item);
// custom memory configuration
@property (nullable) void (*relinquishFunction)(const void *item, NSUInteger (* _Nullable size)(const void *item));
@property (nullable) void * _Nonnull (*acquireFunction)(const void *src, NSUInteger (* _Nullable size)(const void *item), BOOL shouldCopy);
// GC used to require that read and write barrier functions be used when pointers are from GC memory
@property BOOL usesStrongWriteBarrier // pointers should (not) be assigned using the GC strong write barrier
API_DEPRECATED("Garbage collection no longer supported", macosx(10.5, 10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
@property BOOL usesWeakReadAndWriteBarriers // pointers should (not) use GC weak read and write barriers
API_DEPRECATED("Garbage collection no longer supported", macosx(10.5, 10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
@end
NS_ASSUME_NONNULL_END
/*
Cheat Sheet
Long Integers (other than zero) (NSPointerFunctionsOpaqueMemory | NSPointerFunctionsIntegerPersonality)
useful for, well, anything that can be jammed into a long int
Strongly held objects (NSPointerFunctionsStrongMemory | NSPointerFunctionsObjectPersonality)
used for retained objects under ARC and/or manual retain-release, or GC; uses isEqual: as necessary
Zeroing weak object references (NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality)
used to hold references that won't keep the object alive. Note that objects implementing custom retain-release must also implement allowsWeakReference and retainWeakReference (or are using GC instead)
Unsafe unretained objects (NSPointerFunctionsOpaqueMemory | NSPointerFunctionsObjectPersonality)
used where zeroing weak is not possible and where, somehow, the objects are removed before being deallocated.
C String where table keeps copy (NSPointerFunctionsStrongMemory | NSPointerFunctionsCStringPersonality | NSPointerFunctionsCopyIn)
used to capture a null-terminated string from a source with unknown lifetime. Keeps string alive under GC. Under ARC/RR, table will deallocate its copy when removed. Generally, "C Strings" is a term for UTF8 strings as well.
C String, owned elsewhere (NSPointerFunctionsOpaqueMemory | NSPointerFunctionsCStringPersonality)
used to hold C string pointers to storage not at all managed by the table.
The NSPointerFunctionsObjectPersonality dictates using isEqual: for the equality test. In some situations == should be used, such as when trying to build a cache of unique immutable "value" objects that implement isEqual:. In those cases use NSPointerFunctionsObjectPointerPersonality instead.
Deprecated
GC Zeroing - ARC/RR unsafe weak (NSPointerFunctionsZeroingWeakMemory | NSPointerFunctionsObjectPersonality)
under GC these are zeroing weak but under manual retain-release (or ARC) these are unsafe unretained. Move to NSPointerFunctionsWeakMemory or NSPointerFunctionsOpaqueMemory instead.
Example
Lets say you have a source of C Strings that often repeat and you need to provide unique NSString counterparts. For this you likely want a NSMapTable with strong copy-in C Strings as the keys and weak NSString values. As long as the NSString counterparts are in use, they stay in the table and don't need to be created each time they show up.
NSMapTable *mt = [[NSMapTable alloc]
initWithKeyOptions: (NSPointerFunctionsStrongMemory | NSPointerFunctionsCStringPersonality | NSPointerFunctionsCopyIn)
valueOptions:(NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality)
capacity:0];
...
// given a C string, look it up and, if not found, create and save the NSString version in the table
const char *cString = ...;
NSString *result = [mt objectForKey:(id)cString];
if (!result) {
result = [NSString stringWithCString:cString];
[mt setObject:result forKey:(id)cString];
}
return result;
*/
#endif // defined __FOUNDATION_NSPOINTERFUNCTIONS__
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSPropertyList.h | /* NSPropertyList.h
Copyright (c) 2002-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#include <CoreFoundation/CFPropertyList.h>
@class NSData, NSString, NSError, NSInputStream, NSOutputStream;
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(NSUInteger, NSPropertyListMutabilityOptions) {
NSPropertyListImmutable = kCFPropertyListImmutable,
NSPropertyListMutableContainers = kCFPropertyListMutableContainers,
NSPropertyListMutableContainersAndLeaves = kCFPropertyListMutableContainersAndLeaves
};
typedef NS_ENUM(NSUInteger, NSPropertyListFormat) {
NSPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat,
NSPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0,
NSPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0
};
typedef NSPropertyListMutabilityOptions NSPropertyListReadOptions;
typedef NSUInteger NSPropertyListWriteOptions;
@interface NSPropertyListSerialization : NSObject {
void *reserved[6];
}
/* Verify that a specified property list is valid for a given format. Returns YES if the property list is valid.
*/
+ (BOOL)propertyList:(id)plist isValidForFormat:(NSPropertyListFormat)format;
/* Create an NSData from a property list. The format can be either NSPropertyListXMLFormat_v1_0 or NSPropertyListBinaryFormat_v1_0. The options parameter is currently unused and should be set to 0. If an error occurs the return value will be nil and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem.
*/
+ (nullable NSData *)dataWithPropertyList:(id)plist format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
/* Write a property list to an output stream. The stream should be opened and configured. The format can be either NSPropertyListXMLFormat_v1_0 or NSPropertyListBinaryFormat_v1_0. The options parameter is currently unused and should be set to 0. If an error occurs the return value will be 0 and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem. In a successful case, the return value is the number of bytes written to the stream.
*/
+ (NSInteger)writePropertyList:(id)plist toStream:(NSOutputStream *)stream format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
/* Create a property list from an NSData. The options can be any of NSPropertyListMutabilityOptions. If the format parameter is non-NULL, it will be filled out with the format that the property list was stored in. If an error occurs the return value will be nil and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem.
*/
+ (nullable id)propertyListWithData:(NSData *)data options:(NSPropertyListReadOptions)opt format:(nullable NSPropertyListFormat *)format error:(out NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
/* Create a property list by reading from an NSInputStream. The options can be any of NSPropertyListMutabilityOptions. If the format parameter is non-NULL, it will be filled out with the format that the property list was stored in. If an error occurs the return value will be nil and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem.
*/
+ (nullable id)propertyListWithStream:(NSInputStream *)stream options:(NSPropertyListReadOptions)opt format:(nullable NSPropertyListFormat *)format error:(out NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
/* This method is deprecated. Use dataWithPropertyList:format:options:error: instead.
*/
+ (nullable NSData *)dataFromPropertyList:(id)plist format:(NSPropertyListFormat)format errorDescription:(out __strong NSString * _Nullable * _Nullable)errorString API_DEPRECATED("Use dataWithPropertyList:format:options:error: instead.", macos(10.0,10.10), ios(2.0,8.0), watchos(2.0,2.0), tvos(9.0,9.0));
/* This method is deprecated. Use propertyListWithData:options:format:error: instead.
*/
+ (nullable id)propertyListFromData:(NSData *)data mutabilityOption:(NSPropertyListMutabilityOptions)opt format:(nullable NSPropertyListFormat *)format errorDescription:(out __strong NSString * _Nullable * _Nullable)errorString API_DEPRECATED("Use propertyListWithData:options:format:error: instead.", macos(10.0,10.10), ios(2.0,8.0), watchos(2.0,2.0), tvos(9.0,9.0));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSCache.h | /* NSCache.h
Copyright (c) 2008-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSString;
@protocol NSCacheDelegate;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0))
@interface NSCache <KeyType, ObjectType> : NSObject {
@private
id _delegate;
void *_private[5];
void *_reserved;
}
@property (copy) NSString *name;
@property (nullable, assign) id<NSCacheDelegate> delegate;
- (nullable ObjectType)objectForKey:(KeyType)key;
- (void)setObject:(ObjectType)obj forKey:(KeyType)key; // 0 cost
- (void)setObject:(ObjectType)obj forKey:(KeyType)key cost:(NSUInteger)g;
- (void)removeObjectForKey:(KeyType)key;
- (void)removeAllObjects;
@property NSUInteger totalCostLimit; // limits are imprecise/not strict
@property NSUInteger countLimit; // limits are imprecise/not strict
@property BOOL evictsObjectsWithDiscardedContent;
@end
@protocol NSCacheDelegate <NSObject>
@optional
- (void)cache:(NSCache *)cache willEvictObject:(id)obj;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSNumberFormatter.h | /* NSNumberFormatter.h
Copyright (c) 1996-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSFormatter.h>
#include <CoreFoundation/CFNumberFormatter.h>
@class NSLocale, NSError, NSMutableDictionary, NSRecursiveLock, NSString, NSCache;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, NSNumberFormatterBehavior) {
NSNumberFormatterBehaviorDefault = 0,
#if TARGET_OS_OSX
NSNumberFormatterBehavior10_0 = 1000,
#endif
NSNumberFormatterBehavior10_4 = 1040,
};
@interface NSNumberFormatter : NSFormatter {
@private
NSMutableDictionary *_attributes;
CFNumberFormatterRef _formatter;
NSUInteger _counter;
NSNumberFormatterBehavior _behavior;
NSRecursiveLock *_lock;
unsigned long _stateBitMask; // this is for NSUnitFormatter
NSInteger _cacheGeneration;
void *_reserved[8];
}
@property NSFormattingContext formattingContext API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); // default is NSFormattingContextUnknown
// - (id)init; // designated initializer
// Report the used range of the string and an NSError, in addition to the usual stuff from NSFormatter
- (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string range:(inout nullable NSRange *)rangep error:(out NSError **)error;
// Even though NSNumberFormatter responds to the usual NSFormatter methods,
// here are some convenience methods which are a little more obvious.
- (nullable NSString *)stringFromNumber:(NSNumber *)number;
- (nullable NSNumber *)numberFromString:(NSString *)string;
typedef NS_ENUM(NSUInteger, NSNumberFormatterStyle) {
NSNumberFormatterNoStyle = kCFNumberFormatterNoStyle,
NSNumberFormatterDecimalStyle = kCFNumberFormatterDecimalStyle,
NSNumberFormatterCurrencyStyle = kCFNumberFormatterCurrencyStyle,
NSNumberFormatterPercentStyle = kCFNumberFormatterPercentStyle,
NSNumberFormatterScientificStyle = kCFNumberFormatterScientificStyle,
NSNumberFormatterSpellOutStyle = kCFNumberFormatterSpellOutStyle,
NSNumberFormatterOrdinalStyle API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) = kCFNumberFormatterOrdinalStyle,
NSNumberFormatterCurrencyISOCodeStyle API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) = kCFNumberFormatterCurrencyISOCodeStyle,
NSNumberFormatterCurrencyPluralStyle API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) = kCFNumberFormatterCurrencyPluralStyle,
NSNumberFormatterCurrencyAccountingStyle API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) = kCFNumberFormatterCurrencyAccountingStyle,
};
+ (NSString *)localizedStringFromNumber:(NSNumber *)num numberStyle:(NSNumberFormatterStyle)nstyle API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
// Attributes of an NSNumberFormatter
+ (NSNumberFormatterBehavior)defaultFormatterBehavior;
+ (void)setDefaultFormatterBehavior:(NSNumberFormatterBehavior)behavior;
@property NSNumberFormatterStyle numberStyle;
@property (null_resettable, copy) NSLocale *locale;
@property BOOL generatesDecimalNumbers;
@property NSNumberFormatterBehavior formatterBehavior;
@property (null_resettable, copy) NSString *negativeFormat;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNegativeValues;
@property (null_resettable, copy) NSString *positiveFormat;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForPositiveValues;
@property BOOL allowsFloats;
@property (null_resettable, copy) NSString *decimalSeparator;
@property BOOL alwaysShowsDecimalSeparator;
@property (null_resettable, copy) NSString *currencyDecimalSeparator;
@property BOOL usesGroupingSeparator;
@property (null_resettable, copy) NSString *groupingSeparator;
@property (nullable, copy) NSString *zeroSymbol;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForZero;
@property (copy) NSString *nilSymbol;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNil;
@property (null_resettable, copy) NSString *notANumberSymbol;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNotANumber;
@property (copy) NSString *positiveInfinitySymbol;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForPositiveInfinity;
@property (copy) NSString *negativeInfinitySymbol;
@property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNegativeInfinity;
@property (null_resettable, copy) NSString *positivePrefix;
@property (null_resettable, copy) NSString *positiveSuffix;
@property (null_resettable, copy) NSString *negativePrefix;
@property (null_resettable, copy) NSString *negativeSuffix;
@property (null_resettable, copy) NSString *currencyCode;
@property (null_resettable, copy) NSString *currencySymbol;
@property (null_resettable, copy) NSString *internationalCurrencySymbol;
@property (null_resettable, copy) NSString *percentSymbol;
@property (null_resettable, copy) NSString *perMillSymbol;
@property (null_resettable, copy) NSString *minusSign;
@property (null_resettable, copy) NSString *plusSign;
@property (null_resettable, copy) NSString *exponentSymbol;
@property NSUInteger groupingSize;
@property NSUInteger secondaryGroupingSize;
@property (nullable, copy) NSNumber *multiplier;
@property NSUInteger formatWidth;
@property (null_resettable, copy) NSString *paddingCharacter;
typedef NS_ENUM(NSUInteger, NSNumberFormatterPadPosition) {
NSNumberFormatterPadBeforePrefix = kCFNumberFormatterPadBeforePrefix,
NSNumberFormatterPadAfterPrefix = kCFNumberFormatterPadAfterPrefix,
NSNumberFormatterPadBeforeSuffix = kCFNumberFormatterPadBeforeSuffix,
NSNumberFormatterPadAfterSuffix = kCFNumberFormatterPadAfterSuffix
};
typedef NS_ENUM(NSUInteger, NSNumberFormatterRoundingMode) {
NSNumberFormatterRoundCeiling = kCFNumberFormatterRoundCeiling,
NSNumberFormatterRoundFloor = kCFNumberFormatterRoundFloor,
NSNumberFormatterRoundDown = kCFNumberFormatterRoundDown,
NSNumberFormatterRoundUp = kCFNumberFormatterRoundUp,
NSNumberFormatterRoundHalfEven = kCFNumberFormatterRoundHalfEven,
NSNumberFormatterRoundHalfDown = kCFNumberFormatterRoundHalfDown,
NSNumberFormatterRoundHalfUp = kCFNumberFormatterRoundHalfUp
};
@property NSNumberFormatterPadPosition paddingPosition;
@property NSNumberFormatterRoundingMode roundingMode;
@property (null_resettable, copy) NSNumber *roundingIncrement;
@property NSUInteger minimumIntegerDigits;
@property NSUInteger maximumIntegerDigits;
@property NSUInteger minimumFractionDigits;
@property NSUInteger maximumFractionDigits;
@property (nullable, copy) NSNumber *minimum;
@property (nullable, copy) NSNumber *maximum;
@property (null_resettable, copy) NSString *currencyGroupingSeparator API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (getter=isLenient) BOOL lenient API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property BOOL usesSignificantDigits API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property NSUInteger minimumSignificantDigits API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property NSUInteger maximumSignificantDigits API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (getter=isPartialStringValidationEnabled) BOOL partialStringValidationEnabled API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@end
@class NSDecimalNumberHandler;
#if TARGET_OS_OSX
@interface NSNumberFormatter (NSNumberFormatterCompatibility)
@property BOOL hasThousandSeparators;
@property (null_resettable, copy) NSString *thousandSeparator;
@property BOOL localizesFormat;
@property (copy) NSString *format;
@property (copy) NSAttributedString *attributedStringForZero;
@property (copy) NSAttributedString *attributedStringForNil;
@property (copy) NSAttributedString *attributedStringForNotANumber;
@property (copy) NSDecimalNumberHandler *roundingBehavior;
@end
#endif
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSPort.h | /* NSPort.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSNotification.h>
#import <Foundation/NSRunLoop.h>
typedef int NSSocketNativeHandle;
@class NSRunLoop, NSMutableArray, NSDate;
@class NSConnection, NSPortMessage;
@class NSData;
@protocol NSPortDelegate, NSMachPortDelegate;
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXPORT NSNotificationName const NSPortDidBecomeInvalidNotification;
@interface NSPort : NSObject <NSCopying, NSCoding>
// For backwards compatibility on Mach, +allocWithZone: returns
// an instance of the NSMachPort class when sent to the NSPort
// class. Otherwise, it returns an instance of a concrete
// subclass which can be used for messaging between threads
// or processes on the local machine.
+ (NSPort *)port;
- (void)invalidate;
@property (readonly, getter=isValid) BOOL valid;
- (void)setDelegate:(nullable id <NSPortDelegate>)anObject;
- (nullable id <NSPortDelegate>)delegate;
// These two methods should be implemented by subclasses
// to setup monitoring of the port when added to a run loop,
// and stop monitoring if needed when removed;
// These methods should not be called directly!
- (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode;
- (void)removeFromRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode;
// DO Transport API; subclassers should implement these methods
// default is 0
@property (readonly) NSUInteger reservedSpaceLength;
- (BOOL)sendBeforeDate:(NSDate *)limitDate components:(nullable NSMutableArray *)components from:(nullable NSPort *) receivePort reserved:(NSUInteger)headerSpaceReserved;
- (BOOL)sendBeforeDate:(NSDate *)limitDate msgid:(NSUInteger)msgID components:(nullable NSMutableArray *)components from:(nullable NSPort *)receivePort reserved:(NSUInteger)headerSpaceReserved;
// The components array consists of a series of instances
// of some subclass of NSData, and instances of some
// subclass of NSPort; since one subclass of NSPort does
// not necessarily know how to transport an instance of
// another subclass of NSPort (or could do it even if it
// knew about the other subclass), all of the instances
// of NSPort in the components array and the 'receivePort'
// argument MUST be of the same subclass of NSPort that
// receives this message. If multiple DO transports are
// being used in the same program, this requires some care.
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
- (void)addConnection:(NSConnection *)conn toRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode NS_SWIFT_UNAVAILABLE("Use NSXPCConnection instead") API_DEPRECATED("Use NSXPCConnection instead", macosx(10.0, 10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0));
- (void)removeConnection:(NSConnection *)conn fromRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode NS_SWIFT_UNAVAILABLE("Use NSXPCConnection instead") API_DEPRECATED("Use NSXPCConnection instead", macosx(10.0, 10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0));
// The default implementation of these two methods is to
// simply add the receiving port to the run loop in the
// given mode. Subclassers need not override these methods,
// but can if they need to do extra work.
#endif
@end
@protocol NSPortDelegate <NSObject>
@optional
- (void)handlePortMessage:(NSPortMessage *)message;
// This is the delegate method that subclasses should send
// to their delegates, unless the subclass has something
// more specific that it wants to try to send first
@end
#if TARGET_OS_OSX || TARGET_OS_IPHONE
NS_AUTOMATED_REFCOUNT_WEAK_UNAVAILABLE
@interface NSMachPort : NSPort {
@private
id _delegate;
NSUInteger _flags;
uint32_t _machPort;
NSUInteger _reserved;
}
+ (NSPort *)portWithMachPort:(uint32_t)machPort;
- (instancetype)initWithMachPort:(uint32_t)machPort NS_DESIGNATED_INITIALIZER;
- (void)setDelegate:(nullable id <NSMachPortDelegate>)anObject;
- (nullable id <NSMachPortDelegate>)delegate;
typedef NS_OPTIONS(NSUInteger, NSMachPortOptions) {
NSMachPortDeallocateNone = 0,
NSMachPortDeallocateSendRight = (1UL << 0),
NSMachPortDeallocateReceiveRight = (1UL << 1)
} API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
+ (NSPort *)portWithMachPort:(uint32_t)machPort options:(NSMachPortOptions)f API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
- (instancetype)initWithMachPort:(uint32_t)machPort options:(NSMachPortOptions)f API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
@property (readonly) uint32_t machPort;
- (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode;
- (void)removeFromRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode;
// If you subclass NSMachPort, you have to override these 2
// methods from NSPort; since this is complicated, subclassing
// NSMachPort is not recommended
@end
@protocol NSMachPortDelegate <NSPortDelegate>
@optional
// Delegates are sent this if they respond, otherwise they
// are sent handlePortMessage:; argument is the raw Mach message
- (void)handleMachMessage:(void *)msg;
@end
#endif
// A subclass of NSPort which can be used for local
// message sending on all platforms.
NS_AUTOMATED_REFCOUNT_WEAK_UNAVAILABLE
@interface NSMessagePort : NSPort {
@private
void *_port;
id _delegate;
}
@end
#if TARGET_OS_OSX || TARGET_IPHONE_SIMULATOR
// A subclass of NSPort which can be used for remote
// message sending on all platforms.
@interface NSSocketPort : NSPort {
@private
void *_receiver;
id _connectors;
void *_loops;
void *_data;
id _signature;
id _delegate;
id _lock;
NSUInteger _maxSize;
NSUInteger _useCount;
NSUInteger _reserved;
}
- (instancetype)init;
- (nullable instancetype)initWithTCPPort:(unsigned short)port;
- (nullable instancetype)initWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol address:(NSData *)address NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol socket:(NSSocketNativeHandle)sock NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initRemoteWithTCPPort:(unsigned short)port host:(nullable NSString *)hostName;
- (instancetype)initRemoteWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol address:(NSData *)address NS_DESIGNATED_INITIALIZER;
@property (readonly) int protocolFamily;
@property (readonly) int socketType;
@property (readonly) int protocol;
@property (readonly, copy) NSData *address;
@property (readonly) NSSocketNativeHandle socket;
@end
#endif
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSExpression.h | /* NSExpression.h
Copyright (c) 2004-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSString;
@class NSArray<ObjectType>;
@class NSMutableDictionary;
@class NSPredicate;
NS_ASSUME_NONNULL_BEGIN
// Expressions are the core of the predicate implementation. When expressionValueWithObject: is called, the expression is evaluated, and a value returned which can then be handled by an operator. Expressions can be anything from constants to method invocations. Scalars should be wrapped in appropriate NSValue classes.
typedef NS_ENUM(NSUInteger, NSExpressionType) {
NSConstantValueExpressionType = 0, // Expression that always returns the same value
NSEvaluatedObjectExpressionType, // Expression that always returns the parameter object itself
NSVariableExpressionType, // Expression that always returns whatever is stored at 'variable' in the bindings dictionary
NSKeyPathExpressionType, // Expression that returns something that can be used as a key path
NSFunctionExpressionType, // Expression that returns the result of evaluating a symbol
NSUnionSetExpressionType API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)), // Expression that returns the result of doing a unionSet: on two expressions that evaluate to flat collections (arrays or sets)
NSIntersectSetExpressionType API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)), // Expression that returns the result of doing an intersectSet: on two expressions that evaluate to flat collections (arrays or sets)
NSMinusSetExpressionType API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)), // Expression that returns the result of doing a minusSet: on two expressions that evaluate to flat collections (arrays or sets)
NSSubqueryExpressionType API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)) = 13,
NSAggregateExpressionType API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)) = 14,
NSAnyKeyExpressionType API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)) = 15,
NSBlockExpressionType = 19,
NSConditionalExpressionType API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) = 20
};
API_AVAILABLE(macos(10.4), ios(3.0), watchos(2.0), tvos(9.0))
@interface NSExpression : NSObject <NSSecureCoding, NSCopying> {
@package
struct _expressionFlags {
unsigned int _evaluationBlocked:1;
unsigned int _reservedExpressionFlags:31;
} _expressionFlags;
#ifdef __LP64__
uint32_t reserved;
#endif
NSExpressionType _expressionType;
}
+ (NSExpression *)expressionWithFormat:(NSString *)expressionFormat argumentArray:(NSArray *)arguments API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
+ (NSExpression *)expressionWithFormat:(NSString *)expressionFormat, ... API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
+ (NSExpression *)expressionWithFormat:(NSString *)expressionFormat arguments:(va_list)argList API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
+ (NSExpression *)expressionForConstantValue:(nullable id)obj; // Expression that returns a constant value
+ (NSExpression *)expressionForEvaluatedObject; // Expression that returns the object being evaluated
+ (NSExpression *)expressionForVariable:(NSString *)string; // Expression that pulls a value from the variable bindings dictionary
+ (NSExpression *)expressionForKeyPath:(NSString *)keyPath; // Expression that invokes valueForKeyPath with keyPath
+ (NSExpression *)expressionForFunction:(NSString *)name arguments:(NSArray *)parameters; // Expression that invokes one of the predefined functions. Will throw immediately if the selector is bad; will throw at runtime if the parameters are incorrect.
// Predefined functions are:
// name parameter array contents returns
//-------------------------------------------------------------------------------------------------------------------------------------
// sum: NSExpression instances representing numbers NSNumber
// count: NSExpression instances representing numbers NSNumber
// min: NSExpression instances representing numbers NSNumber
// max: NSExpression instances representing numbers NSNumber
// average: NSExpression instances representing numbers NSNumber
// median: NSExpression instances representing numbers NSNumber
// mode: NSExpression instances representing numbers NSArray (returned array will contain all occurrences of the mode)
// stddev: NSExpression instances representing numbers NSNumber
// add:to: NSExpression instances representing numbers NSNumber
// from:subtract: two NSExpression instances representing numbers NSNumber
// multiply:by: two NSExpression instances representing numbers NSNumber
// divide:by: two NSExpression instances representing numbers NSNumber
// modulus:by: two NSExpression instances representing numbers NSNumber
// sqrt: one NSExpression instance representing numbers NSNumber
// log: one NSExpression instance representing a number NSNumber
// ln: one NSExpression instance representing a number NSNumber
// raise:toPower: one NSExpression instance representing a number NSNumber
// exp: one NSExpression instance representing a number NSNumber
// floor: one NSExpression instance representing a number NSNumber
// ceiling: one NSExpression instance representing a number NSNumber
// abs: one NSExpression instance representing a number NSNumber
// trunc: one NSExpression instance representing a number NSNumber
// uppercase: one NSExpression instance representing a string NSString
// lowercase: one NSExpression instance representing a string NSString
// canonical: one NSExpression instance representing a string NSString
// random none NSNumber (integer)
// randomn: one NSExpression instance representing a number NSNumber (integer) such that 0 <= rand < param
// now none [NSDate now]
// bitwiseAnd:with: two NSExpression instances representing numbers NSNumber (numbers will be treated as NSInteger)
// bitwiseOr:with: two NSExpression instances representing numbers NSNumber (numbers will be treated as NSInteger)
// bitwiseXor:with: two NSExpression instances representing numbers NSNumber (numbers will be treated as NSInteger)
// leftshift:by: two NSExpression instances representing numbers NSNumber (numbers will be treated as NSInteger)
// rightshift:by: two NSExpression instances representing numbers NSNumber (numbers will be treated as NSInteger)
// onesComplement: one NSExpression instance representing a numbers NSNumber (numbers will be treated as NSInteger)
// noindex: an NSExpression parameter (used by CoreData to indicate that an index should be dropped)
// distanceToLocation:fromLocation:
// two NSExpression instances representing CLLocations NSNumber
// length: an NSExpression instance representing a string NSNumber
+ (NSExpression *)expressionForAggregate:(NSArray<NSExpression *> *)subexpressions API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // Expression that returns a collection containing the results of other expressions
+ (NSExpression *)expressionForUnionSet:(NSExpression *)left with:(NSExpression *)right API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // return an expression that will return the union of the collections expressed by left and right
+ (NSExpression *)expressionForIntersectSet:(NSExpression *)left with:(NSExpression *)right API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // return an expression that will return the intersection of the collections expressed by left and right
+ (NSExpression *)expressionForMinusSet:(NSExpression *)left with:(NSExpression *)right API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // return an expression that will return the disjunction of the collections expressed by left and right
+ (NSExpression *)expressionForSubquery:(NSExpression *)expression usingIteratorVariable:(NSString *)variable predicate:(NSPredicate *)predicate API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // Expression that filters a collection by storing elements in the collection in the variable variable and keeping the elements for which qualifer returns true; variable is used as a local variable, and will shadow any instances of variable in the bindings dictionary, the variable is removed or the old value replaced once evaluation completes
+ (NSExpression *)expressionForFunction:(NSExpression *)target selectorName:(NSString *)name arguments:(nullable NSArray *)parameters API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // Expression that invokes the selector on target with parameters. Will throw at runtime if target does not implement selector or if parameters are wrong.
+ (NSExpression *)expressionForAnyKey API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
+ (NSExpression *)expressionForBlock:(id (^)(id _Nullable evaluatedObject, NSArray<NSExpression *> *expressions, NSMutableDictionary * _Nullable context))block arguments:(nullable NSArray<NSExpression *> *)arguments API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // Expression that invokes the block with the parameters; note that block expressions are not encodable or representable as parseable strings.
+ (NSExpression *)expressionForConditional:(NSPredicate *)predicate trueExpression:(NSExpression *)trueExpression falseExpression:(NSExpression *)falseExpression API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)); // Expression that will return the result of trueExpression or falseExpression depending on the value of predicate
- (instancetype)initWithExpressionType:(NSExpressionType)type NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
// accessors for individual parameters - raise if not applicable
@property (readonly) NSExpressionType expressionType;
@property (nullable, readonly, retain) id constantValue;
@property (readonly, copy) NSString *keyPath;
@property (readonly, copy) NSString *function;
@property (readonly, copy) NSString *variable;
@property (readonly, copy) NSExpression *operand; // the object on which the selector will be invoked (the result of evaluating a key path or one of the defined functions)
@property (nullable, readonly, copy) NSArray<NSExpression *> *arguments; // array of expressions which will be passed as parameters during invocation of the selector on the operand of a function expression
@property (readonly, retain) id collection API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0));
@property (readonly, copy) NSPredicate *predicate API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0));
@property (readonly, copy) NSExpression *leftExpression API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // expression which represents the left side of a set expression
@property (readonly, copy) NSExpression *rightExpression API_AVAILABLE(macos(10.5), ios(3.0), watchos(2.0), tvos(9.0)); // expression which represents the right side of a set expression
@property (readonly, copy) NSExpression *trueExpression API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)); // expression which will be evaluated if a conditional expression's predicate evaluates to true
@property (readonly, copy) NSExpression *falseExpression API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)); // expression which will be evaluated if a conditional expression's predicate evaluates to false
@property (readonly, copy) id (^expressionBlock)(id _Nullable, NSArray<NSExpression *> *, NSMutableDictionary * _Nullable) API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
// evaluate the expression using the object and bindings- note that context is mutable here and can be used by expressions to store temporary state for one predicate evaluation
- (nullable id)expressionValueWithObject:(nullable id)object context:(nullable NSMutableDictionary *)context;
- (void)allowEvaluation API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)); // Force an expression which was securely decoded to allow evaluation
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSDistantObject.h | /* NSDistantObject.h
Copyright (c) 1989-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSProxy.h>
@class Protocol, NSConnection, NSCoder;
NS_ASSUME_NONNULL_BEGIN
API_DEPRECATED("Use NSXPCConnection instead", macosx(10.0, 10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0))
NS_SWIFT_UNAVAILABLE("Use NSXPCConnection instead")
@interface NSDistantObject : NSProxy <NSCoding> {
@private
id _knownSelectors;
NSUInteger _wireCount;
NSUInteger _refCount;
id _proto;
uint16_t ___2;
uint8_t ___1;
uint8_t _wireType;
id _remoteClass;
}
// Do not attempt to subclass NSDistantObject -- it is futile
// Do not use these next two methods
+ (nullable id)proxyWithTarget:(id)target connection:(NSConnection *)connection;
- (nullable instancetype)initWithTarget:(id)target connection:(NSConnection *)connection;
+ (id)proxyWithLocal:(id)target connection:(NSConnection *)connection;
- (instancetype)initWithLocal:(id)target connection:(NSConnection *)connection;
- (nullable instancetype)initWithCoder:(NSCoder *)inCoder NS_DESIGNATED_INITIALIZER;
- (void)setProtocolForProxy:(nullable Protocol *)proto;
@property (readonly, retain) NSConnection *connectionForProxy;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSXMLDTD.h | /* NSXMLDTD.h
Copyright (c) 2004-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSXMLNode.h>
@class NSArray<ObjectType>, NSData, NSMutableDictionary;
@class NSXMLDTDNode;
NS_ASSUME_NONNULL_BEGIN
/*!
@class NSXMLDTD
@abstract Defines the order, repetition, and allowable values for a document
*/
@interface NSXMLDTD : NSXMLNode {
@private
NSString *_name;
NSString *_publicID;
NSString *_systemID;
NSArray *_children;
BOOL _childrenHaveMutated;
uint8_t _padding3[3];
NSMutableDictionary *_entities;
NSMutableDictionary *_elements;
NSMutableDictionary *_notations;
NSMutableDictionary *_attributes;
NSString *_original;
BOOL _modified;
uint8_t _padding2[3];
}
#if 0
#pragma mark --- Properties ---
#endif
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithKind:(NSXMLNodeKind)kind options:(NSXMLNodeOptions)options API_UNAVAILABLE(macos, ios, watchos, tvos);
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSXMLNodeOptions)mask error:(NSError **)error;
- (nullable instancetype)initWithData:(NSData *)data options:(NSXMLNodeOptions)mask error:(NSError **)error NS_DESIGNATED_INITIALIZER; //primitive
/*!
@abstract Sets the public id. This identifier should be in the default catalog in /etc/xml/catalog or in a path specified by the environment variable XML_CATALOG_FILES. When the public id is set the system id must also be set.
*/
@property (nullable, copy) NSString *publicID; //primitive
/*!
@abstract Sets the system id. This should be a URL that points to a valid DTD.
*/
@property (nullable, copy) NSString *systemID; //primitive
#if 0
#pragma mark --- Children ---
#endif
/*!
@method insertChild:atIndex:
@abstract Inserts a child at a particular index.
*/
- (void)insertChild:(NSXMLNode *)child atIndex:(NSUInteger)index; //primitive
/*!
@method insertChildren:atIndex:
@abstract Insert several children at a particular index.
*/
- (void)insertChildren:(NSArray<NSXMLNode *> *)children atIndex:(NSUInteger)index;
/*!
@method removeChildAtIndex:
@abstract Removes a child at a particular index.
*/
- (void)removeChildAtIndex:(NSUInteger)index; //primitive
/*!
@method setChildren:
@abstract Removes all existing children and replaces them with the new children. Set children to nil to simply remove all children.
*/
- (void)setChildren:(nullable NSArray<NSXMLNode *> *)children; //primitive
/*!
@method addChild:
@abstract Adds a child to the end of the existing children.
*/
- (void)addChild:(NSXMLNode *)child;
/*!
@method replaceChildAtIndex:withNode:
@abstract Replaces a child at a particular index with another child.
*/
- (void)replaceChildAtIndex:(NSUInteger)index withNode:(NSXMLNode *)node;
#if 0
#pragma mark --- Accessors ---
#endif
/*!
@method entityDeclarationForName:
@abstract Returns the entity declaration matching this name.
*/
- (nullable NSXMLDTDNode *)entityDeclarationForName:(NSString *)name; //primitive
/*!
@method notationDeclarationForName:
@abstract Returns the notation declaration matching this name.
*/
- (nullable NSXMLDTDNode *)notationDeclarationForName:(NSString *)name; //primitive
/*!
@method elementDeclarationForName:
@abstract Returns the element declaration matching this name.
*/
- (nullable NSXMLDTDNode *)elementDeclarationForName:(NSString *)name; //primitive
/*!
@method attributeDeclarationForName:
@abstract Returns the attribute declaration matching this name.
*/
- (nullable NSXMLDTDNode *)attributeDeclarationForName:(NSString *)name elementName:(NSString *)elementName; //primitive
/*!
@method predefinedEntityDeclarationForName:
@abstract Returns the predefined entity declaration matching this name.
@discussion The five predefined entities are
<ul><li>&lt; - <</li><li>&gt; - ></li><li>&amp; - &</li><li>&quot; - "</li><li>&apos; - &</li></ul>
*/
+ (nullable NSXMLDTDNode *)predefinedEntityDeclarationForName:(NSString *)name;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSDecimalNumber.h | /* NSDecimalNumber.h
Copyright (c) 1995-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSValue.h>
#import <Foundation/NSScanner.h>
#import <Foundation/NSDecimal.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
NS_ASSUME_NONNULL_BEGIN
/*************** Exceptions ***********/
FOUNDATION_EXPORT NSExceptionName const NSDecimalNumberExactnessException;
FOUNDATION_EXPORT NSExceptionName const NSDecimalNumberOverflowException;
FOUNDATION_EXPORT NSExceptionName const NSDecimalNumberUnderflowException;
FOUNDATION_EXPORT NSExceptionName const NSDecimalNumberDivideByZeroException;
/*************** Rounding and Exception behavior ***********/
@class NSDecimalNumber;
@protocol NSDecimalNumberBehaviors
- (NSRoundingMode)roundingMode;
- (short)scale;
// The scale could return NO_SCALE for no defined scale.
- (nullable NSDecimalNumber *)exceptionDuringOperation:(SEL)operation error:(NSCalculationError)error leftOperand:(NSDecimalNumber *)leftOperand rightOperand:(nullable NSDecimalNumber *)rightOperand;
// Receiver can raise, return a new value, or return nil to ignore the exception.
@end
/*************** NSDecimalNumber: the class ***********/
@interface NSDecimalNumber : NSNumber {
@private
signed int _exponent:8;
unsigned int _length:4;
unsigned int _isNegative:1;
unsigned int _isCompact:1;
unsigned int _reserved:1;
unsigned int _hasExternalRefCount:1;
unsigned int _refs:16;
unsigned short _mantissa[0]; /* GCC */
}
- (instancetype)initWithMantissa:(unsigned long long)mantissa exponent:(short)exponent isNegative:(BOOL)flag;
- (instancetype)initWithDecimal:(NSDecimal)dcm NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithString:(nullable NSString *)numberValue;
- (instancetype)initWithString:(nullable NSString *)numberValue locale:(nullable id)locale;
- (NSString *)descriptionWithLocale:(nullable id)locale;
@property (readonly) NSDecimal decimalValue;
+ (NSDecimalNumber *)decimalNumberWithMantissa:(unsigned long long)mantissa exponent:(short)exponent isNegative:(BOOL)flag;
+ (NSDecimalNumber *)decimalNumberWithDecimal:(NSDecimal)dcm;
+ (NSDecimalNumber *)decimalNumberWithString:(nullable NSString *)numberValue;
+ (NSDecimalNumber *)decimalNumberWithString:(nullable NSString *)numberValue locale:(nullable id)locale;
@property (class, readonly, copy) NSDecimalNumber *zero;
@property (class, readonly, copy) NSDecimalNumber *one;
@property (class, readonly, copy) NSDecimalNumber *minimumDecimalNumber;
@property (class, readonly, copy) NSDecimalNumber *maximumDecimalNumber;
@property (class, readonly, copy) NSDecimalNumber *notANumber;
- (NSDecimalNumber *)decimalNumberByAdding:(NSDecimalNumber *)decimalNumber;
- (NSDecimalNumber *)decimalNumberByAdding:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
- (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber;
- (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
- (NSDecimalNumber *)decimalNumberByMultiplyingBy:(NSDecimalNumber *)decimalNumber;
- (NSDecimalNumber *)decimalNumberByMultiplyingBy:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
- (NSDecimalNumber *)decimalNumberByDividingBy:(NSDecimalNumber *)decimalNumber;
- (NSDecimalNumber *)decimalNumberByDividingBy:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power;
- (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
- (NSDecimalNumber *)decimalNumberByMultiplyingByPowerOf10:(short)power;
- (NSDecimalNumber *)decimalNumberByMultiplyingByPowerOf10:(short)power withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
- (NSDecimalNumber *)decimalNumberByRoundingAccordingToBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior;
// Round to the scale of the behavior.
- (NSComparisonResult)compare:(NSNumber *)decimalNumber;
// compare two NSDecimalNumbers
@property (class, strong) id <NSDecimalNumberBehaviors> defaultBehavior;
// One behavior per thread - The default behavior is
// rounding mode: NSRoundPlain
// scale: No defined scale (full precision)
// ignore exactnessException
// raise on overflow, underflow and divide by zero.
@property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
// return 'd' for double
@property (readonly) double doubleValue;
// return an approximate double value
@end
/*********** A class for defining common behaviors *******/
@interface NSDecimalNumberHandler : NSObject <NSDecimalNumberBehaviors, NSCoding> {
@private
signed int _scale:16;
unsigned _roundingMode:3;
unsigned _raiseOnExactness:1;
unsigned _raiseOnOverflow:1;
unsigned _raiseOnUnderflow:1;
unsigned _raiseOnDivideByZero:1;
unsigned _unused:9;
void *_reserved2;
void *_reserved;
}
@property (class, readonly, strong) NSDecimalNumberHandler *defaultDecimalNumberHandler;
// rounding mode: NSRoundPlain
// scale: No defined scale (full precision)
// ignore exactnessException (return nil)
// raise on overflow, underflow and divide by zero.
- (instancetype)initWithRoundingMode:(NSRoundingMode)roundingMode scale:(short)scale raiseOnExactness:(BOOL)exact raiseOnOverflow:(BOOL)overflow raiseOnUnderflow:(BOOL)underflow raiseOnDivideByZero:(BOOL)divideByZero NS_DESIGNATED_INITIALIZER;
+ (instancetype)decimalNumberHandlerWithRoundingMode:(NSRoundingMode)roundingMode scale:(short)scale raiseOnExactness:(BOOL)exact raiseOnOverflow:(BOOL)overflow raiseOnUnderflow:(BOOL)underflow raiseOnDivideByZero:(BOOL)divideByZero;
@end
/*********** Extensions to other classes *******/
@interface NSNumber (NSDecimalNumberExtensions)
@property (readonly) NSDecimal decimalValue;
// Could be silently inexact for float and double.
@end
@interface NSScanner (NSDecimalNumberScanning)
- (BOOL)scanDecimal:(nullable NSDecimal *)dcm
#if defined(__swift__) // Deprecated for Swift only:
API_DEPRECATED_WITH_REPLACEMENT("scanDecimal()", macosx(10.0,10.15), ios(2.0,13.0), watchos(2.0,13.0), tvos(9.0,13.0))
#endif
;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSArchiver.h | /* NSArchiver.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSCoder.h>
#import <Foundation/NSException.h>
@class NSString, NSData, NSMutableData, NSMutableDictionary, NSMutableArray;
NS_ASSUME_NONNULL_BEGIN
/************ Archiving: Writing ****************/
API_DEPRECATED("Use NSKeyedArchiver instead", macos(10.0,10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0))
@interface NSArchiver : NSCoder {
@private
void *mdata;
void *pointerTable;
void *stringTable;
void *ids;
void *map;
void *replacementTable;
void *reserved;
}
- (instancetype)initForWritingWithMutableData:(NSMutableData *)mdata NS_DESIGNATED_INITIALIZER;
@property (readonly, retain) NSMutableData *archiverData;
- (void)encodeRootObject:(id)rootObject;
- (void)encodeConditionalObject:(nullable id)object;
+ (NSData *)archivedDataWithRootObject:(id)rootObject;
+ (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path;
- (void)encodeClassName:(NSString *)trueName intoClassName:(NSString *)inArchiveName;
- (nullable NSString *)classNameEncodedForTrueClassName:(NSString *)trueName;
- (void)replaceObject:(id)object withObject:(id)newObject;
@end
/************ Archiving: Reading ****************/
API_DEPRECATED("Use NSKeyedUnarchiver instead", macos(10.0,10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0))
@interface NSUnarchiver : NSCoder {
@private
void * datax;
NSUInteger cursor;
NSZone *objectZone;
NSUInteger systemVersion;
signed char streamerVersion;
char swap;
char unused1;
char unused2;
void *pointerTable;
void *stringTable;
id classVersions;
NSInteger lastLabel;
void *map;
void *allUnarchivedObjects;
id reserved;
}
- (nullable instancetype)initForReadingWithData:(NSData *)data NS_DESIGNATED_INITIALIZER;
- (void)setObjectZone:(nullable NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
- (nullable NSZone *)objectZone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
@property (getter=isAtEnd, readonly) BOOL atEnd;
@property (readonly) unsigned int systemVersion;
+ (nullable id)unarchiveObjectWithData:(NSData *)data;
+ (nullable id)unarchiveObjectWithFile:(NSString *)path;
+ (void)decodeClassName:(NSString *)inArchiveName asClassName:(NSString *)trueName;
- (void)decodeClassName:(NSString *)inArchiveName asClassName:(NSString *)trueName;
+ (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName;
- (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName;
- (void)replaceObject:(id)object withObject:(id)newObject;
@end
/************ Object call back ****************/
@interface NSObject (NSArchiverCallback)
@property (nullable, readonly) Class classForArchiver;
- (nullable id)replacementObjectForArchiver:(NSArchiver *)archiver API_DEPRECATED_WITH_REPLACEMENT("replacementObjectForCoder:", macos(10.0,10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurement.h | /*
NSMeasurement.h
Copyright (c) 2015-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSUnit.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSMeasurement<UnitType: NSUnit *> : NSObject<NSCopying, NSSecureCoding> {
@private
UnitType _unit;
double _doubleValue;
}
@property (readonly, copy) UnitType unit;
@property (readonly) double doubleValue;
- (instancetype)init API_UNAVAILABLE(macos, ios, watchos, tvos);
- (instancetype)initWithDoubleValue:(double)doubleValue unit:(UnitType)unit NS_DESIGNATED_INITIALIZER;
/*
Given an NSUnit object, canBeConvertedToUnit: will check for dimensionality i.e. check the unit type (NSUnitAngle, NSUnitLength, NSUnitCustom, etc.) of the NSUnit object. It will return YES if the unit type of the given unit is the same as the unit type of the unit within the NSMeasurement object and NO if not.
Note: This method will return NO if given or called on a dimensionless unit.
*/
- (BOOL)canBeConvertedToUnit:(NSUnit *)unit;
/*
Given an NSUnit object, measurementByConvertingUnit: will first check for dimensionality i.e. check the unit type (NSUnitAngle, NSUnitLength, NSUnitCustom, etc.) of the NSUnit object. If the unit type of the given unit is not the same as the unit type of the unit within the NSMeasurement object (i.e. the units are of differing dimensionalities), measurementByConvertingToUnit: will throw an InvalidArgumentException.
@return A new NSMeasurement object with the given unit and converted value.
*/
- (NSMeasurement *)measurementByConvertingToUnit:(NSUnit *)unit;
/*
Given an NSMeasurement object, these methods will first check for dimensionality i.e. check the unit type (NSUnitAngle, NSUnitLength, NSUnitCustom, etc.) of the unit contained in that object. If the unit type of the unit in the given NSMeasurement object is not the same as the unit type of the unit within the current NSMeasurement instance (i.e. the units are of differing dimensionalities), these methods will throw an InvalidArgumentException.
@return A new NSMeasurement object with the adjusted value and a unit that is the same type as the current NSMeasurement instance.
*/
- (NSMeasurement<UnitType> *)measurementByAddingMeasurement:(NSMeasurement<UnitType> *)measurement;
- (NSMeasurement<UnitType> *)measurementBySubtractingMeasurement:(NSMeasurement<UnitType> *)measurement;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSXMLNode.h | /* NSXMLNode.h
Copyright (c) 2004-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSXMLNodeOptions.h>
@class NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSString, NSURL;
@class NSXMLElement, NSXMLDocument;
NS_ASSUME_NONNULL_BEGIN
/*!
@typedef NSXMLNodeKind
*/
typedef NS_ENUM(NSUInteger, NSXMLNodeKind) {
NSXMLInvalidKind = 0,
NSXMLDocumentKind,
NSXMLElementKind,
NSXMLAttributeKind,
NSXMLNamespaceKind,
NSXMLProcessingInstructionKind,
NSXMLCommentKind,
NSXMLTextKind,
NSXMLDTDKind NS_SWIFT_NAME(DTDKind),
NSXMLEntityDeclarationKind,
NSXMLAttributeDeclarationKind,
NSXMLElementDeclarationKind,
NSXMLNotationDeclarationKind
};
// initWithKind options
// NSXMLNodeOptionsNone
// NSXMLNodePreserveAll
// NSXMLNodePreserveNamespaceOrder
// NSXMLNodePreserveAttributeOrder
// NSXMLNodePreserveEntities
// NSXMLNodePreservePrefixes
// NSXMLNodeIsCDATA
// NSXMLNodeExpandEmptyElement
// NSXMLNodeCompactEmptyElement
// NSXMLNodeUseSingleQuotes
// NSXMLNodeUseDoubleQuotes
// Output options
// NSXMLNodePrettyPrint
/*!
@class NSXMLNode
@abstract The basic unit of an XML document.
*/
@interface NSXMLNode : NSObject <NSCopying> {
@protected
#if __LP64__
NSXMLNode *_parent;
id _objectValue;
NSXMLNodeKind _kind:4;
uint32_t _index:28;
@private
int32_t _private;
#else
NSXMLNodeKind _kind;
NSXMLNode *_parent;
uint32_t _index;
id _objectValue;
#endif
}
- (instancetype)init NS_DESIGNATED_INITIALIZER;
/*!
@method initWithKind:
@abstract Invokes @link initWithKind:options: @/link with options set to NSXMLNodeOptionsNone
*/
- (instancetype)initWithKind:(NSXMLNodeKind)kind;
/*!
@method initWithKind:options:
@abstract Inits a node with fidelity options as description NSXMLNodeOptions.h
*/
- (instancetype)initWithKind:(NSXMLNodeKind)kind options:(NSXMLNodeOptions)options NS_DESIGNATED_INITIALIZER; //primitive
/*!
@method document:
@abstract Returns an empty document.
*/
+ (id)document;
/*!
@method documentWithRootElement:
@abstract Returns a document
@param element The document's root node.
*/
+ (id)documentWithRootElement:(NSXMLElement *)element;
/*!
@method elementWithName:
@abstract Returns an element <tt><name></name></tt>.
*/
+ (id)elementWithName:(NSString *)name;
/*!
@method elementWithName:URI:
@abstract Returns an element whose full QName is specified.
*/
+ (id)elementWithName:(NSString *)name URI:(NSString *)URI;
/*!
@method elementWithName:stringValue:
@abstract Returns an element with a single text node child <tt><name>string</name></tt>.
*/
+ (id)elementWithName:(NSString *)name stringValue:(NSString *)string;
/*!
@method elementWithName:children:attributes:
@abstract Returns an element children and attributes <tt><name attr1="foo" attr2="bar"><-- child1 -->child2</name></tt>.
*/
+ (id)elementWithName:(NSString *)name children:(nullable NSArray<NSXMLNode *> *)children attributes:(nullable NSArray<NSXMLNode *> *)attributes;
/*!
@method attributeWithName:stringValue:
@abstract Returns an attribute <tt>name="stringValue"</tt>.
*/
+ (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue;
/*!
@method attributeWithLocalName:URI:stringValue:
@abstract Returns an attribute whose full QName is specified.
*/
+ (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSString *)stringValue;
/*!
@method namespaceWithName:stringValue:
@abstract Returns a namespace <tt>xmlns:name="stringValue"</tt>.
*/
+ (id)namespaceWithName:(NSString *)name stringValue:(NSString *)stringValue;
/*!
@method processingInstructionWithName:stringValue:
@abstract Returns a processing instruction <tt><?name stringValue></tt>.
*/
+ (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)stringValue;
/*!
@method commentWithStringValue:
@abstract Returns a comment <tt><--stringValue--></tt>.
*/
+ (id)commentWithStringValue:(NSString *)stringValue;
/*!
@method textWithStringValue:
@abstract Returns a text node.
*/
+ (id)textWithStringValue:(NSString *)stringValue;
/*!
@method DTDNodeWithXMLString:
@abstract Returns an element, attribute, entity, or notation DTD node based on the full XML string.
*/
+ (nullable id)DTDNodeWithXMLString:(NSString *)string;
#if 0
#pragma mark --- Properties ---
#endif
/*!
@abstract Returns an element, attribute, entity, or notation DTD node based on the full XML string.
*/
@property (readonly) NSXMLNodeKind kind; //primitive
/*!
@abstract Sets the nodes name. Applicable for element, attribute, namespace, processing-instruction, document type declaration, element declaration, attribute declaration, entity declaration, and notation declaration.
*/
@property (nullable, copy) NSString *name; //primitive
/*!
@abstract Sets the content of the node. Setting the objectValue removes all existing children including processing instructions and comments. Setting the object value on an element creates a single text node child.
*/
@property (nullable, retain) id objectValue; //primitive
/*!
@abstract Sets the content of the node. Setting the stringValue removes all existing children including processing instructions and comments. Setting the string value on an element creates a single text node child. The getter returns the string value of the node, which may be either its content or child text nodes, depending on the type of node. Elements are recursed and text nodes concatenated in document order with no intervening spaces.
*/
@property (nullable, copy) NSString *stringValue; //primitive
/*!
@method setStringValue:resolvingEntities:
@abstract Sets the content as with @link setStringValue: @/link, but when "resolve" is true, character references, predefined entities and user entities available in the document's dtd are resolved. Entities not available in the dtd remain in their entity form.
*/
- (void)setStringValue:(NSString *)string resolvingEntities:(BOOL)resolve; //primitive
#if 0
#pragma mark --- Tree Navigation ---
#endif
/*!
@abstract A node's index amongst its siblings.
*/
@property (readonly) NSUInteger index; //primitive
/*!
@abstract The depth of the node within the tree. Documents and standalone nodes are level 0.
*/
@property (readonly) NSUInteger level;
/*!
@abstract The encompassing document or nil.
*/
@property (nullable, readonly, retain) NSXMLDocument *rootDocument;
/*!
@abstract The parent of this node. Documents and standalone Nodes have a nil parent; there is not a 1-to-1 relationship between parent and children, eg a namespace cannot be a child but has a parent element.
*/
@property (nullable, readonly, copy) NSXMLNode *parent; //primitive
/*!
@abstract The amount of children, relevant for documents, elements, and document type declarations. Use this instead of [[self children] count].
*/
@property (readonly) NSUInteger childCount; //primitive
/*!
@abstract An immutable array of child nodes. Relevant for documents, elements, and document type declarations.
*/
@property (nullable, readonly, copy) NSArray<NSXMLNode *> *children; //primitive
/*!
@method childAtIndex:
@abstract Returns the child node at a particular index.
*/
- (nullable NSXMLNode *)childAtIndex:(NSUInteger)index; //primitive
/*!
@abstract Returns the previous sibling, or nil if there isn't one.
*/
@property (nullable, readonly, copy) NSXMLNode *previousSibling;
/*!
@abstract Returns the next sibling, or nil if there isn't one.
*/
@property (nullable, readonly, copy) NSXMLNode *nextSibling;
/*!
@abstract Returns the previous node in document order. This can be used to walk the tree backwards.
*/
@property (nullable, readonly, copy) NSXMLNode *previousNode;
/*!
@abstract Returns the next node in document order. This can be used to walk the tree forwards.
*/
@property (nullable, readonly, copy) NSXMLNode *nextNode;
/*!
@method detach:
@abstract Detaches this node from its parent.
*/
- (void)detach; //primitive
/*!
@abstract Returns the XPath to this node, for example foo/bar[2]/baz.
*/
@property (nullable, readonly, copy) NSString *XPath;
#if 0
#pragma mark --- QNames ---
#endif
/*!
@abstract Returns the local name bar if this attribute or element's name is foo:bar
*/
@property (nullable, readonly, copy) NSString *localName; //primitive
/*!
@abstract Returns the prefix foo if this attribute or element's name if foo:bar
*/
@property (nullable, readonly, copy) NSString *prefix; //primitive
/*!
@abstract Set the URI of this element, attribute, or document. For documents it is the URI of document origin. Getter returns the URI of this element, attribute, or document. For documents it is the URI of document origin and is automatically set when using initWithContentsOfURL.
*/
@property (nullable, copy) NSString *URI; //primitive
/*!
@method localNameForName:
@abstract Returns the local name bar in foo:bar.
*/
+ (NSString *)localNameForName:(NSString *)name;
/*!
@method localNameForName:
@abstract Returns the prefix foo in the name foo:bar.
*/
+ (nullable NSString *)prefixForName:(NSString *)name;
/*!
@method predefinedNamespaceForPrefix:
@abstract Returns the namespace belonging to one of the predefined namespaces xml, xs, or xsi
*/
+ (nullable NSXMLNode *)predefinedNamespaceForPrefix:(NSString *)name;
#if 0
#pragma mark --- Output ---
#endif
/*!
@abstract Used for debugging. May give more information than XMLString.
*/
@property (readonly, copy) NSString *description;
/*!
@abstract The representation of this node as it would appear in an XML document.
*/
@property (readonly, copy) NSString *XMLString;
/*!
@method XMLStringWithOptions:
@abstract The representation of this node as it would appear in an XML document, with various output options available.
*/
- (NSString *)XMLStringWithOptions:(NSXMLNodeOptions)options;
/*!
@method canonicalXMLStringPreservingComments:
@abstract W3 canonical form (http://www.w3.org/TR/xml-c14n). The input option NSXMLNodePreserveWhitespace should be set for true canonical form.
*/
- (NSString *)canonicalXMLStringPreservingComments:(BOOL)comments;
#if 0
#pragma mark --- XPath/XQuery ---
#endif
/*!
@method nodesForXPath:error:
@abstract Returns the nodes resulting from applying an XPath to this node using the node as the context item ("."). normalizeAdjacentTextNodesPreservingCDATA:NO should be called if there are adjacent text nodes since they are not allowed under the XPath/XQuery Data Model.
@returns An array whose elements are a kind of NSXMLNode.
*/
- (nullable NSArray<__kindof NSXMLNode *> *)nodesForXPath:(NSString *)xpath error:(NSError **)error;
/*!
@method objectsForXQuery:constants:error:
@abstract Returns the objects resulting from applying an XQuery to this node using the node as the context item ("."). Constants are a name-value dictionary for constants declared "external" in the query. normalizeAdjacentTextNodesPreservingCDATA:NO should be called if there are adjacent text nodes since they are not allowed under the XPath/XQuery Data Model.
@returns An array whose elements are kinds of NSArray, NSData, NSDate, NSNumber, NSString, NSURL, or NSXMLNode.
*/
- (nullable NSArray *)objectsForXQuery:(NSString *)xquery constants:(nullable NSDictionary<NSString *, id> *)constants error:(NSError **)error;
- (nullable NSArray *)objectsForXQuery:(NSString *)xquery error:(NSError **)error;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h | /* NSArray.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSRange.h>
#import <Foundation/NSObjCRuntime.h>
#import <Foundation/NSOrderedCollectionDifference.h>
@class NSData, NSIndexSet, NSString, NSURL;
/**************** Immutable Array ****************/
NS_ASSUME_NONNULL_BEGIN
@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
@property (readonly) NSUInteger count;
- (ObjectType)objectAtIndex:(NSUInteger)index;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end
@interface NSArray<ObjectType> (NSExtendedArray)
- (NSArray<ObjectType> *)arrayByAddingObject:(ObjectType)anObject;
- (NSArray<ObjectType> *)arrayByAddingObjectsFromArray:(NSArray<ObjectType> *)otherArray;
- (NSString *)componentsJoinedByString:(NSString *)separator;
- (BOOL)containsObject:(ObjectType)anObject;
@property (readonly, copy) NSString *description;
- (NSString *)descriptionWithLocale:(nullable id)locale;
- (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level;
- (nullable ObjectType)firstObjectCommonWithArray:(NSArray<ObjectType> *)otherArray;
- (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nonnull])objects range:(NSRange)range NS_SWIFT_UNAVAILABLE("Use 'subarrayWithRange()' instead");
- (NSUInteger)indexOfObject:(ObjectType)anObject;
- (NSUInteger)indexOfObject:(ObjectType)anObject inRange:(NSRange)range;
- (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject;
- (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
- (BOOL)isEqualToArray:(NSArray<ObjectType> *)otherArray;
@property (nullable, nonatomic, readonly) ObjectType firstObject API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
@property (nullable, nonatomic, readonly) ObjectType lastObject;
- (NSEnumerator<ObjectType> *)objectEnumerator;
- (NSEnumerator<ObjectType> *)reverseObjectEnumerator;
@property (readonly, copy) NSData *sortedArrayHint;
- (NSArray<ObjectType> *)sortedArrayUsingFunction:(NSInteger (NS_NOESCAPE *)(ObjectType, ObjectType, void * _Nullable))comparator context:(nullable void *)context;
- (NSArray<ObjectType> *)sortedArrayUsingFunction:(NSInteger (NS_NOESCAPE *)(ObjectType, ObjectType, void * _Nullable))comparator context:(nullable void *)context hint:(nullable NSData *)hint;
- (NSArray<ObjectType> *)sortedArrayUsingSelector:(SEL)comparator;
- (NSArray<ObjectType> *)subarrayWithRange:(NSRange)range;
/* Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. */
- (BOOL)writeToURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
- (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
- (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
- (NSArray<ObjectType> *)objectsAtIndexes:(NSIndexSet *)indexes;
- (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
- (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (void)enumerateObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSUInteger)indexOfObjectPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSUInteger)indexOfObjectWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSUInteger)indexOfObjectAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (NSArray<ObjectType> *)sortedArrayWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
typedef NS_OPTIONS(NSUInteger, NSBinarySearchingOptions) {
NSBinarySearchingFirstEqual = (1UL << 8),
NSBinarySearchingLastEqual = (1UL << 9),
NSBinarySearchingInsertionIndex = (1UL << 10),
};
- (NSUInteger)indexOfObject:(ObjectType)obj inSortedRange:(NSRange)r options:(NSBinarySearchingOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmp API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // binary search
@end
@interface NSArray<ObjectType> (NSArrayCreation)
+ (instancetype)array;
+ (instancetype)arrayWithObject:(ObjectType)anObject;
+ (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt;
+ (instancetype)arrayWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
+ (instancetype)arrayWithArray:(NSArray<ObjectType> *)array;
- (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
- (instancetype)initWithArray:(NSArray<ObjectType> *)array;
- (instancetype)initWithArray:(NSArray<ObjectType> *)array copyItems:(BOOL)flag;
/* Reads array stored in NSPropertyList format from the specified url. */
- (nullable NSArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/* Reads array stored in NSPropertyList format from the specified url. */
+ (nullable NSArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_SWIFT_UNAVAILABLE("Use initializer instead");
@end
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
NS_SWIFT_UNAVAILABLE("NSArray diffing methods are not available in Swift, use Collection.difference(from:) instead")
@interface NSArray<ObjectType> (NSArrayDiffing)
- (NSOrderedCollectionDifference<ObjectType> *)differenceFromArray:(NSArray<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options usingEquivalenceTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj1, ObjectType obj2))block;
- (NSOrderedCollectionDifference<ObjectType> *)differenceFromArray:(NSArray<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options;
// Uses isEqual: to determine the difference between the parameter and the receiver
- (NSOrderedCollectionDifference<ObjectType> *)differenceFromArray:(NSArray<ObjectType> *)other;
- (nullable NSArray<ObjectType> *)arrayByApplyingDifference:(NSOrderedCollectionDifference<ObjectType> *)difference;
@end
@interface NSArray<ObjectType> (NSDeprecated)
/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
*/
- (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nonnull])objects NS_SWIFT_UNAVAILABLE("Use 'as [AnyObject]' instead") API_DEPRECATED("Use -getObjects:range: instead", macos(10.0, 10.13), ios(2.0, 11.0), watchos(2.0, 4.0), tvos(9.0, 11.0));
/* These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. */
+ (nullable NSArray<ObjectType> *)arrayWithContentsOfFile:(NSString *)path API_DEPRECATED_WITH_REPLACEMENT("arrayWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
+ (nullable NSArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("arrayWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
- (nullable NSArray<ObjectType> *)initWithContentsOfFile:(NSString *)path API_DEPRECATED_WITH_REPLACEMENT("initWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
- (nullable NSArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("initWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile API_DEPRECATED_WITH_REPLACEMENT("writeToURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically API_DEPRECATED_WITH_REPLACEMENT("writeToURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
@end
/**************** Mutable Array ****************/
@interface NSMutableArray<ObjectType> : NSArray<ObjectType>
- (void)addObject:(ObjectType)anObject;
- (void)insertObject:(ObjectType)anObject atIndex:(NSUInteger)index;
- (void)removeLastObject;
- (void)removeObjectAtIndex:(NSUInteger)index;
- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(ObjectType)anObject;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end
@interface NSMutableArray<ObjectType> (NSExtendedMutableArray)
- (void)addObjectsFromArray:(NSArray<ObjectType> *)otherArray;
- (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2;
- (void)removeAllObjects;
- (void)removeObject:(ObjectType)anObject inRange:(NSRange)range;
- (void)removeObject:(ObjectType)anObject;
- (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
- (void)removeObjectIdenticalTo:(ObjectType)anObject;
- (void)removeObjectsFromIndices:(NSUInteger *)indices numIndices:(NSUInteger)cnt API_DEPRECATED("Not supported", macos(10.0,10.6), ios(2.0,4.0), watchos(2.0,2.0), tvos(9.0,9.0));
- (void)removeObjectsInArray:(NSArray<ObjectType> *)otherArray;
- (void)removeObjectsInRange:(NSRange)range;
- (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray<ObjectType> *)otherArray range:(NSRange)otherRange;
- (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray<ObjectType> *)otherArray;
- (void)setArray:(NSArray<ObjectType> *)otherArray;
- (void)sortUsingFunction:(NSInteger (NS_NOESCAPE *)(ObjectType, ObjectType, void * _Nullable))compare context:(nullable void *)context;
- (void)sortUsingSelector:(SEL)comparator;
- (void)insertObjects:(NSArray<ObjectType> *)objects atIndexes:(NSIndexSet *)indexes;
- (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withObjects:(NSArray<ObjectType> *)objects;
- (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
- (void)sortUsingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
- (void)sortWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
@end
@interface NSMutableArray<ObjectType> (NSMutableArrayCreation)
+ (instancetype)arrayWithCapacity:(NSUInteger)numItems;
+ (nullable NSMutableArray<ObjectType> *)arrayWithContentsOfFile:(NSString *)path;
+ (nullable NSMutableArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url;
- (nullable NSMutableArray<ObjectType> *)initWithContentsOfFile:(NSString *)path;
- (nullable NSMutableArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url;
@end
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
NS_SWIFT_UNAVAILABLE("NSMutableArray diffing methods are not available in Swift")
@interface NSMutableArray<ObjectType> (NSMutableArrayDiffing)
- (void)applyDifference:(NSOrderedCollectionDifference<ObjectType> *)difference;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h | /* NSValue.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSString, NSDictionary;
NS_ASSUME_NONNULL_BEGIN
@interface NSValue : NSObject <NSCopying, NSSecureCoding>
- (void)getValue:(void *)value size:(NSUInteger)size API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
@property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
- (instancetype)initWithBytes:(const void *)value objCType:(const char *)type NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end
@interface NSValue (NSValueCreation)
+ (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type;
+ (NSValue *)value:(const void *)value withObjCType:(const char *)type;
@end
@interface NSValue (NSValueExtensionMethods)
+ (NSValue *)valueWithNonretainedObject:(nullable id)anObject;
@property (nullable, readonly) id nonretainedObjectValue;
+ (NSValue *)valueWithPointer:(nullable const void *)pointer;
@property (nullable, readonly) void *pointerValue;
- (BOOL)isEqualToValue:(NSValue *)value;
@end
@interface NSNumber : NSValue
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithUnsignedLong:(unsigned long)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithLongLong:(long long)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithUnsignedLongLong:(unsigned long long)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithFloat:(float)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithDouble:(double)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithBool:(BOOL)value NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithInteger:(NSInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
- (NSNumber *)initWithUnsignedInteger:(NSUInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
@property (readonly) char charValue;
@property (readonly) unsigned char unsignedCharValue;
@property (readonly) short shortValue;
@property (readonly) unsigned short unsignedShortValue;
@property (readonly) int intValue;
@property (readonly) unsigned int unsignedIntValue;
@property (readonly) long longValue;
@property (readonly) unsigned long unsignedLongValue;
@property (readonly) long long longLongValue;
@property (readonly) unsigned long long unsignedLongLongValue;
@property (readonly) float floatValue;
@property (readonly) double doubleValue;
@property (readonly) BOOL boolValue;
@property (readonly) NSInteger integerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (readonly) NSUInteger unsignedIntegerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@property (readonly, copy) NSString *stringValue;
- (NSComparisonResult)compare:(NSNumber *)otherNumber;
- (BOOL)isEqualToNumber:(NSNumber *)number;
- (NSString *)descriptionWithLocale:(nullable id)locale;
@end
@interface NSNumber (NSNumberCreation)
+ (NSNumber *)numberWithChar:(char)value;
+ (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
+ (NSNumber *)numberWithShort:(short)value;
+ (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
+ (NSNumber *)numberWithInt:(int)value;
+ (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
+ (NSNumber *)numberWithLong:(long)value;
+ (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
+ (NSNumber *)numberWithLongLong:(long long)value;
+ (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
+ (NSNumber *)numberWithFloat:(float)value;
+ (NSNumber *)numberWithDouble:(double)value;
+ (NSNumber *)numberWithBool:(BOOL)value;
+ (NSNumber *)numberWithInteger:(NSInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
+ (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
@end
@interface NSValue (NSDeprecated)
/* This method is unsafe because it could potentially cause buffer overruns. You should use -getValue:size: instead.
*/
- (void)getValue:(void *)value API_DEPRECATED_WITH_REPLACEMENT("getValue:size:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSUbiquitousKeyValueStore.h | /* NSUbiquitousKeyValueStore.h
Copyright (c) 2011-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSNotification.h>
@class NSArray, NSDictionary<KeyType, ObjectType>, NSData, NSString;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.7), ios(5.0), tvos(9.0)) API_UNAVAILABLE(watchos)
@interface NSUbiquitousKeyValueStore : NSObject {
@private
id _private1;
id _private2;
id _private3;
void *_private4;
void *_reserved[3];
int _daemonWakeToken;
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
BOOL _disabledSuddenTermination;
#endif
}
@property (class, readonly, strong) NSUbiquitousKeyValueStore *defaultStore;
- (nullable id)objectForKey:(NSString *)aKey;
- (void)setObject:(nullable id)anObject forKey:(NSString *)aKey;
- (void)removeObjectForKey:(NSString *)aKey;
- (nullable NSString *)stringForKey:(NSString *)aKey;
- (nullable NSArray *)arrayForKey:(NSString *)aKey;
- (nullable NSDictionary<NSString *, id> *)dictionaryForKey:(NSString *)aKey;
- (nullable NSData *)dataForKey:(NSString *)aKey;
- (long long)longLongForKey:(NSString *)aKey;
- (double)doubleForKey:(NSString *)aKey;
- (BOOL)boolForKey:(NSString *)aKey;
- (void)setString:(nullable NSString *)aString forKey:(NSString *)aKey;
- (void)setData:(nullable NSData *)aData forKey:(NSString *)aKey;
- (void)setArray:(nullable NSArray *)anArray forKey:(NSString *)aKey;
- (void)setDictionary:(nullable NSDictionary<NSString *, id> *)aDictionary forKey:(NSString *)aKey;
- (void)setLongLong:(long long)value forKey:(NSString *)aKey;
- (void)setDouble:(double)value forKey:(NSString *)aKey;
- (void)setBool:(BOOL)value forKey:(NSString *)aKey;
@property (readonly, copy) NSDictionary<NSString *, id> *dictionaryRepresentation;
- (BOOL)synchronize;
@end
FOUNDATION_EXPORT NSNotificationName const NSUbiquitousKeyValueStoreDidChangeExternallyNotification API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSUbiquitousKeyValueStoreChangeReasonKey API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSUbiquitousKeyValueStoreChangedKeysKey API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
NS_ENUM(NSInteger) {
NSUbiquitousKeyValueStoreServerChange API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)),
NSUbiquitousKeyValueStoreInitialSyncChange API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)),
NSUbiquitousKeyValueStoreQuotaViolationChange API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)),
NSUbiquitousKeyValueStoreAccountChange API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0))
};
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSByteOrder.h | /* NSByteOrder.h
Copyright (c) 1995-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObjCRuntime.h>
#import <CoreFoundation/CFByteOrder.h>
enum {
NS_UnknownByteOrder = CFByteOrderUnknown,
NS_LittleEndian = CFByteOrderLittleEndian,
NS_BigEndian = CFByteOrderBigEndian
};
NS_INLINE long NSHostByteOrder(void) {
return CFByteOrderGetCurrent();
}
NS_INLINE unsigned short NSSwapShort(unsigned short inv) {
return CFSwapInt16(inv);
}
NS_INLINE unsigned int NSSwapInt(unsigned int inv) {
return CFSwapInt32(inv);
}
NS_INLINE unsigned long NSSwapLong(unsigned long inv) {
#if __LP64__
return CFSwapInt64(inv);
#else
return CFSwapInt32(inv);
#endif
}
NS_INLINE unsigned long long NSSwapLongLong(unsigned long long inv) {
return CFSwapInt64(inv);
}
NS_INLINE unsigned short NSSwapBigShortToHost(unsigned short x) {
return CFSwapInt16BigToHost(x);
}
NS_INLINE unsigned int NSSwapBigIntToHost(unsigned int x) {
return CFSwapInt32BigToHost(x);
}
NS_INLINE unsigned long NSSwapBigLongToHost(unsigned long x) {
#if __LP64__
return CFSwapInt64BigToHost(x);
#else
return CFSwapInt32BigToHost(x);
#endif
}
NS_INLINE unsigned long long NSSwapBigLongLongToHost(unsigned long long x) {
return CFSwapInt64BigToHost(x);
}
NS_INLINE unsigned short NSSwapHostShortToBig(unsigned short x) {
return CFSwapInt16HostToBig(x);
}
NS_INLINE unsigned int NSSwapHostIntToBig(unsigned int x) {
return CFSwapInt32HostToBig(x);
}
NS_INLINE unsigned long NSSwapHostLongToBig(unsigned long x) {
#if __LP64__
return CFSwapInt64HostToBig(x);
#else
return CFSwapInt32HostToBig(x);
#endif
}
NS_INLINE unsigned long long NSSwapHostLongLongToBig(unsigned long long x) {
return CFSwapInt64HostToBig(x);
}
NS_INLINE unsigned short NSSwapLittleShortToHost(unsigned short x) {
return CFSwapInt16LittleToHost(x);
}
NS_INLINE unsigned int NSSwapLittleIntToHost(unsigned int x) {
return CFSwapInt32LittleToHost(x);
}
NS_INLINE unsigned long NSSwapLittleLongToHost(unsigned long x) {
#if __LP64__
return CFSwapInt64LittleToHost(x);
#else
return CFSwapInt32LittleToHost(x);
#endif
}
NS_INLINE unsigned long long NSSwapLittleLongLongToHost(unsigned long long x) {
return CFSwapInt64LittleToHost(x);
}
NS_INLINE unsigned short NSSwapHostShortToLittle(unsigned short x) {
return CFSwapInt16HostToLittle(x);
}
NS_INLINE unsigned int NSSwapHostIntToLittle(unsigned int x) {
return CFSwapInt32HostToLittle(x);
}
NS_INLINE unsigned long NSSwapHostLongToLittle(unsigned long x) {
#if __LP64__
return CFSwapInt64HostToLittle(x);
#else
return CFSwapInt32HostToLittle(x);
#endif
}
NS_INLINE unsigned long long NSSwapHostLongLongToLittle(unsigned long long x) {
return CFSwapInt64HostToLittle(x);
}
typedef struct {unsigned int v;} NSSwappedFloat;
typedef struct {unsigned long long v;} NSSwappedDouble;
NS_INLINE NSSwappedFloat NSConvertHostFloatToSwapped(float x) {
union fconv {
float number;
NSSwappedFloat sf;
};
return ((union fconv *)&x)->sf;
}
NS_INLINE float NSConvertSwappedFloatToHost(NSSwappedFloat x) {
union fconv {
float number;
NSSwappedFloat sf;
};
return ((union fconv *)&x)->number;
}
NS_INLINE NSSwappedDouble NSConvertHostDoubleToSwapped(double x) {
union dconv {
double number;
NSSwappedDouble sd;
};
return ((union dconv *)&x)->sd;
}
NS_INLINE double NSConvertSwappedDoubleToHost(NSSwappedDouble x) {
union dconv {
double number;
NSSwappedDouble sd;
};
return ((union dconv *)&x)->number;
}
NS_INLINE NSSwappedFloat NSSwapFloat(NSSwappedFloat x) {
x.v = NSSwapInt(x.v);
return x;
}
NS_INLINE NSSwappedDouble NSSwapDouble(NSSwappedDouble x) {
x.v = NSSwapLongLong(x.v);
return x;
}
#if defined(__BIG_ENDIAN__)
NS_INLINE double NSSwapBigDoubleToHost(NSSwappedDouble x) {
return NSConvertSwappedDoubleToHost(x);
}
NS_INLINE float NSSwapBigFloatToHost(NSSwappedFloat x) {
return NSConvertSwappedFloatToHost(x);
}
NS_INLINE NSSwappedDouble NSSwapHostDoubleToBig(double x) {
return NSConvertHostDoubleToSwapped(x);
}
NS_INLINE NSSwappedFloat NSSwapHostFloatToBig(float x) {
return NSConvertHostFloatToSwapped(x);
}
NS_INLINE double NSSwapLittleDoubleToHost(NSSwappedDouble x) {
return NSConvertSwappedDoubleToHost(NSSwapDouble(x));
}
NS_INLINE float NSSwapLittleFloatToHost(NSSwappedFloat x) {
return NSConvertSwappedFloatToHost(NSSwapFloat(x));
}
NS_INLINE NSSwappedDouble NSSwapHostDoubleToLittle(double x) {
return NSSwapDouble(NSConvertHostDoubleToSwapped(x));
}
NS_INLINE NSSwappedFloat NSSwapHostFloatToLittle(float x) {
return NSSwapFloat(NSConvertHostFloatToSwapped(x));
}
#elif defined(__LITTLE_ENDIAN__)
NS_INLINE double NSSwapBigDoubleToHost(NSSwappedDouble x) {
return NSConvertSwappedDoubleToHost(NSSwapDouble(x));
}
NS_INLINE float NSSwapBigFloatToHost(NSSwappedFloat x) {
return NSConvertSwappedFloatToHost(NSSwapFloat(x));
}
NS_INLINE NSSwappedDouble NSSwapHostDoubleToBig(double x) {
return NSSwapDouble(NSConvertHostDoubleToSwapped(x));
}
NS_INLINE NSSwappedFloat NSSwapHostFloatToBig(float x) {
return NSSwapFloat(NSConvertHostFloatToSwapped(x));
}
NS_INLINE double NSSwapLittleDoubleToHost(NSSwappedDouble x) {
return NSConvertSwappedDoubleToHost(x);
}
NS_INLINE float NSSwapLittleFloatToHost(NSSwappedFloat x) {
return NSConvertSwappedFloatToHost(x);
}
NS_INLINE NSSwappedDouble NSSwapHostDoubleToLittle(double x) {
return NSConvertHostDoubleToSwapped(x);
}
NS_INLINE NSSwappedFloat NSSwapHostFloatToLittle(float x) {
return NSConvertHostFloatToSwapped(x);
}
#else
#error Do not know the endianess of this architecture
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSPersonNameComponentsFormatter.h | /* NSPersonNameComponentsFormatter.h
Copyright (c) 2015-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSPersonNameComponents.h>
#import <Foundation/NSFormatter.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, NSPersonNameComponentsFormatterStyle) {
NSPersonNameComponentsFormatterStyleDefault = 0,
/* Relies on user preferences and language defaults to display shortened form appropriate
for display in space-constrained settings, e.g. C Darwin */
NSPersonNameComponentsFormatterStyleShort,
/* The minimally necessary features for differentiation in a casual setting , e.g. Charles Darwin */
NSPersonNameComponentsFormatterStyleMedium,
/* The fully-qualified name complete with all known components, e.g. Charles Robert Darwin, FRS */
NSPersonNameComponentsFormatterStyleLong,
/* The maximally-abbreviated form of a name suitable for monograms, e.g. CRD) */
NSPersonNameComponentsFormatterStyleAbbreviated
} API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
typedef NS_OPTIONS (NSUInteger, NSPersonNameComponentsFormatterOptions) {
/* Indicates that the formatter should format the component object's phoneticRepresentation components instead of its own components.
The developer must have populated these manually. e.g.: Developer creates components object with the following properties:
<family:"Family", given:"Given", phoneticRepresentation:<family:"FamilyPhonetic", given:"GivenPhonetic">>.
If this option is specified, we perform formatting operations on <family "FamilyPhonetic", given "GivenPhonetic"> instead. */
NSPersonNameComponentsFormatterPhonetic = (1UL << 1)
} API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface NSPersonNameComponentsFormatter : NSFormatter {
@private
id _private;
}
/* Specify the formatting style for the formatted string on an instance. ShortStyle will fall back to user preferences and language-specific defaults
*/
@property NSPersonNameComponentsFormatterStyle style;
/* Specify that the formatter should only format the components object's phoneticRepresentation
*/
@property (getter=isPhonetic) BOOL phonetic;
/* Specifies the locale to format names. Defaults to autoupdatingCurrentLocale. Also resets to autoupdatingCurrentLocale on assignment of nil.
*/
@property (null_resettable, copy) NSLocale *locale API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
/* Shortcut for converting an NSPersonNameComponents object into a string without explicitly creating an instance.
Create an instance for greater customizability.
*/
+ (NSString *)localizedStringFromPersonNameComponents:(NSPersonNameComponents *)components
style:(NSPersonNameComponentsFormatterStyle)nameFormatStyle
options:(NSPersonNameComponentsFormatterOptions)nameOptions;
/* Convenience method on stringForObjectValue:. Returns a string containing the formatted value of the provided components object.
*/
- (NSString *)stringFromPersonNameComponents:(NSPersonNameComponents *)components;
/* Returns attributed string with annotations for each component. For each range, attributes can be obtained by querying
dictionary key NSPersonNameComponentKey , using NSPersonNameComponent constant values.
*/
- (NSAttributedString *)annotatedStringFromPersonNameComponents:(NSPersonNameComponents *)components;
/* Convenience method on getObjectValue:forString:error:. Returns an NSPersonNameComponents object representing the name components found in the provided string.
*/
- (nullable NSPersonNameComponents *)personNameComponentsFromString:(nonnull NSString *)string API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
- (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error;
@end
// Attributed String identifier key string
FOUNDATION_EXPORT NSString * const NSPersonNameComponentKey API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
// Constants for attributed strings
FOUNDATION_EXPORT NSString * const NSPersonNameComponentGivenName API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSPersonNameComponentFamilyName API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSPersonNameComponentMiddleName API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSPersonNameComponentPrefix API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSPersonNameComponentSuffix API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
FOUNDATION_EXPORT NSString * const NSPersonNameComponentNickname API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
/* The delimiter is the character or characters used to separate name components.
For CJK languages there is no delimiter.
*/
FOUNDATION_EXPORT NSString * const NSPersonNameComponentDelimiter API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSFileCoordinator.h | /*
NSFileCoordinator.h
Copyright (c) 2010-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSURL.h>
@class NSArray<ObjectType>, NSError, NSMutableDictionary, NSOperationQueue, NSSet<ObjectType>;
@protocol NSFilePresenter;
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(NSUInteger, NSFileCoordinatorReadingOptions) {
/* Whether reading does _not_ trigger sending of -savePresentedItemChangesWithCompletionHandler: to certain NSFilePresenters in the system and waiting for those NSFilePresenters to respond. The default behavior during coordinated reading is to send -savePresentedItemChangesWithCompletionHandler: to NSFilePresenters.
*/
NSFileCoordinatorReadingWithoutChanges = 1 << 0,
/* Whether reading of an item that might be a symbolic link file causes the resolution of the link if it is. This affects the URL passed to the block passed to an invocation of one of the -coordinateReadingItemAtURL:... methods. This is not a valid option to use with -prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:.
*/
NSFileCoordinatorReadingResolvesSymbolicLink = 1 << 1,
/* Whether the reading to be done will only attempt to get an item's metadata that is immediately available (name, modification date, tags, and other attributes), and not its contents. For ubiquitous items, specifying this option will cause coordinated reads to be granted immediately (barring other coordinated readers or writers or file presenters on the same system on the same system preventing this) instead of waiting for any downloading of contents or additional metadata like conflicting versions or thumbnails. Attempting to read the item's contents during such a coordinated read may give you unexpected results or fail.
*/
NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) = 1 << 2,
/* Whether reading of an item is being done for the purpose of uploading. When using this option, NSFileCoordinator will create a temporary snapshot of the item being read and will relinquish its claim on the file once that snapshot is made to avoid blocking other coordinated writes during a potentially long upload. If the item at the URL being read is a directory (such as a document package), then the snapshot will be a new file that contains the zipped contents of that directory, and the URL passed to the accessor block will locate that file.
When using this option, you may upload the document outside of the accessor block. However, you should open a file descriptor to the file or relocate the file within the accessor block before you do so, because NSFileCoordinator will unlink the file after the block returns, rendering it inaccessible via the URL.
*/
NSFileCoordinatorReadingForUploading API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) = 1 << 3,
};
typedef NS_OPTIONS(NSUInteger, NSFileCoordinatorWritingOptions) {
/* You can use only one of these writing options at a time. Using none of them indicates that the writing will simply update the item.
*/
/* Whether the writing to be done is actually the deletion of the item. This affects how the writing waits for previously scheduled coordinated reading and writing, how the writing causes subsequently scheduled reading and writing to wait, and what NSFilePresenter messaging is done. See the comments in the Single File Coordination section below. This option is how you trigger sending of -accommodatePresentedItemDeletionWithCompletionHandler: or -accommodatePresentedSubitemDeletionAtURL:completionHandler: messages to NSFilePresenters.
For example, Finder uses this when it's emptying the trash to give NSFilePresenters a chance to close documents before their files disappear, or would disappear if the files weren't still open.
*/
NSFileCoordinatorWritingForDeleting = 1 << 0,
/* Whether the writing to be done is actually the moving or renaming of the item. This affects how the writing waits for previously scheduled coordinated reading and writing, how the writing causes subsequently scheduled reading and writing to wait, and what NSFilePresenter messaging is done. See the comments in the Single File Coordination section below. This option has no effect when what's being moved is a plain file so you can use it in code that moves file system items without checking whether the items are files or directories. Any such check would invite a race condition anyway.
For example, Finder uses this when it's moving items that the user has dragged and dropped so as not to yank files contained by moved folders out from underneath applications that are reading or writing those files.
*/
NSFileCoordinatorWritingForMoving = 1 << 1,
/* Whether coordinated writing triggers sending of -savePresentedItemChangesWithCompletionHandler: to certain NSFilePresenters in the system and waiting for those NSFilePresenters to respond.
*/
NSFileCoordinatorWritingForMerging = 1 << 2,
/* Whether the writing to be done is actually the replacement of the item with a different item. It causes the same behavior as NSFileCoordinatorWritingForDeleting except that when the item being written to is renamed or moved while the writer is being made to wait the item is considered to have been a different item, so the writer is not passed an updated URL to reflect the renaming or moving. Use this when the moving or creation of an item will replace any item that gets in its way. To avoid a race condition use it regardless of whether there is actually an item in the way before the writing begins. Don't use this when simply updating the contents of a file, even if the way you do that is writing the contents to another file and renaming it into place. This is not a valid option to use with -prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:.
For example, NSDocument uses this for NSSaveAsOperation and NSSaveToOperation to announce that it is possibly overwriting an item with a brand new file or file package. This gives any NSFilePresenter of the overwritten item, including perhaps a different instance of NSDocument, perhaps in the same application, a chance to close itself before the item is overwritten.
For another example, the most accurate and safe way to coordinate a move is to invoke -coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor: using the NSFileCoordinatorWritingForMoving option with the source URL and NSFileCoordinatorWritingForReplacing with the destination URL.
*/
NSFileCoordinatorWritingForReplacing = 1 << 3,
/* Whether the writing to be done will change the item's metadata only and not its contents. If the item being written to is ubiquitous, then changes to the item's contents during this coordinated write may not be preserved or fail. When using this option, changing metadata that is related to the item's contents is not supported for ubiquitous items and such changes may not be preserved. For example, changing the value of NSURLTagNamesKey is supported, but changing the value of NSURLContentModificationDateKey is not.
*/
NSFileCoordinatorWritingContentIndependentMetadataOnly API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) = 1 << 4
};
API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
@interface NSFileAccessIntent : NSObject {
@private
NSURL *_url;
BOOL _isRead;
NSInteger _options;
}
+ (instancetype)readingIntentWithURL:(NSURL *)url options:(NSFileCoordinatorReadingOptions)options;
+ (instancetype)writingIntentWithURL:(NSURL *)url options:(NSFileCoordinatorWritingOptions)options;
@property (readonly, copy) NSURL *URL; // Use this URL within the accessor block. This property may change from its original value in response to actions from other writers.
@end
API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0))
@interface NSFileCoordinator : NSObject {
@private
id _accessArbiter;
id _fileReactor;
id _purposeID;
NSURL *_recentFilePresenterURL;
id _accessClaimIDOrIDs;
BOOL _isCancelled;
NSMutableDictionary *_movedItems;
}
#pragma mark *** File Presenters ***
/* The process' file presenters. If you invoke +addFilePresenter: you have to do a balancing invocation of +removeFilePresenter: before the file presenter is deallocated, even in a garbage-collected application.
If your application reads an item and then registers a file presenter for it there is a possible race condition in which between those two steps another process does coordinated reading or writing of the item, without any messages sent to your not-quite-registered file presenter. This can leave your file presenter ignorant of the fact that what it knows about the item it just read is already out of date, or under the misconception that just because it hasn't received a -relinquish... method it owns the item. To avoid that race condition you can invoke +addFilePresenter: in the same block that you pass to -coordinateReadingItemAtURL:options:error:byAccessor: to read what the file presenter will present.
*/
+ (void)addFilePresenter:(id<NSFilePresenter>)filePresenter;
+ (void)removeFilePresenter:(id<NSFilePresenter>)filePresenter;
@property (class, readonly, copy) NSArray<id<NSFilePresenter>> *filePresenters;
/* The designated initializer. If an NSFilePresenter is provided then the receiver is considered to have been created by that NSFilePresenter, or on its behalf.
NSFileCoordinator is meant to be instantiated on a per-file-operation basis, where a file operation is something like the opening or saving of a document, or the copying or moving of a batch of folders and files. There is no benefit to keeping an instance of it alive in your application for much more time than it takes to actually perform the file operation. Doing so can be harmful, or at least wasteful of memory, because NSFileCoordinators may retain NSFilePresenters.
You pass an NSFilePresenter to this initializer when the operation whose file access is to be coordinated is being performed by that NSFilePresenter. Associating an NSFileCoordinator with an NSFilePresenter accomplishes a few important things:
- It prevents the NSFileCoordinator from sending messages to that NSFilePresenter, so the NSFilePresenter does not have to somehow filter out messages about its own file operations. The exception to this rule is that messages about versions of the presented item being added, remove, or resolved during coordinated writing are sent to every relevant NSFilePresenter, even the one passed to -initWithFilePresenter:.
- It allows the file coordination mechanism to determine when coordinated writing is being done in response to an NSFilePresenter receiving a -savePresentedItemChangesWithCompletionHandler: message, and not deadlock. Usually coordinated writing done by one NSFileCoordinator must wait for coordinated reading of the same file or directory done by another NSFileCoordinator. But, for example, when coordinated reading is begun with one NSFileCoordinator, and that causes an NSFilePresenter to do coordinated writing using another NSFileCoordinator, the writing done with the second NSFileCoordinator should not wait for the completion of the first NSFileCoordinator's reading, it should instead happen while the first NSFileCoordinator is waiting to read.
- It allows the file coordination mechanism to handle a race condition that can occur when it has sent an NSFilePresenter a -presentedItemDidMoveToURL: message in the NSFilePresenter's operation queue but before that message is dequeued the NSFilePresenter enqueues, on a different queue, an operation using the old URL. For this to be effective however the NSFileCoordinator must be initialized in the same operation queue in which NSFilePresenter messages are received.
- It allows the file coordination mechanism to gracefully handle your application's registration of an NSFilePresenter that at first returns nil when sent -presentedItemURL but can later return non-nil at the end of doing a coordinated write that creates the presented item in the file system for the very first time. AppKit for example takes advantage of this by registering brand new untitled NSDocuments as NSFilePresenters immediately, instead of waiting until after the first time the user causes the document to be saved to a file, which would be more complicated.
For example, NSDocument creates a single NSFileCoordinator for all of the coordinated reading and writing it does during the saving of a document. It always creates the NSFileCoordinator in the main queue even when it is doing the actual coordinated reading and writing in a background queue to implement asynchronous saving.
*/
- (instancetype)initWithFilePresenter:(nullable id<NSFilePresenter>)filePresenterOrNil NS_DESIGNATED_INITIALIZER;
#pragma mark *** Purpose Identifier ***
/* A string that uniquely identifies the file access that will be done by this NSFileCoordinator. Every NSFileCoordinator has a unique purpose identifier that is created during initialization. Coordinated reads and writes performed by NSFileCoordinators with the same purpose identifier never block each other, even if they exist in different processes. In addition to some of the reasons explained in the comments of -initWithFilePresenter:, you may want to set a custom purpose identifier for the following reasons:
- Your application has an NSFileProviderExtension. Any file coordination done on behalf of the NSFileProviderExtension needs to be done using the same purpose identifier reported by your NSFileProviderExtension.
- To avoid deadlocking when two separate subsystems need to work together to perform one high-level operation, and both subsystems perform their own coordinated reads or writes.
If you are coordinating file access on behalf of an NSFilePresenter, you should use -initWithFilePresenter: and should not attempt to set a custom purpose identifier. Every NSFileCoordinator instance initialized with the same NSFilePresenter will have the same purpose identifier.
When creating custom purpose identifiers, you can use a reverse DNS style string, such as "com.mycompany.myapplication.mypurpose", or a UUID string. Nil and zero-length strings are not allowed.
Purpose identifiers can be set only once. If you attempt to set the purpose identifier of an NSFileCoordinator that you initialized with -initWithFilePresenter: or that you already assigned a purpose identifier, an exception will be thrown.
*/
@property (copy) NSString *purposeIdentifier API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
#pragma mark *** Asynchronous File Coordination ***
/* You can consider "item" in method names and comments in this header file to be an abbreviation of "fileOrDirectory." As always, a directory might actually be a file package.
The term "reader" refers to an invocation of -coordinateAccessWithIntents:queue:byAccessor: with at least one NSFileAccessIntent created with +readingIntentWithURL:options:. Similarly, the term "writer" refers to an invocation of -coordinateAccessWithIntents:queue:byAccessor: with at least one NSFileAccessIntent created with +writingIntentWithURL:optiosn:.
*/
/* Given an array of one or more NSFileAccessIntent objects that specify reading and/or writing items located by the corresponding URLs, wait asynchronously for certain other readers and writers and then invoke the passed-in block on the given queue, which must not be nil. If an error occurs, file access is not granted and a non-nil error will be passed to the accessor block. If file access is successfully granted, then 'error' will be nil and you may perform the intended file access inside the accessor block.
You must use the URL property on the NSFileAccessIntent objects when performing file access in the accessor block. Within the block, the NSFileAccessIntent objects' URLs may differ from their original values to account for items that have been moved or renamed while waiting for access to be granted. When access to the intended files is granted, certain other readers and writers are made to wait until the given block returns, which defines the end of that file access. Do not allow file access to continue after the accessor block returns by dispatching work to other threads or queues.
You can invoke this method to serialize your process's access of files and directories with other processes' access of the same files and directories so that inconsistencies due to overlapping reading and writing don't occur. It also causes messages to be sent to NSFilePresenters, and wait for NSFilePresenters to react, as described below. The fact that file system items can be moved or renamed while this method is waiting to invoke the block you passed when invoking it is why it's critical to use the URL property on the NSFileAccessIntent objects, not the URLs you used when initializing them.
In general a coordinated reader waits for a coordinated writer of the same item, and a coordinated writer waits for coordinated readers and other coordinated writers of the same item. Coordinated readers do not wait for each other. Coordinated reading or writing of items in a file package is treated as coordinated reading or writing of the file package as a whole. A coordinated reader of a directory that is not a file package does not wait for coordinated writers of contained items, or cause such writers to wait. With one exception, a coordinated writer of a directory that is not a file package does not wait for coordinated readers and writers of contained items, or cause such readers and writers to wait. The exception is when you use NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingForReplacing. They make your coordinated writer wait for previously scheduled coordinated readers and writers of contained items, and causes subsequently scheduled coordinated readers and writers of contained items to wait.
None of those rules apply to coordinated readers and writers that are using the exact same instance of NSFileCoordinator, including arrays of multiple NSFileAccessIntent objects. Instances of NSFileCoordinator never block themselves. You can take advantage of that in a couple of ways when invoking -coordinateAccessWithIntents:queue:byAccessor: multiple times on the same NSFileCoordinator instance, but take care because doing so raises the possibility of deadlocking with other processes that are doing the same sort of thing. If you can, you should invoke -coordinateAccessWithIntents:queue:byAccessor: a single time with multiple NSFileAccessIntent objects instead of invoking it multiple times with a single NSFileAccssIntent object.
In addition to waiting for writers, readers wait for NSFilePresenters that are messaged as part of the coordinated reading.
Coordinated reading of an item triggers the sending of messages to NSFilePresenters that implement the corresponding optional methods, even those in other processes, except the one specified when -initWithFilePresenter: was invoked:
- -relinquishPresentedItemToReader: is sent to NSFilePresenters of the item and, if the item is in a file package, NSFilePresenters of the file package. If there are nested file packages then the message is sent to NSFilePresenters of all of them.
- If NSFileCoordinatorReadingWithoutChanges is not used then -savePresentedItemChangesWithCompletionHandler: is also sent to the same NSFilePresenters.
In addition to waiting for readers and other writers, writers wait for NSFilePresenters that are messaged as part of the coordinated writing.
Coordinated writing of an item triggers the sending of messages to NSFilePresenters that implement the corresponding optional methods, even those in other processes, except the one specified when -initWithFilePresenter: was invoked:
- -relinquishPresentedItemToWriter: is sent to NSFilePresenters of the item and, if the item is in a file package, NSFilePresenters of the file package. If there are nested file packages then the message is sent to NSFilePresenters of all of them.
- If NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingForReplacing is used and the item is a directory then -relinquishPresentedItemToWriter: is also sent to NSFilePresenters of each item contained by it.
- If NSFileCoordinatorWritingForDeleting or NSFileCoordinatorWritingForReplacing is used then -accommodatePresentedItemDeletionWithCompletionHandler: is sent to NSFilePresenters of the item and, if the item is a directory, NSFilePresenters of each item contained by it. -accommodatePresentedSubitemDeletionAtURL:completionHandler: is sent to NSFilePresenters of each file package that contains the item.
- When NSFileCoordinatorWritingForReplacing is used the the definition of "the item" depends on what happened while waiting for other writers. See the description of it above.
- If NSFileCoordinatorWritingForMerging is used then -savePresentedItemChangesWithCompletionHandler: is sent to NSFilePresenters of the item and, if the item is in a file package, NSFilePresenters of the file package. If there are nested file packages then the message is sent to NSFilePresenters of all of them.
For both coordinated reading and writing, if there are multiple NSFilePresenters involved then the order in which they are messaged is undefined. If an NSFilePresenter signals failure then waiting will fail and *outError will be set to an NSError describing the failure.
*/
- (void)coordinateAccessWithIntents:(NSArray<NSFileAccessIntent *> *)intents queue:(NSOperationQueue *)queue byAccessor:(void (^)(NSError * _Nullable error))accessor API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
#pragma mark *** Synchronous File Coordination ***
/* The next four methods behave similarly to -coordinateAccessWithIntents:queue:byAccessor: with one or two NSFileAccessIntent objects with the following exceptions:
Each of these methods wait synchronously on the same thread they were invoked on before invoking the passed-in accessor block on the same thread, instead of waiting asynchronously and scheduling invocation of the block on a specific queue.
The accessor block of each of these methods is passed one or more URLs that locate the intended items, perhaps changed from the original URLs to take into account the fact that the item might have been moved or renamed during the waiting.
Each of these methods returns an NSError by reference instead of passing it to the accessory block. However, these methods are uncommon among Cocoa framework methods in that they don't also return a result indicating success or failure. The success of the waiting that they do is typically not interesting to invokers. Only the success of file system access done by the passed-in block is interesting. (The failure of either is of course interesting.) When invoking these methods it's cleanest to just declare a __block variable outside of the block and initialize it to a value that signals failure, and then inside the block set it to a value that signals success. If the waiting fails then the invoked method sets the error reference to an NSError that describes what went wrong, your block will not be invoked, your __block variable will not be set to a value that signals success, and all will be as it should be, with failure signaled and an NSError that describes the failure.
*/
- (void)coordinateReadingItemAtURL:(NSURL *)url options:(NSFileCoordinatorReadingOptions)options error:(NSError **)outError byAccessor:(void (NS_NOESCAPE ^)(NSURL *newURL))reader;
- (void)coordinateWritingItemAtURL:(NSURL *)url options:(NSFileCoordinatorWritingOptions)options error:(NSError **)outError byAccessor:(void (NS_NOESCAPE ^)(NSURL *newURL))writer;
- (void)coordinateReadingItemAtURL:(NSURL *)readingURL options:(NSFileCoordinatorReadingOptions)readingOptions writingItemAtURL:(NSURL *)writingURL options:(NSFileCoordinatorWritingOptions)writingOptions error:(NSError **)outError byAccessor:(void (NS_NOESCAPE ^)(NSURL *newReadingURL, NSURL *newWritingURL))readerWriter;
- (void)coordinateWritingItemAtURL:(NSURL *)url1 options:(NSFileCoordinatorWritingOptions)options1 writingItemAtURL:(NSURL *)url2 options:(NSFileCoordinatorWritingOptions)options2 error:(NSError **)outError byAccessor:(void (NS_NOESCAPE ^)(NSURL *newURL1, NSURL *newURL2))writer;
#pragma mark *** Batched File Coordination ***
/* Prepare to more efficiently do a large number of invocations of -coordinate... methods, first synchronously messaging and waiting for NSFilePresenters in a variation of what individual invocations of the -coordinate... methods would do, and then, if no error occurs, invoke the passed-in block. The passed-in block must invoke the completion handler passed to it when all of the coordinated reading and writing it does is done. The completion handler block can be invoked on any thread (or from any dispatch queue, if that's how you think of it). This method returns errors in the same manner as the -coordinate... methods.
The -coordinate... methods must use interprocess communication to message instances of NSFileCoordinator and NSFilePresenter in other processes in the system. That is an expense best avoided when reading or writing many files in one operation. Using this method can greatly reduce the amount of interprocess communication required by, for example, a large batched copying or moving of files. You use it by moving all of the invocations of the -coordinate... methods your application will do during a batch operation, or the scheduling of them if the operation's work is done in a multithreaded fashion, into a block and passing that block to an invocation of this method, remembering that the completion handler passed to that block must be invoked when the operation is done. You don't simply pass all URLs that will be passed into invocations of the -coordinate... methods when invoking this method. Instead you pass the top-level files and directories involved in the operation. This method triggers messages to not just NSFilePresenters of those items, but also NSFilePresenters of items contained by those items. For example, when Finder uses this method during a copy operation readingURLs is an array of the URLs of the exact files and folders that the user has selected, even though those folders may contain many files and subfolders for which Finder is going to do coordinated reading, and writingURLs is an array that contains just the URL of the destination folder.
In most cases it is redundant to pass the same reading or writing options in an invocation of this method as are passed to individual invocations of the -coordinate... methods invoked by the block passed to an invocation of this method. For example, when Finder invokes this method during a copy operation it does not pass NSFileCoordinatorReadingWithoutChanges because it is appropriate to trigger the saving of document changes right away, but it does pass it when doing the nested invocations of -coordinate... methods because it is not necessary to trigger saving again, even if the user changes the document before the Finder proceeds far enough to actually copy that document's file.
*/
- (void)prepareForReadingItemsAtURLs:(NSArray<NSURL *> *)readingURLs options:(NSFileCoordinatorReadingOptions)readingOptions writingItemsAtURLs:(NSArray<NSURL *> *)writingURLs options:(NSFileCoordinatorWritingOptions)writingOptions error:(NSError **)outError byAccessor:(void (NS_NOESCAPE ^)(void (^completionHandler)(void)))batchAccessor;
#pragma mark *** Renaming and Moving Notification ***
/*Announce that the item located by a URL is going to be located by another URL.
Support for App Sandbox on OS X. Some applications can rename files while saving them. For example, when a user adds attachments to a rich text document, TextEdit changes the document's extension from .rtf to .rtfd. A sandboxed application like TextEdit must ordinarily prompt the user for approval before renaming a document. You can invoke this method to make your process declare its intent to rename a document without user approval. After the renaming succeeds you must invoke -itemAtURL:didMoveToURL:, with the same arguments, for the process to keep access to the file with its new name and to give up access to any file that appears with the old name. If the renaming fails you should probably not invoke -itemAtURL:didMoveToURL:.
There is no reason to invoke this method from applications that do not use App Sandbox. Invoking it does nothing on iOS.
*/
- (void)itemAtURL:(NSURL *)oldURL willMoveToURL:(NSURL *)newURL API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
/* Announce that the item located by a URL is now located by another URL.
This triggers the sending of messages to NSFilePresenters that implement the corresponding optional methods, even those in other processes, except the one specified when -initWithFilePresenter: was invoked:
- -presentedItemDidMoveToURL: is sent to NSFilePresenters of the item.
- If the item is a directory then -presentedItemDidMoveToURL: is sent to NSFilePresenters of each item contained by it.
- -presentedSubitemAtURL:didMoveToURL: is sent to NSFilePresenters of each directory that contains the item, unless that method is not implemented but -presentedItemDidChange is, and the directory is actually a file package, in which case -presentedItemDidChange is sent instead.
This also balances invocations of -itemAtURL:willMoveToURL:, as described above.
Useless invocations of this method are harmless, so you don't have to write code that compares NSURLs for equality, which is not straightforward. This method must be invoked from within the block passed to an invocation of -coordinateAccessWithIntents:queue:byAccessory:, -coordinateWritingItemAtURL:options:error:byAccessor:, or -coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:.
*/
- (void)itemAtURL:(NSURL *)oldURL didMoveToURL:(NSURL *)newURL;
#pragma mark *** Ubiquity Attribute Change Notification ***
/* Announce that the item located by a URL has changed one or more ubiquity attributes. See NSFilePresenter.observedPresentedItemUbiquityAttributes for an explanation of valid attributes.
This triggers the sending of messages to NSFilePresenters that implement -presentedItemDidChangeUbiquityAttibutes:, even those in other processes.
*/
- (void)itemAtURL:(NSURL *)url didChangeUbiquityAttributes:(NSSet <NSURLResourceKey> *)attributes API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(watchos, tvos);
#pragma mark *** Cancellation ***
/* Cancel all invocations of -coordinate... and -prepare... methods for the receiver. Any current invocation of one of those methods will stop waiting and return immediately, unless it has already invoked the passed-in block, in which case it will return when the passed-in block returns. Subsequent invocations of those methods will not invoke the blocks passed into them at all. When an invocation of -coordinate... or -prepare... returns without invoking the passed-in block because this method was invoked it instead returns an error whose domain is NSCocoaErrorDomain and whose code is NSUserCancelledError. Messages that have already been sent to NSFilePresenters will not be cancelled but the file coordination machinery will stop waiting for the replies.
This method can be invoked from any thread. It always returns immediately, without waiting for anything. Cancellation is racy; you usually cannot assume that no block passed into a -coordinate... or -prepare... method is already being invoked, so the code inside those blocks typically still has to check for cancellation, whatever that means in your application.
*/
- (void)cancel;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSURLProtocol.h | /*
NSURLProtocol.h
Copyright (c) 2003-2019, Apple Inc. All rights reserved.
Public header file.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSURLCache.h>
@class NSCachedURLResponse;
@class NSError;
@class NSMutableURLRequest;
@class NSURLAuthenticationChallenge;
@class NSURLConnection;
@class NSURLProtocol;
@class NSURLProtocolInternal;
@class NSURLRequest;
@class NSURLResponse;
@class NSURLSessionTask;
NS_ASSUME_NONNULL_BEGIN
/*!
@header NSURLProtocol.h
This header file describes the constructs used to represent URL
protocols, and describes the extensible system by which specific
classes can be made to handle the loading of particular URL types or
schemes.
<p>NSURLProtocol is an abstract class which provides the
basic structure for performing protocol-specific loading of URL
data.
<p>The NSURLProtocolClient describes the integration points a
protocol implemention can use to hook into the URL loading system.
NSURLProtocolClient describes the methods a protocol implementation
needs to drive the URL loading system from a NSURLProtocol subclass.
<p>To support customization of protocol-specific requests,
protocol implementors are encouraged to provide categories on
NSURLRequest and NSMutableURLRequest. Protocol implementors who
need to extend the capabilities of NSURLRequest and
NSMutableURLRequest in this way can store and retrieve
protocol-specific request data by using the
<tt>+propertyForKey:inRequest:</tt> and
<tt>+setProperty:forKey:inRequest:</tt> class methods on
NSURLProtocol. See the NSHTTPURLRequest on NSURLRequest and
NSMutableHTTPURLRequest on NSMutableURLRequest for examples of
such extensions.
<p>An essential responsibility for a protocol implementor is
creating a NSURLResponse for each request it processes successfully.
A protocol implementor may wish to create a custom, mutable
NSURLResponse class to aid in this work.
*/
/*!
@protocol NSURLProtocolClient
@discussion NSURLProtocolClient provides the interface to the URL
loading system that is intended for use by NSURLProtocol
implementors.
*/
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
@protocol NSURLProtocolClient <NSObject>
/*!
@method URLProtocol:wasRedirectedToRequest:
@abstract Indicates to an NSURLProtocolClient that a redirect has
occurred.
@param protocol the NSURLProtocol object sending the message.
@param request the NSURLRequest to which the protocol implementation
has redirected.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol wasRedirectedToRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse;
/*!
@method URLProtocol:cachedResponseIsValid:
@abstract Indicates to an NSURLProtocolClient that the protocol
implementation has examined a cached response and has
determined that it is valid.
@param protocol the NSURLProtocol object sending the message.
@param cachedResponse the NSCachedURLResponse object that has
examined and is valid.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol cachedResponseIsValid:(NSCachedURLResponse *)cachedResponse;
/*!
@method URLProtocol:didReceiveResponse:
@abstract Indicates to an NSURLProtocolClient that the protocol
implementation has created an NSURLResponse for the current load.
@param protocol the NSURLProtocol object sending the message.
@param response the NSURLResponse object the protocol implementation
has created.
@param policy The NSURLCacheStoragePolicy the protocol
has determined should be used for the given response if the
response is to be stored in a cache.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol didReceiveResponse:(NSURLResponse *)response cacheStoragePolicy:(NSURLCacheStoragePolicy)policy;
/*!
@method URLProtocol:didLoadData:
@abstract Indicates to an NSURLProtocolClient that the protocol
implementation has loaded URL data.
@discussion The data object must contain only new data loaded since
the previous call to this method (if any), not cumulative data for
the entire load.
@param protocol the NSURLProtocol object sending the message.
@param data URL load data being made available.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol didLoadData:(NSData *)data;
/*!
@method URLProtocolDidFinishLoading:
@abstract Indicates to an NSURLProtocolClient that the protocol
implementation has finished loading successfully.
@param protocol the NSURLProtocol object sending the message.
*/
- (void)URLProtocolDidFinishLoading:(NSURLProtocol *)protocol;
/*!
@method URLProtocol:didFailWithError:
@abstract Indicates to an NSURLProtocolClient that the protocol
implementation has failed to load successfully.
@param protocol the NSURLProtocol object sending the message.
@param error The error that caused the load to fail.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol didFailWithError:(NSError *)error;
/*!
@method URLProtocol:didReceiveAuthenticationChallenge:
@abstract Start authentication for the specified request
@param protocol The protocol object requesting authentication.
@param challenge The authentication challenge.
@discussion The protocol client guarantees that it will answer the
request on the same thread that called this method. It may add a
default credential to the challenge it issues to the connection delegate,
if the protocol did not provide one.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
/*!
@method URLProtocol:didCancelAuthenticationChallenge:
@abstract Cancel authentication for the specified request
@param protocol The protocol object cancelling authentication.
@param challenge The authentication challenge.
*/
- (void)URLProtocol:(NSURLProtocol *)protocol didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
@end
/*!
@class NSURLProtocol
@abstract NSURLProtocol is an abstract class which provides the
basic structure for performing protocol-specific loading of URL
data. Concrete subclasses handle the specifics associated with one
or more protocols or URL schemes.
*/
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
@interface NSURLProtocol : NSObject
{
@private
NSURLProtocolInternal *_internal;
}
/*!
@method initWithRequest:cachedResponse:client:
@abstract Initializes an NSURLProtocol given request,
cached response, and client.
@param request The request to load.
@param cachedResponse A response that has been retrieved from the
cache for the given request. The protocol implementation should
apply protocol-specific validity checks if such tests are
necessary.
@param client The NSURLProtocolClient object that serves as the
interface the protocol implementation can use to report results back
to the URL loading system.
*/
- (instancetype)initWithRequest:(NSURLRequest *)request cachedResponse:(nullable NSCachedURLResponse *)cachedResponse client:(nullable id <NSURLProtocolClient>)client NS_DESIGNATED_INITIALIZER;
/*!
@abstract Returns the NSURLProtocolClient of the receiver.
@result The NSURLProtocolClient of the receiver.
*/
@property (nullable, readonly, retain) id <NSURLProtocolClient> client;
/*!
@abstract Returns the NSURLRequest of the receiver.
@result The NSURLRequest of the receiver.
*/
@property (readonly, copy) NSURLRequest *request;
/*!
@abstract Returns the NSCachedURLResponse of the receiver.
@result The NSCachedURLResponse of the receiver.
*/
@property (nullable, readonly, copy) NSCachedURLResponse *cachedResponse;
/*======================================================================
Begin responsibilities for protocol implementors
The methods between this set of begin-end markers must be
implemented in order to create a working protocol.
======================================================================*/
/*!
@method canInitWithRequest:
@abstract This method determines whether this protocol can handle
the given request.
@discussion A concrete subclass should inspect the given request and
determine whether or not the implementation can perform a load with
that request. This is an abstract method. Sublasses must provide an
implementation.
@param request A request to inspect.
@result YES if the protocol can handle the given request, NO if not.
*/
+ (BOOL)canInitWithRequest:(NSURLRequest *)request;
/*!
@method canonicalRequestForRequest:
@abstract This method returns a canonical version of the given
request.
@discussion It is up to each concrete protocol implementation to
define what "canonical" means. However, a protocol should
guarantee that the same input request always yields the same
canonical form. Special consideration should be given when
implementing this method since the canonical form of a request is
used to look up objects in the URL cache, a process which performs
equality checks between NSURLRequest objects.
<p>
This is an abstract method; sublasses must provide an
implementation.
@param request A request to make canonical.
@result The canonical form of the given request.
*/
+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request;
/*!
@method requestIsCacheEquivalent:toRequest:
@abstract Compares two requests for equivalence with regard to caching.
@discussion Requests are considered euqivalent for cache purposes
if and only if they would be handled by the same protocol AND that
protocol declares them equivalent after performing
implementation-specific checks.
@result YES if the two requests are cache-equivalent, NO otherwise.
*/
+ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b;
/*!
@method startLoading
@abstract Starts protocol-specific loading of a request.
@discussion When this method is called, the protocol implementation
should start loading a request.
*/
- (void)startLoading;
/*!
@method stopLoading
@abstract Stops protocol-specific loading of a request.
@discussion When this method is called, the protocol implementation
should end the work of loading a request. This could be in response
to a cancel operation, so protocol implementations must be able to
handle this call while a load is in progress.
*/
- (void)stopLoading;
/*======================================================================
End responsibilities for protocol implementors
======================================================================*/
/*!
@method propertyForKey:inRequest:
@abstract Returns the property in the given request previously
stored with the given key.
@discussion The purpose of this method is to provide an interface
for protocol implementors to access protocol-specific information
associated with NSURLRequest objects.
@param key The string to use for the property lookup.
@param request The request to use for the property lookup.
@result The property stored with the given key, or nil if no property
had previously been stored with the given key in the given request.
*/
+ (nullable id)propertyForKey:(NSString *)key inRequest:(NSURLRequest *)request;
/*!
@method setProperty:forKey:inRequest:
@abstract Stores the given property in the given request using the
given key.
@discussion The purpose of this method is to provide an interface
for protocol implementors to customize protocol-specific
information associated with NSMutableURLRequest objects.
@param value The property to store.
@param key The string to use for the property storage.
@param request The request in which to store the property.
*/
+ (void)setProperty:(id)value forKey:(NSString *)key inRequest:(NSMutableURLRequest *)request;
/*!
@method removePropertyForKey:inRequest:
@abstract Remove any property stored under the given key
@discussion Like setProperty:forKey:inRequest: above, the purpose of this
method is to give protocol implementors the ability to store
protocol-specific information in an NSURLRequest
@param key The key whose value should be removed
@param request The request to be modified
*/
+ (void)removePropertyForKey:(NSString *)key inRequest:(NSMutableURLRequest *)request;
/*!
@method registerClass:
@abstract This method registers a protocol class, making it visible
to several other NSURLProtocol class methods.
@discussion When the URL loading system begins to load a request,
each protocol class that has been registered is consulted in turn to
see if it can be initialized with a given request. The first
protocol handler class to provide a YES answer to
<tt>+canInitWithRequest:</tt> "wins" and that protocol
implementation is used to perform the URL load. There is no
guarantee that all registered protocol classes will be consulted.
Hence, it should be noted that registering a class places it first
on the list of classes that will be consulted in calls to
<tt>+canInitWithRequest:</tt>, moving it in front of all classes
that had been registered previously.
<p>A similar design governs the process to create the canonical form
of a request with the <tt>+canonicalRequestForRequest:</tt> class
method.
@param protocolClass the class to register.
@result YES if the protocol was registered successfully, NO if not.
The only way that failure can occur is if the given class is not a
subclass of NSURLProtocol.
*/
+ (BOOL)registerClass:(Class)protocolClass;
/*!
@method unregisterClass:
@abstract This method unregisters a protocol.
@discussion After unregistration, a protocol class is no longer
consulted in calls to NSURLProtocol class methods.
@param protocolClass The class to unregister.
*/
+ (void)unregisterClass:(Class)protocolClass;
@end
@interface NSURLProtocol (NSURLSessionTaskAdditions)
+ (BOOL)canInitWithTask:(NSURLSessionTask *)task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
- (instancetype)initWithTask:(NSURLSessionTask *)task cachedResponse:(nullable NSCachedURLResponse *)cachedResponse client:(nullable id <NSURLProtocolClient>)client API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
@property (nullable, readonly, copy) NSURLSessionTask *task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSMethodSignature.h | /* NSMethodSignature.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_UNAVAILABLE("NSInvocation and related APIs not available")
@interface NSMethodSignature : NSObject
+ (nullable NSMethodSignature *)signatureWithObjCTypes:(const char *)types;
@property (readonly) NSUInteger numberOfArguments;
- (const char *)getArgumentTypeAtIndex:(NSUInteger)idx NS_RETURNS_INNER_POINTER;
@property (readonly) NSUInteger frameLength;
- (BOOL)isOneway;
@property (readonly) const char *methodReturnType NS_RETURNS_INNER_POINTER;
@property (readonly) NSUInteger methodReturnLength;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurementFormatter.h | /*
NSMeasurementFormatter.h
Copyright (c) 2015-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSFormatter.h>
#import <Foundation/NSNumberFormatter.h>
#import <Foundation/NSMeasurement.h>
#import <Foundation/NSLocale.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(NSUInteger, NSMeasurementFormatterUnitOptions) {
NSMeasurementFormatterUnitOptionsProvidedUnit = (1UL << 0), // e.g This ensures the formatter uses this unit even if it is not the preferred unit of the set locale.
NSMeasurementFormatterUnitOptionsNaturalScale = (1UL << 1), // e.g. This would make the formatter show "12 kilometers" instead of "12000 meters". Note that setting NSMeasurementFormatterUnitOptionsNaturalScale results in scaling within the unit system of the preferred unit of the locale. To scale within the unit system of the provided unit, set NSMeasurementFormatterUnitOptionsNaturalScale | NSMeasurementFormatterUnitOptionsProvidedUnit.
NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = (1UL << 2), // e.g. This would display "90°" rather than "90°F" or "90°C"
} API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
@interface NSMeasurementFormatter : NSFormatter <NSSecureCoding> {
@private
void *_formatter;
}
/*
This property can be set to ensure that the formatter behaves in a way the developer expects, even if it is not standard according to the preferences of the user's locale. If not specified, unitOptions defaults to localizing according to the preferences of the locale.
Ex:
By default, if unitOptions is set to the empty set, the formatter will do the following:
- kilocalories may be formatted as "C" instead of "kcal" depending on the locale.
- kilometersPerHour may be formatted as "miles per hour" for US and UK locales but "kilometers per hour" for other locales.
However, if NSMeasurementFormatterUnitOptionsProvidedUnit is set, the formatter will do the following:
- kilocalories would be formatted as "kcal" in the language of the locale, even if the locale prefers "C".
- kilometersPerHour would be formatted as "kilometers per hour" for US and UK locales even though the preference is for "miles per hour."
Note that NSMeasurementFormatter will handle converting measurement objects to the preferred units in a particular locale. For instance, if provided a measurement object in kilometers and the set locale is en_US, the formatter will implicitly convert the measurement object to miles and return the formatted string as the equivalent measurement in miles.
*/
@property NSMeasurementFormatterUnitOptions unitOptions;
/*
If not specified, unitStyle is set to NSFormattingUnitStyleMedium.
*/
@property NSFormattingUnitStyle unitStyle;
/*
If not specified, locale is set to the user's current locale.
*/
@property (null_resettable, copy) NSLocale *locale;
/*
If not specified, the number formatter is set up with NSNumberFormatterDecimalStyle.
*/
@property (null_resettable, copy) NSNumberFormatter *numberFormatter;
- (NSString *)stringFromMeasurement:(NSMeasurement *)measurement;
/*
@param An NSUnit
@return A formatted string representing the localized form of the unit without a value attached to it. This method will return [unit symbol] if the provided unit cannot be localized.
*/
- (NSString *)stringFromUnit:(NSUnit *)unit;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Headers/NSScanner.h | /* NSScanner.h
Copyright (c) 1994-2019, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
@class NSString, NSCharacterSet, NSDictionary;
NS_ASSUME_NONNULL_BEGIN
// Some of these API are deprecated in Swift only. They remain available in Objective-C.
#if defined(__swift__)
#define _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT(...) API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__)
#else
#define _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT(...)
#endif
@interface NSScanner : NSObject <NSCopying>
@property (readonly, copy) NSString *string;
@property NSUInteger scanLocation _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("currentIndex", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
@property (nullable, copy) NSCharacterSet *charactersToBeSkipped;
@property BOOL caseSensitive;
@property (nullable, retain) id locale;
- (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER;
@end
@interface NSScanner (NSExtendedScanner)
// On overflow, the below methods will return success and clamp
- (BOOL)scanInt:(nullable int *)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanInt()", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanInteger:(nullable NSInteger *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanInt()", macos(10.5,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanLongLong:(nullable long long *)result;
- (BOOL)scanUnsignedLongLong:(nullable unsigned long long *)result API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)) _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanUnsignedLongLong()", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanFloat:(nullable float *)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanFloat()", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanDouble:(nullable double *)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanDouble()", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanHexInt:(nullable unsigned *)result // Optionally prefixed with "0x" or "0X"
_NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanHexInt()", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanHexLongLong:(nullable unsigned long long *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) // Optionally prefixed with "0x" or "0X"
_NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanHexLongLong()", macos(10.5,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanHexFloat:(nullable float *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) // Corresponding to %a or %A formatting. Requires "0x" or "0X" prefix.
_NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanHexFloat()", macos(10.5,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanHexDouble:(nullable double *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) // Corresponding to %a or %A formatting. Requires "0x" or "0X" prefix.
_NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanHexDouble()", macos(10.5,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanString:(NSString *)string intoString:(NSString * _Nullable * _Nullable)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanString(_:)", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable * _Nullable)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanCharacters(from:)", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanUpToString:(NSString *)string intoString:(NSString * _Nullable * _Nullable)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanUpTo(_:)", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
- (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable * _Nullable)result _NS_SCANNER_DEPRECATED_FOR_SWIFT_ONLY_WITH_REPLACEMENT("scanUpToCharacters(from:)", macos(10.0,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
@property (getter=isAtEnd, readonly) BOOL atEnd;
+ (instancetype)scannerWithString:(NSString *)string;
+ (id)localizedScannerWithString:(NSString *)string;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Foundation.framework/Modules/module.modulemap | framework module Foundation [extern_c] [system] {
umbrella header "Foundation.h"
export *
module * {
export *
}
explicit module NSDebug {
header "NSDebug.h"
export *
}
// Use NSItemProvider.h
exclude header "NSItemProviderReadingWriting.h"
}
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/QuartzCore.tbd | --- !tapi-tbd
tbd-version: 4
targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst,
arm64e-macos, arm64e-maccatalyst ]
uuids:
- target: x86_64-macos
value: 02A32CE1-B8EA-3A62-AA18-7B8D1A503403
- target: x86_64-maccatalyst
value: 02A32CE1-B8EA-3A62-AA18-7B8D1A503403
- target: arm64-macos
value: 00000000-0000-0000-0000-000000000000
- target: arm64-maccatalyst
value: 00000000-0000-0000-0000-000000000000
- target: arm64e-macos
value: E1777344-AC02-314A-BBC4-33E10BD4BC79
- target: arm64e-maccatalyst
value: E1777344-AC02-314A-BBC4-33E10BD4BC79
install-name: '/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore'
current-version: 1.11
compatibility-version: 1.2
exports:
- targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst,
arm64-macos, arm64-maccatalyst ]
symbols: [ _CAAtomGetString, _CABackingStoreBeginUpdate, _CABackingStoreCollect,
_CABackingStoreCollectBlocking, _CABackingStoreCopyCGImage,
_CABackingStoreCopyTintColor, _CABackingStoreCreate, _CABackingStoreEndUpdate,
_CABackingStoreGetTypeID, _CABackingStoreGetUpdateRegion,
_CABackingStoreHasVerticalPadding, _CABackingStoreInvalidate,
_CABackingStoreIsPurged, _CABackingStoreIsVolatile, _CABackingStoreRetainFrontTexture,
_CABackingStoreSetColorSpace, _CABackingStoreSetVolatile,
_CABackingStoreSetVolatileOptions, _CABackingStoreUpdate,
_CACFAnimationCreate, _CACFAnimationGetAnimations, _CACFAnimationGetAutoreverses,
_CACFAnimationGetBeginTime, _CACFAnimationGetBiasValues, _CACFAnimationGetByValue,
_CACFAnimationGetCalculationMode, _CACFAnimationGetClass,
_CACFAnimationGetContinuityValues, _CACFAnimationGetDamping,
_CACFAnimationGetDuration, _CACFAnimationGetEndAngle, _CACFAnimationGetEndProgress,
_CACFAnimationGetFillMode, _CACFAnimationGetFilter, _CACFAnimationGetFrameInterval,
_CACFAnimationGetFromValue, _CACFAnimationGetKeyPath, _CACFAnimationGetKeyTimes,
_CACFAnimationGetMass, _CACFAnimationGetPath, _CACFAnimationGetRepeatCount,
_CACFAnimationGetRepeatDuration, _CACFAnimationGetRotationMode,
_CACFAnimationGetRoundsToInteger, _CACFAnimationGetSpeed,
_CACFAnimationGetStartAngle, _CACFAnimationGetStartProgress,
_CACFAnimationGetStiffness, _CACFAnimationGetSubtype, _CACFAnimationGetTensionValues,
_CACFAnimationGetTimeOffset, _CACFAnimationGetTimingFunction,
_CACFAnimationGetTimingFunctions, _CACFAnimationGetToValue,
_CACFAnimationGetType, _CACFAnimationGetTypeID, _CACFAnimationGetUserData,
_CACFAnimationGetValueFunction, _CACFAnimationGetValues, _CACFAnimationIsAdditive,
_CACFAnimationIsCumulative, _CACFAnimationIsEnabled, _CACFAnimationIsRemovedOnCompletion,
_CACFAnimationSetAdditive, _CACFAnimationSetAnimations, _CACFAnimationSetAutoreverses,
_CACFAnimationSetBeginTime, _CACFAnimationSetBiasValues, _CACFAnimationSetByValue,
_CACFAnimationSetCalculationMode, _CACFAnimationSetContinuityValues,
_CACFAnimationSetCumulative, _CACFAnimationSetDamping, _CACFAnimationSetDuration,
_CACFAnimationSetEnabled, _CACFAnimationSetEndAngle, _CACFAnimationSetEndProgress,
_CACFAnimationSetFillMode, _CACFAnimationSetFilter, _CACFAnimationSetFrameInterval,
_CACFAnimationSetFromValue, _CACFAnimationSetKeyPath, _CACFAnimationSetKeyTimes,
_CACFAnimationSetMass, _CACFAnimationSetPath, _CACFAnimationSetRemovedOnCompletion,
_CACFAnimationSetRepeatCount, _CACFAnimationSetRepeatDuration,
_CACFAnimationSetRotationMode, _CACFAnimationSetRoundsToInteger,
_CACFAnimationSetSpeed, _CACFAnimationSetStartAngle, _CACFAnimationSetStartProgress,
_CACFAnimationSetStiffness, _CACFAnimationSetSubtype, _CACFAnimationSetTensionValues,
_CACFAnimationSetTimeOffset, _CACFAnimationSetTimingFunction,
_CACFAnimationSetTimingFunctions, _CACFAnimationSetToValue,
_CACFAnimationSetType, _CACFAnimationSetUserData, _CACFAnimationSetValueFunction,
_CACFAnimationSetValues, _CACFCAMLParserCreate, _CACFCAMLParserGetBaseURL,
_CACFCAMLParserGetError, _CACFCAMLParserGetObject, _CACFCAMLParserGetResult,
_CACFCAMLParserGetTypeID, _CACFCAMLParserParseBytes, _CACFCAMLParserParseContentsOfURL,
_CACFCAMLParserParseData, _CACFCAMLParserParseString, _CACFCAMLParserSetBaseURL,
_CACFContextCreate, _CACFContextFlush, _CACFContextGetColorSpace,
_CACFContextGetLastCommitTime, _CACFContextGetLayer, _CACFContextGetRenderContext,
_CACFContextGetTypeID, _CACFContextGetUserData, _CACFContextInvalidate,
_CACFContextSetClientPort, _CACFContextSetColorSpace, _CACFContextSetLayer,
_CACFContextSetUserData, _CACFFilterCreate, _CACFFilterGetName,
_CACFFilterGetType, _CACFFilterGetTypeID, _CACFFilterGetUserData,
_CACFFilterIsEnabled, _CACFFilterSetEnabled, _CACFFilterSetName,
_CACFFilterSetUserData, _CACFFilterSetValue, _CACFLayerAddAnimation,
_CACFLayerContentsAreFlipped, _CACFLayerConvertPoint, _CACFLayerConvertRect,
_CACFLayerConvertTime, _CACFLayerCreate, _CACFLayerDisplay,
_CACFLayerGetAffineTransform, _CACFLayerGetAllowsHitTesting,
_CACFLayerGetAnchorPoint, _CACFLayerGetAnchorPointZ, _CACFLayerGetAutoreverses,
_CACFLayerGetBackgroundColor, _CACFLayerGetBackgroundFilters,
_CACFLayerGetBeginTime, _CACFLayerGetBorderColor, _CACFLayerGetBorderWidth,
_CACFLayerGetBounds, _CACFLayerGetClass, _CACFLayerGetClearsContext,
_CACFLayerGetCompositingFilter, _CACFLayerGetContents, _CACFLayerGetContentsCenter,
_CACFLayerGetContentsFormat, _CACFLayerGetContentsGravity,
_CACFLayerGetContentsOpaque, _CACFLayerGetContentsRect, _CACFLayerGetContentsScale,
_CACFLayerGetContentsScaling, _CACFLayerGetContentsTransform,
_CACFLayerGetContext, _CACFLayerGetContextId, _CACFLayerGetCornerRadius,
_CACFLayerGetDuration, _CACFLayerGetEdgeAntialiasingMask,
_CACFLayerGetFillMode, _CACFLayerGetFilters, _CACFLayerGetFrame,
_CACFLayerGetFrameTransform, _CACFLayerGetHitTestsAsOpaque,
_CACFLayerGetInvertsShadow, _CACFLayerGetMagnificationFilter,
_CACFLayerGetMask, _CACFLayerGetMasksToBounds, _CACFLayerGetMeshTransform,
_CACFLayerGetMinificationFilter, _CACFLayerGetMinificationFilterBias,
_CACFLayerGetName, _CACFLayerGetOpacity, _CACFLayerGetPluginFlags,
_CACFLayerGetPluginGravity, _CACFLayerGetPluginId, _CACFLayerGetPluginType,
_CACFLayerGetPosition, _CACFLayerGetPreservesFlip, _CACFLayerGetRasterizationScale,
_CACFLayerGetRepeatCount, _CACFLayerGetRepeatDuration, _CACFLayerGetShadowColor,
_CACFLayerGetShadowOffset, _CACFLayerGetShadowOpacity, _CACFLayerGetShadowPath,
_CACFLayerGetShadowPathIsBounds, _CACFLayerGetShadowRadius,
_CACFLayerGetShouldRasterize, _CACFLayerGetSortsSublayers,
_CACFLayerGetSpeed, _CACFLayerGetSublayerTransform, _CACFLayerGetSublayers,
_CACFLayerGetSuperlayer, _CACFLayerGetTimeOffset, _CACFLayerGetTransform,
_CACFLayerGetTypeID, _CACFLayerGetUserData, _CACFLayerGetZPosition,
_CACFLayerHasBeenCommitted, _CACFLayerInsertSublayer, _CACFLayerIsDoubleSided,
_CACFLayerIsGeometryFlipped, _CACFLayerIsHidden, _CACFLayerIsOpaque,
_CACFLayerLayoutSublayers, _CACFLayerMapGeometry, _CACFLayerRemoveAllAnimations,
_CACFLayerRemoveAnimation, _CACFLayerRemoveFromSuperlayer,
_CACFLayerSetAffineTransform, _CACFLayerSetAllowsHitTesting,
_CACFLayerSetAnchorPoint, _CACFLayerSetAnchorPointZ, _CACFLayerSetAutoreverses,
_CACFLayerSetBackgroundColor, _CACFLayerSetBackgroundFilters,
_CACFLayerSetBeginTime, _CACFLayerSetBorderColor, _CACFLayerSetBorderWidth,
_CACFLayerSetBounds, _CACFLayerSetClearsContext, _CACFLayerSetCompositingFilter,
_CACFLayerSetContents, _CACFLayerSetContentsCenter, _CACFLayerSetContentsFormat,
_CACFLayerSetContentsGravity, _CACFLayerSetContentsOpaque,
_CACFLayerSetContentsRect, _CACFLayerSetContentsScale, _CACFLayerSetContentsScaling,
_CACFLayerSetContentsTransform, _CACFLayerSetContextId, _CACFLayerSetCornerRadius,
_CACFLayerSetDisplayCallback, _CACFLayerSetDoubleSided, _CACFLayerSetDuration,
_CACFLayerSetEdgeAntialiasingMask, _CACFLayerSetFillMode,
_CACFLayerSetFilters, _CACFLayerSetFrame, _CACFLayerSetGeometryFlipped,
_CACFLayerSetHidden, _CACFLayerSetHitTestsAsOpaque, _CACFLayerSetInvertsShadow,
_CACFLayerSetLayoutCallback, _CACFLayerSetMagnificationFilter,
_CACFLayerSetMask, _CACFLayerSetMasksToBounds, _CACFLayerSetMeshTransform,
_CACFLayerSetMinificationFilter, _CACFLayerSetMinificationFilterBias,
_CACFLayerSetName, _CACFLayerSetNeedsDisplay, _CACFLayerSetNeedsLayout,
_CACFLayerSetOpacity, _CACFLayerSetOpaque, _CACFLayerSetPluginFlags,
_CACFLayerSetPluginGravity, _CACFLayerSetPluginId, _CACFLayerSetPluginType,
_CACFLayerSetPosition, _CACFLayerSetPreservesFlip, _CACFLayerSetRasterizationScale,
_CACFLayerSetRepeatCount, _CACFLayerSetRepeatDuration, _CACFLayerSetShadowColor,
_CACFLayerSetShadowOffset, _CACFLayerSetShadowOpacity, _CACFLayerSetShadowPath,
_CACFLayerSetShadowPathIsBounds, _CACFLayerSetShadowRadius,
_CACFLayerSetShouldRasterize, _CACFLayerSetSortsSublayers,
_CACFLayerSetSpeed, _CACFLayerSetSublayerTransform, _CACFLayerSetSublayers,
_CACFLayerSetTimeOffset, _CACFLayerSetTransform, _CACFLayerSetUserData,
_CACFLayerSetZPosition, _CACFLock, _CACFMeshTransformCreate,
_CACFMeshTransformGetTypeID, _CACFTimingFunctionCreate, _CACFTimingFunctionGetControlPoint,
_CACFTimingFunctionGetFunctionWithName, _CACFTimingFunctionGetTypeID,
_CACFUnlock, _CACFValueFunctionGetFunctionWithName, _CACFValueFunctionGetName,
_CACFValueFunctionGetTypeID, _CACFVectorCopyValues, _CACFVectorCreate,
_CACFVectorCreateRect, _CACFVectorGetCount, _CACFVectorGetRect,
_CACFVectorGetTypeID, _CACFVectorGetValue, _CACFViewCreate,
_CACFViewGetContext, _CACFViewGetLayer, _CACFViewSetLayer,
_CACFilterGetValue, _CAClearColorDebugOptions, _CAClearDebugOptions,
_CACodingImageFormat, _CAColorMatrixConcat, _CAColorMatrixIdentity,
_CAColorMatrixMakeBrightness, _CAColorMatrixMakeColorSourceOver,
_CAColorMatrixMakeContrast, _CAColorMatrixMakeMultiplyColor,
_CAColorMatrixMakeSaturation, _CACurrentMediaTime, _CADebugClientOptionAtIndex,
_CADebugClientOptionCount, _CADebugColorOptionAtIndex, _CADebugColorOptionCount,
_CADebugFeatureOptionAtIndex, _CADebugFeatureOptionCount,
_CADebugGlobalOptionAtIndex, _CADebugGlobalOptionCount, _CADebugLayerRelease,
_CADebugOptionIsClient, _CADebugOptionIsColor, _CADebugOptionIsFeature,
_CADebugOptionIsGlobal, _CADebugOptionIsPrint, _CADebugPrintOptionAtIndex,
_CADebugPrintOptionCount, _CADecrementDebugValue, _CADisplayGetCurrentHeadroom,
_CADisplayGetPotentialHeadroom, _CADisplayGetReferenceHeadroom,
_CAEncodeBackingStores, _CAEncodeIOSurfacesAsCGImages, _CAEncodeLayerTree,
_CAEncodeLayerTreeToFile, _CAEncodeLayerTreeToFileWithInfo,
_CAEncodeLayerTreeWithInfo, _CAFenceCreateSetCallbackBlock,
_CAFrameRateRangeDefault, _CAFrameRateRangeDefaultDoNotUse,
_CAFrameRateRangeIsEqualToRange, _CAFrameRateRangeMake, _CAGetCurrentImageBytes,
_CAGetDebugFlags, _CAGetDebugMessage, _CAGetDebugMessageColor,
_CAGetDebugOption, _CAGetDebugOptionEnvVariableName, _CAGetDebugValue,
_CAGetDebugValueEnvVariableName, _CAGetDebugValueFloat, _CAGetFrameCounter,
_CAGetLUTFile, _CAGetMaximumImageBytes, _CAGetRuntimeSeparatedVersion,
_CAGetScreenTelemetryInterval, _CAGetScreenTelemetryParameters,
_CAGetTransactionCounter, _CAIOSurfaceContextVTable, _CAIOSurfaceCreateDefault,
_CAIOSurfaceWriteToFile, _CAIOSurfaceWriteToFileWithSuffix,
_CAImageProviderCreate, _CAImageProviderDraw, _CAImageProviderGetFillColor,
_CAImageProviderGetFlags, _CAImageProviderGetImageHeight,
_CAImageProviderGetImageWidth, _CAImageProviderGetLODBias,
_CAImageProviderGetLODCount, _CAImageProviderGetLODHeight,
_CAImageProviderGetLODScale, _CAImageProviderGetLODWidth,
_CAImageProviderGetSubImageHeight, _CAImageProviderGetSubImageWidth,
_CAImageProviderGetTypeID, _CAImageProviderInvalidate, _CAImageProviderInvalidateLOD,
_CAImageProviderMaxLOD, _CAImageProviderSetCallback, _CAImageProviderSetFillColor,
_CAImageProviderSetImageSize, _CAImageProviderSetSubImage,
_CAImageProviderSetSubImageWithSeed, _CAImageQueueCollect,
_CAImageQueueConsumeUnconsumedInRange, _CAImageQueueCreate,
_CAImageQueueDeleteBuffer, _CAImageQueueFlush, _CAImageQueueFlushWithTransaction,
_CAImageQueueGetCapacity, _CAImageQueueGetDisplayMask, _CAImageQueueGetDisplayTime,
_CAImageQueueGetDisplayedPixelCount, _CAImageQueueGetFlags,
_CAImageQueueGetGPURegistryID, _CAImageQueueGetHeight, _CAImageQueueGetIdentifier,
_CAImageQueueGetLastUpdateHostTime, _CAImageQueueGetLatestTime,
_CAImageQueueGetReleasedImageInfo, _CAImageQueueGetRotationFlags,
_CAImageQueueGetTimeStamp, _CAImageQueueGetTimes, _CAImageQueueGetTypeID,
_CAImageQueueGetUnconsumedImageCount, _CAImageQueueGetVBLInfo,
_CAImageQueueGetWidth, _CAImageQueueInsertImage, _CAImageQueueInsertImageWithRotation,
_CAImageQueueInvalidate, _CAImageQueueRegisterBuffer, _CAImageQueueRegisterCVImageBuffer,
_CAImageQueueRegisterIOAccelSurfaceBuffer, _CAImageQueueRegisterIOSurfaceBuffer,
_CAImageQueueRegisterPixelBuffer, _CAImageQueueSetCollectableCallback,
_CAImageQueueSetEnhancementMode, _CAImageQueueSetFlags, _CAImageQueueSetIdentifier,
_CAImageQueueSetInterpolationCurve, _CAImageQueueSetLatestCanonicalTime,
_CAImageQueueSetMediaTiming, _CAImageQueueSetOwner, _CAImageQueueSetReducedPollingTimeRange,
_CAImageQueueSetSize, _CAImageQueueUnregisterBuffer, _CAInternAtom,
_CAInvalidRenderId, _CAIsScreenTelemetryEnabled, _CALayerEncodeAllAnimations,
_CALayerFrameAffineTransform, _CALayerGetContext, _CALayerGetDelegate,
_CALayerGetRenderId, _CALayerGetSuperlayer, _CALayerMapGeometry,
_CALayerShouldInvokeAnimationCallbacksTheOldWay, _CALinearMaskContextClearRect,
_CALinearMaskContextConcatCTM, _CALinearMaskContextDrawGlyphs,
_CALinearMaskContextGetCTM, _CAMLEncodeLayerTreeToPathWithInfo,
_CAMLEncodeLayerTreeToPathWithOptions, _CAMachPortCreate,
_CAMachPortGetPort, _CAMachPortGetTypeID, _CAMetalLayerDidQueryMetalDevice,
_CAPoint3DEqualToPoint, _CAPoint3DZero, _CAPointApplyTransform,
_CAPointApplyTransform_, _CAPointArrayApplyTransform, _CAPointEqualToPoint,
_CAPointToCGPoint, _CAPointZero, _CARenderBackdropCollect,
_CARenderCGCollect, _CARenderCGDestroy, _CARenderCGGetFeatureFlags,
_CARenderCGLSetScissorOffset, _CARenderCGNew, _CARenderCGPurge,
_CARenderCGRender, _CARenderCGSetFeatureFlags, _CARenderClientGetArchivedLayerTree,
_CARenderCollect, _CARenderContextById, _CARenderContextCanZombify,
_CARenderContextCopyBoundsRegion, _CARenderContextCopyClientAnnotation,
_CARenderContextCopyOpaqueRegion, _CARenderContextCopyPayload,
_CARenderContextCopyProcessPath, _CARenderContextDestroy,
_CARenderContextGetBeginTime, _CARenderContextGetChangedSeed,
_CARenderContextGetColorspace, _CARenderContextGetCommitSeed,
_CARenderContextGetDisplayInfo, _CARenderContextGetEventMask,
_CARenderContextGetGPURegistryID, _CARenderContextGetGeometrySeed,
_CARenderContextGetId, _CARenderContextGetInputTime, _CARenderContextGetOptions,
_CARenderContextGetPayloadSeed, _CARenderContextGetProcessId,
_CARenderContextGetRequestsFrameStallSkip, _CARenderContextGetServerPort,
_CARenderContextGetTransactionSeed, _CARenderContextHitTest,
_CARenderContextHitTestForHostedContextSeparated, _CARenderContextHitTest_,
_CARenderContextInvalidateRect, _CARenderContextLock, _CARenderContextNeedsDeferUpdate,
_CARenderContextNew, _CARenderContextSetBeginTimeThreshold,
_CARenderContextSetCanZombify, _CARenderContextSetChameleonColor,
_CARenderContextSetDisplayInfo, _CARenderContextSetGPURegistryID,
_CARenderContextSetVisible, _CARenderContextUnlock, _CARenderGetGlobalFeatureFlags,
_CARenderImageBitsPerComponent, _CARenderImageBitsPerPixel,
_CARenderImageCGBitmapInfo, _CARenderImageCopyCGImage, _CARenderImageFormatName,
_CARenderImageGetHeight, _CARenderImageGetWidth, _CARenderImageHasAlpha,
_CARenderImageIsNative, _CARenderImageNew, _CARenderImageNewMipmapped,
_CARenderImageNewWithCGImage, _CARenderImageRowbytes, _CARenderLayerGetContextId,
_CARenderMTLCompileShader, _CARenderMTLGetState, _CARenderMTLLoadPipeline,
_CARenderMTLSetDestinationTextures, _CARenderMTLSetState,
_CARenderNotificationAddObserver, _CARenderNotificationPostNotification,
_CARenderNotificationRemoveEveryObserver, _CARenderNotificationRemoveObserver,
_CARenderOGLBeginRendering, _CARenderOGLCollect, _CARenderOGLDestroy,
_CARenderOGLEndRendering, _CARenderOGLFinish, _CARenderOGLFlush,
_CARenderOGLGetColorSpace, _CARenderOGLGetFeatureFlags, _CARenderOGLGetFlags,
_CARenderOGLGetGLContext, _CARenderOGLNew, _CARenderOGLNew_,
_CARenderOGLPrepareUpdateShape, _CARenderOGLPurge, _CARenderOGLRender,
_CARenderOGLRenderDisplay, _CARenderOGLRenderDisplayWithOptions,
_CARenderOGLRenderSeparated, _CARenderOGLRenderSeparatedWithOptions,
_CARenderOGLSetAccelerator, _CARenderOGLSetBackdropSubstituteColor,
_CARenderOGLSetColorSpace, _CARenderOGLSetDestinationBitDepth,
_CARenderOGLSetDestinationIOSurface, _CARenderOGLSetDestinationOffset,
_CARenderOGLSetDestinationTexture, _CARenderOGLSetDisplay,
_CARenderOGLSetDisplayBounds, _CARenderOGLSetEDRScalingFactor,
_CARenderOGLSetFeatureFlags, _CARenderOGLSetGLContext, _CARenderOGLSetHDRScalingFactor,
_CARenderOGLSetScale, _CARenderOGLSetUpdateRect, _CARenderOGLSetUpdateRegion,
_CARenderPresentAcquire, _CARenderPresentRelease, _CARenderRegisterPluginVTable,
_CARenderRelease, _CARenderRetain, _CARenderServerCaptureDisplay,
_CARenderServerCaptureDisplayClientList, _CARenderServerCaptureDisplayClientListWithTransform,
_CARenderServerCaptureDisplayClientListWithTransformList,
_CARenderServerCaptureDisplayLayerWithTransformTimeOffsetAndFlags,
_CARenderServerCaptureDisplayWithTransform, _CARenderServerCaptureLayer,
_CARenderServerCaptureLayerWithTransform, _CARenderServerCaptureLayerWithTransformAndTimeOffset,
_CARenderServerClearColorDebugOptions, _CARenderServerClearDebugOptions,
_CARenderServerCopyODStatistics, _CARenderServerCopyUpdateHistograms,
_CARenderServerCreateSnapshots, _CARenderServerDebugBrightness,
_CARenderServerGetClientPort, _CARenderServerGetClientProcessId,
_CARenderServerGetDebugFlags, _CARenderServerGetDebugOption,
_CARenderServerGetDebugValue, _CARenderServerGetDebugValueFloat,
_CARenderServerGetDirtyFrameCount, _CARenderServerGetDirtyFrameCountByIndex,
_CARenderServerGetDisplayLogicalBounds, _CARenderServerGetFrameCounter,
_CARenderServerGetFrameCounterByIndex, _CARenderServerGetInfo,
_CARenderServerGetMaxRenderableIOSurfaceSize, _CARenderServerGetNeededAlignment,
_CARenderServerGetPerformanceInfo, _CARenderServerGetPort,
_CARenderServerGetServerPort, _CARenderServerGetStatistics,
_CARenderServerIsRunning, _CARenderServerPostPowerLog, _CARenderServerPurgeServer,
_CARenderServerRegister, _CARenderServerRenderDisplay, _CARenderServerRenderDisplayClientList,
_CARenderServerRenderDisplayClientListWithTransform, _CARenderServerRenderDisplayClientListWithTransformList,
_CARenderServerRenderDisplayLayerWithTransformAndTimeOffset,
_CARenderServerRenderDisplayLayerWithTransformTimeOffsetAndFlags,
_CARenderServerRenderLayer, _CARenderServerRenderLayerWithTransform,
_CARenderServerRenderLayerWithTransformAndTimeOffset, _CARenderServerSetAXMatrix,
_CARenderServerSetCacheAsynchronousSurfaces, _CARenderServerSetDebugFlags,
_CARenderServerSetDebugMessage, _CARenderServerSetDebugOption,
_CARenderServerSetDebugValue, _CARenderServerSetDebugValueFloat,
_CARenderServerSetMessageFile, _CARenderServerSetOverdriveLUTFile,
_CARenderServerSetRootQueue, _CARenderServerSetScreenTelemetryParameters,
_CARenderServerShutdown, _CARenderServerSnapshot, _CARenderServerStart,
_CARenderSetExternalAnimationBlock, _CARenderSetGlobalFeatureFlags,
_CARenderSetPluginNeedsDisplay, _CARenderSetSeparatedLayerBlock,
_CARenderShow, _CARenderShowImages, _CARenderShowStatistics,
_CARenderSoftwareSetDestination, _CARenderSurfaceNew, _CARenderUpdateAddContext,
_CARenderUpdateAddContext2, _CARenderUpdateAddFlags, _CARenderUpdateAddRect,
_CARenderUpdateAddRegion, _CARenderUpdateAddedAllContexts,
_CARenderUpdateAllocateSeed, _CARenderUpdateBegin, _CARenderUpdateBegin2,
_CARenderUpdateCheckUnobscuredRegionOfInterest, _CARenderUpdateClipBackdropInvalidations,
_CARenderUpdateCopyLayerHostBindings2, _CARenderUpdateCopyRegion,
_CARenderUpdateCopyRegionForLayer, _CARenderUpdateCopyUnobscuredHostedRegion,
_CARenderUpdateFinish, _CARenderUpdateGetBackdropLayerCount,
_CARenderUpdateGetBackdropLayerInfo, _CARenderUpdateGetBeginTime,
_CARenderUpdateGetBounds, _CARenderUpdateGetFlags, _CARenderUpdateGetMaxBitsPerChannel,
_CARenderUpdateGetNextTime, _CARenderUpdateGetPrepareLayer0Count,
_CARenderUpdateGetPrepareLayerCount, _CARenderUpdateGetProtectionOptions,
_CARenderUpdateGetProxyLayerCount, _CARenderUpdateGetProxyLayerInfo,
_CARenderUpdateGetSeed, _CARenderUpdateGetTime, _CARenderUpdateGetTimeStamp,
_CARenderUpdateGetUnobscuredRegionOfInterest, _CARenderUpdateGetVersionedProxyLayerInfo,
_CARenderUpdateGetWindowServerAwareBackdropCount, _CARenderUpdateHasChameleonLayers,
_CARenderUpdateInvalidateBackdrops, _CARenderUpdateInvalidateDetachedLayers,
_CARenderUpdatePrintTrees, _CARenderUpdateSetAllowsHostedContexts,
_CARenderUpdateSetDisplayAttributes, _CARenderUpdateSetDisplayType,
_CARenderUpdateSetDisplays, _CARenderUpdateSetEDRAttributes,
_CARenderUpdateSetInterval, _CARenderUpdateSetIsolated, _CARenderUpdateSetProtectionOptions,
_CARenderUpdateSetRect, _CARenderUpdateSetRegion, _CARenderUpdateSetSkipsBackdropCollect,
_CARenderUpdateSetStartTime, _CARenderUpdateSetVBLTime, _CARenderUpdateSetVRRMinRate,
_CARenderUpdateValidateRestrictedLayerHosts, _CASeparatedOptionMetadataCreate,
_CASeparatedOptionMetadataGetDefaultValue, _CASeparatedOptionMetadataGetName,
_CASetDebugFlags, _CASetDebugMessage, _CASetDebugOption, _CASetDebugValue,
_CASetDebugValueFloat, _CASetLUTFile, _CASetMessageFile, _CASetMessageFunction,
_CASetScreenTelemetryInterval, _CASetScreenTelemetryParameters,
_CATransform3DConcat, _CATransform3DConcatAffineTransform,
_CATransform3DConcatAffineTransform_, _CATransform3DConcat_,
_CATransform3DEqualToTransform, _CATransform3DEqualToTransform_,
_CATransform3DGetAffineTransform, _CATransform3DGetAffineTransform_,
_CATransform3DGetDecomposition_, _CATransform3DIdentity, _CATransform3DInterpolate,
_CATransform3DInvert, _CATransform3DInvert_, _CATransform3DIsAffine,
_CATransform3DIsAffine_, _CATransform3DIsIdentity, _CATransform3DIsIdentity_,
_CATransform3DMakeAffineTransform, _CATransform3DMakeAffineTransform_,
_CATransform3DMakeRotation, _CATransform3DMakeRotation_, _CATransform3DMakeScale,
_CATransform3DMakeScale_, _CATransform3DMakeTranslation, _CATransform3DMakeTranslation_,
_CATransform3DRotate, _CATransform3DRotate_, _CATransform3DScale,
_CATransform3DScale_, _CATransform3DTranslate, _CATransform3DTranslateRight,
_CATransform3DTranslateRight_, _CATransform3DTranslate_, _CAViewBeginDraw,
_CAViewCreate, _CAViewDestroy, _CAViewDisableAsyncDrawing,
_CAViewDraw, _CAViewEnableAsyncDrawing, _CAViewEndDraw, _CAViewGetCIFilterBehavior,
_CAViewGetColorSpace, _CAViewGetContext, _CAViewGetGlobalFlags,
_CAViewGetLayer, _CAViewGetPixelFormat, _CAViewGetRendererFeatures,
_CAViewGetTypeID, _CAViewInvalidateRect, _CAViewSetCIFilterBehavior,
_CAViewSetColorSpace, _CAViewSetGlobalFlags, _CAViewSetLayer,
_CAViewSetPixelFormat, _CAViewSetRendererFeatures, _CAViewUpdate,
_CAViewUpdate2, _CAWindowContextDelegateCreate, _CAXPCImageQueueCommandForMessage,
_CAXPCImageQueueCreate, _CAXPCImageQueueReceiverCreate, _CAXPCImageQueueReceiverCreateSampleForTime,
_CAXPCImageQueueReceiverGetIdentifier, _CAXPCImageQueueReceiverGetImageCount,
_CAXPCImageQueueReceiverProcessMessage, _CAXPCImageQueueReceiverSetDisplayedPixelCount,
_CAXPCImageQueueReceiverSetProperty, _CAXPCImageQueueSampleGetDisplayCount,
_CAXPCImageQueueSampleGetIOSurface, _CAXPCImageQueueSampleGetTimestamp,
_CA_CGPointApplyTransform, _CA_CGPointApplyTransform_, _CA_CGPointUnapplyInverseTransform,
_CA_CGPointUnapplyInverseTransform_, _CA_CGRectApplyTransform,
_CA_CGRectApplyTransform_, _CA_CGRectUnapplyInverseTransform,
_CA_CGRectUnapplyInverseTransform_, _QuartzCoreVersionNumber,
_QuartzCoreVersionString, _kCAAlignmentCenter, _kCAAlignmentJustified,
_kCAAlignmentLeft, _kCAAlignmentNatural, _kCAAlignmentRight,
_kCAAnimationAbsolute, _kCAAnimationCubic, _kCAAnimationCubicPaced,
_kCAAnimationDiscrete, _kCAAnimationLinear, _kCAAnimationNonZero,
_kCAAnimationPaced, _kCAAnimationRelative, _kCAAnimationRotateAuto,
_kCAAnimationRotateAutoReverse, _kCAAtomCFDictionaryKeyCallbacks,
_kCAAttributeEnumNames, _kCAAttributeIncrement, _kCAAttributeMax,
_kCAAttributeMin, _kCAAttributeOptional, _kCAAttributeSliderMax,
_kCAAttributeSliderMin, _kCAAttributeSubtype, _kCAAttributeType,
_kCAAttributeUnitSpace, _kCABackdropNamespaceGlobal, _kCABackdropNamespaceHostingNamespacedContext,
_kCABackdropNamespaceOwningContext, _kCABrightnessNotificationAttached,
_kCABrightnessNotificationDetached, _kCABrightnessNotificationRequestEDR,
_kCABrightnessRequestEDRHeadroom, _kCABrightnessRequestRampDuration,
_kCACFAnimationCubic, _kCACFAnimationCubicPaced, _kCACFAnimationDiscrete,
_kCACFAnimationGroup, _kCACFAnimationLinear, _kCACFAnimationPaced,
_kCACFAnimationRotateAuto, _kCACFAnimationRotateAutoReverse,
_kCACFBasicAnimation, _kCACFContentsFormatGray8, _kCACFContentsFormatRGBA8,
_kCACFContentsFormatRGBAh, _kCACFContentsScalingRepeat, _kCACFContentsScalingStretch,
_kCACFContextBitsPerComponentHint, _kCACFContextDefinesDisplayBounds,
_kCACFContextDisplayFilter, _kCACFContextDisplayId, _kCACFContextDisplayName,
_kCACFContextIgnoresHitTest, _kCACFContextPortName, _kCACFContextPortNumber,
_kCACFFillModeBackwards, _kCACFFillModeBoth, _kCACFFillModeForwards,
_kCACFFillModeRemoved, _kCACFFilterLanczos, _kCACFFilterLinear,
_kCACFFilterNearest, _kCACFFilterTrilinear, _kCACFGravityBottom,
_kCACFGravityBottomLeft, _kCACFGravityBottomRight, _kCACFGravityCenter,
_kCACFGravityLeft, _kCACFGravityResize, _kCACFGravityResizeAspect,
_kCACFGravityResizeAspectFill, _kCACFGravityRight, _kCACFGravityTop,
_kCACFGravityTopLeft, _kCACFGravityTopRight, _kCACFKeyframeAnimation,
_kCACFLayer, _kCACFLayerHost, _kCACFPluginLayer, _kCACFSpringAnimation,
_kCACFTimingFunctionDefault, _kCACFTimingFunctionEaseIn, _kCACFTimingFunctionEaseInEaseOut,
_kCACFTimingFunctionEaseOut, _kCACFTimingFunctionLinear, _kCACFTransformLayer,
_kCACFTransition, _kCACFTransitionFade, _kCACFTransitionFromBottom,
_kCACFTransitionFromLeft, _kCACFTransitionFromRight, _kCACFTransitionFromTop,
_kCACFTransitionMoveIn, _kCACFTransitionPush, _kCACFTransitionReveal,
_kCACFValueFunctionRotateX, _kCACFValueFunctionRotateY, _kCACFValueFunctionRotateZ,
_kCACFValueFunctionScale, _kCACFValueFunctionScaleX, _kCACFValueFunctionScaleY,
_kCACFValueFunctionScaleZ, _kCACFValueFunctionTranslate, _kCACFValueFunctionTranslateX,
_kCACFValueFunctionTranslateY, _kCACFValueFunctionTranslateZ,
_kCACodingImageFormat, _kCACodingImageOptions, _kCACodingSkipHiddenLayers,
_kCACodingUserInfo, _kCAContentsFormatA8, _kCAContentsFormatAutomatic,
_kCAContentsFormatGray8Uint, _kCAContentsFormatRGBA10XR, _kCAContentsFormatRGBA16Float,
_kCAContentsFormatRGBA16Uint, _kCAContentsFormatRGBA8, _kCAContentsFormatRGBA8ColorA8LinearGlyphMask,
_kCAContentsFormatRGBA8ColorRGBA8LinearGlyphMask, _kCAContentsFormatRGBA8Uint,
_kCAContentsFormatRGBAh, _kCAContentsScalingRepeat, _kCAContentsScalingStretch,
_kCAContextAllowsOcclusionDetectionOverride, _kCAContextAllowsRecursiveScreenCapture,
_kCAContextAutoSeparateBackdropLayers, _kCAContextBitsPerComponentHint,
_kCAContextCIFilterBehavior, _kCAContextCanBeObscured, _kCAContextCanZombify,
_kCAContextClientPortNumber, _kCAContextCreatesBackdropGroupNamespace,
_kCAContextDefinesDisplayBounds, _kCAContextDisableEdgeAntialiasing,
_kCAContextDisableGroupOpacity, _kCAContextDisablesChangeNotifications,
_kCAContextDisplayFilter, _kCAContextDisplayId, _kCAContextDisplayName,
_kCAContextDisplayable, _kCAContextEnablePixelDoubling, _kCAContextEnablePixelQuadrupling,
_kCAContextIgnoresHitTest, _kCAContextIgnoresRestrictedHostProcessId,
_kCAContextName, _kCAContextPortName, _kCAContextPortNumber,
_kCAContextReversesContentsAreFlippedInCatalystEnvironment,
_kCAContextSecure, _kCAContextSerializeLayerDrawInContext,
_kCAContextSerializeLayerFinalizeContext, _kCACornerCurveCircular,
_kCACornerCurveContinuous, _kCADebugOptionsDidChange, _kCADepthNormalizationAverage,
_kCADepthNormalizationHeight, _kCADepthNormalizationMax, _kCADepthNormalizationMin,
_kCADepthNormalizationNone, _kCADepthNormalizationWidth, _kCADisplayAuto,
_kCADisplayClonedFrameCount, _kCADisplayDeviceName, _kCADisplayDirtyFrameCount,
_kCADisplayDolbyVision, _kCADisplayDolbyVisionLowLatency,
_kCADisplayDolbyVisionNative, _kCADisplayDolbyVisionTunneled,
_kCADisplayFrameCount, _kCADisplayHDR10RGBFullRange, _kCADisplayHDR10YCbCr420,
_kCADisplayHDR10YCbCr420LimitedRange, _kCADisplayHDR10YCbCr422,
_kCADisplayHDR10YCbCr422LimitedRange, _kCADisplayHDR10YCbCr444LimitedRange,
_kCADisplayId, _kCADisplayInsetBounds, _kCADisplayModeDolby,
_kCADisplayModeGamutBT2020, _kCADisplayModeGamutP3, _kCADisplayModeGamutSRGB,
_kCADisplayModeHDR10, _kCADisplayModeHLG, _kCADisplayModeSDR,
_kCADisplayName, _kCADisplayNone, _kCADisplayOrientationRotation0,
_kCADisplayOrientationRotation180, _kCADisplayOrientationRotation270,
_kCADisplayOrientationRotation90, _kCADisplayRGBFullRange,
_kCADisplayRGBLimitedRange, _kCADisplayScaleContent, _kCADisplaySkippedClonedFrameCount,
_kCADisplaySkippedFrameCount, _kCADisplayTimingOffset, _kCADisplayTimingRefreshRate,
_kCADisplayYCbCr, _kCADisplayYCbCr420LimitedRange, _kCADisplayYCbCr422LimitedRange,
_kCADisplayYCbCr444LimitedRange, _kCADistanceFieldLayerFill,
_kCADistanceFieldLayerInnerStroke, _kCADistanceFieldLayerOuterStroke,
_kCADistanceFieldLayerStroke, _kCAEmitterBehaviorAlignToMotion,
_kCAEmitterBehaviorAttractor, _kCAEmitterBehaviorColorOverDistance,
_kCAEmitterBehaviorColorOverLife, _kCAEmitterBehaviorDrag,
_kCAEmitterBehaviorLight, _kCAEmitterBehaviorSimpleAttractor,
_kCAEmitterBehaviorValueOverDistance, _kCAEmitterBehaviorValueOverLife,
_kCAEmitterBehaviorWave, _kCAEmitterCellPlane, _kCAEmitterCellPoint,
_kCAEmitterCellRandom, _kCAEmitterCellSequential, _kCAEmitterCellSingle,
_kCAEmitterCellSprite, _kCAEmitterLayerAdditive, _kCAEmitterLayerBackToFront,
_kCAEmitterLayerCheapColorDodge, _kCAEmitterLayerCircle, _kCAEmitterLayerCuboid,
_kCAEmitterLayerLine, _kCAEmitterLayerMaximum, _kCAEmitterLayerOldestFirst,
_kCAEmitterLayerOldestLast, _kCAEmitterLayerOutline, _kCAEmitterLayerPath,
_kCAEmitterLayerPoint, _kCAEmitterLayerPoints, _kCAEmitterLayerRectangle,
_kCAEmitterLayerRectangles, _kCAEmitterLayerScreen, _kCAEmitterLayerSequential,
_kCAEmitterLayerSphere, _kCAEmitterLayerSurface, _kCAEmitterLayerUnordered,
_kCAEmitterLayerVolume, _kCAFillModeBackwards, _kCAFillModeBoth,
_kCAFillModeForwards, _kCAFillModeFrozen, _kCAFillModeRemoved,
_kCAFillRuleEvenOdd, _kCAFillRuleNonZero, _kCAFilterASG, _kCAFilterASG77,
_kCAFilterAlphaThreshold, _kCAFilterAverageColor, _kCAFilterBias,
_kCAFilterBox, _kCAFilterClear, _kCAFilterColorAdd, _kCAFilterColorBlendMode,
_kCAFilterColorBrightness, _kCAFilterColorBurnBlendMode, _kCAFilterColorContrast,
_kCAFilterColorDodgeBlendMode, _kCAFilterColorHueRotate, _kCAFilterColorInvert,
_kCAFilterColorMatrix, _kCAFilterColorMonochrome, _kCAFilterColorSaturate,
_kCAFilterColorSubtract, _kCAFilterCompressLuminance, _kCAFilterCopy,
_kCAFilterCubic, _kCAFilterCurves, _kCAFilterDarkenBlendMode,
_kCAFilterDarkenSourceOver, _kCAFilterDest, _kCAFilterDestAtop,
_kCAFilterDestIn, _kCAFilterDestOut, _kCAFilterDestOver, _kCAFilterDifferenceBlendMode,
_kCAFilterDistanceField, _kCAFilterDivideBlendMode, _kCAFilterEDRGain,
_kCAFilterExclusionBlendMode, _kCAFilterGaussianBlur, _kCAFilterHardLightBlendMode,
_kCAFilterHueBlendMode, _kCAFilterInputAddWhite, _kCAFilterInputAlphaValues,
_kCAFilterInputAmount, _kCAFilterInputAngle, _kCAFilterInputAspectRatio,
_kCAFilterInputBackColor0, _kCAFilterInputBackColor1, _kCAFilterInputBackEnabled,
_kCAFilterInputBias, _kCAFilterInputBlueValues, _kCAFilterInputBounds,
_kCAFilterInputColor, _kCAFilterInputColor0, _kCAFilterInputColor1,
_kCAFilterInputColorMap, _kCAFilterInputColorMatrix, _kCAFilterInputDither,
_kCAFilterInputEndAngle, _kCAFilterInputFrontColor, _kCAFilterInputFrontEnabled,
_kCAFilterInputGreenValues, _kCAFilterInputHSVSpace, _kCAFilterInputHardEdges,
_kCAFilterInputIntermediateBitDepth, _kCAFilterInputLinear,
_kCAFilterInputNormalizeEdges, _kCAFilterInputOverlayOpacity,
_kCAFilterInputQuality, _kCAFilterInputRadius, _kCAFilterInputRedValues,
_kCAFilterInputReversed, _kCAFilterInputScale, _kCAFilterInputShadowBounds,
_kCAFilterInputShadowColor, _kCAFilterInputStartAngle, _kCAFilterInputTime,
_kCAFilterInputValues, _kCAFilterLanczos, _kCAFilterLanczosResize,
_kCAFilterLightenBlendMode, _kCAFilterLightenSourceOver, _kCAFilterLimitAveragePixelLuminance,
_kCAFilterLinear, _kCAFilterLinearBurnBlendMode, _kCAFilterLinearDodgeBlendMode,
_kCAFilterLinearLightBlendMode, _kCAFilterLinearlySampledLinear,
_kCAFilterLuminanceCurveMap, _kCAFilterLuminanceMap, _kCAFilterLuminanceToAlpha,
_kCAFilterLuminosityBlendMode, _kCAFilterMaximum, _kCAFilterMeteor,
_kCAFilterMinimum, _kCAFilterMultiply, _kCAFilterMultiplyBlendMode,
_kCAFilterMultiplyColor, _kCAFilterNearest, _kCAFilterNormalBlendMode,
_kCAFilterOpacityPair, _kCAFilterOverlayBlendMode, _kCAFilterPageCurl,
_kCAFilterPinLightBlendMode, _kCAFilterPlusD, _kCAFilterPlusL,
_kCAFilterSDRNormalize, _kCAFilterSRL, _kCAFilterSaturationBlendMode,
_kCAFilterScreenBlendMode, _kCAFilterSoftLightBlendMode, _kCAFilterSourceAtop,
_kCAFilterSourceIn, _kCAFilterSourceOut, _kCAFilterSourceOver,
_kCAFilterSubtractBlendMode, _kCAFilterSubtractD, _kCAFilterSubtractS,
_kCAFilterTrilinear, _kCAFilterVariableBlur, _kCAFilterVibrantColorMatrix,
_kCAFilterVibrantColorMatrixSourceOver, _kCAFilterVibrantDark,
_kCAFilterVibrantLight, _kCAFilterXor, _kCAGradientLayerAxial,
_kCAGradientLayerConic, _kCAGradientLayerRadial, _kCAGravityBottom,
_kCAGravityBottomLeft, _kCAGravityBottomRight, _kCAGravityCenter,
_kCAGravityLeft, _kCAGravityResize, _kCAGravityResizeAspect,
_kCAGravityResizeAspectFill, _kCAGravityRight, _kCAGravityTop,
_kCAGravityTopLeft, _kCAGravityTopRight, _kCAImageQueueCapacity,
_kCAImageQueueIdentifier, _kCAImageQueueReceiverDisplayRefreshRate,
_kCALayerContentsSwizzleAAAA, _kCALayerContentsSwizzleRGBA,
_kCALayerOptimizationDescription, _kCALayerOptimizationName,
_kCALayerOptimizationType, _kCALayerSecurityModeInsecure,
_kCALayerSecurityModeSecure, _kCALayerSecurityModeUnrestricted,
_kCALayerSeparatedOptionContextData, _kCALayerSeparatedOptionEnableContext,
_kCALayerSeparatedOptionMarkerId, _kCALayerSeparatedOptionTextureScale,
_kCALineCapButt, _kCALineCapRound, _kCALineCapSquare, _kCALineJoinBevel,
_kCALineJoinMiter, _kCALineJoinRound, _kCAMLWriterSrc, _kCAMediaTimingFunctionDefault,
_kCAMediaTimingFunctionEaseIn, _kCAMediaTimingFunctionEaseInEaseOut,
_kCAMediaTimingFunctionEaseOut, _kCAMediaTimingFunctionLinear,
_kCAOnOrderIn, _kCAOnOrderOut, _kCAPackageTypeArchive, _kCAPackageTypeCAMLBundle,
_kCAPackageTypeCAMLFile, _kCAProxyLayerActive, _kCAProxyLayerBlendMode,
_kCAProxyLayerLevel, _kCAProxyLayerMaterial, _kCAProxyLayerSaturation,
_kCAProxyLayerSelectionTintColor, _kCARenderCGLCallbacks,
_kCARenderCGLCallbacksRef, _kCARenderCGLSCallbacks, _kCARenderCGLSCallbacksRef,
_kCARenderMetalCallbacks, _kCARenderMetalCallbacksRef, _kCARenderMetalServerCallbacks,
_kCARenderMetalServerCallbacksRef, _kCARenderNullCallbacksRef,
_kCARenderSoftwareCallbacks, _kCARenderSoftwareCallbacksRef,
_kCARendererClearsDestination, _kCARendererColorSpace, _kCARendererDeepBuffers,
_kCARendererMetalCommandQueue, _kCAScrollBoth, _kCAScrollHorizontally,
_kCAScrollNone, _kCAScrollVertically, _kCASecureModeViolationContextId,
_kCASecureModeViolationHostContextId, _kCASecureModeViolationHostProcessId,
_kCASecureModeViolationLayerNames, _kCASecureModeViolationProcessId,
_kCASnapshotBeforeSlotId, _kCASnapshotBottomLeftOrigin, _kCASnapshotContextId,
_kCASnapshotContextList, _kCASnapshotDestination, _kCASnapshotDisplayName,
_kCASnapshotEnforceSecureMode, _kCASnapshotFormatOpaque, _kCASnapshotFormatWideGamut,
_kCASnapshotIgnoreDisableUpdateMasks, _kCASnapshotIgnoreLayerFixup,
_kCASnapshotIgnoreRootAccessibilityFilters, _kCASnapshotIgnoreSublayers,
_kCASnapshotLayerId, _kCASnapshotMapCacheAttribute, _kCASnapshotMode,
_kCASnapshotModeDisplay, _kCASnapshotModeExcludeContextList,
_kCASnapshotModeIncludeContextList, _kCASnapshotModeLayer,
_kCASnapshotModeStopAfterContextList, _kCASnapshotModeStopBeforeSlot,
_kCASnapshotOriginX, _kCASnapshotOriginY, _kCASnapshotReuseBackdropContents,
_kCASnapshotSizeHeight, _kCASnapshotSizeWidth, _kCASnapshotTimeOffset,
_kCASnapshotTrackBackdropReuseFailures, _kCASnapshotTransform,
_kCASubtypeAngle, _kCASubtypeBool, _kCASubtypeColorMatrix,
_kCASubtypeDistance, _kCASubtypeEnum, _kCASubtypeFloat, _kCASubtypeInt,
_kCASubtypePercentage, _kCASubtypePoint, _kCASubtypePoint3D,
_kCASubtypeRect, _kCASubtypeSize, _kCASubtypeTime, _kCASubtypeTimeInterval,
_kCASubtypeTransform, _kCATiledLayerDisableFade, _kCATiledLayerOnlyIfNull,
_kCATiledLayerRemoveImmediately, _kCATiledLayerUncollectable,
_kCATransactionAnimatesFromModelValues, _kCATransactionAnimationDelegate,
_kCATransactionAnimationDuration, _kCATransactionAnimationTimingFunction,
_kCATransactionCommitTime, _kCATransactionCompletionBlock,
_kCATransactionDisableActions, _kCATransactionEarliestAutomaticCommitTime,
_kCATransactionInputTime, _kCATransition, _kCATransitionFade,
_kCATransitionFromBottom, _kCATransitionFromLeft, _kCATransitionFromRight,
_kCATransitionFromTop, _kCATransitionMoveIn, _kCATransitionPush,
_kCATransitionReveal, _kCATruncationEnd, _kCATruncationMiddle,
_kCATruncationNone, _kCATruncationStart, _kCAValueFunctionRotateX,
_kCAValueFunctionRotateY, _kCAValueFunctionRotateZ, _kCAValueFunctionScale,
_kCAValueFunctionScaleX, _kCAValueFunctionScaleXY, _kCAValueFunctionScaleXYZ,
_kCAValueFunctionScaleY, _kCAValueFunctionScaleZ, _kCAValueFunctionTranslate,
_kCAValueFunctionTranslateX, _kCAValueFunctionTranslateY,
_kCAValueFunctionTranslateZ, _kCAVirtualDisplayHeight, _kCAVirtualDisplayPixelFormat,
_kCAVirtualDisplayUpdateRate, _kCAVirtualDisplayWidth, _kCAWindowServerClone_CaptureDisplay,
_kCAWindowServerClone_DisableOverscan, _kCAWindowServerClone_DisableRotation,
_kCAWindowServerClone_DisableScaling, _kCAWindowServerClone_DisableYUV,
_kCAWindowServerClone_NoReplayScaling, _kCAWindowServerClone_ReplayContexts,
_kCAWindowServerColorMode_Auto, _kCAWindowServerColorMode_RGBFullRange,
_kCAWindowServerColorMode_RGBLimitedRange, _kCAWindowServerColorMode_YCbCr,
_kCAWindowServerDisableUpdatesOnMainDisplay, _kCAWindowServerFetchFrozenSurfaces,
_kCAWindowServerHitTestClientPort, _kCAWindowServerHitTestContextId,
_kCAWindowServerHitTestCumulativeContentsTransform, _kCAWindowServerHitTestCumulativeLayerTransform,
_kCAWindowServerHitTestCumulativeOpacity, _kCAWindowServerHitTestCumulativeTransform,
_kCAWindowServerHitTestDetectedOcclusion, _kCAWindowServerHitTestIgnoreBlankingContext,
_kCAWindowServerHitTestIsInsecureFiltered, _kCAWindowServerHitTestLayerBackgroundAverage,
_kCAWindowServerHitTestLayerBackgroundMaximum, _kCAWindowServerHitTestLayerBackgroundMinimum,
_kCAWindowServerHitTestLayerBackgroundStandardDeviation, _kCAWindowServerHitTestOcclusionType,
_kCAWindowServerHitTestOptionExcludedContextIds, _kCAWindowServerHitTestSlotId,
_kCAWindowServerHitTestWantsLayerBackgroundStatistics, _kCAWindowServerLocal,
_kCAWindowServerManagedRenderServer, _kCAWindowServerOcclusionTypeClipped,
_kCAWindowServerOcclusionTypeLayer, _kCAWindowServerOcclusionTypeNone,
_kCAWindowServerOrientation_LandscapeLeft, _kCAWindowServerOrientation_LandscapeRight,
_kCAWindowServerOrientation_Portrait, _kCAWindowServerOrientation_PortraitUpsideDown,
_kCAWindowServerOverscanInsetBounds, _kCAWindowServerOverscanNone,
_kCAWindowServerOverscanScaleContent, _kCAWindowServerTVMode_NTSC_M,
_kCAWindowServerTVMode_PAL_BGHID, _kCAWindowServerTVSignalType_Component,
_kCAWindowServerTVSignalType_Composite, _kCAWindowServerTVSignalType_Digital,
_kCAWindowServerTVSignalType_None ]
objc-classes: [ CAAnimation, CAAnimationGroup, CABackdropLayer, CABasicAnimation,
CABoxLayoutManager, CAChameleonLayer, CACloningTerminatorLayer,
CAConstraint, CAConstraintLayoutManager, CAContext, CADisplay,
CADisplayAttributes, CADisplayLink, CADisplayMode, CADisplayModeCriteria,
CADisplayPreferences, CADisplayProperties, CADistanceFieldLayer,
CADynamicFrameRateSource, CAEAGLLayer, CAEDRMetadata, CAEmitterBehavior,
CAEmitterCell, CAEmitterLayer, CAExternalAnimation, CAFenceHandle,
CAFilter, CAFrameRateRangeGroup, CAGradientLayer, CAKeyframeAnimation,
CALayer, CALayerHost, CALinearMaskLayer, CAMLParser, CAMLWriter,
CAMatchMoveAnimation, CAMatchPropertyAnimation, CAMediaTimingFunction,
CAMeshTransform, CAMetalDrawable, CAMetalLayer, CAMutableDisplayPreferences,
CAMutableMeshTransform, CAOpenGLLayer, CAPackage, CAPluginLayer,
CAPortalLayer, CAPresentationModifier, CAPresentationModifierGroup,
CAPropertyAnimation, CAProxyLayer, CARemoteLayerClient, CARemoteLayerServer,
CARenderer, CAReplicatorLayer, CAScrollLayer, CAScrollLayoutManager,
CAShapeLayer, CASmoothedTextLayer, CASpringAnimation, CAState,
CAStateAddAnimation, CAStateAddElement, CAStateController,
CAStateElement, CAStateRemoveAnimation, CAStateRemoveElement,
CAStateSetValue, CAStateTransition, CAStateTransitionElement,
CATableLayoutManager, CATextLayer, CATiledLayer, CATransaction,
CATransactionCompletionItem, CATransformLayer, CATransition,
CAValueFunction, CAWindowServer, CAWindowServerDisplay, CAWindowServerVirtualDisplay,
CAWrappedLayoutManager ]
objc-ivars: [ CADisplayProperties._connectionSeed, CADisplayProperties._currentMode,
CADisplayProperties._overscanAdjustment, CAStateAddElement._beforeObject,
CAStateAddElement._keyPath, CAStateAddElement._object, CAStateElement._source,
CAStateElement._target, CAStateRemoveElement._keyPath, CAStateRemoveElement._object,
CAValueFunction._impl, CAValueFunction._string ]
- targets: [ x86_64-macos, arm64e-macos, arm64-macos ]
symbols: [ _CARenderContextGetRemoteInputMachTime ]
...
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h | /* CoreAnimation - CATransformLayer.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
NS_ASSUME_NONNULL_BEGIN
/* "Transform" layers are used to create true 3D layer hierarchies.
*
* Unlike normal layers, transform layers do not project (i.e. flatten)
* their sublayers into the plane at Z=0. However due to this neither
* do they support many features of the 2D compositing model:
*
* - only their sublayers are rendered (i.e. no background, contents,
* border)
*
* - filters, backgroundFilters, compositingFilter, mask, masksToBounds
* and shadow related properties are ignored (they all assume 2D
* image processing of the projected layer)
*
* - opacity is applied to each sublayer individually, i.e. the transform
* layer does not form a compositing group.
*
* Also, the -hitTest: method should never be called on transform
* layers (they do not have a 2D coordinate space into which to map the
* supplied point.) CALayer will pass over transform layers directly to
* their sublayers, applying the effects of the transform layer's
* geometry when hit-testing each sublayer. */
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0))
@interface CATransformLayer : CALayer
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h | /* CoreAnimation - CAReplicatorLayer.h
Copyright (c) 2008-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
NS_ASSUME_NONNULL_BEGIN
/* The replicator layer creates a specified number of copies of its
* sublayers, each copy potentially having geometric, temporal and
* color transformations applied to it.
*
* Note: the CALayer -hitTest: method currently only tests the first
* instance of z replicator layer's sublayers. This may change in the
* future. */
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0))
@interface CAReplicatorLayer : CALayer
/* The number of copies to create, including the source object.
* Default value is one (i.e. no extra copies). Animatable. */
@property NSInteger instanceCount;
/* Defines whether this layer flattens its sublayers into its plane or
* not (i.e. whether it's treated similarly to a transform layer or
* not). Defaults to NO. If YES, the standard restrictions apply (see
* CATransformLayer.h). */
@property BOOL preservesDepth;
/* The temporal delay between replicated copies. Defaults to zero.
* Animatable. */
@property CFTimeInterval instanceDelay;
/* The matrix applied to instance k-1 to produce instance k. The matrix
* is applied relative to the center of the replicator layer, i.e. the
* superlayer of each replicated sublayer. Defaults to the identity
* matrix. Animatable. */
@property CATransform3D instanceTransform;
/* The color to multiply the first object by (the source object). Defaults
* to opaque white. Animatable. */
@property(nullable) CGColorRef instanceColor;
/* The color components added to the color of instance k-1 to produce
* the modulation color of instance k. Defaults to the clear color (no
* change). Animatable. */
@property float instanceRedOffset;
@property float instanceGreenOffset;
@property float instanceBlueOffset;
@property float instanceAlphaOffset;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIFilterGenerator.h | #include <CoreImage/CIFilterGenerator.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIImage.h | #include <CoreImage/CIImage.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CoreVideo.h | #include <CoreVideo/CoreVideo.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h | #include <CoreImage/CoreImage.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h | /* CoreAnimation - CAEmitterCell.h
Copyright (c) 2007-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.6), ios(5.0), watchos(2.0), tvos(9.0))
@interface CAEmitterCell : NSObject <NSSecureCoding, CAMediaTiming>
{
@private
void *_attr[2];
void *_state;
uint32_t _flags;
}
+ (instancetype)emitterCell;
/* Emitter cells implement the same property model as defined by CALayer.
* See CALayer.h for more details. */
+ (nullable id)defaultValueForKey:(NSString *)key;
- (BOOL)shouldArchiveValueForKey:(NSString *)key;
/* The name of the cell. Used to construct key paths. Defaults to nil. */
@property(nullable, copy) NSString *name;
/* Controls whether or not cells from this emitter are rendered. */
@property(getter=isEnabled) BOOL enabled;
/* The number of emitted objects created every second. Default value is
* zero. Animatable. */
@property float birthRate;
/* The lifetime of each emitted object in seconds, specified as a mean
* value and a range about the mean. Both values default to zero.
* Animatable. */
@property float lifetime;
@property float lifetimeRange;
/* The orientation of the emission angle in radians, relative to the
* natural orientation angle of the emission shape. Note that latitude
* here is what is typically called colatitude, the zenith or phi, the
* angle from the z-axis. Similarly longitude is the angle in the
* xy-plane from the x-axis, often referred to as the azimuth or
* theta. Both values default to zero, which translates to no change
* relative to the emission shape's direction. Both values are
* animatable. */
@property CGFloat emissionLatitude;
@property CGFloat emissionLongitude;
/* An angle (in radians) defining a cone around the emission angle.
* Emitted objects are uniformly distributed across this cone. Defaults
* to zero. Animatable. */
@property CGFloat emissionRange;
/* The initial mean velocity of each emitted object, and its range. Both
* values default to zero. Animatable. */
@property CGFloat velocity;
@property CGFloat velocityRange;
/* The acceleration vector applied to emitted objects. Defaults to
* (0, 0, 0). Animatable. */
@property CGFloat xAcceleration;
@property CGFloat yAcceleration;
@property CGFloat zAcceleration;
/* The scale factor applied to each emitted object, defined as mean and
* range about the mean. Scale defaults to one, range to zero.
* Animatable. */
@property CGFloat scale;
@property CGFloat scaleRange;
@property CGFloat scaleSpeed;
/* The rotation speed applied to each emitted object, defined as mean
* and range about the mean. Defaults to zero. Animatable. */
@property CGFloat spin;
@property CGFloat spinRange;
/* The mean color of each emitted object, and the range from that mean
* color. `color' defaults to opaque white, `colorRange' to (0, 0, 0,
* 0). Animatable. */
@property(nullable) CGColorRef color;
@property float redRange;
@property float greenRange;
@property float blueRange;
@property float alphaRange;
/* The speed at which color components of emitted objects change over
* their lifetime, defined as the rate of change per second. Defaults
* to (0, 0, 0, 0). Animatable. */
@property float redSpeed;
@property float greenSpeed;
@property float blueSpeed;
@property float alphaSpeed;
/* The cell contents, typically a CGImageRef. Defaults to nil.
* Animatable. */
@property(nullable, strong) id contents;
/* The sub-rectangle of the contents image that will be drawn. See
* CALayer.h for more details. Defaults to the unit rectangle [0 0 1 1].
* Animatable. */
@property CGRect contentsRect;
/* Defines the scale factor applied to the contents of the cell. See
* CALayer.h for more details. */
@property CGFloat contentsScale;
/* The filter parameters used when rendering the `contents' image. See
* CALayer.h for more details. */
@property(copy) NSString *minificationFilter;
@property(copy) NSString *magnificationFilter;
@property float minificationFilterBias;
/* An array containing the sub-cells of this cell, or nil (the default
* value). When non-nil each particle emitted by the cell will act as
* an emitter for each of the cell's sub-cells. The emission point is
* the current particle position and the emission angle is relative to
* the current direction of the particle. Animatable. */
@property(nullable, copy) NSArray<CAEmitterCell *> *emitterCells;
/* Inherited attributes similar to in layers. */
@property(nullable, copy) NSDictionary *style;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIFilterShape.h | #include <CoreImage/CIFilterShape.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIRAWFilter.h | #include <CoreImage/CIRAWFilter.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h | /* CoreAnimation - CAMetalLayer.h
Copyright (c) 2013-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
#import <QuartzCore/CAEDRMetadata.h>
#import <Metal/MTLPixelFormat.h>
#import <Metal/MTLDrawable.h>
@protocol MTLDevice;
@protocol MTLTexture;
@protocol MTLDrawable;
@class CAMetalLayer;
NS_ASSUME_NONNULL_BEGIN
/* CAMetalDrawable represents a displayable buffer that vends an object
* that conforms to the MTLTexture protocol that may be used to create
* a render target for Metal.
*
* Note: CAMetalLayer maintains an internal pool of textures used for
* display. In order for a texture to be re-used for a new CAMetalDrawable,
* any prior CAMetalDrawable must have been deallocated and another
* CAMetalDrawable presented. */
@protocol CAMetalDrawable <MTLDrawable>
/* This is an object that conforms to the MTLTexture protocol and will
* typically be used to create an MTLRenderTargetDescriptor. */
@property(readonly) id<MTLTexture> texture;
/* This is the CAMetalLayer responsible for displaying the drawable */
@property(readonly) CAMetalLayer *layer;
@end
/* Note: The default value of the `opaque' property for CAMetalLayer
* instances is true. */
API_AVAILABLE(macos(10.11), ios(8.0), watchos(2.0), tvos(9.0))
@interface CAMetalLayer : CALayer
{
@private
struct _CAMetalLayerPrivate *_priv;
}
/* This property determines which MTLDevice the MTLTexture objects for
* the drawables will be created from.
* On iOS this defaults to MTLCreateSystemDefaultDevice().
* On macOS this defaults to nil and must be set explicitly before asking for
* the first drawable. */
@property(nullable, retain) id<MTLDevice> device;
/* This property returns the preferred MTLDevice for this CAMetalLayer. */
@property(nullable, readonly) id<MTLDevice> preferredDevice
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/* This property controls the pixel format of the MTLTexture objects.
* The two supported values are MTLPixelFormatBGRA8Unorm and
* MTLPixelFormatBGRA8Unorm_sRGB. */
@property MTLPixelFormat pixelFormat;
/* This property controls whether or not the returned drawables'
* MTLTextures may only be used for framebuffer attachments (YES) or
* whether they may also be used for texture sampling and pixel
* read/write operations (NO). A value of YES allows CAMetalLayer to
* allocate the MTLTexture objects in ways that are optimized for display
* purposes that makes them unsuitable for sampling. The recommended
* value for most applications is YES. */
@property BOOL framebufferOnly;
/* This property controls the pixel dimensions of the returned drawable
* objects. The most typical value will be the layer size multiplied by
* the layer contentsScale property. */
@property CGSize drawableSize;
/* Get the swap queue's next available drawable. Always blocks until a drawable
* is available. Can return nil under the following conditions:
* 1) The layer has an invalid combination of drawable properties.
* 2) All drawables in the swap queue are in-use and the 1 second timeout
* has elapsed. (except when `allowsNextDrawableTimeout' is set to NO)
* 3) Process is out of memory. */
- (nullable id<CAMetalDrawable>)nextDrawable;
/* Controls the number maximum number of drawables in the swap queue. The
* default value is 3. Values set outside of range [2, 3] are ignored and an
* exception will be thrown. */
@property NSUInteger maximumDrawableCount
API_AVAILABLE(macos(10.13.2), ios(11.2), watchos(4.2), tvos(11.2));
/* When false (the default value) changes to the layer's render buffer
* appear on-screen asynchronously to normal layer updates. When true,
* changes to the MTL content are sent to the screen via the standard
* CATransaction mechanisms. */
@property BOOL presentsWithTransaction;
/* The colorspace of the rendered frames. If nil, no colormatching occurs.
* If non-nil, the rendered content will be colormatched to the colorspace of
* the context containing this layer (typically the display's colorspace). */
@property (nullable) CGColorSpaceRef colorspace;
/* If any rendering context on the screen has this enabled, all content will be
* clamped to its NSScreen’s maximumExtendedDynamicRangeColorComponentValue
* rather than 1.0. The default is NO. */
@property BOOL wantsExtendedDynamicRangeContent;
/* Metadata describing extended dynamic range content in the layer's drawable.
* Must be set before calling nextDrawable. If non-nil, content may be
* tone mapped to match the current display characteristics. If nil, samples
* will be rendered without tone mapping and values above the maximum EDR value
* -[NSScreen maximumExtendedDynamicRangeColorComponentValue] may be clamped.
* Defaults to nil. */
@property (strong, nullable) CAEDRMetadata *EDRMetadata API_AVAILABLE(macos(10.15));
/* This property controls if this layer and its drawables will be synchronized
* to the display's Vsync. The default value is YES. */
@property BOOL displaySyncEnabled API_AVAILABLE(macos(10.13));
/* Controls if `-nextDrawable' is allowed to timeout after 1 second and return
* nil if * the system does not have a free drawable available. The default
* value is YES. If set to NO, then `-nextDrawable' will block forever until a
* free drawable is available. */
@property BOOL allowsNextDrawableTimeout
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVReturn.h | #include <CoreVideo/CVReturn.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h | /* CoreAnimation - CATiledLayer.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
/* This is a subclass of CALayer providing a way to asynchronously
* provide tiles of the layer's content, potentially cached at multiple
* levels of detail.
*
* As more data is required by the renderer, the layer's
* -drawInContext: method is called on one or more background threads
* to supply the drawing operations to fill in one tile of data. The
* clip bounds and CTM of the drawing context can be used to determine
* the bounds and resolution of the tile being requested.
*
* Regions of the layer may be invalidated using the usual
* -setNeedsDisplayInRect: method. However update will be asynchronous,
* i.e. the next display update will most likely not contain the
* changes, but a future update will.
*
* Note: do not attempt to directly modify the `contents' property of
* an CATiledLayer object - doing so will effectively turn it into a
* regular CALayer. */
#import <QuartzCore/CALayer.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CATiledLayer : CALayer
/* The time in seconds that newly added images take to "fade-in" to the
* rendered representation of the tiled layer. The default implementation
* returns 0.25 seconds. */
+ (CFTimeInterval)fadeDuration;
/* The number of levels of detail maintained by this layer. Defaults to
* one. Each LOD is half the resolution of the previous level. If too
* many levels are specified for the current size of the layer, then
* the number of levels is clamped to the maximum value (the bottom
* most LOD must contain at least a single pixel in each dimension). */
@property size_t levelsOfDetail;
/* The number of magnified levels of detail for this layer. Defaults to
* zero. Each previous level of detail is twice the resolution of the
* later. E.g. specifying 'levelsOfDetailBias' of two means that the
* layer devotes two of its specified levels of detail to
* magnification, i.e. 2x and 4x. */
@property size_t levelsOfDetailBias;
/* The maximum size of each tile used to create the layer's content.
* Defaults to (256, 256). Note that there is a maximum tile size, and
* requests for tiles larger than that limit will cause a suitable
* value to be substituted. */
@property CGSize tileSize;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIKernel.h | #include <CoreImage/CIKernel.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVOpenGLTexture.h | #include <CoreVideo/CVOpenGLTexture.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVBase.h | #include <CoreVideo/CVBase.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVPixelFormatDescription.h | #include <CoreVideo/CVPixelFormatDescription.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAOpenGLLayer.h | /* CoreAnimation - CAOpenGLLayer.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
#import <CoreVideo/CVBase.h>
#import <OpenGL/OpenGL.h>
NS_ASSUME_NONNULL_BEGIN
#ifndef GL_SILENCE_DEPRECATION
API_DEPRECATED("OpenGL is deprecated", macos(10.5, 10.14))
#else
API_AVAILABLE(macos(10.5))
#endif
@interface CAOpenGLLayer : CALayer
{
@private
struct CAOpenGLLayerPrivate *_glPriv;
}
/* When false the contents of the layer is only updated in response to
* -setNeedsDisplay messages. When true the layer is asked to redraw
* periodically with timestamps matching the display update frequency.
* The default value is NO. */
@property(getter=isAsynchronous) BOOL asynchronous;
/* Called before attempting to render the frame for layer time 't'.
* When non-null 'ts' describes the display timestamp associated with
* layer time 't'. If the method returns false, the frame is skipped. The
* default implementation always returns YES. */
- (BOOL)canDrawInCGLContext:(CGLContextObj)ctx
pixelFormat:(CGLPixelFormatObj)pf forLayerTime:(CFTimeInterval)t
displayTime:(nullable const CVTimeStamp *)ts;
/* Called when a new frame needs to be generated for layer time 't'.
* 'ctx' is attached to the rendering destination. It's state is
* otherwise undefined. When non-null 'ts' describes the display
* timestamp associated with layer time 't'. Subclasses should call
* the superclass implementation of the method to flush the context
* after rendering. */
- (void)drawInCGLContext:(CGLContextObj)ctx pixelFormat:(CGLPixelFormatObj)pf
forLayerTime:(CFTimeInterval)t displayTime:(nullable const CVTimeStamp *)ts;
/* This method will be called by the CAOpenGLLayer implementation when
* a pixel format object is needed for the layer. Should return an
* OpenGL pixel format suitable for rendering to the set of displays
* defined by the display mask 'mask'. The default implementation
* returns a 32bpp fixed point pixel format, with NoRecovery and
* Accelerated flags set. */
- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask;
/* Called when the OpenGL pixel format 'pf' that was previously
* returned from -copyCGLPixelFormatForDisplayMask: is no longer
* needed. */
- (void)releaseCGLPixelFormat:(CGLPixelFormatObj)pf;
/* Called by the CAOpenGLLayer implementation when a rendering context
* is needed by the layer. Should return an OpenGL context with
* renderers from pixel format 'pf'. The default implementation
* allocates a new context with a null share context. */
- (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pf;
/* Called when the OpenGL context 'ctx' that was previously returned
* from -copyCGLContextForPixelFormat: is no longer needed. */
- (void)releaseCGLContext:(CGLContextObj)ctx;
/* The colorspace of the rendered frames. If nil, no colormatching occurs.
* If non-nil, the rendered content will be colormatched to the colorspace of
* the context containing this layer (typically the display's colorspace). */
@property (nullable) CGColorSpaceRef colorspace;
/* If any rendering context on the screen has this enabled, all content will be
* clamped to its NSScreen’s maximumExtendedDynamicRangeColorComponentValue
* rather than 1.0. The default is NO. */
@property BOOL wantsExtendedDynamicRangeContent;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h | /* CoreAnimation - CAMediaTiming.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CABase.h>
#import <objc/objc.h>
#import <Foundation/NSObject.h>
/* The CAMediaTiming protocol is implemented by layers and animations, it
* models a hierarchical timing system, with each object describing the
* mapping from time values in the object's parent to local time.
*
* Absolute time is defined as mach time converted to seconds. The
* CACurrentMediaTime function is provided as a convenience for querying the
* current absolute time.
*
* The conversion from parent time to local time has two stages:
*
* 1. conversion to "active local time". This includes the point at
* which the object appears in the parent's timeline, and how fast it
* plays relative to the parent.
*
* 2. conversion from active to "basic local time". The timing model
* allows for objects to repeat their basic duration multiple times,
* and optionally to play backwards before repeating. */
@class NSString;
typedef NSString * CAMediaTimingFillMode NS_TYPED_ENUM;
NS_ASSUME_NONNULL_BEGIN
@protocol CAMediaTiming
/* The begin time of the object, in relation to its parent object, if
* applicable. Defaults to 0. */
@property CFTimeInterval beginTime;
/* The basic duration of the object. Defaults to 0. */
@property CFTimeInterval duration;
/* The rate of the layer. Used to scale parent time to local time, e.g.
* if rate is 2, local time progresses twice as fast as parent time.
* Defaults to 1. */
@property float speed;
/* Additional offset in active local time. i.e. to convert from parent
* time tp to active local time t: t = (tp - begin) * speed + offset.
* One use of this is to "pause" a layer by setting `speed' to zero and
* `offset' to a suitable value. Defaults to 0. */
@property CFTimeInterval timeOffset;
/* The repeat count of the object. May be fractional. Defaults to 0. */
@property float repeatCount;
/* The repeat duration of the object. Defaults to 0. */
@property CFTimeInterval repeatDuration;
/* When true, the object plays backwards after playing forwards. Defaults
* to NO. */
@property BOOL autoreverses;
/* Defines how the timed object behaves outside its active duration.
* Local time may be clamped to either end of the active duration, or
* the element may be removed from the presentation. The legal values
* are `backwards', `forwards', `both' and `removed'. Defaults to
* `removed'. */
@property(copy) CAMediaTimingFillMode fillMode;
@end
/* `fillMode' options. */
CA_EXTERN CAMediaTimingFillMode const kCAFillModeForwards
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFillMode const kCAFillModeBackwards
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFillMode const kCAFillModeBoth
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFillMode const kCAFillModeRemoved
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h | /* CoreAnimation - CATransform3D.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#ifndef CATRANSFORM_H
#define CATRANSFORM_H
#include <QuartzCore/CABase.h>
#ifdef __OBJC__
#import <Foundation/NSValue.h>
#endif
/* Homogeneous three-dimensional transforms. */
struct CATransform3D
{
CGFloat m11, m12, m13, m14;
CGFloat m21, m22, m23, m24;
CGFloat m31, m32, m33, m34;
CGFloat m41, m42, m43, m44;
};
typedef struct CA_BOXABLE CATransform3D CATransform3D;
CA_EXTERN_C_BEGIN
/* The identity transform: [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]. */
CA_EXTERN const CATransform3D CATransform3DIdentity
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns true if 't' is the identity transform. */
CA_EXTERN bool CATransform3DIsIdentity (CATransform3D t)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns true if 'a' is exactly equal to 'b'. */
CA_EXTERN bool CATransform3DEqualToTransform (CATransform3D a,
CATransform3D b)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns a transform that translates by '(tx, ty, tz)':
* t' = [1 0 0 0; 0 1 0 0; 0 0 1 0; tx ty tz 1]. */
CA_EXTERN CATransform3D CATransform3DMakeTranslation (CGFloat tx,
CGFloat ty, CGFloat tz)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns a transform that scales by `(sx, sy, sz)':
* t' = [sx 0 0 0; 0 sy 0 0; 0 0 sz 0; 0 0 0 1]. */
CA_EXTERN CATransform3D CATransform3DMakeScale (CGFloat sx, CGFloat sy,
CGFloat sz)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns a transform that rotates by 'angle' radians about the vector
* '(x, y, z)'. If the vector has length zero the identity transform is
* returned. */
CA_EXTERN CATransform3D CATransform3DMakeRotation (CGFloat angle, CGFloat x,
CGFloat y, CGFloat z)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Translate 't' by '(tx, ty, tz)' and return the result:
* t' = translate(tx, ty, tz) * t. */
CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx,
CGFloat ty, CGFloat tz)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Scale 't' by '(sx, sy, sz)' and return the result:
* t' = scale(sx, sy, sz) * t. */
CA_EXTERN CATransform3D CATransform3DScale (CATransform3D t, CGFloat sx,
CGFloat sy, CGFloat sz)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Rotate 't' by 'angle' radians about the vector '(x, y, z)' and return
* the result. If the vector has zero length the behavior is undefined:
* t' = rotation(angle, x, y, z) * t. */
CA_EXTERN CATransform3D CATransform3DRotate (CATransform3D t, CGFloat angle,
CGFloat x, CGFloat y, CGFloat z)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Concatenate 'b' to 'a' and return the result: t' = a * b. */
CA_EXTERN CATransform3D CATransform3DConcat (CATransform3D a, CATransform3D b)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Invert 't' and return the result. Returns the original matrix if 't'
* has no inverse. */
CA_EXTERN CATransform3D CATransform3DInvert (CATransform3D t)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Return a transform with the same effect as affine transform 'm'. */
CA_EXTERN CATransform3D CATransform3DMakeAffineTransform (CGAffineTransform m)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns true if 't' can be represented exactly by an affine transform. */
CA_EXTERN bool CATransform3DIsAffine (CATransform3D t)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Returns the affine transform represented by 't'. If 't' can not be
* represented exactly by an affine transform the returned value is
* undefined. */
CA_EXTERN CGAffineTransform CATransform3DGetAffineTransform (CATransform3D t)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN_C_END
/** NSValue support. **/
#ifdef __OBJC__
NS_ASSUME_NONNULL_BEGIN
@interface NSValue (CATransform3DAdditions)
+ (NSValue *)valueWithCATransform3D:(CATransform3D)t;
@property(readonly) CATransform3D CATransform3DValue;
@end
NS_ASSUME_NONNULL_END
#endif /* __OBJC__ */
#endif /* CATRANSFORM_H */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h | /* CoreAnimation - CADisplayLink.h
Copyright (c) 2009-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CABase.h>
#import <QuartzCore/CAFrameRateRange.h>
#import <Foundation/NSObject.h>
@class NSString, NSRunLoop;
NS_ASSUME_NONNULL_BEGIN
/** Class representing a timer bound to the display vsync. **/
API_AVAILABLE(ios(3.1), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos)
@interface CADisplayLink : NSObject
{
@private
void *_impl;
}
/* Create a new display link object for the main display. It will
* invoke the method called 'sel' on 'target', the method has the
* signature '(void)selector:(CADisplayLink *)sender'. */
+ (CADisplayLink *)displayLinkWithTarget:(id)target selector:(SEL)sel;
/* Adds the receiver to the given run-loop and mode. Unless paused, it
* will fire every vsync until removed. Each object may only be added
* to a single run-loop, but it may be added in multiple modes at once.
* While added to a run-loop it will implicitly be retained. */
- (void)addToRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode;
/* Removes the receiver from the given mode of the runloop. This will
* implicitly release it when removed from the last mode it has been
* registered for. */
- (void)removeFromRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode;
/* Removes the object from all runloop modes (releasing the receiver if
* it has been implicitly retained) and releases the 'target' object. */
- (void)invalidate;
/* The current time, and duration of the display frame associated with
* the most recent target invocation. Time is represented using the
* normal Core Animation conventions, i.e. Mach host time converted to
* seconds. */
@property(readonly, nonatomic) CFTimeInterval timestamp;
@property(readonly, nonatomic) CFTimeInterval duration;
/* The next timestamp that the client should target their render for. */
@property(readonly, nonatomic) CFTimeInterval targetTimestamp
API_AVAILABLE(ios(10.0), watchos(3.0), tvos(10.0));
/* When true the object is prevented from firing. Initial state is
* false. */
@property(getter=isPaused, nonatomic) BOOL paused;
/* Defines how many display frames must pass between each time the
* display link fires. Default value is one, which means the display
* link will fire for every display frame. Setting the interval to two
* will cause the display link to fire every other display frame, and
* so on. The behavior when using values less than one is undefined.
* DEPRECATED - use preferredFramesPerSecond. */
@property(nonatomic) NSInteger frameInterval
API_DEPRECATED("preferredFramesPerSecond", ios(3.1, 10.0),
watchos(2.0, 3.0), tvos(9.0, 10.0));
/* Defines the desired callback rate in frames-per-second for this display
* link. If set to zero, the default value, the display link will fire at the
* native cadence of the display hardware. The display link will make a
* best-effort attempt at issuing callbacks at the requested rate. */
@property(nonatomic) NSInteger preferredFramesPerSecond
API_DEPRECATED_WITH_REPLACEMENT ("preferredFrameRateRange",
ios(10.0, API_TO_BE_DEPRECATED),
watchos(3.0, API_TO_BE_DEPRECATED),
tvos(10.0, API_TO_BE_DEPRECATED));
/* Defines the range of desired callback rate in frames-per-second for this
display link. If the range contains the same minimum and maximum frame rate,
this property is identical as preferredFramesPerSecond. Otherwise, the actual
callback rate will be dynamically adjusted to better align with other
animation sources. */
@property(nonatomic) CAFrameRateRange preferredFrameRateRange
API_AVAILABLE(ios(15.0), watchos(8.0), tvos(15.0));
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CARemoteLayerServer.h | /* CoreAnimation - CARemoteLayerServer.h
Copyright (c) 2010-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
#import <Foundation/NSObject.h>
#import <mach/mach.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.7))
@interface CARemoteLayerServer : NSObject
{
}
/* Return the singleton server instance. */
+ (CARemoteLayerServer *)sharedServer;
/* The Mach port that the server listens for new clients on. This
* should be sent to other processes that want to export layer trees
* into the server. */
@property(readonly) mach_port_t serverPort;
@end
@interface CALayer (CARemoteLayerServer)
/* Returns a layer that renders the root layer of the client with the given
* identifier as an extra implicit sublayer. */
+ (CALayer *)layerWithRemoteClientId:(uint32_t)client_id;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h | /* CoreAnimation - CAAnimation.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
#import <QuartzCore/CAFrameRateRange.h>
#import <Foundation/NSObject.h>
@class NSArray, NSString, CAMediaTimingFunction, CAValueFunction;
@protocol CAAnimationDelegate;
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CAAnimationCalculationMode NS_TYPED_ENUM;
typedef NSString * CAAnimationRotationMode NS_TYPED_ENUM;
typedef NSString * CATransitionType NS_TYPED_ENUM;
typedef NSString * CATransitionSubtype NS_TYPED_ENUM;
/** The base animation class. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CAAnimation : NSObject
<NSSecureCoding, NSCopying, CAMediaTiming, CAAction>
{
@private
void *_attr;
uint32_t _flags;
}
/* Creates a new animation object. */
+ (instancetype)animation;
/* Animations implement the same property model as defined by CALayer.
* See CALayer.h for more details. */
+ (nullable id)defaultValueForKey:(NSString *)key;
- (BOOL)shouldArchiveValueForKey:(NSString *)key;
/* A timing function defining the pacing of the animation. Defaults to
* nil indicating linear pacing. */
@property(nullable, strong) CAMediaTimingFunction *timingFunction;
/* The delegate of the animation. This object is retained for the
* lifetime of the animation object. Defaults to nil. See below for the
* supported delegate methods. */
@property(nullable, strong) id <CAAnimationDelegate> delegate;
/* When true, the animation is removed from the render tree once its
* active duration has passed. Defaults to YES. */
@property(getter=isRemovedOnCompletion) BOOL removedOnCompletion;
/* Defines the range of desired frame rate in frames-per-second for this
animation. The actual frame rate is dynamically adjusted to better align
with other animation sources. */
@property CAFrameRateRange preferredFrameRateRange
API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
@end
/* Delegate methods for CAAnimation. */
@protocol CAAnimationDelegate <NSObject>
@optional
/* Called when the animation begins its active duration. */
- (void)animationDidStart:(CAAnimation *)anim;
/* Called when the animation either completes its active duration or
* is removed from the object it is attached to (i.e. the layer). 'flag'
* is true if the animation reached the end of its active duration
* without being removed. */
- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag;
@end
/** Subclass for property-based animations. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CAPropertyAnimation : CAAnimation
/* Creates a new animation object with its `keyPath' property set to
* 'path'. */
+ (instancetype)animationWithKeyPath:(nullable NSString *)path;
/* The key-path describing the property to be animated. */
@property(nullable, copy) NSString *keyPath;
/* When true the value specified by the animation will be "added" to
* the current presentation value of the property to produce the new
* presentation value. The addition function is type-dependent, e.g.
* for affine transforms the two matrices are concatenated. Defaults to
* NO. */
@property(getter=isAdditive) BOOL additive;
/* The `cumulative' property affects how repeating animations produce
* their result. If true then the current value of the animation is the
* value at the end of the previous repeat cycle, plus the value of the
* current repeat cycle. If false, the value is simply the value
* calculated for the current repeat cycle. Defaults to NO. */
@property(getter=isCumulative) BOOL cumulative;
/* If non-nil a function that is applied to interpolated values
* before they are set as the new presentation value of the animation's
* target property. Defaults to nil. */
@property(nullable, strong) CAValueFunction *valueFunction;
@end
/** Subclass for basic (single-keyframe) animations. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CABasicAnimation : CAPropertyAnimation
/* The objects defining the property values being interpolated between.
* All are optional, and no more than two should be non-nil. The object
* type should match the type of the property being animated (using the
* standard rules described in CALayer.h). The supported modes of
* animation are:
*
* - both `fromValue' and `toValue' non-nil. Interpolates between
* `fromValue' and `toValue'.
*
* - `fromValue' and `byValue' non-nil. Interpolates between
* `fromValue' and `fromValue' plus `byValue'.
*
* - `byValue' and `toValue' non-nil. Interpolates between `toValue'
* minus `byValue' and `toValue'.
*
* - `fromValue' non-nil. Interpolates between `fromValue' and the
* current presentation value of the property.
*
* - `toValue' non-nil. Interpolates between the layer's current value
* of the property in the render tree and `toValue'.
*
* - `byValue' non-nil. Interpolates between the layer's current value
* of the property in the render tree and that plus `byValue'. */
@property(nullable, strong) id fromValue;
@property(nullable, strong) id toValue;
@property(nullable, strong) id byValue;
@end
/** General keyframe animation class. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CAKeyframeAnimation : CAPropertyAnimation
/* An array of objects providing the value of the animation function for
* each keyframe. */
@property(nullable, copy) NSArray *values;
/* An optional path object defining the behavior of the animation
* function. When non-nil overrides the `values' property. Each point
* in the path except for `moveto' points defines a single keyframe for
* the purpose of timing and interpolation. Defaults to nil. For
* constant velocity animation along the path, `calculationMode' should
* be set to `paced'. Upon assignment the path is copied. */
@property(nullable) CGPathRef path;
/* An optional array of `NSNumber' objects defining the pacing of the
* animation. Each time corresponds to one value in the `values' array,
* and defines when the value should be used in the animation function.
* Each value in the array is a floating point number in the range
* [0,1]. */
@property(nullable, copy) NSArray<NSNumber *> *keyTimes;
/* An optional array of CAMediaTimingFunction objects. If the `values' array
* defines n keyframes, there should be n-1 objects in the
* `timingFunctions' array. Each function describes the pacing of one
* keyframe to keyframe segment. */
@property(nullable, copy) NSArray<CAMediaTimingFunction *> *timingFunctions;
/* The "calculation mode". Possible values are `discrete', `linear',
* `paced', `cubic' and `cubicPaced'. Defaults to `linear'. When set to
* `paced' or `cubicPaced' the `keyTimes' and `timingFunctions'
* properties of the animation are ignored and calculated implicitly. */
@property(copy) CAAnimationCalculationMode calculationMode;
/* For animations with the cubic calculation modes, these properties
* provide control over the interpolation scheme. Each keyframe may
* have a tension, continuity and bias value associated with it, each
* in the range [-1, 1] (this defines a Kochanek-Bartels spline, see
* http://en.wikipedia.org/wiki/Kochanek-Bartels_spline).
*
* The tension value controls the "tightness" of the curve (positive
* values are tighter, negative values are rounder). The continuity
* value controls how segments are joined (positive values give sharp
* corners, negative values give inverted corners). The bias value
* defines where the curve occurs (positive values move the curve before
* the control point, negative values move it after the control point).
*
* The first value in each array defines the behavior of the tangent to
* the first control point, the second value controls the second
* point's tangents, and so on. Any unspecified values default to zero
* (giving a Catmull-Rom spline if all are unspecified). */
@property(nullable, copy) NSArray<NSNumber *> *tensionValues;
@property(nullable, copy) NSArray<NSNumber *> *continuityValues;
@property(nullable, copy) NSArray<NSNumber *> *biasValues;
/* Defines whether or objects animating along paths rotate to match the
* path tangent. Possible values are `auto' and `autoReverse'. Defaults
* to nil. The effect of setting this property to a non-nil value when
* no path object is supplied is undefined. `autoReverse' rotates to
* match the tangent plus 180 degrees. */
@property(nullable, copy) CAAnimationRotationMode rotationMode;
@end
/* `calculationMode' strings. */
CA_EXTERN CAAnimationCalculationMode const kCAAnimationLinear
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAAnimationCalculationMode const kCAAnimationDiscrete
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAAnimationCalculationMode const kCAAnimationPaced
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAAnimationCalculationMode const kCAAnimationCubic
API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAAnimationCalculationMode const kCAAnimationCubicPaced
API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
/* `rotationMode' strings. */
CA_EXTERN CAAnimationRotationMode const kCAAnimationRotateAuto
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAAnimationRotationMode const kCAAnimationRotateAutoReverse
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/** Subclass for mass-spring animations. */
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface CASpringAnimation : CABasicAnimation
/* The mass of the object attached to the end of the spring. Must be greater
than 0. Defaults to one. */
@property CGFloat mass;
/* The spring stiffness coefficient. Must be greater than 0.
* Defaults to 100. */
@property CGFloat stiffness;
/* The damping coefficient. Must be greater than or equal to 0.
* Defaults to 10. */
@property CGFloat damping;
/* The initial velocity of the object attached to the spring. Defaults
* to zero, which represents an unmoving object. Negative values
* represent the object moving away from the spring attachment point,
* positive values represent the object moving towards the spring
* attachment point. */
@property CGFloat initialVelocity;
/* Returns the estimated duration required for the spring system to be
* considered at rest. The duration is evaluated for the current animation
* parameters. */
@property(readonly) CFTimeInterval settlingDuration;
@end
/** Transition animation subclass. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CATransition : CAAnimation
/* The name of the transition. Current legal transition types include
* `fade', `moveIn', `push' and `reveal'. Defaults to `fade'. */
@property(copy) CATransitionType type;
/* An optional subtype for the transition. E.g. used to specify the
* transition direction for motion-based transitions, in which case
* the legal values are `fromLeft', `fromRight', `fromTop' and
* `fromBottom'. */
@property(nullable, copy) CATransitionSubtype subtype;
/* The amount of progress through to the transition at which to begin
* and end execution. Legal values are numbers in the range [0,1].
* `endProgress' must be greater than or equal to `startProgress'.
* Default values are 0 and 1 respectively. */
@property float startProgress;
@property float endProgress;
/* An optional filter object implementing the transition. When set the
* `type' and `subtype' properties are ignored. The filter must
* implement `inputImage', `inputTargetImage' and `inputTime' input
* keys, and the `outputImage' output key. Optionally it may support
* the `inputExtent' key, which will be set to a rectangle describing
* the region in which the transition should run. Defaults to nil. */
@property(nullable, strong) id filter;
@end
/* Common transition types. */
CA_EXTERN CATransitionType const kCATransitionFade
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CATransitionType const kCATransitionMoveIn
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CATransitionType const kCATransitionPush
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CATransitionType const kCATransitionReveal
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Common transition subtypes. */
CA_EXTERN CATransitionSubtype const kCATransitionFromRight
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CATransitionSubtype const kCATransitionFromLeft
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CATransitionSubtype const kCATransitionFromTop
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CATransitionSubtype const kCATransitionFromBottom
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/** Animation subclass for grouped animations. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CAAnimationGroup : CAAnimation
/* An array of CAAnimation objects. Each member of the array will run
* concurrently in the time space of the parent animation using the
* normal rules. */
@property(nullable, copy) NSArray<CAAnimation *> *animations;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIPlugIn.h | #include <CoreImage/CIPlugIn.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVImageBuffer.h | #include <CoreVideo/CVImageBuffer.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVHostTime.h | #include <CoreVideo/CVHostTime.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAEDRMetadata.h | /* CoreAnimation - CAEDRMetadata.h
Copyright (c) 2018-2021, Apple Inc.
All rights reserved. */
#ifndef CAEDRMetadata_h
#define CAEDRMetadata_h
#include <Foundation/NSObject.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.15))
@interface CAEDRMetadata : NSObject
{
@private
struct _CAEDRMetadataPrivate *_priv;
}
/* Use one of the class methods to instantiate CAEDRMetadata. */
- (instancetype)init NS_UNAVAILABLE;
/* The following two selectors are for static mastering display color volume and
* content light level info - typically associated with "HDR10" content. The
* data is treated as display referred with 1.0 mapping to diffuse white of 100
* nits in a reference grading environment. */
/* Initialize with SEI MDCV and CLLI as defined by ISO/IEC 23008-2:2017
*
* `displayData'
* The value is 24 bytes containing a big-endian structure as defined in D.2.28
* Mastering display colour volume SEI message. If nil, uses system defaults.
*
* `contentData'
* The value is 4 bytes containing a big-endian structure as defined in D.2.35
* Content light level information SEI message. If nil, uses system defaults.
*
* `scale'
* Scale factor relating (display-referred linear) extended range buffer values
* (such as MTLPixelFormatRGBA16Float) to optical output of a reference display.
* Values y in the buffer are assumed to be proportional to the optical output
* C (in cd/m^2) of a reference display; denoting the opticalOutputScale as C1
* (cd/m^2), the relationship is C = C1 * y. As an example, if C1 = 100 cd/m^2,
* the optical output corresponding to y = 1 is C = C1 = 100 cd/m^2, and the
* display-referred linear value corresponding to C = 4,000 cd/m^2 is y = 40.
* If the content, y, is in a normalized pixel format then `scale' is
* assumed to be 10,000. */
+ (CAEDRMetadata *)HDR10MetadataWithDisplayInfo:(nullable NSData *)displayData
contentInfo:(nullable NSData *)contentData
opticalOutputScale:(float)scale NS_SWIFT_NAME(hdr10(displayInfo:contentInfo:opticalOutputScale:));
/* Simplified HDR10 initializer based on the minimum and maximum candelas per
* meters squared ("nits") of the mastering display. Any content greater than
* `maxNits' may be clamped when displayed.
*
* `minNits'
* Minimum nits (cd/m^2) of the mastering display
*
* `maxNits'
* Maximum nits (cd/m^2) of the mastering display
*
* `scale'
* Scale factor relating (display-referred linear) extended range buffer values
* (such as MTLPixelFormatRGBA16Float) to optical output of a reference display.
* Values y in the buffer are assumed to be proportional to the optical output
* C (in cd/m^2) of a reference display; denoting the opticalOutputScale as C1
* (cd/m^2), the relationship is C = C1 * y. As an example, if C1 = 100 cd/m^2,
* the optical output corresponding to y = 1 is C = C1 = 100 cd/m^2, and the
* display-referred linear value corresponding to C = 4,000 cd/m^2 is y = 40.
* If the content, y, is in a normalized pixel format then `scale' is
* assumed to be 10,000.
*/
+ (CAEDRMetadata *)HDR10MetadataWithMinLuminance:(float)minNits
maxLuminance:(float)maxNits
opticalOutputScale:(float)scale NS_SWIFT_NAME(hdr10(minLuminance:maxLuminance:opticalOutputScale:));
/* Content is scene referred and originally encoded with the ITU-R BT.2100-2
* Hybrid Log Gamma (HLG) opto-electrical transfer function (OETF). The system
* will apply the opto-optical transfer function (OOTF) based on peak display
* brightness and ambient. If rendering to a CAMetalLayer with a linear
* colorspace (for floating point extended dynamic range layers), the content
* provider must have already applied the HLG inverse OETF. */
@property (class, readonly, retain) CAEDRMetadata *HLGMetadata;
@end
NS_ASSUME_NONNULL_END
#endif /* CAEDRMetadata_h */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVOpenGLTextureCache.h | #include <CoreVideo/CVOpenGLTextureCache.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h | /* CoreAnimation - CAGradientLayer.h
Copyright (c) 2008-2021, Apple Inc.
All rights reserved. */
/* The gradient layer draws a color gradient over its background color,
* filling the shape of the layer (i.e. including rounded corners). */
#import <QuartzCore/CALayer.h>
#import <QuartzCore/CAMediaTimingFunction.h>
#import <Foundation/NSArray.h>
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CAGradientLayerType NS_TYPED_ENUM;
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0))
@interface CAGradientLayer : CALayer
/* The array of CGColorRef objects defining the color of each gradient
* stop. Defaults to nil. Animatable. */
@property(nullable, copy) NSArray *colors;
/* An optional array of NSNumber objects defining the location of each
* gradient stop as a value in the range [0,1]. The values must be
* monotonically increasing. If a nil array is given, the stops are
* assumed to spread uniformly across the [0,1] range. When rendered,
* the colors are mapped to the output colorspace before being
* interpolated. Defaults to nil. Animatable. */
@property(nullable, copy) NSArray<NSNumber *> *locations;
/* The start and end points of the gradient when drawn into the layer's
* coordinate space. The start point corresponds to the first gradient
* stop, the end point to the last gradient stop. Both points are
* defined in a unit coordinate space that is then mapped to the
* layer's bounds rectangle when drawn. (I.e. [0,0] is the bottom-left
* corner of the layer, [1,1] is the top-right corner.) The default values
* are [.5,0] and [.5,1] respectively. Both are animatable. */
@property CGPoint startPoint;
@property CGPoint endPoint;
/* The kind of gradient that will be drawn. Currently, the only allowed
* values are `axial' (the default value), `radial', and `conic'. */
@property(copy) CAGradientLayerType type;
@end
/** `type' values. **/
CA_EXTERN CAGradientLayerType const kCAGradientLayerAxial
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* Radial gradient. The gradient is defined as an ellipse with its
* center at 'startPoint' and its width and height defined by
* '(endPoint.x - startPoint.x) * 2' and '(endPoint.y - startPoint.y) *
* 2' respectively. */
CA_EXTERN CAGradientLayerType const kCAGradientLayerRadial
API_AVAILABLE(macos(10.6), ios(3.2), watchos(2.0), tvos(9.0));
/* Conic gradient. The gradient is centered at 'startPoint' and its 0-degrees
* direction is defined by a vector spanned between 'startPoint' and
* 'endPoint'. When 'startPoint' and 'endPoint' overlap the results are
* undefined. The gradient's angle increases in the direction of rotation of
* positive x-axis towards positive y-axis. */
CA_EXTERN CAGradientLayerType const kCAGradientLayerConic
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h | /* CoreAnimation - CAMediaTimingFunction.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CAMediaTiming.h>
#import <Foundation/NSObject.h>
@class NSArray, NSString;
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CAMediaTimingFunctionName NS_TYPED_ENUM;
/* Represents one segment of a function describing a timing curve. The
* function maps an input time normalized to the range [0,1] to an
* output time also in the range [0,1]. E.g. these functions are used
* to define the pacing of an animation over its duration (or over the
* duration of one keyframe). */
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CAMediaTimingFunction : NSObject <NSSecureCoding>
{
@private
struct CAMediaTimingFunctionPrivate *_priv;
}
/* A convenience method for creating common timing functions. The
* currently supported names are `linear', `easeIn', `easeOut' and
* `easeInEaseOut' and `default' (the curve used by implicit animations
* created by Core Animation). */
+ (instancetype)functionWithName:(CAMediaTimingFunctionName)name;
/* Creates a timing function modelled on a cubic Bezier curve. The end
* points of the curve are at (0,0) and (1,1), the two points 'c1' and
* 'c2' defined by the class instance are the control points. Thus the
* points defining the Bezier curve are: '[(0,0), c1, c2, (1,1)]' */
+ (instancetype)functionWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y;
- (instancetype)initWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y;
/* 'idx' is a value from 0 to 3 inclusive. */
- (void)getControlPointAtIndex:(size_t)idx values:(float[_Nonnull 2])ptr;
@end
/** Timing function names. **/
CA_EXTERN CAMediaTimingFunctionName const kCAMediaTimingFunctionLinear
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFunctionName const kCAMediaTimingFunctionEaseIn
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFunctionName const kCAMediaTimingFunctionEaseOut
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFunctionName const kCAMediaTimingFunctionEaseInEaseOut
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAMediaTimingFunctionName const kCAMediaTimingFunctionDefault
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CARemoteLayerClient.h | /* CoreAnimation - CARemoteLayerClient.h
Copyright (c) 2010-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CABase.h>
#import <Foundation/NSObject.h>
#import <mach/mach.h>
@class CALayer;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.7))
@interface CARemoteLayerClient : NSObject
{
@private
id _impl;
}
/* The designated initializer. The port must have been obtained from
* -[CARemoteLayerServer serverPort]. */
- (instancetype)initWithServerPort:(mach_port_t)port;
/* Invalidate the object, i.e. delete all state from the server. This
* is called implicitly when the object is finalized. */
- (void)invalidate;
/* An integer used by the server to identify the client. The value
* should be passed back to the server so it can display the client's
* root layer. */
@property(readonly) uint32_t clientId;
/* The root layer. Defaults to nil. */
@property(nullable, strong) CALayer *layer;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIColor.h | #include <CoreImage/CIColor.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVOpenGLBufferPool.h | #include <CoreVideo/CVOpenGLBufferPool.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h | /* CoreAnimation - CoreAnimation.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#ifndef COREANIMATION_H
#define COREANIMATION_H
#include <QuartzCore/CABase.h>
#include <QuartzCore/CATransform3D.h>
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <QuartzCore/CAAnimation.h>
#import <QuartzCore/CAConstraintLayoutManager.h>
#import <QuartzCore/CADisplayLink.h>
#import <QuartzCore/CAMetalLayer.h>
#import <QuartzCore/CAEmitterCell.h>
#import <QuartzCore/CAEmitterLayer.h>
#import <QuartzCore/CAFrameRateRange.h>
#import <QuartzCore/CAGradientLayer.h>
#import <QuartzCore/CALayer.h>
#import <QuartzCore/CAMediaTiming.h>
#import <QuartzCore/CAMediaTimingFunction.h>
#import <QuartzCore/CAOpenGLLayer.h>
#import <QuartzCore/CARemoteLayerClient.h>
#import <QuartzCore/CARemoteLayerServer.h>
#import <QuartzCore/CARenderer.h>
#import <QuartzCore/CAReplicatorLayer.h>
#import <QuartzCore/CAScrollLayer.h>
#import <QuartzCore/CAShapeLayer.h>
#import <QuartzCore/CATextLayer.h>
#import <QuartzCore/CATiledLayer.h>
#import <QuartzCore/CATransaction.h>
#import <QuartzCore/CATransform3D.h>
#import <QuartzCore/CATransformLayer.h>
#import <QuartzCore/CAValueFunction.h>
#import <QuartzCore/CAEDRMetadata.h>
#endif
#endif /* COREANIMATION_H */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAConstraintLayoutManager.h | /* CoreAnimation - CAConstraintLayoutManager.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
/* The constraint-based layout manager add a `constraints' layer
* property, an array of CAConstraint objects. Each object describes
* one geometry relationship between two layers. Layout is then
* performed by fetching the constraints of each sublayer and solving
* the resulting system of constraints for the frame of each sublayer
* starting from the bounds of the containing layer.
*
* The relationships between layers are linear equations of the form:
*
* u = m v + c
*
* where 'u' and 'v' are scalar values representing geometry attributes
* of the two layers (e.g. leftmost x position), and 'm' and 'c' are
* constants.
*
* Sibling layers are referenced by name, using the `name' property of
* each layer. The special name "superlayer" should be used to refer to
* the layer's superlayer. */
typedef NS_ENUM (int, CAConstraintAttribute)
{
kCAConstraintMinX,
kCAConstraintMidX,
kCAConstraintMaxX,
kCAConstraintWidth,
kCAConstraintMinY,
kCAConstraintMidY,
kCAConstraintMaxY,
kCAConstraintHeight,
};
@class CAConstraint;
NS_ASSUME_NONNULL_BEGIN
/** The additions to CALayer for constraint layout. **/
@interface CALayer (CAConstraintLayoutManager)
/* The layer's array of CAConstraint objects. */
@property(nullable, copy) NSArray<CAConstraint *> *constraints;
/* Append 'c' to the receiver's array of constraint objects. */
- (void)addConstraint:(CAConstraint *)c;
@end
/** The constraint-based layout manager. **/
API_AVAILABLE(macos(10.5))
@interface CAConstraintLayoutManager : NSObject <CALayoutManager>
/* Returns a new layout manager object. */
+ (instancetype)layoutManager;
@end
/** The class representing a single layout constraint. **/
API_AVAILABLE(macos(10.5))
@interface CAConstraint : NSObject <NSSecureCoding>
{
@private
NSString *_srcId;
CAConstraintAttribute _srcAttr :16;
CAConstraintAttribute _attr :16;
CGFloat _scale, _offset;
};
/* Create a new constraint object with the specified parameters. In the
* general case the new constraint will have the form:
*
* layer.attr = m * srcLayer.srcAttr + c
*
* 'm' defaults to one when undefined; 'c' defaults to zero. */
+ (instancetype)constraintWithAttribute:(CAConstraintAttribute)attr
relativeTo:(NSString *)srcId attribute:(CAConstraintAttribute)srcAttr
scale:(CGFloat)m offset:(CGFloat)c;
+ (instancetype)constraintWithAttribute:(CAConstraintAttribute)attr
relativeTo:(NSString *)srcId attribute:(CAConstraintAttribute)srcAttr
offset:(CGFloat)c;
+ (instancetype)constraintWithAttribute:(CAConstraintAttribute)attr
relativeTo:(NSString *)srcId attribute:(CAConstraintAttribute)srcAttr;
/* Designated initializer. */
- (instancetype)initWithAttribute:(CAConstraintAttribute)attr
relativeTo:(NSString *)srcId attribute:(CAConstraintAttribute)srcAttr
scale:(CGFloat)m offset:(CGFloat)c;
/* Accessors. */
@property(readonly) CAConstraintAttribute attribute;
@property(readonly) NSString *sourceName;
@property(readonly) CAConstraintAttribute sourceAttribute;
@property(readonly) CGFloat scale;
@property(readonly) CGFloat offset;
@end
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CISampler.h | #include <CoreImage/CISampler.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h | /* CoreAnimation - CAValueFunction.h
Copyright (c) 2008-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CABase.h>
#import <Foundation/NSObject.h>
typedef NSString * CAValueFunctionName NS_TYPED_ENUM;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0))
@interface CAValueFunction : NSObject <NSSecureCoding>
{
@protected
NSString *_string;
void *_impl;
}
+ (nullable instancetype)functionWithName:(CAValueFunctionName)name;
@property(readonly) CAValueFunctionName name;
@end
/** Value function names. **/
/* The `rotateX', `rotateY', `rotateZ' functions take a single input
* value in radians, and construct a 4x4 matrix representing the
* corresponding rotation matrix. */
CA_EXTERN CAValueFunctionName const kCAValueFunctionRotateX
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAValueFunctionName const kCAValueFunctionRotateY
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAValueFunctionName const kCAValueFunctionRotateZ
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* The `scale' function takes three input values and constructs a
* 4x4 matrix representing the corresponding scale matrix. */
CA_EXTERN CAValueFunctionName const kCAValueFunctionScale
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* The `scaleX', `scaleY', `scaleZ' functions take a single input value
* and construct a 4x4 matrix representing the corresponding scaling
* matrix. */
CA_EXTERN CAValueFunctionName const kCAValueFunctionScaleX
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAValueFunctionName const kCAValueFunctionScaleY
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAValueFunctionName const kCAValueFunctionScaleZ
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* The `translate' function takes three input values and constructs a
* 4x4 matrix representing the corresponding scale matrix. */
CA_EXTERN CAValueFunctionName const kCAValueFunctionTranslate
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* The `translateX', `translateY', `translateZ' functions take a single
* input value and construct a 4x4 matrix representing the corresponding
* translation matrix. */
CA_EXTERN CAValueFunctionName const kCAValueFunctionTranslateX
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAValueFunctionName const kCAValueFunctionTranslateY
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAValueFunctionName const kCAValueFunctionTranslateZ
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h | /* CoreAnimation - CABase.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#ifndef CABASE_H
#define CABASE_H
/* Adapted from <CoreGraphics/CGBase.h> */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <float.h>
#include <CoreFoundation/CoreFoundation.h>
#if TARGET_OS_MAC
#include <CoreGraphics/CoreGraphics.h>
#endif
#include <os/availability.h>
#include <TargetConditionals.h>
#if TARGET_OS_OSX
# define CA_OSX_VERSION(v) ((__MAC_##v) > 0 && __MAC_OS_X_VERSION_MAX_ALLOWED >= (__MAC_##v))
#else
# define CA_OSX_VERSION(v) (0)
#endif
#if TARGET_OS_IOS
# define CA_IOS_VERSION(v) ((__IPHONE_##v) > 0 && __IPHONE_OS_VERSION_MIN_REQUIRED >= (__IPHONE_##v))
#else
# define CA_IOS_VERSION(v) (0)
#endif
#if TARGET_OS_TV
# define CA_TV_VERSION(v) ((__TVOS_##v) > 0 && __TV_OS_VERSION_MIN_REQUIRED >= (__TVOS_##v))
#else
# define CA_TV_VERSION(v) (0)
#endif
#if TARGET_OS_WATCH
# define CA_WATCH_VERSION(v) ((__WATCHOS_##v) > 0 && __WATCH_OS_VERSION_MIN_REQUIRED >= (__WATCHOS_##v))
#else
# define CA_WATCH_VERSION(v) (0)
#endif
#ifdef __cplusplus
# define CA_EXTERN_C_BEGIN extern "C" {
# define CA_EXTERN_C_END }
#else
# define CA_EXTERN_C_BEGIN
# define CA_EXTERN_C_END
#endif
#ifdef __GNUC__
# define CA_GNUC(major, minor) \
(__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
#else
# define CA_GNUC(major, minor) 0
#endif
#ifndef CA_EXTERN
# define CA_EXTERN extern __attribute__((visibility("default")))
#endif
#ifndef CA_INLINE
# if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define CA_INLINE static inline
# elif defined (__cplusplus)
# define CA_INLINE static inline
# elif CA_GNUC (3, 0)
# define CA_INLINE static __inline__ __attribute__ ((always_inline))
# else
# define CA_INLINE static
# endif
#endif
#ifndef CA_HIDDEN
# if CA_GNUC (4,0)
# define CA_HIDDEN __attribute__ ((visibility ("hidden")))
# else
# define CA_HIDDEN /* no hidden */
# endif
#endif
#ifndef CA_PURE
# if CA_GNUC (3, 0)
# define CA_PURE __attribute__ ((pure))
# else
# define CA_PURE /* no pure */
# endif
#endif
#ifndef CA_CONST
# if CA_GNUC (3, 0)
# define CA_CONST __attribute__ ((const))
# else
# define CA_CONST /* no const */
# endif
#endif
#ifndef CA_NORETURN
# if CA_GNUC (3, 0)
# define CA_NORETURN __attribute__ ((noreturn))
# else
# define CA_NORETURN /* no noreturn */
# endif
#endif
#ifndef CA_MALLOC
# if CA_GNUC (3, 0)
# define CA_MALLOC __attribute__ ((malloc))
# else
# define CA_MALLOC /* no malloc */
# endif
#endif
#ifndef CA_WARN_UNUSED
# if CA_GNUC (3, 4)
# define CA_WARN_UNUSED __attribute__ ((warn_unused_result))
# else
# define CA_WARN_UNUSED /* no warn_unused */
# endif
#endif
#ifndef CA_WARN_DEPRECATED
# define CA_WARN_DEPRECATED 1
#endif
#ifndef CA_DEPRECATED
# if CA_GNUC (3, 0) && CA_WARN_DEPRECATED
# define CA_DEPRECATED __attribute__ ((deprecated))
# else
# define CA_DEPRECATED
# endif
#endif
#if defined(__has_attribute) && __has_attribute(objc_boxable)
# define CA_BOXABLE __attribute__((objc_boxable))
#else
# define CA_BOXABLE
#endif
CA_EXTERN_C_BEGIN
/* Returns the current CoreAnimation absolute time. This is the result of
* calling mach_absolute_time () and converting the units to seconds. */
CA_EXTERN CFTimeInterval CACurrentMediaTime (void)
API_AVAILABLE (macos(10.5), ios(2.0));
CA_EXTERN_C_END
#endif /* CABASE_H */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIPlugInInterface.h | #include <CoreImage/CIPlugInInterface.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h | /* CoreAnimation - CALayer.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CAMediaTiming.h>
#import <QuartzCore/CATransform3D.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
@class NSEnumerator, CAAnimation, CALayerArray;
@protocol CAAction, CALayerDelegate;
@protocol CALayoutManager;
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CALayerContentsGravity NS_TYPED_ENUM;
typedef NSString * CALayerContentsFormat NS_TYPED_ENUM;
typedef NSString * CALayerContentsFilter NS_TYPED_ENUM;
typedef NSString * CALayerCornerCurve NS_TYPED_ENUM;
/* Bit definitions for `autoresizingMask' property. */
typedef NS_OPTIONS (unsigned int, CAAutoresizingMask)
{
kCALayerNotSizable = 0,
kCALayerMinXMargin = 1U << 0,
kCALayerWidthSizable = 1U << 1,
kCALayerMaxXMargin = 1U << 2,
kCALayerMinYMargin = 1U << 3,
kCALayerHeightSizable = 1U << 4,
kCALayerMaxYMargin = 1U << 5
};
/* Bit definitions for `edgeAntialiasingMask' property. */
typedef NS_OPTIONS (unsigned int, CAEdgeAntialiasingMask)
{
kCALayerLeftEdge = 1U << 0, /* Minimum X edge. */
kCALayerRightEdge = 1U << 1, /* Maximum X edge. */
kCALayerBottomEdge = 1U << 2, /* Minimum Y edge. */
kCALayerTopEdge = 1U << 3, /* Maximum Y edge. */
};
/* Bit definitions for `maskedCorners' property. */
typedef NS_OPTIONS (NSUInteger, CACornerMask)
{
kCALayerMinXMinYCorner = 1U << 0,
kCALayerMaxXMinYCorner = 1U << 1,
kCALayerMinXMaxYCorner = 1U << 2,
kCALayerMaxXMaxYCorner = 1U << 3,
};
/** The base layer class. **/
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CALayer : NSObject <NSSecureCoding, CAMediaTiming>
/** Layer creation and initialization. **/
+ (instancetype)layer;
/* The designated initializer. */
- (instancetype)init;
/* This initializer is used by CoreAnimation to create shadow copies of
* layers, e.g. for use as presentation layers. Subclasses can override
* this method to copy their instance variables into the presentation
* layer (subclasses should call the superclass afterwards). Calling this
* method in any other situation will result in undefined behavior. */
- (instancetype)initWithLayer:(id)layer;
/* Returns a copy of the layer containing all properties as they were
* at the start of the current transaction, with any active animations
* applied. This gives a close approximation to the version of the layer
* that is currently displayed. Returns nil if the layer has not yet
* been committed.
*
* The effect of attempting to modify the returned layer in any way is
* undefined.
*
* The `sublayers', `mask' and `superlayer' properties of the returned
* layer return the presentation versions of these properties. This
* carries through to read-only layer methods. E.g., calling -hitTest:
* on the result of the -presentationLayer will query the presentation
* values of the layer tree. */
- (nullable instancetype)presentationLayer;
/* When called on the result of the -presentationLayer method, returns
* the underlying layer with the current model values. When called on a
* non-presentation layer, returns the receiver. The result of calling
* this method after the transaction that produced the presentation
* layer has completed is undefined. */
- (instancetype)modelLayer;
/** Property methods. **/
/* CALayer implements the standard NSKeyValueCoding protocol for all
* Objective C properties defined by the class and its subclasses. It
* dynamically implements missing accessor methods for properties
* declared by subclasses.
*
* When accessing properties via KVC whose values are not objects, the
* standard KVC wrapping conventions are used, with extensions to
* support the following types:
*
* C Type Class
* ------ -----
* CGPoint NSValue
* CGSize NSValue
* CGRect NSValue
* CGAffineTransform NSAffineTransform
* CATransform3D NSValue */
/* Returns the default value of the named property, or nil if no
* default value is known. Subclasses that override this method to
* define default values for their own properties should call `super'
* for unknown properties. */
+ (nullable id)defaultValueForKey:(NSString *)key;
/* Method for subclasses to override. Returning true for a given
* property causes the layer's contents to be redrawn when the property
* is changed (including when changed by an animation attached to the
* layer). The default implementation returns NO. Subclasses should
* call super for properties defined by the superclass. (For example,
* do not try to return YES for properties implemented by CALayer,
* doing will have undefined results.) */
+ (BOOL)needsDisplayForKey:(NSString *)key;
/* Called by the object's implementation of -encodeWithCoder:, returns
* false if the named property should not be archived. The base
* implementation returns YES. Subclasses should call super for
* unknown properties. */
- (BOOL)shouldArchiveValueForKey:(NSString *)key;
/** Geometry and layer hierarchy properties. **/
/* The bounds of the layer. Defaults to CGRectZero. Animatable. */
@property CGRect bounds;
/* The position in the superlayer that the anchor point of the layer's
* bounds rect is aligned to. Defaults to the zero point. Animatable. */
@property CGPoint position;
/* The Z component of the layer's position in its superlayer. Defaults
* to zero. Animatable. */
@property CGFloat zPosition;
/* Defines the anchor point of the layer's bounds rect, as a point in
* normalized layer coordinates - '(0, 0)' is the bottom left corner of
* the bounds rect, '(1, 1)' is the top right corner. Defaults to
* '(0.5, 0.5)', i.e. the center of the bounds rect. Animatable. */
@property CGPoint anchorPoint;
/* The Z component of the layer's anchor point (i.e. reference point for
* position and transform). Defaults to zero. Animatable. */
@property CGFloat anchorPointZ;
/* A transform applied to the layer relative to the anchor point of its
* bounds rect. Defaults to the identity transform. Animatable. */
@property CATransform3D transform;
/* Convenience methods for accessing the `transform' property as an
* affine transform. */
- (CGAffineTransform)affineTransform;
- (void)setAffineTransform:(CGAffineTransform)m;
/* Unlike NSView, each Layer in the hierarchy has an implicit frame
* rectangle, a function of the `position', `bounds', `anchorPoint',
* and `transform' properties. When setting the frame the `position'
* and `bounds.size' are changed to match the given frame. */
@property CGRect frame;
/* When true the layer and its sublayers are not displayed. Defaults to
* NO. Animatable. */
@property(getter=isHidden) BOOL hidden;
/* When false layers facing away from the viewer are hidden from view.
* Defaults to YES. Animatable. */
@property(getter=isDoubleSided) BOOL doubleSided;
/* Whether or not the geometry of the layer (and its sublayers) is
* flipped vertically. Defaults to NO. Note that even when geometry is
* flipped, image orientation remains the same (i.e. a CGImageRef
* stored in the `contents' property will display the same with both
* flipped=NO and flipped=YES, assuming no transform on the layer). */
@property(getter=isGeometryFlipped) BOOL geometryFlipped;
/* Returns true if the contents of the contents property of the layer
* will be implicitly flipped when rendered in relation to the local
* coordinate space (e.g. if there are an odd number of layers with
* flippedGeometry=YES from the receiver up to and including the
* implicit container of the root layer). Subclasses should not attempt
* to redefine this method. When this method returns true the
* CGContextRef object passed to -drawInContext: by the default
* -display method will have been y- flipped (and rectangles passed to
* -setNeedsDisplayInRect: will be similarly flipped). */
- (BOOL)contentsAreFlipped;
/* The receiver's superlayer object. Implicitly changed to match the
* hierarchy described by the `sublayers' properties. */
@property(nullable, readonly) CALayer *superlayer;
/* Removes the layer from its superlayer, works both if the receiver is
* in its superlayer's `sublayers' array or set as its `mask' value. */
- (void)removeFromSuperlayer;
/* The array of sublayers of this layer. The layers are listed in back
* to front order. Defaults to nil. When setting the value of the
* property, any newly added layers must have nil superlayers, otherwise
* the behavior is undefined. Note that the returned array is not
* guaranteed to retain its elements. */
@property(nullable, copy) NSArray<__kindof CALayer *> *sublayers;
/* Add 'layer' to the end of the receiver's sublayers array. If 'layer'
* already has a superlayer, it will be removed before being added. */
- (void)addSublayer:(CALayer *)layer;
/* Insert 'layer' at position 'idx' in the receiver's sublayers array.
* If 'layer' already has a superlayer, it will be removed before being
* inserted. */
- (void)insertSublayer:(CALayer *)layer atIndex:(unsigned)idx;
/* Insert 'layer' either above or below the specified layer in the
* receiver's sublayers array. If 'layer' already has a superlayer, it
* will be removed before being inserted. */
- (void)insertSublayer:(CALayer *)layer below:(nullable CALayer *)sibling;
- (void)insertSublayer:(CALayer *)layer above:(nullable CALayer *)sibling;
/* Remove 'oldLayer' from the sublayers array of the receiver and insert
* 'newLayer' if non-nil in its position. If the superlayer of 'oldLayer'
* is not the receiver, the behavior is undefined. */
- (void)replaceSublayer:(CALayer *)oldLayer with:(CALayer *)newLayer;
/* A transform applied to each member of the `sublayers' array while
* rendering its contents into the receiver's output. Typically used as
* the projection matrix to add perspective and other viewing effects
* into the model. Defaults to identity. Animatable. */
@property CATransform3D sublayerTransform;
/* A layer whose alpha channel is used as a mask to select between the
* layer's background and the result of compositing the layer's
* contents with its filtered background. Defaults to nil. When used as
* a mask the layer's `compositingFilter' and `backgroundFilters'
* properties are ignored. When setting the mask to a new layer, the
* new layer must have a nil superlayer, otherwise the behavior is
* undefined. Nested masks (mask layers with their own masks) are
* unsupported. */
@property(nullable, strong) __kindof CALayer *mask;
/* When true an implicit mask matching the layer bounds is applied to
* the layer (including the effects of the `cornerRadius' property). If
* both `mask' and `masksToBounds' are non-nil the two masks are
* multiplied to get the actual mask values. Defaults to NO.
* Animatable. */
@property BOOL masksToBounds;
/** Mapping between layer coordinate and time spaces. **/
- (CGPoint)convertPoint:(CGPoint)p fromLayer:(nullable CALayer *)l;
- (CGPoint)convertPoint:(CGPoint)p toLayer:(nullable CALayer *)l;
- (CGRect)convertRect:(CGRect)r fromLayer:(nullable CALayer *)l;
- (CGRect)convertRect:(CGRect)r toLayer:(nullable CALayer *)l;
- (CFTimeInterval)convertTime:(CFTimeInterval)t fromLayer:(nullable CALayer *)l;
- (CFTimeInterval)convertTime:(CFTimeInterval)t toLayer:(nullable CALayer *)l;
/** Hit testing methods. **/
/* Returns the farthest descendant of the layer containing point 'p'.
* Siblings are searched in top-to-bottom order. 'p' is defined to be
* in the coordinate space of the receiver's nearest ancestor that
* isn't a CATransformLayer (transform layers don't have a 2D
* coordinate space in which the point could be specified). */
- (nullable __kindof CALayer *)hitTest:(CGPoint)p;
/* Returns true if the bounds of the layer contains point 'p'. */
- (BOOL)containsPoint:(CGPoint)p;
/** Layer content properties and methods. **/
/* An object providing the contents of the layer, typically a CGImageRef,
* but may be something else. (For example, NSImage objects are
* supported on Mac OS X 10.6 and later.) Default value is nil.
* Animatable. */
@property(nullable, strong) id contents;
/* A rectangle in normalized image coordinates defining the
* subrectangle of the `contents' property that will be drawn into the
* layer. If pixels outside the unit rectangles are requested, the edge
* pixels of the contents image will be extended outwards. If an empty
* rectangle is provided, the results are undefined. Defaults to the
* unit rectangle [0 0 1 1]. Animatable. */
@property CGRect contentsRect;
/* A string defining how the contents of the layer is mapped into its
* bounds rect. Options are `center', `top', `bottom', `left',
* `right', `topLeft', `topRight', `bottomLeft', `bottomRight',
* `resize', `resizeAspect', `resizeAspectFill'. The default value is
* `resize'. Note that "bottom" always means "Minimum Y" and "top"
* always means "Maximum Y". */
@property(copy) CALayerContentsGravity contentsGravity;
/* Defines the scale factor applied to the contents of the layer. If
* the physical size of the contents is '(w, h)' then the logical size
* (i.e. for contentsGravity calculations) is defined as '(w /
* contentsScale, h / contentsScale)'. Applies to both images provided
* explicitly and content provided via -drawInContext: (i.e. if
* contentsScale is two -drawInContext: will draw into a buffer twice
* as large as the layer bounds). Defaults to one. Animatable. */
@property CGFloat contentsScale
API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
/* A rectangle in normalized image coordinates defining the scaled
* center part of the `contents' image.
*
* When an image is resized due to its `contentsGravity' property its
* center part implicitly defines the 3x3 grid that controls how the
* image is scaled to its drawn size. The center part is stretched in
* both dimensions; the top and bottom parts are only stretched
* horizontally; the left and right parts are only stretched
* vertically; the four corner parts are not stretched at all. (This is
* often called "9-slice scaling".)
*
* The rectangle is interpreted after the effects of the `contentsRect'
* property have been applied. It defaults to the unit rectangle [0 0 1
* 1] meaning that the entire image is scaled. As a special case, if
* the width or height is zero, it is implicitly adjusted to the width
* or height of a single source pixel centered at that position. If the
* rectangle extends outside the [0 0 1 1] unit rectangle the result is
* undefined. Animatable. */
@property CGRect contentsCenter;
/* A hint for the desired storage format of the layer contents provided by
* -drawLayerInContext. Defaults to kCAContentsFormatRGBA8Uint. Note that this
* does not affect the interpretation of the `contents' property directly. */
@property(copy) CALayerContentsFormat contentsFormat
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/* The filter types to use when rendering the `contents' property of
* the layer. The minification filter is used when to reduce the size
* of image data, the magnification filter to increase the size of
* image data. Currently the allowed values are `nearest' and `linear'.
* Both properties default to `linear'. */
@property(copy) CALayerContentsFilter minificationFilter;
@property(copy) CALayerContentsFilter magnificationFilter;
/* The bias factor added when determining which levels of detail to use
* when minifying using trilinear filtering. The default value is 0.
* Animatable. */
@property float minificationFilterBias;
/* A hint marking that the layer contents provided by -drawInContext:
* is completely opaque. Defaults to NO. Note that this does not affect
* the interpretation of the `contents' property directly. */
@property(getter=isOpaque) BOOL opaque;
/* Reload the content of this layer. Calls the -drawInContext: method
* then updates the `contents' property of the layer. Typically this is
* not called directly. */
- (void)display;
/* Marks that -display needs to be called before the layer is next
* committed. If a region is specified, only that region of the layer
* is invalidated. */
- (void)setNeedsDisplay;
- (void)setNeedsDisplayInRect:(CGRect)r;
/* Returns true when the layer is marked as needing redrawing. */
- (BOOL)needsDisplay;
/* Call -display if receiver is marked as needing redrawing. */
- (void)displayIfNeeded;
/* When true -setNeedsDisplay will automatically be called when the
* bounds of the layer changes. Default value is NO. */
@property BOOL needsDisplayOnBoundsChange;
/* When true, the CGContext object passed to the -drawInContext: method
* may queue the drawing commands submitted to it, such that they will
* be executed later (i.e. asynchronously to the execution of the
* -drawInContext: method). This may allow the layer to complete its
* drawing operations sooner than when executing synchronously. The
* default value is NO. */
@property BOOL drawsAsynchronously
API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
/* Called via the -display method when the `contents' property is being
* updated. Default implementation does nothing. The context may be
* clipped to protect valid layer content. Subclasses that wish to find
* the actual region to draw can call CGContextGetClipBoundingBox(). */
- (void)drawInContext:(CGContextRef)ctx;
/** Rendering properties and methods. **/
/* Renders the receiver and its sublayers into 'ctx'. This method
* renders directly from the layer tree. Renders in the coordinate space
* of the layer.
*
* WARNING: currently this method does not implement the full
* CoreAnimation composition model, use with caution. */
- (void)renderInContext:(CGContextRef)ctx;
/* Defines how the edges of the layer are rasterized. For each of the
* four edges (left, right, bottom, top) if the corresponding bit is
* set the edge will be antialiased. Typically this property is used to
* disable antialiasing for edges that abut edges of other layers, to
* eliminate the seams that would otherwise occur. The default value is
* for all edges to be antialiased. */
@property CAEdgeAntialiasingMask edgeAntialiasingMask;
/* When true this layer is allowed to antialias its edges, as requested
* by the edgeAntialiasingMask.
*
* The default value is read from the CALayerAllowsEdgeAntialiasing
* property in the main bundle's Info.plist. On iOS, if that property
* is not found, the UIViewEdgeAntialiasing property will be used
* instead. If no value is found in the Info.plist the default value is
* YES on macOS and NO on iOS. */
@property BOOL allowsEdgeAntialiasing
API_AVAILABLE(macos(10.10), ios(2.0), watchos(2.0), tvos(9.0));
/* The background color of the layer. Default value is nil. Colors
* created from tiled patterns are supported. Animatable. */
@property(nullable) CGColorRef backgroundColor;
/* When positive, the background of the layer will be drawn with
* rounded corners. Also effects the mask generated by the
* `masksToBounds' property. Defaults to zero. Animatable. */
@property CGFloat cornerRadius;
/* Defines which of the four corners receives the masking when using
* `cornerRadius' property. Defaults to all four corners. */
@property CACornerMask maskedCorners
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/* Defines the curve used for rendering the rounded corners of the layer.
* Defaults to 'kCACornerCurveCircular'. */
@property(copy) CALayerCornerCurve cornerCurve
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/* Expansion scale factor applied to the rounded corner bounding box size
* when specific corner curve is used. */
+ (CGFloat)cornerCurveExpansionFactor:(CALayerCornerCurve)curve
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/* The width of the layer's border, inset from the layer bounds. The
* border is composited above the layer's content and sublayers and
* includes the effects of the `cornerRadius' property. Defaults to
* zero. Animatable. */
@property CGFloat borderWidth;
/* The color of the layer's border. Defaults to opaque black. Colors
* created from tiled patterns are supported. Animatable. */
@property(nullable) CGColorRef borderColor;
/* The opacity of the layer, as a value between zero and one. Defaults
* to one. Specifying a value outside the [0,1] range will give undefined
* results. Animatable. */
@property float opacity;
/* When true, and the layer's opacity property is less than one, the
* layer is allowed to composite itself as a group separate from its
* parent. This gives the correct results when the layer contains
* multiple opaque components, but may reduce performance.
*
* The default value is read from the CALayerAllowsGroupOpacity
* property in the main bundle's Info.plist. On iOS, if that property
* is not found, the UIViewGroupOpacity property will be used instead.
* If no value is found in the Info.plist the default value is YES on
* macOS and NO on iOS. */
@property BOOL allowsGroupOpacity
API_AVAILABLE(macos(10.10), ios(2.0), watchos(2.0), tvos(9.0));
/* A filter object used to composite the layer with its (possibly
* filtered) background. Default value is nil, which implies source-
* over compositing. Animatable.
*
* Note that if the inputs of the filter are modified directly after
* the filter is attached to a layer, the behavior is undefined. The
* filter must either be reattached to the layer, or filter properties
* should be modified by calling -setValue:forKeyPath: on each layer
* that the filter is attached to. (This also applies to the `filters'
* and `backgroundFilters' properties.) */
@property(nullable, strong) id compositingFilter;
/* An array of filters that will be applied to the contents of the
* layer and its sublayers. Defaults to nil. Animatable. */
@property(nullable, copy) NSArray *filters;
/* An array of filters that are applied to the background of the layer.
* The root layer ignores this property. Animatable. */
@property(nullable, copy) NSArray *backgroundFilters;
/* When true, the layer is rendered as a bitmap in its local coordinate
* space ("rasterized"), then the bitmap is composited into the
* destination (with the minificationFilter and magnificationFilter
* properties of the layer applied if the bitmap needs scaling).
* Rasterization occurs after the layer's filters and shadow effects
* are applied, but before the opacity modulation. As an implementation
* detail the rendering engine may attempt to cache and reuse the
* bitmap from one frame to the next. (Whether it does or not will have
* no affect on the rendered output.)
*
* When false the layer is composited directly into the destination
* whenever possible (however, certain features of the compositing
* model may force rasterization, e.g. adding filters).
*
* Defaults to NO. Animatable. */
@property BOOL shouldRasterize;
/* The scale at which the layer will be rasterized (when the
* shouldRasterize property has been set to YES) relative to the
* coordinate space of the layer. Defaults to one. Animatable. */
@property CGFloat rasterizationScale;
/** Shadow properties. **/
/* The color of the shadow. Defaults to opaque black. Colors created
* from patterns are currently NOT supported. Animatable. */
@property(nullable) CGColorRef shadowColor;
/* The opacity of the shadow. Defaults to 0. Specifying a value outside the
* [0,1] range will give undefined results. Animatable. */
@property float shadowOpacity;
/* The shadow offset. Defaults to (0, -3). Animatable. */
@property CGSize shadowOffset;
/* The blur radius used to create the shadow. Defaults to 3. Animatable. */
@property CGFloat shadowRadius;
/* When non-null this path defines the outline used to construct the
* layer's shadow instead of using the layer's composited alpha
* channel. The path is rendered using the non-zero winding rule.
* Specifying the path explicitly using this property will usually
* improve rendering performance, as will sharing the same path
* reference across multiple layers. Upon assignment the path is copied.
* Defaults to null. Animatable. */
@property(nullable) CGPathRef shadowPath;
/** Layout methods. **/
/* A bitmask defining how the layer is resized when the bounds of its
* superlayer changes. See the CAAutoresizingMask enum for the bit
* definitions. Default value is zero. */
@property CAAutoresizingMask autoresizingMask;
/* The object responsible for assigning frame rects to sublayers,
* should implement methods from the CALayoutManager informal protocol.
* When nil (the default value) only the autoresizing style of layout
* is done (unless a subclass overrides -layoutSublayers). */
@property(nullable, strong) id <CALayoutManager> layoutManager;
/* Returns the preferred frame size of the layer in the coordinate
* space of the superlayer. The default implementation calls the layout
* manager if one exists and it implements the -preferredSizeOfLayer:
* method, otherwise returns the size of the bounds rect mapped into
* the superlayer. */
- (CGSize)preferredFrameSize;
/* Marks that -layoutSublayers needs to be invoked on the receiver
* before the next update. If the receiver's layout manager implements
* the -invalidateLayoutOfLayer: method it will be called.
*
* This method is automatically invoked on a layer whenever its
* `sublayers' or `layoutManager' property is modified, and is invoked
* on the layer and its superlayer whenever its `bounds' or `transform'
* properties are modified. Implicit calls to -setNeedsLayout are
* skipped if the layer is currently executing its -layoutSublayers
* method. */
- (void)setNeedsLayout;
/* Returns true when the receiver is marked as needing layout. */
- (BOOL)needsLayout;
/* Traverse upwards from the layer while the superlayer requires layout.
* Then layout the entire tree beneath that ancestor. */
- (void)layoutIfNeeded;
/* Called when the layer requires layout. The default implementation
* calls the layout manager if one exists and it implements the
* -layoutSublayersOfLayer: method. Subclasses can override this to
* provide their own layout algorithm, which should set the frame of
* each sublayer. */
- (void)layoutSublayers;
/* NSView-style springs and struts layout. -resizeSublayersWithOldSize:
* is called when the layer's bounds rect is changed. It calls
* -resizeWithOldSuperlayerSize: to resize the sublayer's frame to
* match the new superlayer bounds based on the sublayer's autoresizing
* mask. */
- (void)resizeSublayersWithOldSize:(CGSize)size;
- (void)resizeWithOldSuperlayerSize:(CGSize)size;
/** Action methods. **/
/* An "action" is an object that responds to an "event" via the
* CAAction protocol (see below). Events are named using standard
* dot-separated key paths. Each layer defines a mapping from event key
* paths to action objects. Events are posted by looking up the action
* object associated with the key path and sending it the method
* defined by the CAAction protocol.
*
* When an action object is invoked it receives three parameters: the
* key path naming the event, the object on which the event happened
* (i.e. the layer), and optionally a dictionary of named arguments
* specific to each event.
*
* To provide implicit animations for layer properties, an event with
* the same name as each property is posted whenever the value of the
* property is modified. A suitable CAAnimation object is associated by
* default with each implicit event (CAAnimation implements the action
* protocol).
*
* The layer class also defines the following events that are not
* linked directly to properties:
*
* onOrderIn
* Invoked when the layer is made visible, i.e. either its
* superlayer becomes visible, or it's added as a sublayer of a
* visible layer
*
* onOrderOut
* Invoked when the layer becomes non-visible. */
/* Returns the default action object associated with the event named by
* the string 'event'. The default implementation returns a suitable
* animation object for events posted by animatable properties, nil
* otherwise. */
+ (nullable id<CAAction>)defaultActionForKey:(NSString *)event;
/* Returns the action object associated with the event named by the
* string 'event'. The default implementation searches for an action
* object in the following places:
*
* 1. if defined, call the delegate method -actionForLayer:forKey:
* 2. look in the layer's `actions' dictionary
* 3. look in any `actions' dictionaries in the `style' hierarchy
* 4. call +defaultActionForKey: on the layer's class
*
* If any of these steps results in a non-nil action object, the
* following steps are ignored. If the final result is an instance of
* NSNull, it is converted to `nil'. */
- (nullable id<CAAction>)actionForKey:(NSString *)event;
/* A dictionary mapping keys to objects implementing the CAAction
* protocol. Default value is nil. */
@property(nullable, copy) NSDictionary<NSString *, id<CAAction>> *actions;
/** Animation methods. **/
/* Attach an animation object to the layer. Typically this is implicitly
* invoked through an action that is an CAAnimation object.
*
* 'key' may be any string such that only one animation per unique key
* is added per layer. The special key 'transition' is automatically
* used for transition animations. The nil pointer is also a valid key.
*
* If the `duration' property of the animation is zero or negative it
* is given the default duration, either the value of the
* `animationDuration' transaction property or .25 seconds otherwise.
*
* The animation is copied before being added to the layer, so any
* subsequent modifications to `anim' will have no affect unless it is
* added to another layer. */
- (void)addAnimation:(CAAnimation *)anim forKey:(nullable NSString *)key;
/* Remove all animations attached to the layer. */
- (void)removeAllAnimations;
/* Remove any animation attached to the layer for 'key'. */
- (void)removeAnimationForKey:(NSString *)key;
/* Returns an array containing the keys of all animations currently
* attached to the receiver. The order of the array matches the order
* in which animations will be applied. */
- (nullable NSArray<NSString *> *)animationKeys;
/* Returns the animation added to the layer with identifier 'key', or nil
* if no such animation exists. Attempting to modify any properties of
* the returned object will result in undefined behavior. */
- (nullable __kindof CAAnimation *)animationForKey:(NSString *)key;
/** Miscellaneous properties. **/
/* The name of the layer. Used by some layout managers. Defaults to nil. */
@property(nullable, copy) NSString *name;
/* An object that will receive the CALayer delegate methods defined
* below (for those that it implements). The value of this property is
* not retained. Default value is nil. */
@property(nullable, weak) id <CALayerDelegate> delegate;
/* When non-nil, a dictionary dereferenced to find property values that
* aren't explicitly defined by the layer. (This dictionary may in turn
* have a `style' property, forming a hierarchy of default values.)
* If the style dictionary doesn't define a value for an attribute, the
* +defaultValueForKey: method is called. Defaults to nil.
*
* Note that if the dictionary or any of its ancestors are modified,
* the values of the layer's properties are undefined until the `style'
* property is reset. */
@property(nullable, copy) NSDictionary *style;
@end
/** Layout manager protocol. **/
@protocol CALayoutManager <NSObject>
@optional
/* Called when the preferred size of 'layer' may have changed. The
* receiver is responsible for recomputing the preferred size and
* returning it. */
- (CGSize)preferredSizeOfLayer:(CALayer *)layer;
/* Called when the preferred size of 'layer' may have changed. The
* receiver should invalidate any cached state. */
- (void)invalidateLayoutOfLayer:(CALayer *)layer;
/* Called when the sublayers of 'layer' may need rearranging (e.g. if
* something changed size). The receiver is responsible for changing
* the frame of each sublayer that needs a new layout. */
- (void)layoutSublayersOfLayer:(CALayer *)layer;
@end
/** Action (event handler) protocol. **/
@protocol CAAction
/* Called to trigger the event named 'path' on the receiver. The object
* (e.g. the layer) on which the event happened is 'anObject'. The
* arguments dictionary may be nil, if non-nil it carries parameters
* associated with the event. */
- (void)runActionForKey:(NSString *)event object:(id)anObject
arguments:(nullable NSDictionary *)dict;
@end
/** NSNull protocol conformance. **/
@interface NSNull (CAActionAdditions) <CAAction>
@end
/** Delegate methods. **/
@protocol CALayerDelegate <NSObject>
@optional
/* If defined, called by the default implementation of the -display
* method, in which case it should implement the entire display
* process (typically by setting the `contents' property). */
- (void)displayLayer:(CALayer *)layer;
/* If defined, called by the default implementation of -drawInContext: */
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx;
/* If defined, called by the default implementation of the -display method.
* Allows the delegate to configure any layer state affecting contents prior
* to -drawLayer:InContext: such as `contentsFormat' and `opaque'. It will not
* be called if the delegate implements -displayLayer. */
- (void)layerWillDraw:(CALayer *)layer
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/* Called by the default -layoutSublayers implementation before the layout
* manager is checked. Note that if the delegate method is invoked, the
* layout manager will be ignored. */
- (void)layoutSublayersOfLayer:(CALayer *)layer;
/* If defined, called by the default implementation of the
* -actionForKey: method. Should return an object implementing the
* CAAction protocol. May return 'nil' if the delegate doesn't specify
* a behavior for the current event. Returning the null object (i.e.
* '[NSNull null]') explicitly forces no further search. (I.e. the
* +defaultActionForKey: method will not be called.) */
- (nullable id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event;
@end
/** Layer `contentsGravity' values. **/
CA_EXTERN CALayerContentsGravity const kCAGravityCenter
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityTop
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityBottom
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityLeft
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityRight
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityTopLeft
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityTopRight
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityBottomLeft
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityBottomRight
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityResize
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityResizeAspect
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsGravity const kCAGravityResizeAspectFill
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/** Layer `contentsFormat` values. **/
CA_EXTERN CALayerContentsFormat const kCAContentsFormatRGBA8Uint /* RGBA UInt8 per component */
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
CA_EXTERN CALayerContentsFormat const kCAContentsFormatRGBA16Float /* RGBA half-float 16-bit per component */
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
CA_EXTERN CALayerContentsFormat const kCAContentsFormatGray8Uint /* Grayscale with alpha (if not opaque) UInt8 per component */
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/** Contents filter names. **/
CA_EXTERN CALayerContentsFilter const kCAFilterNearest
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CALayerContentsFilter const kCAFilterLinear
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/* Trilinear minification filter. Enables mipmap generation. Some
* renderers may ignore this, or impose additional restrictions, such
* as source images requiring power-of-two dimensions. */
CA_EXTERN CALayerContentsFilter const kCAFilterTrilinear
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/** Corner curve names. **/
CA_EXTERN CALayerCornerCurve const kCACornerCurveCircular
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
CA_EXTERN CALayerCornerCurve const kCACornerCurveContinuous
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/** Layer event names. **/
CA_EXTERN NSString * const kCAOnOrderIn
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN NSString * const kCAOnOrderOut
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/** The animation key used for transitions. **/
CA_EXTERN NSString * const kCATransition
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVPixelBuffer.h | #include <CoreVideo/CVPixelBuffer.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h | /* QuartzCore.h
Copyright (c) 2004-2021, Apple Inc.
All rights reserved. */
#ifndef QUARTZCORE_H
#define QUARTZCORE_H
#include <QuartzCore/CoreImage.h>
#include <QuartzCore/CoreVideo.h>
#include <QuartzCore/CoreAnimation.h>
#endif /* QUARTZCORE_H */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIImageAccumulator.h | #include <CoreImage/CIImageAccumulator.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h | /* CoreAnimation - CATextLayer.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
/* The text layer provides simple text layout and rendering of plain
* or attributed strings. The first line is aligned to the top of the
* layer. */
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CATextLayerTruncationMode NS_TYPED_ENUM;
typedef NSString * CATextLayerAlignmentMode NS_TYPED_ENUM;
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CATextLayer : CALayer
{
@private
struct CATextLayerPrivate *_state;
}
/* The text to be rendered, should be either an NSString or an
* NSAttributedString. Defaults to nil. */
@property(nullable, copy) id string;
/* The font to use, currently may be either a CTFontRef (toll-free
* bridged from NSFont), a CGFontRef, or a string naming the font.
* Defaults to the Helvetica font. Only used when the `string' property
* is not an NSAttributedString. */
@property(nullable) CFTypeRef font;
/* The font size. Defaults to 36. Only used when the `string' property
* is not an NSAttributedString. Animatable (Mac OS X 10.6 and later.) */
@property CGFloat fontSize;
/* The color object used to draw the text. Defaults to opaque white.
* Only used when the `string' property is not an NSAttributedString.
* Animatable (Mac OS X 10.6 and later.) */
@property(nullable) CGColorRef foregroundColor;
/* When true the string is wrapped to fit within the layer bounds.
* Defaults to NO.*/
@property(getter=isWrapped) BOOL wrapped;
/* Describes how the string is truncated to fit within the layer
* bounds. The possible options are `none', `start', `middle' and
* `end'. Defaults to `none'. */
@property(copy) CATextLayerTruncationMode truncationMode;
/* Describes how individual lines of text are aligned within the layer
* bounds. The possible options are `natural', `left', `right',
* `center' and `justified'. Defaults to `natural'. */
@property(copy) CATextLayerAlignmentMode alignmentMode;
/* Sets allowsFontSubpixelQuantization parameter of CGContextRef
* passed to the -drawInContext: method. Defaults to NO. */
@property BOOL allowsFontSubpixelQuantization;
@end
/* Truncation modes. */
CA_EXTERN CATextLayerTruncationMode const kCATruncationNone
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerTruncationMode const kCATruncationStart
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerTruncationMode const kCATruncationEnd
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerTruncationMode const kCATruncationMiddle
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
/* Alignment modes. */
CA_EXTERN CATextLayerAlignmentMode const kCAAlignmentNatural
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerAlignmentMode const kCAAlignmentLeft
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerAlignmentMode const kCAAlignmentRight
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerAlignmentMode const kCAAlignmentCenter
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
CA_EXTERN CATextLayerAlignmentMode const kCAAlignmentJustified
API_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h | /* CoreAnimation - CAShapeLayer.h
Copyright (c) 2008-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CAShapeLayerFillRule NS_TYPED_ENUM;
typedef NSString * CAShapeLayerLineJoin NS_TYPED_ENUM;
typedef NSString * CAShapeLayerLineCap NS_TYPED_ENUM;
/* The shape layer draws a cubic Bezier spline in its coordinate space.
*
* The spline is described using a CGPath object and may have both fill
* and stroke components (in which case the stroke is composited over
* the fill). The shape as a whole is composited between the layer's
* contents and its first sublayer.
*
* The path object may be animated using any of the concrete subclasses
* of CAPropertyAnimation. Paths will interpolate as a linear blend of
* the "on-line" points; "off-line" points may be interpolated
* non-linearly (e.g. to preserve continuity of the curve's
* derivative). If the two paths have a different number of control
* points or segments the results are undefined.
*
* The shape will be drawn antialiased, and whenever possible it will
* be mapped into screen space before being rasterized to preserve
* resolution independence. (However, certain kinds of image processing
* operations, e.g. CoreImage filters, applied to the layer or its
* ancestors may force rasterization in a local coordinate space.)
*
* Note: rasterization may favor speed over accuracy, e.g. pixels with
* multiple intersecting path segments may not give exact results. */
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0))
@interface CAShapeLayer : CALayer
/* The path defining the shape to be rendered. If the path extends
* outside the layer bounds it will not automatically be clipped to the
* layer, only if the normal layer masking rules cause that. Upon
* assignment the path is copied. Defaults to null. Animatable.
* (Note that although the path property is animatable, no implicit
* animation will be created when the property is changed.) */
@property(nullable) CGPathRef path;
/* The color to fill the path, or nil for no fill. Defaults to opaque
* black. Animatable. */
@property(nullable) CGColorRef fillColor;
/* The fill rule used when filling the path. Options are `non-zero' and
* `even-odd'. Defaults to `non-zero'. */
@property(copy) CAShapeLayerFillRule fillRule;
/* The color to fill the path's stroked outline, or nil for no stroking.
* Defaults to nil. Animatable. */
@property(nullable) CGColorRef strokeColor;
/* These values define the subregion of the path used to draw the
* stroked outline. The values must be in the range [0,1] with zero
* representing the start of the path and one the end. Values in
* between zero and one are interpolated linearly along the path
* length. strokeStart defaults to zero and strokeEnd to one. Both are
* animatable. */
@property CGFloat strokeStart;
@property CGFloat strokeEnd;
/* The line width used when stroking the path. Defaults to one.
* Animatable. */
@property CGFloat lineWidth;
/* The miter limit used when stroking the path. Defaults to ten.
* Animatable. */
@property CGFloat miterLimit;
/* The cap style used when stroking the path. Options are `butt', `round'
* and `square'. Defaults to `butt'. */
@property(copy) CAShapeLayerLineCap lineCap;
/* The join style used when stroking the path. Options are `miter', `round'
* and `bevel'. Defaults to `miter'. */
@property(copy) CAShapeLayerLineJoin lineJoin;
/* The phase of the dashing pattern applied when creating the stroke.
* Defaults to zero. Animatable. */
@property CGFloat lineDashPhase;
/* The dash pattern (an array of NSNumbers) applied when creating the
* stroked version of the path. Defaults to nil. */
@property(nullable, copy) NSArray<NSNumber *> *lineDashPattern;
@end
/* `fillRule' values. */
CA_EXTERN CAShapeLayerFillRule const kCAFillRuleNonZero
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAShapeLayerFillRule const kCAFillRuleEvenOdd
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* `lineJoin' values. */
CA_EXTERN CAShapeLayerLineJoin const kCALineJoinMiter
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAShapeLayerLineJoin const kCALineJoinRound
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAShapeLayerLineJoin const kCALineJoinBevel
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/* `lineCap' values. */
CA_EXTERN CAShapeLayerLineCap const kCALineCapButt
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAShapeLayerLineCap const kCALineCapRound
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAShapeLayerLineCap const kCALineCapSquare
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVDisplayLink.h | #include <CoreVideo/CVDisplayLink.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h | /* CoreAnimation - CATransaction.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CABase.h>
#import <Foundation/NSObject.h>
/* Transactions are CoreAnimation's mechanism for batching multiple layer-
* tree operations into atomic updates to the render tree. Every
* modification to the layer tree requires a transaction to be part of.
*
* CoreAnimation supports two kinds of transactions, "explicit" transactions
* and "implicit" transactions.
*
* Explicit transactions are where the programmer calls `[CATransaction
* begin]' before modifying the layer tree, and `[CATransaction commit]'
* afterwards.
*
* Implicit transactions are created automatically by CoreAnimation when the
* layer tree is modified by a thread without an active transaction.
* They are committed automatically when the thread's run-loop next
* iterates. In some circumstances (i.e. no run-loop, or the run-loop
* is blocked) it may be necessary to use explicit transactions to get
* timely render tree updates. */
@class CAMediaTimingFunction;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CATransaction : NSObject
/* Begin a new transaction for the current thread; nests. */
+ (void)begin;
/* Commit all changes made during the current transaction. Raises an
* exception if no current transaction exists. */
+ (void)commit;
/* Commits any extant implicit transaction. Will delay the actual commit
* until any nested explicit transactions have completed. */
+ (void)flush;
/* Methods to lock and unlock the global lock. Layer methods automatically
* obtain this while modifying shared state, but callers may need to lock
* around multiple operations to ensure consistency. The lock is a
* recursive spin-lock (i.e shouldn't be held for extended periods). */
+ (void)lock;
+ (void)unlock;
/* Accessors for the "animationDuration" per-thread transaction
* property. Defines the default duration of animations added to
* layers. Defaults to 1/4s. */
+ (CFTimeInterval)animationDuration;
+ (void)setAnimationDuration:(CFTimeInterval)dur;
/* Accessors for the "animationTimingFunction" per-thread transaction
* property. The default value is nil, when set to a non-nil value any
* animations added to layers will have this value set as their
* "timingFunction" property. Added in Mac OS X 10.6. */
+ (nullable CAMediaTimingFunction *)animationTimingFunction;
+ (void)setAnimationTimingFunction:(nullable CAMediaTimingFunction *)function;
/* Accessors for the "disableActions" per-thread transaction property.
* Defines whether or not the layer's -actionForKey: method is used to
* find an action (aka. implicit animation) for each layer property
* change. Defaults to NO, i.e. implicit animations enabled. */
+ (BOOL)disableActions;
+ (void)setDisableActions:(BOOL)flag;
/* Accessors for the "completionBlock" per-thread transaction property.
* Once set to a non-nil value the block is guaranteed to be called (on
* the main thread) as soon as all animations subsequently added by
* this transaction group have completed (or been removed). If no
* animations are added before the current transaction group is
* committed (or the completion block is set to a different value), the
* block will be invoked immediately. Added in Mac OS X 10.6. */
#if __BLOCKS__
+ (nullable void (^)(void))completionBlock;
+ (void)setCompletionBlock:(nullable void (^)(void))block;
#endif
/* Associate arbitrary keyed-data with the current transaction (i.e.
* with the current thread).
*
* Nested transactions have nested data scope, i.e. reading a key
* searches for the innermost scope that has set it, setting a key
* always sets it in the innermost scope.
*
* Currently supported transaction properties include:
* "animationDuration", "animationTimingFunction", "completionBlock",
* "disableActions". See method declarations above for descriptions of
* each property.
*
* Attempting to set a property to a type other than its document type
* has an undefined result. */
+ (nullable id)valueForKey:(NSString *)key;
+ (void)setValue:(nullable id)anObject forKey:(NSString *)key;
@end
/** Transaction property ids. **/
CA_EXTERN NSString * const kCATransactionAnimationDuration
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN NSString * const kCATransactionDisableActions
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN NSString * const kCATransactionAnimationTimingFunction
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
CA_EXTERN NSString * const kCATransactionCompletionBlock
API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIContext.h | #include <CoreImage/CIContext.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVOpenGLBuffer.h | #include <CoreVideo/CVOpenGLBuffer.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIImageProvider.h | #include <CoreImage/CIImageProvider.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h | /* CoreAnimation - CAScrollLayer.h
Copyright (c) 2006-2021, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
NS_ASSUME_NONNULL_BEGIN
typedef NSString * CAScrollLayerScrollMode NS_TYPED_ENUM;
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
@interface CAScrollLayer : CALayer
/* Changes the origin of the layer to point 'p'. */
- (void)scrollToPoint:(CGPoint)p;
/* Scroll the contents of the layer to ensure that rect 'r' is visible. */
- (void)scrollToRect:(CGRect)r;
/* Defines the axes in which the layer may be scrolled. Possible values
* are `none', `vertically', `horizontally' or `both' (the default). */
@property(copy) CAScrollLayerScrollMode scrollMode;
@end
@interface CALayer (CALayerScrolling)
/* These methods search for the closest ancestor CAScrollLayer of the *
* receiver, and then call either -scrollToPoint: or -scrollToRect: on
* that layer with the specified geometry converted from the coordinate
* space of the receiver to that of the found scroll layer. */
- (void)scrollPoint:(CGPoint)p;
- (void)scrollRectToVisible:(CGRect)r;
/* Returns the visible region of the receiver, in its own coordinate
* space. The visible region is the area not clipped by the containing
* scroll layer. */
@property(readonly) CGRect visibleRect;
@end
/* `scrollMode' values. */
CA_EXTERN CAScrollLayerScrollMode const kCAScrollNone
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAScrollLayerScrollMode const kCAScrollVertically
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAScrollLayerScrollMode const kCAScrollHorizontally
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
CA_EXTERN CAScrollLayerScrollMode const kCAScrollBoth
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CARenderer.h | /* CoreAnimation - CARenderer.h
Copyright (c) 2007-2021, Apple Inc.
All rights reserved. */
/* This class lets an application manually drive the rendering of a
* layer tree into an OpenGL rendering context. This is _not_ the
* best solution for real-time output, use an NSView to host a layer
* tree for that.
*
* The contract between CARenderer and the provided OpenGL context is
* as follows:
*
* 1. the context should have an orthographic projection matrix and an
* identity model-view matrix, such that vertex position (0,0) is in
* the bottom left corner. (That is, window coordinates must match
* vertex coordinates.)
*
* Sample code to initialize the OpenGL context for a window of width
* W and height H could be:
*
* glViewport (0, 0, W, H);
* glMatrixMode (GL_PROJECTION);
* glLoadIdentity ();
* glOrtho (0, W, 0, H, -1, 1);
*
* 2. all OpenGL state apart from the viewport and projection matrices
* must have their default values when -render is called. On return
* from the -render method, the default values will be preserved.
*/
#import <QuartzCore/CABase.h>
#import <CoreVideo/CVBase.h>
#import <Foundation/NSObject.h>
@class NSDictionary, CALayer;
@protocol MTLTexture;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos)
@interface CARenderer : NSObject
{
@private
struct CARendererPriv *_priv;
}
/* Create a new renderer object. Its render target is the specified
* Core OpenGL context. 'dict' is an optional dictionary of parameters. */
+ (CARenderer *)rendererWithCGLContext:(void *)ctx
options:(nullable NSDictionary *)dict
#ifndef GL_SILENCE_DEPRECATION
API_DEPRECATED("+rendererWithMTLTexture", macos(10.5, 10.14));
#else
API_AVAILABLE(macos(10.5));
#endif
/* Create a new renderer object. Its render target is the specified
* texture. 'dict' is an optional dictionary of parameters. */
+ (CARenderer *)rendererWithMTLTexture:(id<MTLTexture>)tex
options:(nullable NSDictionary *)dict
API_AVAILABLE(macos(10.13)) API_UNAVAILABLE(ios, watchos, tvos);
/* The root layer associated with the renderer. */
@property(nullable, strong) CALayer *layer;
/* The bounds rect of the render target. */
@property CGRect bounds;
/* Begin rendering a frame at time 't'. If 'ts' is non-null it defines
* the host time and update frequency of the target device. */
- (void)beginFrameAtTime:(CFTimeInterval)t timeStamp:(nullable CVTimeStamp *)ts;
/* Returns the bounds of the update region - the area that contains all
* pixels that will be rendered by the current frame. Initially this
* will include all differences between the current frame and the
* previously rendered frame. */
- (CGRect)updateBounds;
/* Add rectangle 'r' to the update region of the current frame. */
- (void)addUpdateRect:(CGRect)r;
/* Render the update region of the current frame to the target context. */
- (void)render;
/* Returns the time at which the next update should happen. If infinite
* no update needs to be scheduled yet. If the current frame time, a
* continuous animation is running and an update should be scheduled
* after a "natural" delay. */
- (CFTimeInterval)nextFrameTime;
/* Release any data associated with the current frame. */
- (void)endFrame;
/* Change the renderer's destination Metal texture. */
- (void)setDestination:(id<MTLTexture>)tex;
@end
/** Options for the renderer options dictionary. **/
/* The CGColorSpaceRef object defining the output color space. */
CA_EXTERN NSString * const kCARendererColorSpace
API_AVAILABLE(macos(10.6)) API_UNAVAILABLE(ios, watchos, tvos);
/* The Metal Command Queue object against which to submit work.
*
* If the client provides a queue, then we will only commit our
* command buffer and let the client handle it's own synchronization
* and/or resource synchronization blits.
*
* If none is provided, then we will use an internal queue which
* automatically commits and waitUntilScheduled. */
CA_EXTERN NSString * const kCARendererMetalCommandQueue
API_AVAILABLE(macos(10.14)) API_UNAVAILABLE(ios, watchos, tvos);
NS_ASSUME_NONNULL_END
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CVPixelBufferPool.h | #include <CoreVideo/CVPixelBufferPool.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/QuartzCore.framework/Headers/CIVector.h | #include <CoreImage/CIVector.h>
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.