-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into ctypes_patch_no_pri…
…vate_api
- Loading branch information
Showing
18 changed files
with
2,010 additions
and
1,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,6 @@ plans for the future? That's what you'll find here! | |
|
||
faq | ||
community | ||
success | ||
releases | ||
roadmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Success Stories | ||
=============== | ||
|
||
Want to see examples of Rubicon in use? Here's some: | ||
|
||
* `Travel Tips <https://itunes.apple.com/au/app/travel-tips/id1336372310>`_ is an app in the iOS App Store that uses Rubicon to access the iOS UIKit libraries. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ similar to how classes can be looked up using ``ObjCClass``: | |
>>> NSCopying = ObjCProtocol('NSCopying') | ||
>>> NSCopying | ||
<rubicon.objc.runtime.ObjCProtocol: NSCopying at 0x7fff76543210> | ||
<rubicon.objc.api.ObjCProtocol: NSCopying at 0x7fff76543210> | ||
The ``isinstance`` function can be used to check whether an object conforms to | ||
a protocol: | ||
|
@@ -67,9 +67,9 @@ We can now use our class. The ``copy`` method (which uses our implemented | |
>>> ua = UserAccount.alloc().initWithUsername_emailAddress_(at('person'), at('[email protected]')) | ||
>>> ua | ||
<rubicon.objc.runtime.ObjCInstance 0x106543210: UserAccount at 0x106543220: <UserAccount: 0x106543220>> | ||
<rubicon.objc.api.ObjCInstance 0x106543210: UserAccount at 0x106543220: <UserAccount: 0x106543220>> | ||
>>> ua.copy() | ||
<rubicon.objc.runtime.ObjCInstance 0x106543210: UserAccount at 0x106543220: <UserAccount: 0x106543220>> | ||
<rubicon.objc.api.ObjCInstance 0x106543210: UserAccount at 0x106543220: <UserAccount: 0x106543220>> | ||
And we can check that the class conforms to the protocol: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
__version__ = '0.2.10' | ||
|
||
# Import commonly used submodules right away. | ||
# The first two imports are only included for clarity. They are not strictly necessary, because the from-imports below | ||
# The first few imports are only included for clarity. They are not strictly necessary, because the from-imports below | ||
# also import the types and runtime modules and implicitly add them to the rubicon.objc namespace. | ||
from . import types # noqa: F401 | ||
from . import runtime # noqa: F401 | ||
from . import api # noqa: F401 | ||
# The import of collections is important, however. The classes from collections are not meant to be used directly, | ||
# instead they are registered with the runtime module (using the for_objcclass decorator) so they are used in place of | ||
# ObjCInstance when representing Foundation collections in Python. If this module is not imported, the registration | ||
# will not take place, and Foundation collections will not support the expected methods/operators in Python! | ||
from . import collections # noqa: F401 | ||
|
||
from .runtime import ( # noqa: F401 | ||
IMP, SEL, Block, Class, Ivar, Method, NSArray, NSDictionary, NSMutableArray, NSMutableDictionary, NSObject, | ||
NSObjectProtocol, ObjCBlock, ObjCClass, ObjCInstance, ObjCMetaClass, ObjCProtocol, at, ns_from_py, | ||
objc_classmethod, objc_const, objc_id, objc_ivar, objc_method, objc_property, objc_property_t, objc_rawmethod, | ||
py_from_ns, send_message, send_super, | ||
) | ||
from .types import ( # noqa: F401 | ||
CFIndex, CFRange, CGFloat, CGGlyph, CGPoint, CGPointMake, CGRect, | ||
CGRectMake, CGSize, CGSizeMake, NSEdgeInsets, NSEdgeInsetsMake, NSInteger, | ||
NSMakePoint, NSMakeRect, NSMakeSize, NSPoint, NSRange, NSRect, NSSize, | ||
NSTimeInterval, NSUInteger, NSZeroPoint, UIEdgeInsets, UIEdgeInsetsMake, | ||
UIEdgeInsetsZero, UniChar, unichar, | ||
CFIndex, CFRange, CGFloat, CGGlyph, CGPoint, CGPointMake, CGRect, CGRectMake, CGSize, CGSizeMake, NSEdgeInsets, | ||
NSEdgeInsetsMake, NSInteger, NSMakePoint, NSMakeRect, NSMakeSize, NSPoint, NSRange, NSRect, NSSize, NSTimeInterval, | ||
NSUInteger, NSZeroPoint, UIEdgeInsets, UIEdgeInsetsMake, UIEdgeInsetsZero, UniChar, unichar, | ||
) | ||
from .runtime import SEL, send_message, send_super # noqa: F401 | ||
from .api import ( # noqa: F401 | ||
Block, NSArray, NSDictionary, NSMutableArray, NSMutableDictionary, NSObject, NSObjectProtocol, ObjCBlock, | ||
ObjCClass, ObjCInstance, ObjCMetaClass, ObjCProtocol, at, ns_from_py, objc_classmethod, objc_const, objc_ivar, | ||
objc_method, objc_property, objc_rawmethod, py_from_ns, | ||
) |
Oops, something went wrong.