]> git.saurik.com Git - cycript.git/blobdiff - Bridge.def
Implemented pointer indirection.
[cycript.git] / Bridge.def
index 26870d73a94cf0f5bde99d564d23d6dd6b3b10cb..e6071ef6c5991ec854a0b4808e7944af7907bb40 100644 (file)
@@ -2,6 +2,16 @@ C YES true
 C NO false
 C nil null
 
+: applicationDidFinishLaunching: v12@0:4@8
+
+S CGPoint "x"f"y"f
+S CGRect "origin"{CGPoint}"size"{CGSize}
+S CGSize "width"f"height"f
+
+l c
+
+S nlist_64 "_un"(?="n_strx"I)"n_type"C"n_sect"C"n_desc"S"n_value"Q
+
 l objc
 
 F class_addIvar B#*LC*
@@ -49,6 +59,7 @@ F method_getReturnType v^{objc_method=}^cL
 F method_getTypeEncoding *^{objc_method=}
 F method_setImplementation ^?^{objc_method=}^?
 
+# this should return # or ^v ?
 F objc_allocateClassPair ##*L
 F objc_copyProtocolList ^@^I
 F objc_duplicateClass ##*L
@@ -92,19 +103,248 @@ F sel_registerName :*
 
 f UIKit
 
-F UIApplicationUseLegacyEvents vB
+C UIBarStyleDefault 0
+C UIBarStyleBlack 1
+C UIBarStyleBlackOpaque 2
+C UIBarStyleBlackTranslucent 3
+
+C UIDataDetectorTypePhoneNumber (1<<0)
+C UIDataDetectorTypeLink (1<<1)
+C UIDataDetectorTypeNone 0
+# XXX: NSUIntegerMax
+C UIDataDetectorTypeAll -1
+
+# UINavigationBar
+
+# UINavigationController
+
+V UINavigationControllerHideShowBarDuration f
+
+# UINavigationControllerDelegate
+
+: navigationController:willShowViewController:animated: v20@0:4@8@12B16
+: navigationController:didShowViewController:animated: v20@0:4@8@12B16
+
+# UIScrollView
+
+C UIScrollViewIndicatorStyleDefault 0
+C UIScrollViewIndicatorStyleBlack 1
+C UIScrollViewIndicatorStyleWhite 2
+
+V UIScrollViewDecelerationRateNormal f
+V UIScrollViewDecelerationRateFast f
+
+# UIScrollViewDelegate
+
+: scrollViewDidScroll: v12@0:4@8
+: scrollViewWillBeginDragging: v12@0:4@8
+: scrollViewDidEndDragging:willDecelerate: v16@0:4@8B12
+: scrollViewShouldScrollToTop: B12@0:4@8
+: scrollViewDidScrollToTop: v12@0:4@8
+: scrollViewWillBeginDecelerating: v12@0:4@8
+: scrollViewDidEndDecelerating: v12@0:4@8
+
+: viewForZoomingInScrollView: @12@0:4@8
+: scrollViewDidEndZooming:withView:atScale: v20@0:4@8@12f16
+
+: scrollViewDidEndScrollingAnimation: v12@0:4@8
+
+# UITabBar
+
+# UITabBarDelegate
+
+: tabBar:willBeginCustomizingItems: v16@0:4@8@12
+: tabBar:didBeginCustomizingItems: v16@0:4@8@12
+: tabBar:willBeginCustomizingItems:changed: v20@0:4@8@12B16
+: tabBar:didBeginCustomizingItems:changed: v20@0:4@8@12B16
+: tabBar:didSelectItem: v16@0:4@8@12
+
+# UITableView
+
+C UITableViewStylePlain 0
+C UITableViewStyleGrouped 1
+
+C UITableViewScrollPositionNone 0
+C UITableViewScrollPositionTop 1
+C UITableViewScrollPositionMiddle 2
+C UITableViewScrollPositionBottom 3
+
+C UITableViewRowAnimationFade 0
+C UITableViewRowAnimationRight 1
+C UITableViewRowAnimationLeft 2
+C UITableViewRowAnimationTop 3
+C UITableViewRowAnimationTop 4
+C UITableViewRowAnimationNone 5
+
+V UITableViewIndexSearch @
+
+# UITableViewCell
+
+C UITableViewCellStyleDefault 0
+C UITableViewCellStyleValue1 1
+C UITableViewCellStyleValue2 2
+C UITableViewCellStyleSubtitle 3
+
+C UITableViewCellStateDefaultMask 0
+C UITableViewCellStateEditingMask (1<<0)
+C UITableViewCellStateShowingDeleteConfirmationMask (1<<1)
+
+C UITableViewCellSelectionStyleNone 0
+C UITableViewCellSelectionStyleBlue 1
+C UITableViewCellSelectionStyleGray 2
+
+C UITableViewCellEditingStyleNone 0
+C UITableViewCellEditingStyleDelete 1
+C UITableViewCellEditingStyleInsert 2
+
+C UITableViewCellAccessoryNone 0
+C UITableViewCellAccessoryDisclosureIndicator 1
+C UITableViewCellAccessoryDetailDisclosureButton 2
+C UITableViewCellAccessoryCheckmark 3
+
+C UITableViewCellSeparatorStyleNone 0
+C UITableViewCellSeparatorStyleSingleLine 1
+
+# UITableViewController
+
+# UITableViewDataSource
+
+: tableView:numberOfRowsInSection: i16@0:4@8i12
+: numberOfSectionsInTableView: i12@0:4@8
+: tableView:cellForRowAtIndexPath: @16@0:4@8@12
+: sectionIndexTitlesForTableView: @12@0:4@8
+: tableView:sectionForSectionIndexTitle:atIndex: i20@0:4@8@12i16
+: tableView:titleForHeaderInSection: @16@0:4@8i12
+: tableView:titleForFooterInSection: @16@0:4@8i12
+
+: tableView:commitEditingStyle:forRowAtIndexPath: v20@0:4@8i12@16
+: tableView:canEditRowAtIndexPath: B16@0:4@8@12
+
+: tableView:canMoveRowAtIndexPath: B16@0:4@8@12
+: tableView:moveRowAtIndexPath:toIndexPath: v20@0:4@8@12@16
+
+# UIToolbar
+
+# UIView
+
+C UIViewAnimationCurveEaseInOut 0
+C UIViewAnimationCurveEaseIn 1
+C UIViewAnimationCurveEaseOut 2
+C UIViewAnimationCurveLinear 3
+
+C UIViewContentModeScaleToFill 0
+C UIViewContentModeScaleAspectFit 1
+C UIViewContentModeScaleAspectFill 2
+C UIViewContentModeRedraw 3
+C UIViewContentModeCenter 4
+C UIViewContentModeTop 5
+C UIViewContentModeBottom 6
+C UIViewContentModeLeft 7
+C UIViewContentModeRight 8
+C UIViewContentModeTopLeft 9
+C UIViewContentModeTopRight 10
+C UIViewContentModeBottomLeft 11
+C UIViewContentModeBottomRight 12
+
+C UIViewAutoresizingNone 0
+C UIViewAutoresizingFlexibleLeftMargin (1<<0)
+C UIViewAutoresizingFlexibleWidth (1<<1)
+C UIViewAutoresizingFlexibleRightMargin (1<<2)
+C UIViewAutoresizingFlexibleTopMargin (1<<3)
+C UIViewAutoresizingFlexibleHeight (1<<4)
+C UIViewAutoresizingFlexibleBottomMargin (1<<5)
+
+C UIViewAnimationTransitionNone 0
+C UIViewAnimationTransitionFlipFromLeft 1
+C UIViewAnimationTransitionFlipFromRight 2
+C UIViewAnimationTransitionCurlUp 3
+C UIViewAnimationTransitionCurlDown 4
+
+# UIViewController
+
+C UIModalTransitionStyleCoverVertical 0
+C UIModalTransitionStyleFlipHorizontal 1
+C UIModalTransitionStyleCrossDissolve 2
+
+# UIWebView
+
+C UIWebViewNavigationTypeLinkClicked 0
+C UIWebViewNavigationTypeFormSubmitted 1
+C UIWebViewNavigationTypeBackForward 2
+C UIWebViewNavigationTypeReload 3
+C UIWebViewNavigationTypeFormResubmitted 4
+C UIWebViewNavigationTypeOther 5
+
+# UIWebViewDelegate
+
+: webView:shouldStartLoadWithRequest:navigationType: B20@0:4@8@12I16
+: webViewDidStartLoad: v12@0:4@8
+: webViewDidFinishLoad: v12@0:4@8
+: webView:didFailLoadWithError: v16@0:4@8@12
+
+# UIWindow
+
+V UIWindowLevelNormal f
+V UIWindowLevelAlert f
+V UIWindowLevelStatusBar f
+
+V UIKeyboardCenterBeginUserInfoKey @
+V UIKeyboardCenterEndUserInfoKey @
+V UIKeyboardBoundsUserInfoKey @
+V UIKeyboardAnimationCurveUserInfoKey @
+V UIKeyboardAnimationDurationUserInfoKey @
+
+# Functions
 
-F UIAccessibilityPostNotification vI@
 F UIApplicationMain ii^^c@@
-F UIGraphicsEndImageContext v
-F UIGraphicsGetCurrentContext @
-F UIGraphicsGetImageFromCurrentImageContext @
-F UIGraphicsPopContext v
-F UIGraphicsPushContext v@
+
 F UIImageJPEGRepresentation @@
 F UIImagePNGRepresentation @@
 F UIImageWriteToSavedPhotosAlbum v@@:^v
 
+F UISaveVideoAtPathToSavedPhotosAlbum v@@:^v
+F UIVideoAtPathIsCompatibleWithSavedPhotosAlbum B@
+
+F UIGraphicsGetCurrentContext @
+F UIGraphicsPushContext v@
+F UIGraphicsPopContext v
+F UIGraphicsBeginImageContext v{CGSize=ff}
+F UIGraphicsGetImageFromCurrentImageContext @
+F UIGraphicsEndImageContext v
+F UIRectClip v{CGRect={CGPoint=ff}{CGSize=ff}}
+F UIRectFill v{CGRect={CGPoint=ff}{CGSize=ff}}
+F UIRectFillUsingBlendMode v{CGRect={CGPoint=ff}{CGSize=ff}}i
+F UIRectFrame v{CGRect={CGPoint=ff}{CGSize=ff}}
+F UIRectFrameUsingBlendMode v{CGRect={CGPoint=ff}{CGSize=ff}}i
+
+F CGPointFromString {CGPoint=ff}@
+F CGRectFromString  {CGRect={CGPoint=ff}{CGSize=ff}}@
+F CGSizeFromString {CGSize=ff}@
+F CGAffineTransformFromString {CGAffineTransform=ffffff}@
+F UIEdgeInsetsFromString {UIEdgeInsets=ffff}@
+F NSStringFromCGPoint @{CGPoint=ff}
+F NSStringFromCGRect @{CGRect={CGPoint=ff}{CGSize=ff}}
+F NSStringFromCGSize @{CGSize=ff}
+F NSStringFromCGAffineTransform @{CGAffineTransform=ffffff}
+F NSStringFromUIEdgeInsets @{UIEdgeInsets=ffff}
+
+F UIEdgeInsetsMake {UIEdgeInsets=ffff}ffff
+F UIEdgeInsetsEqualToEdgeInsets B{UIEdgeInsets=ffff}{UIEdgeInsets=ffff}
+F UIEdgeInsetsInsetRect {CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}{UIEdgeInsets=ffff}
+
+# XXX: UIInterfaceOrientationIsPortrait
+# XXX: UIInterfaceOrientationIsLandscape
+
+# XXX: UIDeviceOrientationIsValidInterfaceOrientation
+# XXX: UIDeviceOrientationIsPortrait
+# XXX: UIDeviceOrientationIsLandscape
+
+F UIAccessibilityPostNotification vI@
+
+# Miscellaneous
+
+F UIApplicationUseLegacyEvents vB
+
 F UIKeyboardDisableAutomaticAppearance v
 F UIKeyboardEnableAutomaticAppearance v
 F UIKeyboardInputModeUsesKBStar B@
@@ -315,24 +555,6 @@ V kABWorkLabel @
 V kABHomeLabel @
 V kABOtherLabel @
 
-f CoreLocation
-
-V kCLLocationAccuracyBest d
-V kCLLocationAccuracyNearestTenMeters d
-V kCLLocationAccuracyHundredMeters d
-V kCLLocationAccuracyKilometer d
-V kCLLocationAccuracyThreeKilometers d
-
-V kCLDistanceFilterNone d
-V kCLHeadingFilterNone d
-
-C kCLErrorLocationUnknown 0
-C kCLErrorDenied 1
-C kCLErrorNetwork 2
-C kCLErrorHeadingFailure 3
-
-V kCLErrorDomain @
-
 f CoreData
 
 C NSUndefinedAttributeType 0
@@ -485,6 +707,98 @@ C NSCoreDataVersionNumber10_4_3 77.0
 C NSCoreDataVersionNumber10_5 185.0
 C NSCoreDataVersionNumber10_5_3 186.0
 
+f CoreFoundation
+
+# XXX: incomplete by any stretch of the imagination
+
+F CFShow v@
+F CFShowStr v@
+
+f CoreGraphics
+
+# CGAffineTransform
+
+F CGAffineTransformMake {CGAffineTransform=ffffff}ffffff
+F CGAffineTransformMakeRotation {CGAffineTransform=ffffff}f
+F CGAffineTransformMakeScale {CGAffineTransform=ffffff}ff
+F CGAffineTransformMakeTranslation {CGAffineTransform=ffffff}ff
+
+F CGAffineTransformTranslate {CGAffineTransform=ffffff}{CGAffineTransform=ffffff}ff
+F CGAffineTransformScale {CGAffineTransform=ffffff}{CGAffineTransform=ffffff}ff
+F CGAffineTransformRotate {CGAffineTransform=ffffff}{CGAffineTransform=ffffff}f
+F CGAffineTransformInvert {CGAffineTransform=ffffff}{CGAffineTransform=ffffff}
+F CGAffineTransformConcat {CGAffineTransform=ffffff}{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}
+
+F CGPointApplyAffineTransform {CGPoint=ff}{CGPoint=ff}{CGAffineTransform=ffffff}
+F CGSizeApplyAffineTransform {CGSize=ff}{CGSize=ff}{CGAffineTransform=ffffff}
+F CGRectApplyAffineTransform {CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}{CGAffineTransform=ffffff}
+
+F CGAffineTransformIsIdentity B{CGAffineTransform=ffffff}
+F CGAffineTransformEqualToTransform B{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}
+
+S CGAffineTransform "a"f"b"f"c"f"d"f"tx"f"ty"f
+
+V CGAffineTransformIdentity {CGAffineTransform=ffffff}
+
+f CoreLocation
+
+V kCLLocationAccuracyBest d
+V kCLLocationAccuracyNearestTenMeters d
+V kCLLocationAccuracyHundredMeters d
+V kCLLocationAccuracyKilometer d
+V kCLLocationAccuracyThreeKilometers d
+
+V kCLDistanceFilterNone d
+V kCLHeadingFilterNone d
+
+C kCLErrorLocationUnknown 0
+C kCLErrorDenied 1
+C kCLErrorNetwork 2
+C kCLErrorHeadingFailure 3
+
+V kCLErrorDomain @
+
+f Foundation
+
+S _NSRange "location"I"length"I
+
+C NSMinXEdge 0
+C NSMinYEdge 1
+C NSMaxXEdge 2
+C NSMaxYEdge 3
+
+C NSApplicationDirectory 1
+C NSDemoApplicationDirectory 2
+C NSDeveloperApplicationDirectory 3
+C NSAdminApplicationDirectory 4
+C NSLibraryDirectory 5
+C NSDeveloperDirectory 6
+C NSUserDirectory 7
+C NSDocumentationDirectory 8
+C NSDocumentDirectory 9
+C NSCoreServiceDirectory 10
+C NSAutosavedInformationDirectory 11
+C NSDesktopDirectory 12
+C NSCachesDirectory 13
+C NSApplicationSupportDirectory 14
+C NSDownloadsDirectory 15
+C NSInputMethodsDirectory 16
+C NSMoviesDirectory 17
+C NSMusicDirectory 18
+C NSPicturesDirectory 19
+C NSPrinterDescriptionDirectory 20
+C NSSharedPublicDirectory 21
+C NSPreferencePanesDirectory 22
+C NSItemReplacementDirectory 99
+C NSAllApplicationsDirectory 100
+C NSAllLibrariesDirectory 101
+
+C NSUserDomainMask 1
+C NSLocalDomainMask 2
+C NSNetworkDomainMask 4
+C NSSystemDomainMask 8
+C NSAllDomainsMask 0x0ffff
+
 f MapKit
 
 C MKMapTypeStandard 0
@@ -505,3 +819,23 @@ C MKPinAnnotationColorPurple 2
 # MKCoordinateRegionMake
 # MKCoordinateRegionMakeWithDistance
 # MKCoordinateSpanMake
+
+C RTLD_LAZY 0x1
+C RTLD_NOW 0x2
+C RTLD_LOCAL 0x4
+C RTLD_GLOBAL 0x8
+
+C RTLD_NOLOAD 0x10
+C RTLD_NODELETE 0x80
+C RTLD_FIRST 0x100
+
+C RTLD_NEXT -1
+C RTLD_DEFAULT -2
+C RTLD_SELF -3
+
+# XXX: dladdr
+F dlclose i^v
+F dlerror *
+F dlopen ^v*i
+F dlsym ^v^v*
+F dlopen_preflight B*