]> git.saurik.com Git - cycript.git/blob - Bridge.def
922b0a682b5227fd02d4e3ec71ec95ff6cc3aff4
[cycript.git] / Bridge.def
1 C YES true
2 C NO false
3 C nil null
4
5 : applicationDidFinishLaunching: v@:@
6
7 l objc
8
9 F class_addIvar B#*LC*
10 F class_addMethod B#:^?*
11 F class_addProtocol B#@
12 F class_conformsToProtocol B#@
13 F class_copyIvarList ^^{objc_ivar=}#^I
14 F class_copyMethodList ^^{objc_method=}#^I
15 F class_copyPropertyList ^^{objc_property=}#^I
16 F class_copyProtocolList ^@#^I
17 F class_createInstance @#L
18 F class_getClassMethod ^{objc_method=}#:
19 F class_getClassVariable ^{objc_ivar=}#*
20 F class_getInstanceMethod ^{objc_method=}#:
21 F class_getInstanceSize L#
22 F class_getInstanceVariable ^{objc_ivar=}#*
23 F class_getIvarLayout *#
24 F class_getMethodImplementation ^?#:
25 F class_getMethodImplementation_stret ^?#:
26 F class_getName *#
27 F class_getProperty ^{objc_property=}#*
28 F class_getSuperclass ##
29 F class_getVersion i#
30 F class_getWeakIvarLayout *#
31 F class_isMetaClass B#
32 F class_replaceMethod ^?#:^?*
33 F class_respondsToSelector B#:
34 F class_setIvarLayout v#*
35 F class_setSuperclass ###
36 F class_setVersion v#i
37 F class_setWeakIvarLayout v#*
38
39 F ivar_getName *^{objc_ivar=}
40 F ivar_getOffset i^{objc_ivar=}
41 F ivar_getTypeEncoding *^{objc_ivar=}
42
43 F method_copyArgumentType ^c^{objc_method=}I
44 F method_copyReturnType ^c^{objc_method=}
45 F method_exchangeImplementations v^{objc_method=}^{objc_method=}
46 F method_getArgumentType v^{objc_method=}I^cL
47 F method_getImplementation ^?^{objc_method=}
48 F method_getName :^{objc_method=}
49 F method_getNumberOfArguments I^{objc_method=}
50 F method_getReturnType v^{objc_method=}^cL
51 F method_getTypeEncoding *^{objc_method=}
52 F method_setImplementation ^?^{objc_method=}^?
53
54 # this should return # or ^v ?
55 F objc_allocateClassPair ##*L
56 F objc_copyProtocolList ^@^I
57 F objc_duplicateClass ##*L
58 F objc_getClass #*
59 F objc_getClassList i^#i
60 F objc_getFutureClass #*
61 F objc_getMetaClass @*
62 F objc_getProtocol @*
63 F objc_getRequiredClass @*
64 F objc_lookUpClass @*
65 F objc_registerClassPair v#
66 F objc_setFutureClass v#*
67
68 F object_copy @@L
69 F object_dispose @@
70 F object_getClass #@
71 F object_getClassName *@
72 F object_getIndexedIvars ^v@
73 F object_getInstanceVariable ^{objc_ivar=}@*^^v
74 F object_getIvar @@^{objc_ivar=}
75 F object_setClass #@#
76 F object_setInstanceVariable ^{objc_ivar=}@*^v
77 F object_setIvar v@^{objc_ivar=}@
78
79 F property_getAttributes *^{objc_property=}
80 F property_getName *^{objc_property=}
81
82 F protocol_conformsToProtocol B@@
83 F protocol_copyMethodDescriptionList ^{objc_method_description=:*}@BB^I
84 F protocol_copyPropertyList ^{objc_property=}@^I
85 F protocol_copyProtocolList ^@@^I
86 F protocol_getMethodDescription {objc_method_description=:*}@:BB
87 F protocol_getName *@
88 F protocol_getProperty ^{objc_property=}@*BB
89 F protocol_isEqual B@@
90
91 F sel_getName *:
92 F sel_getUid :*
93 F sel_isEqual B::
94 F sel_registerName :*
95
96 f UIKit
97
98 F UIApplicationUseLegacyEvents vB
99
100 F UIAccessibilityPostNotification vI@
101 F UIApplicationMain ii^^c@@
102 F UIGraphicsEndImageContext v
103 F UIGraphicsGetCurrentContext @
104 F UIGraphicsGetImageFromCurrentImageContext @
105 F UIGraphicsPopContext v
106 F UIGraphicsPushContext v@
107 F UIImageJPEGRepresentation @@
108 F UIImagePNGRepresentation @@
109 F UIImageWriteToSavedPhotosAlbum v@@:^v
110
111 F UIKeyboardDisableAutomaticAppearance v
112 F UIKeyboardEnableAutomaticAppearance v
113 F UIKeyboardInputModeUsesKBStar B@
114
115 F _UIImageWithName @@
116
117 F UIFormattedPhoneNumberFromString @@
118 F UIUnformattedPhoneNumberFromString @@
119
120 V UIApp @
121
122 V kUIButtonBarButtonAction @
123 V kUIButtonBarButtonInfo @
124 V kUIButtonBarButtonInfoOffset @
125 V kUIButtonBarButtonSelectedInfo @
126 V kUIButtonBarButtonSizeToFit @
127 V kUIButtonBarButtonStyle @
128 V kUIButtonBarButtonTag @
129 V kUIButtonBarButtonTarget @
130 V kUIButtonBarButtonTitle @
131 V kUIButtonBarButtonTitleVerticalHeight @
132 V kUIButtonBarButtonTitleWidth @
133 V kUIButtonBarButtonType @
134
135 V UIKeyboardAnimationCurveUserInfoKey @
136 V UIKeyboardAnimationDurationUserInfoKey @
137 V UIKeyboardBoundsUserInfoKey @
138 V UIKeyboardCenterBeginUserInfoKey @
139 V UIKeyboardCenterEndUserInfoKey @
140 V UIKeyboardRequiresInternationalKey @
141
142 V UIKeyboardCandidateCorrectionDidChangeNotification @
143 V UIKeyboardCurrentInputModeDidChangeNotification @
144 V UIKeyboardDefaultsDidChangeNotification @
145 V UIKeyboardDidHideNotification @
146 V UIKeyboardDidShowNotification @
147 V UIKeyboardEmptyDelegateNotification @
148 V UIKeyboardWillHideNotification @
149 V UIKeyboardWillShowNotification @
150
151 V UIWebViewDidReceiveMessageNotification @
152 V UIWebViewDidClearMessagesNotification @
153 V UIWebViewGrowsAndShrinksToFitHeight f
154 V UIWebViewGrowsAndShrinksToFitWidth f
155 V UIWebViewScalesToFitScale f
156
157 f AddressBook
158
159 F ABAddressBookAddRecord B@@^@
160 F ABAddressBookCopyArrayOfAllGroups @@
161 F ABAddressBookCopyArrayOfAllPeople @@
162 F ABAddressBookCopyLocalizedLabel @@
163 F ABAddressBookCreate @
164 F ABAddressBookGetGroupCount l@
165 F ABAddressBookGetPersonCount l@
166 F ABAddressBookHasUnsavedChanges B@
167 F ABAddressBookRegisterExternalChangeCallback v@^?^v
168 F ABAddressBookRemoveRecord B@@^@
169 F ABAddressBookRevert v@
170 F ABAddressBookSave B@^@
171 F ABAddressBookUnregisterExternalChangeCallback v@^?^v
172
173 V ABAddressBookErrorDomain @
174 C kABOperationNotPermittedByStoreError 0
175
176 F ABMultiValueCopyArrayOfAllValues @@
177 F ABMultiValueCopyLabelAtIndex @@l
178 F ABMultiValueCopyValueAtIndex @@l
179 F ABMultiValueGetCount l@
180 F ABMultiValueGetFirstIndexOfValue l@@
181 F ABMultiValueGetIdentifierAtIndex i@l
182 F ABMultiValueGetIndexForIdentifier l@i
183 F ABMultiValueGetPropertyType S@
184
185 C kABMultiValueInvalidIdentifier -1
186
187 F ABMultiValueAddValueAndLabel @@@^i
188 F ABMultiValueCreateMutable @S
189 F ABMultiValueCreateMutableCopy @@
190 F ABMultiValueInsertValueAndLabelAtIndex B@@@l^i
191 F ABMultiValueRemoveValueAndLabelAtIndex B@l
192 F ABMultiValueReplaceLabelAtIndex B@@l
193 F ABMultiValueReplaceValueAtIndex B@@l
194
195 F ABRecordCopyCompositeName @@
196 F ABRecordCopyValue @@i
197 F ABRecordGetRecordID i@
198 F ABRecordGetRecordType I@
199 F ABRecordRemoveValue B@i^@
200 F ABRecordSetValue B@i@^@
201
202 C kABPersonType 0
203 C kABGroupType 1
204
205 # this was (1<<8)
206 C kABMultiValueMask 0x100
207
208 C kABInvalidPropertyType 0x0
209 C kABStringPropertyType 0x1
210 C kABIntegerPropertyType 0x2
211 C kABRealPropertyType 0x3
212 C kABDateTimePropertyType 0x4
213 C kABDictionaryPropertyType 0x5
214 C kABMultiStringPropertyType 0x101
215 C kABMultiIntegerPropertyType 0x102
216 C kABMultiRealPropertyType 0x103
217 C kABMultiDateTimePropertyType 0x104
218 C kABMultiDictionaryPropertyType 0x105
219
220 C kABRecordInvalidID -1
221 C kABPropertyInvalidID -1
222
223 F ABAddressBookGetGroupWithRecordID @@i
224 F ABGroupAddMember B@@^@
225 F ABGroupCopyArrayOfAllMembers @@
226 F ABGroupCopyArrayOfAllMembersWithSortOrdering @@I
227 F ABGroupCreate @
228 F ABGroupRemoveMember B@@^@
229
230 V kABGroupNameProperty i
231
232 F ABAddressBookCopyPeopleWithName @@@
233 F ABAddressBookGetPersonWithRecordID @@i
234 F ABPersonComparePeopleByName i@@I
235 F ABPersonCopyImageData @@
236 F ABPersonCopyLocalizedPropertyName @i
237 F ABPersonCreate @
238 F ABPersonGetCompositeNameFormat I
239 F ABPersonGetSortOrdering I
240 F ABPersonGetTypeOfProperty SI
241 F ABPersonHasImageData B@
242 F ABPersonRemoveImageData B@^@
243 F ABPersonSetImageData B@@^@
244
245 C kABPersonSortByFirstName 0
246 C kABPersonSortByLastName 1
247
248 C kABPersonCompositeNameFormatFirstNameFirst 0
249 C kABPersonCompositeNameFormatLastNameFirst 1
250
251 V kABPersonFirstNameProperty i
252 V kABPersonLastNameProperty i
253 V kABPersonMiddleNameProperty i
254 V kABPersonPrefixProperty i
255 V kABPersonSuffixProperty i
256 V kABPersonNicknameProperty i
257 V kABPersonFirstNamePhoneticProperty i
258 V kABPersonLastNamePhoneticProperty i
259 V kABPersonMiddleNamePhoneticProperty i
260 V kABPersonOrganizationProperty i
261 V kABPersonJobTitleProperty i
262 V kABPersonDepartmentProperty i
263 V kABPersonEmailProperty i
264 V kABPersonBirthdayProperty i
265 V kABPersonNoteProperty i
266 V kABPersonCreationDateProperty i
267 V kABPersonModificationDateProperty i
268
269 V kABPersonAddressProperty i
270 V kABPersonAddressStreetKey @
271 V kABPersonAddressCityKey @
272 V kABPersonAddressStateKey @
273 V kABPersonAddressZIPKey @
274 V kABPersonAddressCountryKey @
275 V kABPersonAddressCountryCodeKey @
276
277 V kABPersonDateProperty i
278 V kABPersonAnniversaryLabel @
279
280 V kABPersonKindProperty i
281 V kABPersonKindPerson @
282 V kABPersonKindOrganization @
283
284 V kABPersonPhoneProperty i
285 V kABPersonPhoneMobileLabel @
286 V kABPersonPhoneIPhoneLabel @
287 V kABPersonPhoneMainLabel @
288 V kABPersonPhoneHomeFAXLabel @
289 V kABPersonPhoneWorkFAXLabel @
290 V kABPersonPhonePagerLabel @
291
292 V kABPersonInstantMessageProperty i
293 V kABPersonInstantMessageServiceKey @
294 V kABPersonInstantMessageServiceYahoo @
295 V kABPersonInstantMessageServiceJabber @
296 V kABPersonInstantMessageServiceMSN @
297 V kABPersonInstantMessageServiceICQ @
298 V kABPersonInstantMessageServiceAIM @
299 V kABPersonInstantMessageUsernameKey @
300
301 V kABPersonURLProperty i
302 V kABPersonHomePageLabel @
303
304 V kABPersonRelatedNamesProperty i
305 V kABPersonMotherLabel @
306 V kABPersonFatherLabel @
307 V kABPersonParentLabel @
308 V kABPersonSisterLabel @
309 V kABPersonBrotherLabel @
310 V kABPersonChildLabel @
311 V kABPersonFriendLabel @
312 V kABPersonSpouseLabel @
313 V kABPersonPartnerLabel @
314 V kABPersonManagerLabel @
315 V kABPersonAssistantLabel @
316
317 V kABWorkLabel @
318 V kABHomeLabel @
319 V kABOtherLabel @
320
321 f CoreLocation
322
323 V kCLLocationAccuracyBest d
324 V kCLLocationAccuracyNearestTenMeters d
325 V kCLLocationAccuracyHundredMeters d
326 V kCLLocationAccuracyKilometer d
327 V kCLLocationAccuracyThreeKilometers d
328
329 V kCLDistanceFilterNone d
330 V kCLHeadingFilterNone d
331
332 C kCLErrorLocationUnknown 0
333 C kCLErrorDenied 1
334 C kCLErrorNetwork 2
335 C kCLErrorHeadingFailure 3
336
337 V kCLErrorDomain @
338
339 f CoreData
340
341 C NSUndefinedAttributeType 0
342 C NSInteger16AttributeType 100
343 C NSInteger32AttributeType 200
344 C NSInteger64AttributeType 300
345 C NSDecimalAttributeType 400
346 C NSDoubleAttributeType 500
347 C NSFloatAttributeType 600
348 C NSStringAttributeType 700
349 C NSBooleanAttributeType 800
350 C NSDateAttributeType 900
351 C NSBinaryDataAttributeType 1000
352 C NSTransformableAttributeType 1800
353 C NSObjectIDAttributeType 2000
354
355 C NSUndefinedEntityMappingType 0x00
356 C NSCustomEntityMappingType 0x01
357 C NSAddEntityMappingType 0x02
358 C NSRemoveEntityMappingType 0x03
359 C NSCopyEntityMappingType 0x04
360 C NSTransformEntityMappingType 0x05
361
362 V NSMigrationManagerKey @
363 V NSMigrationSourceObjectKey @
364 V NSMigrationDestinationObjectKey @
365 V NSMigrationEntityMappingKey @
366 V NSMigrationPropertyMappingKey @
367 V NSMigrationPropertyMappingKey @
368
369 C NSManagedObjectResultType 0x00
370 C NSManagedObjectIDResultType 0x01
371 C NSDictionaryResultType 0x02
372
373 C NSFetchRequestExpressionType 50
374
375 C NSSnapshotEventUndoInsertion 1<<1
376 C NSSnapshotEventUndoDeletion 1<<2
377 C NSSnapshotEventUndoUpdate 1<<3
378 C NSSnapshotEventRollback 1<<4
379 C NSSnapshotEventRefresh 1<<5
380 C NSSnapshotEventMergePolicy 1<<6
381
382 V NSInsertedObjectsKey @
383 V NSUpdatedObjectsKey @
384 V NSDeletedObjectsKey @
385 V NSRefreshedObjectsKey @
386 V NSInvalidatedObjectsKey @
387 V NSInvalidatedAllObjectsKey @
388
389 V NSErrorMergePolicy @
390 V NSMergeByPropertyStoreTrumpMergePolicy @
391 V NSMergeByPropertyObjectTrumpMergePolicy @
392 V NSOverwriteMergePolicy @
393 V NSRollbackMergePolicy @
394
395 V NSSQLiteStoreType @
396 V NSBinaryStoreType @
397 V NSInMemoryStoreType @
398
399 V NSStoreTypeKey @
400 V NSStoreUUIDKey @
401
402 V NSAddedPersistentStoresKey @
403 V NSRemovedPersistentStoresKey @
404 V NSUUIDChangedPersistentStoresKey @
405
406 V NSReadOnlyPersistentStoreOption @
407 V NSPersistentStoreTimeoutOption @
408 V NSSQLitePragmasOption @
409 V NSSQLiteAnalyzeOption @
410 V NSSQLiteManualVacuumOption @
411
412 V NSIgnorePersistentStoreVersioningOption @
413 V NSMigratePersistentStoresAutomaticallyOption @
414 V NSInferMappingModelAutomaticallyOption @
415
416 V NSStoreModelVersionHashesKey @
417 V NSStoreModelVersionIdentifiersKey @
418 V NSPersistentStoreOSCompatibility @
419
420 C NSNoActionDeleteRule 0
421 C NSNullifyDeleteRule 1
422 C NSCascadeDeleteRule 2
423 C NSDenyDeleteRule 3
424
425 C NSFetchedResultsChangeInsert 1
426 C NSFetchedResultsChangeDelete 2
427 C NSFetchedResultsChangeMove 3
428 C NSFetchedResultsChangeUpdate 4
429
430 V NSDetailedErrorsKey @
431 V NSValidationObjectErrorKey @
432 V NSValidationKeyErrorKey @
433 V NSValidationPredicateErrorKey @
434 V NSValidationValueErrorKey @
435 V NSAffectedStoresErrorKey @
436 V NSAffectedObjectsErrorKey @
437
438 V NSSQLiteErrorDomain @
439
440 C NSManagedObjectValidationError 1550
441 C NSValidationMultipleErrorsError 1560
442 C NSValidationMissingMandatoryPropertyError 1570
443 C NSValidationRelationshipLacksMinimumCountError 1580
444 C NSValidationRelationshipExceedsMaximumCountError 1590
445 C NSValidationRelationshipDeniedDeleteError 1600
446 C NSValidationNumberTooLargeError 1610
447 C NSValidationNumberTooSmallError 1620
448 C NSValidationDateTooLateError 1630
449 C NSValidationDateTooSoonError 1640
450 C NSValidationInvalidDateError 1650
451 C NSValidationStringTooLongError 1660
452 C NSValidationStringTooShortError 1670
453 C NSValidationStringPatternMatchingError 1680
454
455 C NSManagedObjectContextLockingError 132000
456 C NSPersistentStoreCoordinatorLockingError 132010
457 C NSManagedObjectReferentialIntegrityError 133000
458 C NSManagedObjectExternalRelationshipError 133010
459 C NSManagedObjectMergeError 133020
460
461 C NSPersistentStoreInvalidTypeError 134000
462 C NSPersistentStoreTypeMismatchError 134010
463 C NSPersistentStoreIncompatibleSchemaError 134020
464 C NSPersistentStoreSaveError 134030
465 C NSPersistentStoreIncompleteSaveError 134040
466 C NSPersistentStoreOperationError 134070
467 C NSPersistentStoreOpenError 134080
468 C NSPersistentStoreTimeoutError 134090
469 C NSPersistentStoreIncompatibleVersionHashError 134100
470
471 C NSMigrationError 134110
472 C NSMigrationCancelledError 134120
473 C NSMigrationMissingSourceModelError 134130
474 C NSMigrationMissingMappingModelError 134140
475 C NSMigrationManagerSourceStoreError 134150
476 C NSMigrationManagerDestinationStoreError 134160
477 C NSEntityMigrationPolicyError 134170
478 C NSInferredMappingModelError 134190
479 C NSExternalRecordImportError 134200
480
481 C NSCoreDataError 134060
482 C NSSQLiteError 134180
483
484 V NSCoreDataVersionNumber d
485
486 C NSCoreDataVersionNumber10_4 46.0
487 C NSCoreDataVersionNumber10_4_3 77.0
488 C NSCoreDataVersionNumber10_5 185.0
489 C NSCoreDataVersionNumber10_5_3 186.0
490
491 f MapKit
492
493 C MKMapTypeStandard 0
494 C MKMapTypeSatellite 1
495 C MKMapTypeHybrid 2
496
497 V MKErrorDomain @
498
499 C MKErrorUnknown 1
500 C MKErrorServerFailure 2
501 C MKErrorLoadingThrottled 3
502 C MKErrorPlacemarkNotFound 4
503
504 C MKPinAnnotationColorRed 0
505 C MKPinAnnotationColorGreen 1
506 C MKPinAnnotationColorPurple 2
507
508 # MKCoordinateRegionMake
509 # MKCoordinateRegionMakeWithDistance
510 # MKCoordinateSpanMake
511
512 C RTLD_LAZY 0x1
513 C RTLD_NOW 0x2
514 C RTLD_LOCAL 0x4
515 C RTLD_GLOBAL 0x8
516
517 C RTLD_NOLOAD 0x10
518 C RTLD_NODELETE 0x80
519 C RTLD_FIRST 0x100
520
521 C RTLD_NEXT -1
522 C RTLD_DEFAULT -2
523 C RTLD_SELF -3
524
525 # XXX: dladdr
526 F dlclose i^v
527 F dlerror *
528 F dlopen ^v*i
529 F dlsym ^v^v*
530 F dlopen_preflight B*