text:
#ifndef __CGIMAGEPROPERTIES__
#define __CGIMAGEPROPERTIES__

#include <CoreFoundation/CoreFoundation.h>
#include <CoreGraphics/CGBase.h>
#include <ImageIO/ImageIOBase.h>

/* Properties that, if returned by CGImageSourceCopyProperties or
 * CGImageSourceCopyPropertiesAtIndex, contain a dictionary of file-format
 * or metadata-format specific key-values. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGIFDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyJFIFDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyRawDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyCIFFDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerCanonDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerNikonDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerMinoltaDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerFujiDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerOlympusDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerPentaxDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImageProperty8BIMDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyDNGDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyOpenEXRDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyMakerAppleDictionary  IMAGEIO_AVAILABLE_STARTING(__MAC_NA, __IPHONE_7_0);

/** Properties which may be returned by "CGImageSourceCopyProperties".  The
 ** values apply to the container in general but not necessarily to any
 ** individual image that it contains. **/

/* The size of the image file in bytes, if known. If present, the value of
 * this key is a CFNumberRef. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyFileSize  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/** Properties which may be returned by "CGImageSourceCopyPropertiesAtIndex".
 ** The values apply to a single image of an image source file. **/

/* The number of pixels in the x- and y-dimensions. The value of these keys
 * is a CFNumberRef. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPixelHeight  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPixelWidth  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The DPI in the x- and y-dimensions, if known. If present, the value of
 * these keys is a CFNumberRef. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyDPIHeight  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyDPIWidth  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The number of bits in each color sample of each pixel. The value of this
 * key is a CFNumberRef. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyDepth  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The intended display orientation of the image. If present, the value
 * of this key is a CFNumberRef with the same value as defined by the
 * TIFF and Exif specifications.  That is:
 *   1  =  0th row is at the top, and 0th column is on the left.
 *   2  =  0th row is at the top, and 0th column is on the right.
 *   3  =  0th row is at the bottom, and 0th column is on the right.
 *   4  =  0th row is at the bottom, and 0th column is on the left.
 *   5  =  0th row is on the left, and 0th column is the top.
 *   6  =  0th row is on the right, and 0th column is the top.
 *   7  =  0th row is on the right, and 0th column is the bottom.
 *   8  =  0th row is on the left, and 0th column is the bottom.
 * If not present, a value of 1 is assumed. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyOrientation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The value of this key is kCFBooleanTrue if the image contains floating-
 * point pixel samples */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIsFloat  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The value of this key is kCFBooleanTrue if the image contains indexed
 * (a.k.a. paletted) pixel samples */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIsIndexed  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The value of this key is kCFBooleanTrue if the image contains an alpha
 * (a.k.a. coverage) channel */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyHasAlpha  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The color model of the image such as "RGB", "CMYK", "Gray", or "Lab".
 * The value of this key is CFStringRef. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyColorModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* The name of the optional ICC profile embedded in the image, if known.
 * If present, the value of this key is a CFStringRef. */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyProfileName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible values for kCGImagePropertyColorModel property */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyColorModelRGB  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyColorModelGray  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyColorModelCMYK  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyColorModelLab  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyTIFFDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFCompression  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFPhotometricInterpretation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFDocumentName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFImageDescription  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFMake  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFOrientation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFXResolution  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFYResolution  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFResolutionUnit  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFSoftware  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFTransferFunction  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFDateTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFArtist  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFHostComputer  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFCopyright  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFWhitePoint  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFPrimaryChromaticities  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyJFIFDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyJFIFVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyJFIFXDensity  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyJFIFYDensity  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyJFIFDensityUnit  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyJFIFIsProgressive  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyExifDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifExposureTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifExposureProgram  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSpectralSensitivity  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifISOSpeedRatings  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifOECF  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSensitivityType  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifStandardOutputSensitivity  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifRecommendedExposureIndex  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifISOSpeed  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifISOSpeedLatitudeyyy  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifISOSpeedLatitudezzz  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifDateTimeOriginal  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifDateTimeDigitized  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifComponentsConfiguration  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifCompressedBitsPerPixel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifShutterSpeedValue  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifApertureValue  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifBrightnessValue  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifExposureBiasValue  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifMaxApertureValue  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubjectDistance  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifMeteringMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifLightSource  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFlash  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFocalLength  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubjectArea  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifMakerNote  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifUserComment  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubsecTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubsecTimeOrginal  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubsecTimeDigitized  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFlashPixVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifColorSpace  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifPixelXDimension  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifPixelYDimension  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifRelatedSoundFile  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFlashEnergy  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSpatialFrequencyResponse  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFocalPlaneXResolution  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFocalPlaneYResolution  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFocalPlaneResolutionUnit  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubjectLocation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifExposureIndex  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSensingMethod  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFileSource  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSceneType  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifCFAPattern  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifCustomRendered  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifExposureMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifWhiteBalance  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifDigitalZoomRatio  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifFocalLenIn35mmFilm  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSceneCaptureType  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifGainControl  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifContrast  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSaturation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSharpness  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifDeviceSettingDescription  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifSubjectDistRange  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifImageUniqueID  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifCameraOwnerName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifBodySerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifLensSpecification  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifLensMake  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifLensModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifLensSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifGamma  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyExifAuxDictionary */
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxLensInfo	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxLensModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxSerialNumber	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxLensID	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxLensSerialNumber	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxImageNumber	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxFlashCompensation	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxOwnerName	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifAuxFirmware	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyGIFDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGIFLoopCount  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGIFDelayTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGIFImageColorMap  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGIFHasGlobalColorMap  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGIFUnclampedDelayTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyPNGDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGGamma  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGInterlaceType  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGXPixelsPerMeter  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGYPixelsPerMeter  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGsRGBIntent  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGChromaticities  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGAuthor  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGCopyright  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGCreationTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGDescription  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGModificationTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGSoftware  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGTitle  IMAGEIO_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);

/* Possible keys for kCGImagePropertyGPSDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSLatitudeRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSLatitude  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSLongitudeRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSLongitude  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSAltitudeRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSAltitude  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSTimeStamp  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSSatellites  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSStatus  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSMeasureMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDOP  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSSpeedRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSSpeed  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSTrackRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSTrack  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSImgDirectionRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSImgDirection  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSMapDatum  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestLatitudeRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestLatitude  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestLongitudeRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestLongitude  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestBearingRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestBearing  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestDistanceRef  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDestDistance  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSProcessingMethod  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSAreaInformation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDateStamp  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyGPSDifferental  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyIPTCDictionary */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCObjectTypeReference  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCObjectAttributeReference  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCObjectName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCEditStatus  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCEditorialUpdate  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCUrgency  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCSubjectReference  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCategory  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCSupplementalCategory  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCFixtureIdentifier  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCKeywords  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContentLocationCode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContentLocationName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCReleaseDate  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCReleaseTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCExpirationDate  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCExpirationTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCSpecialInstructions  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCActionAdvised  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCReferenceService  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCReferenceDate  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCReferenceNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCDateCreated  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCTimeCreated  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCDigitalCreationDate  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCDigitalCreationTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCOriginatingProgram  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCProgramVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCObjectCycle  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCByline  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCBylineTitle  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCity  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCSubLocation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCProvinceState  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCountryPrimaryLocationCode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCountryPrimaryLocationName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCOriginalTransmissionReference  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCHeadline  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCredit  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCSource  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCopyrightNotice  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContact  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCaptionAbstract  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCWriterEditor  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCImageType  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCImageOrientation  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCLanguageIdentifier  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCStarRating  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCCreatorContactInfo  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);	// IPTC Core
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCRightsUsageTerms  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);	// IPTC Core
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCScene  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);				// IPTC Core

/* Possible keys for kCGImagePropertyIPTCCreatorContactInfo dictionary (part of IPTC Core - above) */

IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoCity  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoCountry  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoAddress  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoPostalCode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoStateProvince  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoEmails  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoPhones  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyIPTCContactInfoWebURLs  IMAGEIO_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_0);

/* Possible keys for kCGImageProperty8BIMDictionary */

IMAGEIO_EXTERN const CFStringRef  kCGImageProperty8BIMLayerNames  IMAGEIO_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyDNGDictionary */

IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyDNGVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyDNGBackwardVersion  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyDNGUniqueCameraModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyDNGLocalizedCameraModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyDNGCameraSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyDNGLensInfo  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyCIFFDictionary */

IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFDescription  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFFirmware  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFOwnerName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFImageName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFImageFileName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFReleaseMethod  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFReleaseTiming  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFRecordID  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFSelfTimingTime  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFCameraSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFImageSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFContinuousDrive  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFFocusMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFMeteringMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFShootingMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFLensModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFLensMaxMM  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFLensMinMM  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFWhiteBalanceIndex  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFFlashExposureComp  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyCIFFMeasuredEV  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyMakerNikonDictionary */

IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonISOSetting  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonColorMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonQuality  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonWhiteBalanceMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonSharpenMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonFocusMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonFlashSetting  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonISOSelection  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonFlashExposureComp  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonImageAdjustment  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonLensAdapter  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef	 kCGImagePropertyMakerNikonLensType  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonLensInfo  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonFocusDistance  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonDigitalZoom  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonShootingMode  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonCameraSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerNikonShutterCount  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyMakerCanonDictionary */

IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonOwnerName  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonCameraSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonImageSerialNumber  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonFlashExposureComp  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonContinuousDrive  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonLensModel  IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonFirmware	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);
IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyMakerCanonAspectRatioInfo	IMAGEIO_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0);

/* Possible keys for kCGImagePropertyOpenEXRDictionary */

IMAGEIO_EXTERN const CFStringRef  kCGImagePropertyOpenEXRAspectRatio  IMAGEIO_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);

#endif	/* __CGIMAGEPROPERTIES__ */


text:
#region LICENCE

//

#endregion

using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using TileIconifier.Core.Custom;
using TileIconifier.Core.Shortcut.State;
using TileIconifier.Core.Utilities;

namespace TileIconifier.Core.Shortcut
{
    [Serializable]
    public class ShortcutItem
    {
        private Bitmap _standardIcon;

        [NonSerialized] public ShortcutItemStateController Properties = new ShortcutItemStateController();

        public ShortcutItem(FileInfo shortcutFileInfo)
        {
            ShortcutFileInfo = shortcutFileInfo;
            IsPinned = null;
            Properties.LoadParameters(IsIconified, VisualElementManifestPath, MediumImageResizeMetadataPath,
                SmallImageResizeMetadataPath, TargetFolderPath);
        }

        public ShortcutItem(string shortcutPath) : this(new FileInfo(shortcutPath))
        {
            //ShortcutFileInfo =
            //IsPinned = null;
            //Properties.LoadParameters(IsIconified, VisualElementManifestPath, MediumImageResizeMetadataPath,
            //    SmallImageResizeMetadataPath, TargetFolderPath);
        }

        public bool IsTileIconifierCustomShortcut => new DirectoryInfo(TargetFolderPath).Parent?.FullName + "\\" ==
                                                     CustomShortcutGetters.CustomShortcutVbsPath;

        public CustomShortcut CustomShortcut
        {
            get
            {
                if (!IsTileIconifierCustomShortcut)
                {
                    return null;
                }
                try
                {
                    return CustomShortcut.Load(TargetFilePath);
                }
                catch
                {
                    return null;
                }
            }
        }

        public ShortcutUser ShortcutUser
        {
            get
            {
                if (ShortcutFileInfo.FullName.StartsWith(CustomShortcutGetters.CustomShortcutAllUsersPath))
                    return ShortcutUser.AllUsers;
                if (ShortcutFileInfo.FullName.StartsWith(CustomShortcutGetters.CustomShortcutCurrentUserPath))
                    return ShortcutUser.CurrentUser;
                return ShortcutUser.Unknown;
            }
        }

        public bool IsValidForIconification => !string.IsNullOrEmpty(TargetFilePath) && File.Exists(TargetFilePath);

        //todo: merge this with property IconifiedByTileIconifier at some point, should be a better indicator but won't work retroactively
        public bool IsIconified => File.Exists(VisualElementManifestPath)
                                   && Directory.Exists(VisualElementsPath)
                                   && File.Exists(FullMediumIconPath)
                                   && File.Exists(FullSmallIconPath);

        public bool IconifiedByTileIconifier
        {
            get
            {
                if (!File.Exists(VisualElementManifestPath))
                {
                    return false;
                }

                var xmlDoc = XDocument.Load(VisualElementManifestPath);
                try
                {
                    return (bool)xmlDoc.Root.Attribute("GeneratedByTileIconifier");
                }
                catch
                {
                    //ignore
                }
                return false;
            }
        }

        public Bitmap StandardIcon
        {
            get
            {
                if (_standardIcon != null) return _standardIcon;
                try
                {
                    _standardIcon = Icon.ExtractAssociatedIcon(ShortcutFileInfo.FullName)?.ToBitmap();
                }
                catch
                {
                    // ignored
                }
                return _standardIcon;
            }
        }

        public FileInfo ShortcutFileInfo { get; set; }
        public string AppId { get; set; }
        public bool? IsPinned { get; set; }

        #region Path properties

        private string _targetFilePath;

        public string TargetFilePath
        {
            get
            {
                if (string.IsNullOrEmpty(_targetFilePath))
                    _targetFilePath = ShortcutUtils.GetTargetPath(ShortcutFileInfo.FullName);
                return
                    Environment.ExpandEnvironmentVariables("%PATHEXT%").Split(';').Any(
                        e =>
                            string.Equals(Path.GetExtension(_targetFilePath), e,
                                StringComparison.InvariantCultureIgnoreCase))
                        ? _targetFilePath
                        : null;
            }
        }

        public string VisualElementManifestPath =>
            $"{TargetFolderPath}{Path.GetFileNameWithoutExtension(TargetFilePath)}.VisualElementsManifest.xml";

        public string VisualElementManifestPathOriginalBackup =>
            VisualElementManifestPath + ".originalbak";

        public string TargetFolderPath => Path.GetDirectoryName(TargetFilePath) + "\\";

        public string VisualElementsPath => TargetFolderPath + @"\VisualElements\";

        public string MediumIconName
            => $"MediumIcon{Path.GetFileNameWithoutExtension(TargetFilePath)}.png";

        public string RelativeMediumIconPath
            => $"{Path.GetFileName(Path.GetDirectoryName(VisualElementsPath))}\\{MediumIconName}";

        public string FullMediumIconPath => $"{VisualElementsPath}{MediumIconName}";

        public string SmallIconName
            => $"SmallIcon{Path.GetFileNameWithoutExtension(TargetFilePath)}.png";

        public string RelativeSmallIconPath
            => $"{Path.GetFileName(Path.GetDirectoryName(VisualElementsPath))}\\{SmallIconName}";

        public string FullSmallIconPath => $"{VisualElementsPath}{SmallIconName}";

        public string MediumImageResizeMetadataPath
            => $"{VisualElementsPath}{Path.GetFileNameWithoutExtension(MediumIconName)}_Metadata.xml";

        public string SmallImageResizeMetadataPath
            => $"{VisualElementsPath}{Path.GetFileNameWithoutExtension(SmallIconName)}_Metadata.xml";

        #endregion
    }

    public class ShortcutItemEqualityComparer : IEqualityComparer<ShortcutItem>
    {
        public bool Equals(ShortcutItem x, ShortcutItem y)
        {
            if (x == null || y == null)
                return false;
            if (ReferenceEquals(x, y))
                return true;

            return x.ShortcutFileInfo.FullName == y.ShortcutFileInfo.FullName;
        }

        public int GetHashCode(ShortcutItem obj)
        {
            return 0;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
                  android:layout_width="fill_parent" android:layout_height="fill_parent"
                  android:background="@drawable/background" android:id="@+id/linearLayout">
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent"
                      android:layout_height="wrap_content" android:background="#FF000000">
            <TextView android:layout_width="wrap_content" android:layout_height="fill_parent"
                      android:text="Timed Actions" android:id="@+id/textView3" android:layout_margin="10dp"
                      android:layout_gravity="center" android:textSize="24dp"/>
        </LinearLayout>
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent"
                      android:layout_height="wrap_content" android:baselineAligned="false"
                      android:background="#CC000000" android:layout_margin="25dp">
            <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" android:layout_weight=".20">
                <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" android:layout_weight=".20">
                        android:layout_weight=".50"
                    <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
                            android:text="Start Action #1" android:id="@+id/button2"
                            android:onClick="startAction1" android:background="#505050"
                            android:textColor="@android:color/white" android:layout_marginLeft="20dp"
                            android:layout_marginTop="20dp"
                            android:layout_alignParentLeft="true" android:width="140dp"
                            android:minHeight="35dp" android:maxHeight="45dp"/>
                    <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
                            android:text="Stop Action #1" android:id="@+id/button3"
                            android:layout_gravity="center_horizontal" android:onClick="stopAction1"
                            android:background="#505050" android:textColor="@android:color/white"
                            android:layout_alignParentLeft="false"
                            android:layout_alignParentRight="true"
                            android:layout_marginTop="20dp" android:layout_marginRight="20dp"
                            android:layout_toRightOf="@+id/button2" android:layout_marginLeft="20dp"
                            android:maxHeight="45dp" android:minHeight="35dp"/>
                </RelativeLayout>
                <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" android:layout_weight=".30">
                        android:layout_weight=".50"
                    <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="In-App Time:"
                            android:id="@+id/textView"
                            android:layout_alignParentTop="true"
                            android:layout_marginLeft="20dp"/>
                    <TextView
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:id="@+id/lblInApp1" android:layout_alignParentLeft="true"
                            android:layout_marginLeft="110dp" android:layout_marginTop="0dp"
                            android:layout_marginRight="20dp" android:layout_alignParentTop="true"/>
                </RelativeLayout>
                <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
                                android:id="@+id/relativeLayout" android:layout_weight=".30">
                    <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                              android:text="Total Time:" android:layout_marginTop="10dp"
                              android:layout_marginLeft="20dp"/>
                    <TextView android:layout_width="fill_parent" android:layout_height="wrap_content"
                              android:id="@+id/lblTotal1" android:layout_alignParentLeft="true"
                              android:layout_marginLeft="110dp" android:layout_marginTop="10dp"
                              android:layout_marginRight="20dp"/>
                </RelativeLayout>
            </LinearLayout>
            <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" android:layout_weight=".20">
                <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" android:layout_weight=".20">
                    <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
                            android:text="Start Action #2" android:id="@+id/button4" android:onClick="startAction2"
                            android:background="#505050" android:textColor="@android:color/white"
                            android:layout_marginLeft="20dp" android:layout_marginTop="20dp"
                            android:layout_alignParentLeft="true" android:width="140dp" android:maxHeight="45dp"
                            android:minHeight="35dp"/>
                    <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
                            android:text="Stop Action #2" android:id="@+id/button5"
                            android:layout_gravity="center_horizontal" android:onClick="stopAction2"
                            android:background="#505050" android:textColor="@android:color/white"
                            android:layout_alignParentLeft="false" android:layout_alignParentRight="true"
                            android:layout_marginTop="20dp" android:layout_marginRight="20dp"
                            android:layout_toRightOf="@+id/button4" android:layout_marginLeft="20dp"
                            android:maxHeight="45dp" android:minHeight="35dp"/>
                </RelativeLayout>
                <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" android:layout_weight=".30">
                    <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                              android:text="In-App Time:" android:id="@+id/textView4" android:layout_marginTop="10dp"
                              android:layout_marginLeft="20dp"/>
                    <TextView android:layout_width="fill_parent" android:layout_height="wrap_content"
                              android:id="@+id/lblInApp2" android:layout_alignParentLeft="true"
                              android:layout_marginLeft="110dp" android:layout_marginTop="10dp"
                              android:layout_marginRight="20dp"/>
                </RelativeLayout>
                <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" android:layout_weight=".30">
                    <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                              android:text="Total Time:" android:layout_marginTop="10dp" android:layout_marginLeft="20dp"/>
                    <TextView android:layout_width="fill_parent" android:layout_height="wrap_content"
                              android:id="@+id/lblTotal2" android:layout_alignParentLeft="true"
                              android:layout_marginLeft="110dp" android:layout_marginTop="10dp"
                              android:layout_marginRight="20dp"/>
                </RelativeLayout>
            </LinearLayout>
            <TextView android:layout_width="fill_parent" android:layout_height="wrap_content"
                      android:text="@string/timedActions" android:id="@+id/textView2" android:layout_margin="20dp"
                      android:textSize="14dp" android:layout_weight="0"/>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>


text:
function push(){
	var xhr = new XMLHttpRequest();
	xhr.open('GET', '/pushevent', true);
	xhr.onload = function(evt){
		console.log(xhr.response);
	}
	xhr.send();
	console.log("Sending....");
}


text:
{% import "lib/githubLinks.html" as github -%}
{% extends 'layout/base.template.html' %}

{% block body %}

{$ doc.id $} module

defined in {$ github.githubViewLink(doc, versionInfo) $}

{$ doc.description | marked $}

{% if doc.exports.length %}

Exports

{%- for exportDoc in doc.exports %}
  {% if not exportDoc.internal -%}

{$ exportDoc.name $} {$ exportDoc.docType $}

  {%- endif %}
{%- endfor %}

{% endif %}
{% endblock %}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>FilestackClient (filestack-java 0.3.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.filestack

Class FilestackClient

java.lang.Object

com.filestack.FilestackClient

public class FilestackClient
extends java.lang.Object

Uploads new files.

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

static class
FilestackClient.Builder

Builds new FilestackClient.

Constructor Summary

Constructors

Constructor and Description

FilestackClient(java.lang.String apiKey)

Constructs an instance without security.

FilestackClient(java.lang.String apiKey,
               Security security)

Constructs an instance with security.

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

java.lang.String
getApiKey()

FsService
getFsService()

Security
getSecurity()

ImageTransform
imageTransform(java.lang.String url)

Creates an ImageTransform object for this file.

FileLink
upload(java.lang.String path,
      java.lang.String contentType)

Uploads local file using default storage options.

FileLink
upload(java.lang.String path,
      java.lang.String contentType,
      StorageOptions options)

Upload local file using custom storage options.

FileLink
upload(java.lang.String path,
      java.lang.String contentType,
      StorageOptions options,
      boolean intelligent)

Uploads local file using custom storage and upload options.

io.reactivex.Flowable<Progress<FileLink>>
uploadAsync(java.lang.String path,
           java.lang.String contentType)

Asynchronously uploads local file using default storage options.

io.reactivex.Flowable<Progress<FileLink>>
uploadAsync(java.lang.String path,
           java.lang.String contentType,
           StorageOptions options)

Asynchronously uploads local file using custom storage options.

io.reactivex.Flowable<Progress<FileLink>>
uploadAsync(java.lang.String path,
           java.lang.String contentType,
           StorageOptions options,
           boolean intelligent)

Asynchronously uploads local file using custom storage and upload options.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FilestackClient

public FilestackClient(java.lang.String apiKey)

Constructs an instance without security.

See Also:

FilestackClient(String, Security)

FilestackClient

public FilestackClient(java.lang.String apiKey,
                       Security security)

Constructs an instance with security.

Parameters:

apiKey - account key from the dev portal

security - needs required permissions for your intended actions

Method Detail

upload

public FileLink upload(java.lang.String path,
                       java.lang.String contentType)
                throws ValidationException,
                       java.io.IOException,
                       PolicySignatureException,
                       InvalidParameterException,
                       InternalException

Uploads local file using default storage options.

Throws:

ValidationException

java.io.IOException

PolicySignatureException

InvalidParameterException

InternalException

See Also:

upload(String, String, StorageOptions, boolean)

upload

public FileLink upload(java.lang.String path,
                       java.lang.String contentType,
                       StorageOptions options)
                throws ValidationException,
                       java.io.IOException,
                       PolicySignatureException,
                       InvalidParameterException,
                       InternalException

Upload local file using custom storage options.

Throws:

ValidationException

java.io.IOException

PolicySignatureException

InvalidParameterException

InternalException

See Also:

upload(String, String, StorageOptions, boolean)

upload

public FileLink upload(java.lang.String path,
                       java.lang.String contentType,
                       StorageOptions options,
                       boolean intelligent)
                throws ValidationException,
                       java.io.IOException,
                       PolicySignatureException,
                       InvalidParameterException,
                       InternalException

Uploads local file using custom storage and upload options.

Parameters:

path - path to the file, can be local or absolute

contentType - MIME type of the file

options - storage options, https://www.filestack.com/docs/rest-api/store

intelligent - intelligent ingestion, improves reliability for bad networks

Returns:

new FileLink referencing file

Throws:

ValidationException - if the pathname doesn't exist or isn't a regular file

java.io.IOException - if request fails because of network or other IO issue

PolicySignatureException - if security is missing or invalid

InvalidParameterException - if a request parameter is missing or invalid

InternalException - if unexpected error occurs

uploadAsync

public io.reactivex.Flowable<Progress<FileLink>> uploadAsync(java.lang.String path,
                                                             java.lang.String contentType)

Asynchronously uploads local file using default storage options.

See Also:

upload(String, String, StorageOptions, boolean),
uploadAsync(String, String, StorageOptions, boolean)

uploadAsync

public io.reactivex.Flowable<Progress<FileLink>> uploadAsync(java.lang.String path,
                                                             java.lang.String contentType,
                                                             StorageOptions options)

Asynchronously uploads local file using custom storage options.

See Also:

upload(String, String, StorageOptions, boolean),
uploadAsync(String, String, StorageOptions, boolean)

uploadAsync

public io.reactivex.Flowable<Progress<FileLink>> uploadAsync(java.lang.String path,
                                                             java.lang.String contentType,
                                                             StorageOptions options,
                                                             boolean intelligent)

Asynchronously uploads local file using custom storage and upload options.
 A stream of Progress objects are emitted by the returned Flowable.
 The final Progress object will return a new FileLink from
 Progress.getData(). The upload is not done until Progress.getData() returns
 non-null.

See Also:

upload(String, String, StorageOptions, boolean)

imageTransform

public ImageTransform imageTransform(java.lang.String url)

Creates an ImageTransform object for this file.
 A transformation call isn't made directly by this method.

Returns:

ImageTransform instance configured for this file

getApiKey

public java.lang.String getApiKey()

getSecurity

public Security getSecurity()

getFsService

public FsService getFsService()

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
package com.vaadin.client.ui;

import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.EventTarget;
import com.google.gwt.dom.client.Touch;
import com.google.gwt.event.dom.client.ContextMenuEvent;
import com.google.gwt.event.dom.client.ContextMenuHandler;
import com.google.gwt.event.dom.client.TouchEndEvent;
import com.google.gwt.event.dom.client.TouchEndHandler;
import com.google.gwt.event.dom.client.TouchMoveEvent;
import com.google.gwt.event.dom.client.TouchMoveHandler;
import com.google.gwt.event.dom.client.TouchStartEvent;
import com.google.gwt.event.dom.client.TouchStartHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Focusable;
import com.google.gwt.user.client.ui.HasEnabled;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.BrowserInfo;
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.HasComponentsConnector;
import com.vaadin.client.LayoutManager;
import com.vaadin.client.MouseEventDetailsBuilder;
import com.vaadin.client.Profiler;
import com.vaadin.client.ServerConnector;
import com.vaadin.client.StyleConstants;
import com.vaadin.client.TooltipInfo;
import com.vaadin.client.UIDL;
import com.vaadin.client.Util;
import com.vaadin.client.VConsole;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.metadata.NoDataException;
import com.vaadin.client.metadata.Type;
import com.vaadin.client.metadata.TypeData;
import com.vaadin.client.ui.ui.UIConnector;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.ComponentConstants;
import com.vaadin.shared.Connector;
import com.vaadin.shared.ContextClickRpc;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.ComponentStateUtil;
import com.vaadin.shared.ui.TabIndexState;
import com.vaadin.shared.ui.ui.UIState;

public abstract class AbstractComponentConnector extends AbstractConnector
        implements ComponentConnector, HasErrorIndicator {

    private HandlerRegistration contextHandler = null;

    private Widget widget;

    private String lastKnownWidth = "";
    private String lastKnownHeight = "";

    private boolean tooltipListenersAttached = false;

    /**
     * The style names from getState().getStyles() which are currently applied
     * to the widget.
     */
    private JsArrayString styleNames = JsArrayString.createArray().cast();

    private Timer longTouchTimer;

    // TODO encapsulate into a nested class
    private HandlerRegistration touchStartHandler;
    private HandlerRegistration touchMoveHandler;
    private HandlerRegistration touchEndHandler;
    private int touchStartX;
    private int touchStartY;
    private boolean preventNextTouchEnd = false;

    protected int SIGNIFICANT_MOVE_THRESHOLD = 20; // pixels

    // long touch event delay
    // TODO replace with global constant for accessibility
    private static final int TOUCH_CONTEXT_MENU_TIMEOUT = 500;

    /**
     * Default constructor
     */
    public AbstractComponentConnector() {
    }

    @OnStateChange("registeredEventListeners")
    void handleContextClickListenerChange() {
        if (contextHandler == null && hasEventListener(EventId.CONTEXT_CLICK)) {
            contextHandler = getWidget()
                    .addDomHandler(new ContextMenuHandler() {
                        @Override
                        public void onContextMenu(ContextMenuEvent event) {
                            final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
                                    .buildMouseEventDetails(
                                            event.getNativeEvent(),
                                            getWidget().getElement());

                            event.preventDefault();
                            event.stopPropagation();
                            sendContextClickEvent(mouseEventDetails,
                                    event.getNativeEvent().getEventTarget());
                        }
                    }, ContextMenuEvent.getType());

            // if the widget has a contextclick listener, add touch support as
            // well.

            if (shouldHandleLongTap()) {
                registerTouchHandlers();
            }

        } else if (contextHandler != null
                && !hasEventListener(EventId.CONTEXT_CLICK)) {
            contextHandler.removeHandler();
            contextHandler = null;

            // remove the touch handlers as well
            unregisterTouchHandlers();
        }
    }

    /**
     * The new default behaviour is for long taps to fire a contextclick event
     * if there's a contextclick listener attached to the component.
     *
     * If you do not want this in your component, override this with a blank
     * method to get rid of said behaviour.
     *
     * @since 7.6
     */
    protected void unregisterTouchHandlers() {
        if (touchStartHandler != null) {
            touchStartHandler.removeHandler();
            touchStartHandler = null;
        }
        if (touchMoveHandler != null) {
            touchMoveHandler.removeHandler();
            touchMoveHandler = null;
        }
        if (touchEndHandler != null) {
            touchEndHandler.removeHandler();
            touchEndHandler = null;
        }
    }

    /**
     * The new default behaviour is for long taps to fire a contextclick event
     * if there's a contextclick listener attached to the component.
     *
     * If you do not want this in your component, override this with a blank
     * method to get rid of said behaviour.
     *
     * Some Vaadin Components already handle the long tap as a context menu.
     * This method is unnecessary for those.
     *
     * @since 7.6
     */
    protected void registerTouchHandlers() {
        touchStartHandler = getWidget().addDomHandler(new TouchStartHandler() {

            @Override
            public void onTouchStart(final TouchStartEvent event) {
                if (longTouchTimer != null && longTouchTimer.isRunning()) {
                    return;
                }

                // Prevent selection for the element while pending long tap.
                WidgetUtil.setTextSelectionEnabled(getWidget().getElement(),
                        false);

                if (BrowserInfo.get().isAndroid()) {
                    // Android fires ContextMenu events automatically.
                    return;
                }

                /*
                 * we need to build mouseEventDetails eagerly - the event won't
                 * be guaranteed to be around when the timer executes. At least
                 * this was the case with iOS devices.
                 */

                final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
                        .buildMouseEventDetails(event.getNativeEvent(),
                                getWidget().getElement());

                final EventTarget eventTarget = event.getNativeEvent()
                        .getEventTarget();

                longTouchTimer = new Timer() {

                    @Override
                    public void run() {
                        cancelParentTouchTimers(); // we're handling this event,
                                                   // our parent components
                                                   // don't need to bother with
                                                   // it anymore.
                        // The default context click
                        // implementation only provides the
                        // mouse coordinates relative to root
                        // element of widget.

                        sendContextClickEvent(mouseEventDetails, eventTarget);
                        preventNextTouchEnd = true;
                    }
                };

                Touch touch = event.getChangedTouches().get(0);
                touchStartX = touch.getClientX();
                touchStartY = touch.getClientY();

                longTouchTimer.schedule(TOUCH_CONTEXT_MENU_TIMEOUT);

            }
        }, TouchStartEvent.getType());

        touchMoveHandler = getWidget().addDomHandler(new TouchMoveHandler() {

            @Override
            public void onTouchMove(TouchMoveEvent event) {
                if (isSignificantMove(event)) {
                    // Moved finger before the context menu timer
                    // expired, so let the browser handle the event.
                    cancelTouchTimer();
                }

            }

            // mostly copy-pasted code from VScrollTable
            // TODO refactor main logic to a common class
            private boolean isSignificantMove(TouchMoveEvent event) {
                if (longTouchTimer == null) {
                    // no touch start
                    return false;
                }

                // Calculate the distance between touch start and the current
                // touch
                // position
                Touch touch = event.getChangedTouches().get(0);
                int deltaX = touch.getClientX() - touchStartX;
                int deltaY = touch.getClientY() - touchStartY;
                int delta = deltaX * deltaX + deltaY * deltaY;

                // Compare to the square of the significant move threshold to
                // remove the need for a square root
                if (delta > SIGNIFICANT_MOVE_THRESHOLD
                        * SIGNIFICANT_MOVE_THRESHOLD) {
                    return true;
                }
                return false;
            }
        }, TouchMoveEvent.getType());

        touchEndHandler = getWidget().addDomHandler(new TouchEndHandler() {

            @Override
            public void onTouchEnd(TouchEndEvent event) {
                // cancel the timer so the event doesn't fire
                cancelTouchTimer();

                if (preventNextTouchEnd) {
                    event.preventDefault();
                    preventNextTouchEnd = false;
                }
            }
        }, TouchEndEvent.getType());
    }

    protected boolean shouldHandleLongTap() {
        return BrowserInfo.get().isTouchDevice() && !BrowserInfo.get().isIOS();
    }

    /**
     * If a long touch event timer is running, cancel it.
     *
     * @since 7.6
     */
    private void cancelTouchTimer() {
        WidgetUtil.setTextSelectionEnabled(getWidget().getElement(), true);
        if (longTouchTimer != null) {
            // Re-enable text selection
            longTouchTimer.cancel();
        }
    }

    /**
     * Cancel the timer recursively for parent components that have timers
     * running
     *
     * @since 7.6
     */
    private void cancelParentTouchTimers() {
        ServerConnector parent = getParent();

        // we have to account for the parent being something other than an
        // abstractcomponent. getParent returns null for the root element.

        while (parent != null) {
            if (parent instanceof AbstractComponentConnector) {
                ((AbstractComponentConnector) parent).cancelTouchTimer();
            }
            parent = parent.getParent();
        }

    }

    /**
     * This method sends the context menu event to the server-side. Can be
     * overridden to provide extra information through an alternative RPC
     * interface.
     *
     * @since 7.6
     * @param event
     */
    protected void sendContextClickEvent(MouseEventDetails details,
            EventTarget eventTarget) {

        // The default context click implementation only provides the mouse
        // coordinates relative to root element of widget.
        getRpcProxy(ContextClickRpc.class).contextClick(details);

        WidgetUtil.clearTextSelection();
    }

    /**
     * Creates and returns the widget for this VPaintableWidget. This method
     * should only be called once when initializing the paintable.
     *

     * You should typically not override this method since the framework by
     * default generates an implementation that uses {@link GWT#create(Class)}
     * to create a widget of the same type as returned by the most specific
     * override of {@link #getWidget()}. If you do override the method, you
     * can't call super.createWidget() since the metadata needed
     * for that implementation is not generated if there's an override of the
     * method.
     *
     * @return a new widget instance to use for this component connector
     */
    protected Widget createWidget() {
        Type type = TypeData.getType(getClass());
        try {
            Type widgetType = type.getMethod("getWidget").getReturnType();
            Object instance = widgetType.createInstance();
            return (Widget) instance;
        } catch (NoDataException e) {
            throw new IllegalStateException(
                    "Default implementation of createWidget() does not work for "
                            + getClass().getSimpleName()
                            + ". This might be caused by explicitely using "
                            + "super.createWidget() or some unspecified "
                            + "problem with the widgetset compilation.",
                    e);
        }
    }

    /**
     * Returns the widget associated with this paintable. The widget returned by
     * this method must not changed during the life time of the paintable.
     *
     * @return The widget associated with this paintable
     */
    @Override
    public Widget getWidget() {
        if (widget == null) {
            if (Profiler.isEnabled()) {
                Profiler.enter("AbstractComponentConnector.createWidget for "
                        + getClass().getSimpleName());
            }
            widget = createWidget();
            if (Profiler.isEnabled()) {
                Profiler.leave("AbstractComponentConnector.createWidget for "
                        + getClass().getSimpleName());
            }
        }

        return widget;
    }

    @Deprecated
    public static boolean isRealUpdate(UIDL uidl) {
        return !uidl.hasAttribute("cached");
    }

    @Override
    public AbstractComponentState getState() {
        return (AbstractComponentState) super.getState();
    }

    @Override
    public void onStateChanged(StateChangeEvent stateChangeEvent) {
        Profiler.enter("AbstractComponentConnector.onStateChanged");
        Profiler.enter("AbstractComponentConnector.onStateChanged update id");
        if (stateChangeEvent.hasPropertyChanged("id")) {
            if (getState().id != null) {
                getWidget().getElement().setId(getState().id);
            } else if (!stateChangeEvent.isInitialStateChange()) {
                getWidget().getElement().removeAttribute("id");
            }
        }
        Profiler.leave("AbstractComponentConnector.onStateChanged update id");

        /*
         * Disabled state may affect (override) tabindex so the order must be
         * first setting tabindex, then enabled state (through super
         * implementation).
         */
        Profiler.enter(
                "AbstractComponentConnector.onStateChanged update tab index");
        if (getState() instanceof TabIndexState) {
            if (getWidget() instanceof Focusable) {
                ((Focusable) getWidget())
                        .setTabIndex(((TabIndexState) getState()).tabIndex);
            } else {
                /*
                 * TODO Enable this error when all widgets have been fixed to
                 * properly support tabIndex, i.e. implement Focusable
                 */
                // VConsole.error("Tab index received for "
                // + Util.getSimpleName(getWidget())
                // + " which does not implement Focusable");
            }
        } else if (getState() instanceof UIState
                && getWidget() instanceof Focusable) {
            // UI behaves like a component with TabIndexState
            ((Focusable) getWidget())
                    .setTabIndex(((UIState) getState()).tabIndex);
        }
        Profiler.leave(
                "AbstractComponentConnector.onStateChanged update tab index");

        Profiler.enter(
                "AbstractComponentConnector.onStateChanged AbstractConnector.onStateChanged()");
        super.onStateChanged(stateChangeEvent);
        Profiler.leave(
                "AbstractComponentConnector.onStateChanged AbstractConnector.onStateChanged()");

        // Style names
        Profiler.enter(
                "AbstractComponentConnector.onStateChanged updateWidgetStyleNames");
        updateWidgetStyleNames();
        Profiler.leave(
                "AbstractComponentConnector.onStateChanged updateWidgetStyleNames");

        /*
         * updateComponentSize need to be after caption update so caption can be
         * taken into account
         */

        Profiler.enter(
                "AbstractComponentConnector.onStateChanged updateComponentSize");
        updateComponentSize();
        Profiler.leave(
                "AbstractComponentConnector.onStateChanged updateComponentSize");

        Profiler.enter(
                "AbstractComponentContainer.onStateChanged check tooltip");
        if (!tooltipListenersAttached && hasTooltip()) {
            /*
             * Add event handlers for tooltips if they are needed but have not
             * yet been added.
             */
            tooltipListenersAttached = true;
            getConnection().getVTooltip().connectHandlersToWidget(getWidget());
        }
        Profiler.leave(
                "AbstractComponentContainer.onStateChanged check tooltip");

        Profiler.leave("AbstractComponentConnector.onStateChanged");
    }

    @Override
    public void setWidgetEnabled(boolean widgetEnabled) {
        // add or remove v-disabled style name from the widget
        setWidgetStyleName(StyleConstants.DISABLED, !widgetEnabled);

        if (getWidget() instanceof HasEnabled) {
            // set widget specific enabled state
            ((HasEnabled) getWidget()).setEnabled(widgetEnabled);
        }

        // make sure the caption has or has not v-disabled style
        if (delegateCaptionHandling()) {
            ServerConnector parent = getParent();
            if (parent instanceof HasComponentsConnector) {
                ((HasComponentsConnector) parent).updateCaption(this);
            } else if (parent == null && !(this instanceof UIConnector)) {
                VConsole.error("Parent of connector "
                        + Util.getConnectorString(this)
                        + " is null. This is typically an indication of a broken component hierarchy");
            }
        }

    }

    /**
     * Updates the component size based on the shared state, invoking the
     * {@link LayoutManager layout manager} if necessary.
     */
    protected void updateComponentSize() {
        updateComponentSize(getState().width == null ? "" : getState().width,
                getState().height == null ? "" : getState().height);
    }

    /**
     * Updates the component size, invoking the {@link LayoutManager layout
     * manager} if necessary.
     *
     * @param newWidth
     *            The new width as a CSS string. Cannot be null.
     * @param newHeight
     *            The new height as a CSS string. Cannot be null.
     */
    protected void updateComponentSize(String newWidth, String newHeight) {
        Profiler.enter("AbstractComponentConnector.updateComponentSize");

        // Parent should be updated if either dimension changed between relative
        // and non-relative
        if (newWidth.endsWith("%") != lastKnownWidth.endsWith("%")) {
            Connector parent = getParent();
            if (parent instanceof ManagedLayout) {
                getLayoutManager()
                        .setNeedsHorizontalLayout((ManagedLayout) parent);
            }
        }

        if (newHeight.endsWith("%") != lastKnownHeight.endsWith("%")) {
            Connector parent = getParent();
            if (parent instanceof ManagedLayout) {
                getLayoutManager()
                        .setNeedsVerticalLayout((ManagedLayout) parent);
            }
        }

        lastKnownWidth = newWidth;
        lastKnownHeight = newHeight;

        // Set defined sizes
        Widget widget = getWidget();

        Profiler.enter(
                "AbstractComponentConnector.updateComponentSize update styleNames");
        widget.setStyleName("v-has-width", !isUndefinedWidth());
        widget.setStyleName("v-has-height", !isUndefinedHeight());
        Profiler.leave(
                "AbstractComponentConnector.updateComponentSize update styleNames");

        Profiler.enter(
                "AbstractComponentConnector.updateComponentSize update DOM");
        updateWidgetSize(newWidth, newHeight);
        Profiler.leave(
                "AbstractComponentConnector.updateComponentSize update DOM");

        Profiler.leave("AbstractComponentConnector.updateComponentSize");
    }

    /**
     * Updates the DOM size of this connector's {@link #getWidget() widget}.
     *
     * @since 7.1.15
     * @param newWidth
     *            The new width as a CSS string. Cannot be null.
     * @param newHeight
     *            The new height as a CSS string. Cannot be null.
     */
    protected void updateWidgetSize(String newWidth, String newHeight) {
        getWidget().setWidth(newWidth);
        getWidget().setHeight(newHeight);
    }

    @Override
    public boolean isRelativeHeight() {
        return ComponentStateUtil.isRelativeHeight(getState());
    }

    @Override
    public boolean isRelativeWidth() {
        return ComponentStateUtil.isRelativeWidth(getState());
    }

    @Override
    public boolean isUndefinedHeight() {
        return ComponentStateUtil.isUndefinedHeight(getState());
    }

    @Override
    public boolean isUndefinedWidth() {
        return ComponentStateUtil.isUndefinedWidth(getState());
    }

    /*
     * (non-Javadoc)
     *
     * @see com.vaadin.client.ComponentConnector#delegateCaptionHandling ()
     */
    @Override
    public boolean delegateCaptionHandling() {
        return true;
    }

    /**
     * Updates the user defined, read-only and error style names for the widget
     * based the shared state. User defined style names are prefixed with the
     * primary style name of the widget returned by {@link #getWidget()}
     *

     * This method can be overridden to provide additional style names for the
     * component, for example see {@code AbstractFieldConnector}
     *

     */
    protected void updateWidgetStyleNames() {
        Profiler.enter("AbstractComponentConnector.updateWidgetStyleNames");
        AbstractComponentState state = getState();

        String primaryStyleName = getWidget().getStylePrimaryName();

        // Set the core 'v' style name for the widget
        setWidgetStyleName(StyleConstants.UI_WIDGET, true);

        // add / remove error style name
        setWidgetStyleNameWithPrefix(primaryStyleName, StyleConstants.ERROR_EXT,
                null != state.errorMessage);

        // add additional user defined style names as class names, prefixed with
        // component default class name. remove nonexistent style names.

        // Remove all old stylenames
        for (int i = 0; i < styleNames.length(); i++) {
            String oldStyle = styleNames.get(i);
            setWidgetStyleName(oldStyle, false);
            setWidgetStyleNameWithPrefix(primaryStyleName + "-", oldStyle,
                    false);
        }
        styleNames.setLength(0);

        if (ComponentStateUtil.hasStyles(state)) {
            // add new style names
            for (String newStyle : state.styles) {
                setWidgetStyleName(newStyle, true);
                setWidgetStyleNameWithPrefix(primaryStyleName + "-", newStyle,
                        true);
                styleNames.push(newStyle);
            }

        }

        if (state.primaryStyleName != null
                && !state.primaryStyleName.equals(primaryStyleName)) {
            /*
             * We overwrite the widgets primary stylename if state defines a
             * primary stylename. This has to be done after updating other
             * styles to be sure the dependent styles are updated correctly.
             */
            getWidget().setStylePrimaryName(state.primaryStyleName);
        }

        // set required style name if components supports that
        if (this instanceof HasRequiredIndicator) {
            getWidget().setStyleName(StyleConstants.REQUIRED,
                    ((HasRequiredIndicator) this).isRequiredIndicatorVisible());
        }

        Profiler.leave("AbstractComponentConnector.updateWidgetStyleNames");
    }

    /**
     * This is used to add / remove state related style names from the widget.
     *

     * Override this method for example if the style name given here should be
     * updated in another widget in addition to the one returned by the
     * {@link #getWidget()}.
     *

     *
     * @param styleName
     *            the style name to be added or removed
     * @param add
     *            true to add the given style, false
     *            to remove it
     */
    protected void setWidgetStyleName(String styleName, boolean add) {
        getWidget().setStyleName(styleName, add);
    }

    /**
     * This is used to add / remove state related prefixed style names from the
     * widget.
     *

     * Override this method if the prefixed style name given here should be
     * updated in another widget in addition to the one returned by the
     * Connector's {@link #getWidget()}, or if the prefix should be
     * different. For example see
     * {@link com.vaadin.client.ui.datefield.TextualDateConnector#setWidgetStyleNameWithPrefix(String, String, boolean)}
     *

     *
     * @param styleName
     *            the style name to be added or removed
     * @param add
     *            true to add the given style, false
     *            to remove it
     * @deprecated This will be removed once styles are no longer added with
     *             prefixes.
     */
    @Deprecated
    protected void setWidgetStyleNameWithPrefix(String prefix, String styleName,
            boolean add) {
        if (!styleName.startsWith("-")) {
            if (!prefix.endsWith("-")) {
                prefix += "-";
            }
        } else {
            if (prefix.endsWith("-")) {
                styleName.replaceFirst("-", "");
            }
        }
        getWidget().setStyleName(prefix + styleName, add);
    }

    @Override
    public LayoutManager getLayoutManager() {
        return LayoutManager.get(getConnection());
    }

    @Override
    public void updateEnabledState(boolean enabledState) {
        super.updateEnabledState(enabledState);

        setWidgetEnabled(isEnabled());
    }

    @Override
    public void onUnregister() {
        super.onUnregister();

        // Show an error if widget is still attached to DOM. It should never be
        // at this point.
        if (getWidget() != null && getWidget().isAttached()) {
            getWidget().removeFromParent();
            VConsole.error(
                    "Widget is still attached to the DOM after the connector ("
                            + Util.getConnectorString(this)
                            + ") has been unregistered. Widget was removed.");
        }
    }

    @Override
    public TooltipInfo getTooltipInfo(Element element) {
        return new TooltipInfo(getState().description,
                getState().descriptionContentMode, getState().errorMessage);
    }

    @Override
    public boolean hasTooltip() {
        // Normally, there is a tooltip if description or errorMessage is set
        AbstractComponentState state = getState();
        if (state.description != null && !state.description.equals("")) {
            return true;
        } else if (state.errorMessage != null
                && !state.errorMessage.equals("")) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Gets the URI of the icon set for this component.
     *
     * @return the URI of the icon, or null if no icon has been
     *         defined.
     */
    protected String getIconUri() {
        return getResourceUrl(ComponentConstants.ICON_RESOURCE);
    }

    /**
     * Gets the icon set for this component.
     *
     * @return the icon, or null if no icon has been defined.
     */
    protected Icon getIcon() {
        return getConnection().getIcon(getIconUri());
    }

    /*
     * (non-Javadoc)
     *
     * @see com.vaadin.client.ComponentConnector#flush()
     */
    @Override
    public void flush() {
        // No generic implementation. Override if needed
    }

    @Override
    public boolean isErrorIndicatorVisible() {
        return getState().errorMessage != null;
    }
}


text:
package com.github.kevinjava.pattern.struct.composite;

public class View {
	public void draw() {

	}

	public void onTouch() {

	}

}


text:
PREFIX=/usr/local/carrydb

$(shell sh build.sh 1>&2)
include build_config.mk

all:
	mkdir -p var var_slave
	chmod u+x deps/cpy/cpy
	chmod u+x tools/carrydb-cli
	cd "${LEVELDB_PATH}"; ${MAKE} static_lib #PORTABLE=1
	cd src/util; ${MAKE}
	cd src/net; ${MAKE}
	cd src/client; ${MAKE}
	cd src/db; ${MAKE}
	cd src; ${MAKE}
	cd tools; ${MAKE}
test:
	cd src; ${MAKE} test

.PHONY: ios

ios:
	cd "${LEVELDB_PATH}"; make clean; CXXFLAGS=-stdlib=libc++ ${MAKE} PLATFORM=IOS
	cd "${SNAPPY_PATH}"; make clean; make -f Makefile-ios
	mkdir -p ios
	mv ${LEVELDB_PATH}/libleveldb-ios.a ${SNAPPY_PATH}/libsnappy-ios.a ios/
	cd src/util; make clean; ${MAKE} -f Makefile-ios
	cd src/db; make clean; ${MAKE} -f Makefile-ios

install:
	mkdir -p ${PREFIX}
	mkdir -p ${PREFIX}/_cpy_
	mkdir -p ${PREFIX}/deps
	mkdir -p ${PREFIX}/var
	mkdir -p ${PREFIX}/var_slave
	cp -f carrydb-server carrydb.conf carrydb_slave.conf ${PREFIX}
	cp -rf api ${PREFIX}
	cp -rf \
		tools/carrydb-bench \
		tools/carrydb-cli tools/carrydb_cli \
		tools/carrydb-cli.cpy tools/carrydb-dump \
		tools/carrydb-repair \
		${PREFIX}
	cp -rf deps/cpy ${PREFIX}/deps
	chmod 755 ${PREFIX}
	chmod -R ugo+rw ${PREFIX}/*
	rm -f ${PREFIX}/Makefile

clean:
	rm -f *.exe.stackdump
	rm -rf api/cpy/_cpy_
	rm -f api/python/SSDB.pyc
	rm -rf db_test
	cd deps/cpy; ${MAKE} clean
	cd tools; ${MAKE} clean
	cd src/util; ${MAKE} clean
	cd src/db; ${MAKE} clean
	cd src/net; ${MAKE} clean
	cd src; ${MAKE} clean

clean_all: clean
	cd "${LEVELDB_PATH}"; ${MAKE} clean
	rm -f ${JEMALLOC_PATH}/Makefile
	cd "${SNAPPY_PATH}"; ${MAKE} clean
	rm -f ${SNAPPY_PATH}/Makefile


text:
require 'spec_helper'

describe Mirlo::TestResult do
  before do
    @test_result = Mirlo::TestResult.new([ZERO, ONE])

    positive_sample = Mirlo::Sample.new(target: ONE)
    negative_sample = Mirlo::Sample.new(target: ZERO)

    @test_result.add(positive_sample, ONE)
    @test_result.add(positive_sample, ONE)
    @test_result.add(positive_sample, ONE)

    @test_result.add(negative_sample, ZERO)
    @test_result.add(negative_sample, ZERO)
    @test_result.add(negative_sample, ZERO)

    # there are two errors classifiying positive samples

    @test_result.add(positive_sample, ZERO)
    @test_result.add(positive_sample, ZERO)
  end

  it "can show the confussion matrix" do
    @test_result.confusion_matrix(ONE, ONE).should  == 3
    @test_result.confusion_matrix(ONE, ZERO).should == 2
    @test_result.confusion_matrix(ZERO, ZERO).should == 3
    @test_result.confusion_matrix(ZERO, ONE).should  == 0
  end
end


text:
$PYTHON -m pip install . --ignore-installed --no-deps

# Load the CARD database JSON file
python $PREFIX/bin/rgi load -i card-data/card.json
rm -rf card-data


text:
#pragma once
#include <aws/mediaconvert/MediaConvert_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace MediaConvert
{
namespace Model
{
  enum class Eac3PassthroughControl
  {
    NOT_SET,
    WHEN_POSSIBLE,
    NO_PASSTHROUGH
  };

namespace Eac3PassthroughControlMapper
{
AWS_MEDIACONVERT_API Eac3PassthroughControl GetEac3PassthroughControlForName(const Aws::String& name);

AWS_MEDIACONVERT_API Aws::String GetNameForEac3PassthroughControl(Eac3PassthroughControl value);
} // namespace Eac3PassthroughControlMapper
} // namespace Model
} // namespace MediaConvert
} // namespace Aws