this repo has no description
at fixPythonPipStalling 218 lines 4.9 kB view raw
1#ifdef __cplusplus 2extern "C" { 3#endif 4 5#pragma pack(push, 2) 6 7typedef CF_OPTIONS(OptionBits, LSRequestedInfo) { 8 kLSRequestExtension = 0x00000001, 9 kLSRequestTypeCreator = 0x00000002, 10 kLSRequestBasicFlagsOnly = 0x00000004, 11 kLSRequestAppTypeFlags = 0x00000008, 12 kLSRequestAllFlags = 0x00000010, 13 kLSRequestIconAndKind = 0x00000020, 14 kLSRequestExtensionFlagsOnly = 0x00000040, 15 kLSRequestAllInfo = (UInt32)0xFFFFFFFF 16}; 17 18 19 20typedef CF_OPTIONS(OptionBits, LSItemInfoFlags) { 21 kLSItemInfoIsPlainFile = 0x00000001, 22 kLSItemInfoIsPackage = 0x00000002, 23 kLSItemInfoIsApplication = 0x00000004, 24 kLSItemInfoIsContainer = 0x00000008, 25 kLSItemInfoIsAliasFile = 0x00000010, 26 kLSItemInfoIsSymlink = 0x00000020, 27 kLSItemInfoIsInvisible = 0x00000040, 28 kLSItemInfoIsNativeApp = 0x00000080, 29 kLSItemInfoIsClassicApp = 0x00000100, 30 kLSItemInfoAppPrefersNative = 0x00000200, 31 kLSItemInfoAppPrefersClassic = 0x00000400, 32 kLSItemInfoAppIsScriptable = 0x00000800, 33 kLSItemInfoIsVolume = 0x00001000, 34 kLSItemInfoExtensionIsHidden = 0x00100000 35}; 36 37typedef struct LSItemInfoRecord { 38 LSItemInfoFlags flags; 39 OSType filetype; 40 OSType creator; 41 CFStringRef extension; 42} LSItemInfoRecord; 43 44extern OSStatus 45LSCopyItemInfoForURL( 46 CFURLRef inURL, 47 LSRequestedInfo inWhichInfo, 48 LSItemInfoRecord * outItemInfo); 49 50extern OSStatus 51LSCopyItemInfoForRef( 52 const FSRef * inItemRef, 53 LSRequestedInfo inWhichInfo, 54 LSItemInfoRecord * outItemInfo); 55 56extern OSStatus 57LSGetExtensionInfo( 58 UniCharCount inNameLen, 59 const UniChar inNameBuffer[], 60 UniCharCount * outExtStartIndex); 61 62extern OSStatus 63LSCopyDisplayNameForRef( 64 const FSRef * inRef, 65 CFStringRef * outDisplayName); 66 67extern OSStatus 68LSCopyDisplayNameForURL( 69 CFURLRef inURL, 70 CFStringRef * outDisplayName); 71 72extern OSStatus 73LSSetExtensionHiddenForRef( 74 const FSRef * inRef, 75 Boolean inHide); 76 77extern OSStatus 78LSSetExtensionHiddenForURL( 79 CFURLRef inURL, 80 Boolean inHide); 81 82extern OSStatus 83LSCopyKindStringForRef( 84 const FSRef * inFSRef, 85 CFStringRef * outKindString); 86 87extern OSStatus 88LSCopyKindStringForURL( 89 CFURLRef inURL, 90 CFStringRef * outKindString); 91 92extern OSStatus 93LSCopyKindStringForTypeInfo( 94 OSType inType, 95 OSType inCreator, 96 CFStringRef inExtension, 97 CFStringRef * outKindString); 98 99extern OSStatus 100LSCopyKindStringForMIMEType( 101 CFStringRef inMIMEType, 102 CFStringRef * outKindString); 103 104extern OSStatus 105LSGetApplicationForItem( 106 const FSRef * inItemRef, 107 LSRolesMask inRoleMask, 108 FSRef * outAppRef, 109 CFURLRef * outAppURL); 110 111extern OSStatus 112LSGetApplicationForInfo( 113 OSType inType, 114 OSType inCreator, 115 CFStringRef inExtension, 116 LSRolesMask inRoleMask, 117 FSRef * outAppRef, 118 CFURLRef * outAppURL); 119 120extern OSStatus 121LSCopyApplicationForMIMEType( 122 CFStringRef inMIMEType, 123 LSRolesMask inRoleMask, 124 CFURLRef * outAppURL); 125 126extern OSStatus 127LSGetApplicationForURL( 128 CFURLRef inURL, 129 LSRolesMask inRoleMask, 130 FSRef * outAppRef, 131 CFURLRef * outAppURL); 132 133extern OSStatus 134LSFindApplicationForInfo( 135 OSType inCreator, 136 CFStringRef inBundleID, 137 CFStringRef inName, 138 FSRef * outAppRef, 139 CFURLRef * outAppURL); 140 141extern OSStatus 142LSCanRefAcceptItem( 143 const FSRef * inItemFSRef, 144 const FSRef * inTargetRef, 145 LSRolesMask inRoleMask, 146 LSAcceptanceFlags inFlags, 147 Boolean * outAcceptsItem); 148 149extern OSStatus 150LSRegisterFSRef( 151 const FSRef * inRef, 152 Boolean inUpdate); 153 154extern const CFStringRef kLSItemContentType; 155extern const CFStringRef kLSItemFileType; 156extern const CFStringRef kLSItemFileCreator; 157extern const CFStringRef kLSItemExtension; 158extern const CFStringRef kLSItemDisplayName; 159extern const CFStringRef kLSItemDisplayKind; 160extern const CFStringRef kLSItemRoleHandlerDisplayName; 161extern const CFStringRef kLSItemIsInvisible; 162extern const CFStringRef kLSItemExtensionIsHidden; 163extern const CFStringRef kLSItemQuarantineProperties; 164 165extern OSStatus 166LSCopyItemAttribute( 167 const FSRef * inItem, 168 LSRolesMask inRoles, 169 CFStringRef inAttributeName, 170 CFTypeRef * outValue); 171 172extern OSStatus 173LSCopyItemAttributes( 174 const FSRef * inItem, 175 LSRolesMask inRoles, 176 CFArrayRef inAttributeNames, 177 CFDictionaryRef * outValues); 178 179extern OSStatus 180LSSetItemAttribute( 181 const FSRef * inItem, 182 LSRolesMask inRoles, 183 CFStringRef inAttributeName, 184 CFTypeRef inValue); 185 186typedef CF_OPTIONS(OptionBits, LSHandlerOptions) { 187 kLSHandlerOptionsDefault = 0, 188 kLSHandlerOptionsIgnoreCreator = 1 189}; 190 191extern LSHandlerOptions 192LSGetHandlerOptionsForContentType(CFStringRef inContentType); 193 194extern OSStatus 195LSSetHandlerOptionsForContentType( 196 CFStringRef inContentType, 197 LSHandlerOptions inOptions); 198 199extern CFArrayRef 200LSCopyAllHandlersForURLScheme( 201 CFStringRef inURLScheme); 202 203extern CFArrayRef 204LSCopyAllRoleHandlersForContentType( 205 CFStringRef inContentType, 206 LSRolesMask inRole); 207 208extern CFStringRef 209LSCopyDefaultHandlerForURLScheme( 210 CFStringRef inURLScheme); 211 212 213#pragma pack(pop) 214 215#ifdef __cplusplus 216} 217#endif 218