Skip to content
Browse files

Updated stuff for Acorn. FUN!

  • Loading branch information...
1 parent d6c2b3c commit c080014c153839a7de959b91eec7fb6588166ef0 @ccgus committed
View
56 plugins/acornplugin/ACPlugin.h
@@ -35,20 +35,20 @@ enum {
@protocol ACPluginManager
- (BOOL)addFilterMenuTitle:(NSString*)menuTitle
- withSuperMenuTitle:(NSString*)superMenuTitle
- target:(id)target
- action:(SEL)selector
- keyEquivalent:(NSString*)keyEquivalent
- keyEquivalentModifierMask:(NSUInteger)mask
- userObject:(id)userObject;
+ withSuperMenuTitle:(NSString*)superMenuTitle
+ target:(id)target
+ action:(SEL)selector
+ keyEquivalent:(NSString*)keyEquivalent
+ keyEquivalentModifierMask:(NSUInteger)mask
+ userObject:(id)userObject;
- (BOOL)addActionMenuTitle:(NSString*)menuTitle
- withSuperMenuTitle:(NSString*)superMenuTitle
- target:(id)target
- action:(SEL)selector
- keyEquivalent:(NSString*)keyEquivalent
- keyEquivalentModifierMask:(NSUInteger)mask
- userObject:(id)userObject;
+ withSuperMenuTitle:(NSString*)superMenuTitle
+ target:(id)target
+ action:(SEL)selector
+ keyEquivalent:(NSString*)keyEquivalent
+ keyEquivalentModifierMask:(NSUInteger)mask
+ userObject:(id)userObject;
- (void)registerIOProviderForReading:(id<ACImageIOProvider>)provider forUTI:(NSString*)uti;
@@ -91,7 +91,6 @@ enum {
*/
- (NSNumber*)worksOnShapeLayers:(id)userObject;
-
/*
How about a more general type of "do you work on this type of layer" question:
@@ -104,6 +103,7 @@ enum {
*/
- (NSNumber*)validateForLayer:(id<ACLayer>)layer;
+
@end
@@ -118,10 +118,13 @@ enum {
*/
- (int)layerType;
-
// grab a CIImage representation of the layer.
- (CIImage*)CIImage;
+// opaqueBounds returns the bounds of the image, not counting any 100% transparent pixels along the edges. If you have a layer style that expands the image size (such as a drop shadow) this is not included in this calculation.
+// Added in 3.5
+- (NSRect)opaqueBounds;
+
@property (assign) BOOL visible;
@property (assign) float opacity;
@property (assign) CGBlendMode compositingMode; // aka, also the blend mode.
@@ -140,6 +143,9 @@ enum {
- (id)addOvalWithBounds:(NSRect)bounds;
- (id)addTextWithBounds:(NSRect)bounds;
+/* added in 3.2.2 */
+- (id)addBezierPath:(NSBezierPath*)path;
+
@end
@protocol ACBitmapLayer <ACLayer>
@@ -187,6 +193,11 @@ enum {
- (id<ACBitmapLayer>)insertCGImage:(CGImageRef)img atIndex:(NSUInteger)idx withName:(NSString*)layerName;
++ (id<ACShapeLayer>)addShapeLayer;
++ (id<ACBitmapLayer>)addBitmapLayer;
++ (id<ACGroupLayer>)addGroupLayer;
+
+
@end
@protocol ACGraphic <NSObject>
@@ -231,6 +242,13 @@ enum {
@end
+@protocol ACTextGraphic <ACGraphic>
+
+// added in 3.0.1
+- (void)setHTMLString:(NSString*)html;
+
+@end
+
@protocol ACDocument <NSObject> // this inherits from NSDocument
// grab an array of layers in the document.
@@ -270,12 +288,13 @@ enum {
- (CGColorSpaceRef)colorSpace;
-- (void)setColorSpace:(CGColorSpaceRef)newColorSpace;
-
// new in 2.2:
- (void)askToCommitCurrentAccessory;
+// new in 3.3:
+- (id<ACLayer>)firstLayerWithName:(NSString*)layerName;
+
@end
@protocol ACToolPalette <NSObject>
@@ -345,6 +364,7 @@ enum {
- (void)unloadViewController;
- (void)assignFilterWindowController:(id<ACFilterWindowController>)filterWindowController; // don't retain this guy!
- (CGFloat)updateExpansion;
+- (id<ACImageFilter>)copyWithScale:(CGFloat)scale;
@end
@@ -367,6 +387,9 @@ enum {
@interface CIImage (PXNSImageAdditions)
- (NSImage *)NSImageFromRect:(CGRect)r;
- (NSImage *)NSImage;
+
+// new in Acorn 3.5
+- (BOOL)writeToURL:(NSURL*)fileURL withUTI:(NSString*)uti;
@end
@interface NSImage (PXNSImageAdditions)
@@ -375,6 +398,7 @@ enum {
@interface NSDocumentController (ACNSDocumentControllerAdditions)
- (id)makeUntitledDocumentWithData:(NSData*)data;
+- (id)makeUntitledDocumentWithSize:(NSSize)s;
@end
View
222 plugins/acornplugin/Acorn.bridgesupport
@@ -0,0 +1,222 @@
+<?xml version='1.0'?>
+<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
+<signatures version='1.0'>
+<enum name='ACBezierGraphic' value='6'/>
+<enum name='ACBitmapLayer' value='1'/>
+<enum name='ACGroupLayer' value='3'/>
+<enum name='ACImageGraphic' value='5'/>
+<enum name='ACLineGraphic' value='3'/>
+<enum name='ACOvalGraphic' value='2'/>
+<enum name='ACPLUGIN_SUPPORT' value='1'/>
+<enum name='ACRectangleGraphic' value='1'/>
+<enum name='ACShapeLayer' value='2'/>
+<enum name='ACTextGraphic' value='4'/>
+<class name='CIImage'>
+<method selector='writeToURL:withUTI:'>
+<retval type='B'/>
+</method>
+</class>
+<class name='NSObject'>
+<method selector='addActionMenuTitle:withSuperMenuTitle:target:action:keyEquivalent:keyEquivalentModifierMask:userObject:'>
+<retval type='B'/>
+</method>
+<method selector='addFilterMenuTitle:withSuperMenuTitle:target:action:keyEquivalent:keyEquivalentModifierMask:userObject:'>
+<retval type='B'/>
+</method>
+<method selector='crushPNGData:toPath:'>
+<retval type='B'/>
+</method>
+<method selector='drawsFill'>
+<retval type='B'/>
+</method>
+<method selector='drawsStroke'>
+<retval type='B'/>
+</method>
+<method selector='hasCornerRadius'>
+<retval type='B'/>
+</method>
+<method selector='hasShadow'>
+<retval type='B'/>
+</method>
+<method selector='isEnabled'>
+<retval type='B'/>
+</method>
+<method selector='isLayerStyle' class_method='true'>
+<retval type='B'/>
+</method>
+<method selector='readImageForDocument:fromURL:ofType:error:'>
+<retval type='B'/>
+</method>
+<method selector='setDrawsFill:'>
+<arg type='B' index='0'/>
+</method>
+<method selector='setDrawsStroke:'>
+<arg type='B' index='0'/>
+</method>
+<method selector='setHasCornerRadius:'>
+<arg type='B' index='0'/>
+</method>
+<method selector='setHasShadow:'>
+<arg type='B' index='0'/>
+</method>
+<method selector='setIsEnabled:'>
+<arg type='B' index='0'/>
+</method>
+<method selector='setVisible:'>
+<arg type='B' index='0'/>
+</method>
+<method selector='visible'>
+<retval type='B'/>
+</method>
+<method selector='writeDocument:toURL:ofType:forSaveOperation:error:'>
+<retval type='B'/>
+</method>
+</class>
+<informal_protocol name='ACBitmapLayer'>
+<method type='v12@0:4@8' selector='applyCIImageFromFilter:' type64='v24@0:8@16'/>
+<method type='v24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='commitFrameOfDrawableContext:' type64='v48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='{_NSPoint=ff}8@0:4' selector='drawDelta' type64='{CGPoint=dd}16@0:8'/>
+<method type='^{CGContext=}8@0:4' selector='drawableContext' type64='^{CGContext=}16@0:8'/>
+<method type='{_NSPoint=ff}8@0:4' selector='frameOrigin' type64='{CGPoint=dd}16@0:8'/>
+<method type='{_NSPoint=ff}12@0:4@8' selector='layerPointFromEvent:' type64='{CGPoint=dd}24@0:8@16'/>
+<method type='v16@0:4{_NSPoint=ff}8' selector='setDrawDelta:' type64='v32@0:8{CGPoint=dd}16'/>
+<method type='v16@0:4{_NSPoint=ff}8' selector='setFrameOrigin:' type64='v32@0:8{CGPoint=dd}16'/>
+<method type='v24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='setNeedsDisplayInRect:' type64='v48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='v12@0:4@8' selector='setPreviewCIImage:' type64='v24@0:8@16'/>
+</informal_protocol>
+<informal_protocol name='ACBitmapTool'>
+<method type='v20@0:4@8@12@16' selector='mouseDown:onCanvas:toLayer:' type64='v40@0:8@16@24@32'/>
+<method type='@12@0:4f8' selector='toolCursorAtScale:' type64='@24@0:8d16'/>
+<method type='@8@0:4' selector='toolName' type64='@16@0:8'/>
+<method type='@8@0:4' selector='toolPaletteView' type64='@16@0:8'/>
+</informal_protocol>
+<informal_protocol name='ACDocument'>
+<method type='v8@0:4' selector='askToCommitCurrentAccessory' type64='v16@0:8'/>
+<method type='@8@0:4' selector='baseGroup' type64='@16@0:8'/>
+<method type='v24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='beginCroppingWithRect:' type64='v48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='{_NSSize=ff}8@0:4' selector='canvasSize' type64='{CGSize=dd}16@0:8'/>
+<method type='^{CGColorSpace=}8@0:4' selector='colorSpace' type64='^{CGColorSpace=}16@0:8'/>
+<method type='v24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='cropToRect:' type64='v48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='@8@0:4' selector='currentLayer' type64='@16@0:8'/>
+<method type='{_NSSize=ff}8@0:4' selector='dpi' type64='{CGSize=dd}16@0:8'/>
+<method type='@12@0:4@8' selector='firstLayerWithName:' type64='@24@0:8@16'/>
+<method type='@8@0:4' selector='layers' type64='@16@0:8'/>
+<method type='v16@0:4{_NSSize=ff}8' selector='resizeImageToSize:' type64='v32@0:8{CGSize=dd}16'/>
+<method type='v12@0:4f8' selector='scaleImageToHeight:' type64='v24@0:8d16'/>
+<method type='v16@0:4{_NSSize=ff}8' selector='scaleImageToSize:' type64='v32@0:8{CGSize=dd}16'/>
+<method type='v12@0:4f8' selector='scaleImageToWidth:' type64='v24@0:8d16'/>
+<method type='v16@0:4{_NSSize=ff}8' selector='setCanvasSize:' type64='v32@0:8{CGSize=dd}16'/>
+<method type='v20@0:4{_NSSize=ff}8@16' selector='setCanvasSize:usingAnchor:' type64='v40@0:8{CGSize=dd}16@32'/>
+<method type='v16@0:4{_NSSize=ff}8' selector='setDpi:' type64='v32@0:8{CGSize=dd}16'/>
+</informal_protocol>
+<informal_protocol name='ACFilterWindowController'>
+<method type='v12@0:4@8' selector='setNeedsToUpdateImageForFilterController:' type64='v24@0:8@16'/>
+</informal_protocol>
+<informal_protocol name='ACGraphic'>
+<method type='@8@0:4' selector='bezierPath' type64='@16@0:8'/>
+<method type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}8@0:4' selector='bounds' type64='{CGRect={CGPoint=dd}{CGSize=dd}}16@0:8'/>
+<method type='f8@0:4' selector='cornerRadius' type64='d16@0:8'/>
+<method type='B8@0:4' selector='drawsFill' type64='B16@0:8'/>
+<method type='B8@0:4' selector='drawsStroke' type64='B16@0:8'/>
+<method type='@8@0:4' selector='fillColor' type64='@16@0:8'/>
+<method type='i8@0:4' selector='graphicType' type64='i16@0:8'/>
+<method type='B8@0:4' selector='hasCornerRadius' type64='B16@0:8'/>
+<method type='B8@0:4' selector='hasShadow' type64='B16@0:8'/>
+<method type='v12@0:4f8' selector='setCornerRadius:' type64='v24@0:8d16'/>
+<method type='v12@0:4B8' selector='setDrawsFill:' type64='v20@0:8B16'/>
+<method type='v12@0:4B8' selector='setDrawsStroke:' type64='v20@0:8B16'/>
+<method type='v12@0:4@8' selector='setFillColor:' type64='v24@0:8@16'/>
+<method type='v12@0:4B8' selector='setHasCornerRadius:' type64='v20@0:8B16'/>
+<method type='v12@0:4B8' selector='setHasShadow:' type64='v20@0:8B16'/>
+<method type='v12@0:4f8' selector='setShadowBlurRadius:' type64='v24@0:8d16'/>
+<method type='v16@0:4{_NSSize=ff}8' selector='setShadowOffset:' type64='v32@0:8{CGSize=dd}16'/>
+<method type='v12@0:4@8' selector='setStrokeColor:' type64='v24@0:8@16'/>
+<method type='v12@0:4f8' selector='setStrokeLineWidth:' type64='v24@0:8d16'/>
+<method type='f8@0:4' selector='shadowBlurRadius' type64='d16@0:8'/>
+<method type='{_NSSize=ff}8@0:4' selector='shadowOffset' type64='{CGSize=dd}16@0:8'/>
+<method type='@8@0:4' selector='strokeColor' type64='@16@0:8'/>
+<method type='f8@0:4' selector='strokeLineWidth' type64='d16@0:8'/>
+</informal_protocol>
+<informal_protocol name='ACGroupLayer'>
+<method type='@8@0:4' selector='addBitmapLayer' type64='@16@0:8' class_method='true'/>
+<method type='@8@0:4' selector='addGroupLayer' type64='@16@0:8' class_method='true'/>
+<method type='v16@0:4@8i12' selector='addLayer:atIndex:' type64='v32@0:8@16q24'/>
+<method type='@8@0:4' selector='addShapeLayer' type64='@16@0:8' class_method='true'/>
+<method type='@20@0:4^{CGImage=}8I12@16' selector='insertCGImage:atIndex:withName:' type64='@40@0:8^{CGImage=}16Q24@32'/>
+<method type='@8@0:4' selector='layers' type64='@16@0:8'/>
+</informal_protocol>
+<informal_protocol name='ACImageFilter'>
+<method type='v12@0:4@8' selector='assignFilterWindowController:' type64='v24@0:8@16'/>
+<method type='@8@0:4' selector='copy' type64='@16@0:8'/>
+<method type='@12@0:4f8' selector='copyWithScale:' type64='@24@0:8d16'/>
+<method type='@12@0:4@8' selector='imageFilterWithName:' type64='@24@0:8@16' class_method='true'/>
+<method type='@16@0:4@8@12' selector='imageFilterWithName:parameters:' type64='@32@0:8@16@24' class_method='true'/>
+<method type='B8@0:4' selector='isEnabled' type64='B16@0:8'/>
+<method type='B8@0:4' selector='isLayerStyle' type64='B16@0:8' class_method='true'/>
+<method type='@8@0:4' selector='localizedName' type64='@16@0:8'/>
+<method type='@12@0:4@8' selector='localizedNameForFilterName:' type64='@24@0:8@16' class_method='true'/>
+<method type='@8@0:4' selector='name' type64='@16@0:8'/>
+<method type='@8@0:4' selector='outputImage' type64='@16@0:8'/>
+<method type='@8@0:4' selector='parametersForSaving' type64='@16@0:8'/>
+<method type='v12@0:4@8' selector='setInputImage:' type64='v24@0:8@16'/>
+<method type='v12@0:4B8' selector='setIsEnabled:' type64='v20@0:8B16'/>
+<method type='v8@0:4' selector='unloadViewController' type64='v16@0:8'/>
+<method type='f8@0:4' selector='updateExpansion' type64='d16@0:8'/>
+<method type='@8@0:4' selector='viewController' type64='@16@0:8'/>
+</informal_protocol>
+<informal_protocol name='ACImageIOProvider'>
+<method type='B24@0:4@8@12@16^@20' selector='readImageForDocument:fromURL:ofType:error:' type64='B48@0:8@16@24@32^@40'/>
+<method type='B28@0:4@8@12@16I20^@24' selector='writeDocument:toURL:ofType:forSaveOperation:error:' type64='B56@0:8@16@24@32Q40^@48'/>
+</informal_protocol>
+<informal_protocol name='ACLayer'>
+<method type='@8@0:4' selector='CIImage' type64='@16@0:8'/>
+<method type='i8@0:4' selector='compositingMode' type64='i16@0:8'/>
+<method type='@8@0:4' selector='layerName' type64='@16@0:8'/>
+<method type='i8@0:4' selector='layerType' type64='i16@0:8'/>
+<method type='f8@0:4' selector='opacity' type64='f16@0:8'/>
+<method type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}8@0:4' selector='opaqueBounds' type64='{CGRect={CGPoint=dd}{CGSize=dd}}16@0:8'/>
+<method type='v12@0:4i8' selector='setCompositingMode:' type64='v20@0:8i16'/>
+<method type='v12@0:4@8' selector='setLayerName:' type64='v24@0:8@16'/>
+<method type='v12@0:4f8' selector='setOpacity:' type64='v20@0:8f16'/>
+<method type='v12@0:4B8' selector='setVisible:' type64='v20@0:8B16'/>
+<method type='B8@0:4' selector='visible' type64='B16@0:8'/>
+</informal_protocol>
+<informal_protocol name='ACPlugin'>
+<method type='v8@0:4' selector='didRegister' type64='v16@0:8'/>
+<method type='@8@0:4' selector='plugin' type64='@16@0:8' class_method='true'/>
+<method type='@12@0:4@8' selector='validateForLayer:' type64='@24@0:8@16'/>
+<method type='v12@0:4@8' selector='willRegister:' type64='v24@0:8@16'/>
+<method type='@12@0:4@8' selector='worksOnShapeLayers:' type64='@24@0:8@16'/>
+</informal_protocol>
+<informal_protocol name='ACPluginManager'>
+<method type='B36@0:4@8@12@16:20@24I28@32' selector='addActionMenuTitle:withSuperMenuTitle:target:action:keyEquivalent:keyEquivalentModifierMask:userObject:' type64='B72@0:8@16@24@32:40@48Q56@64'/>
+<method type='B36@0:4@8@12@16:20@24I28@32' selector='addFilterMenuTitle:withSuperMenuTitle:target:action:keyEquivalent:keyEquivalentModifierMask:userObject:' type64='B72@0:8@16@24@32:40@48Q56@64'/>
+<method type='v16@0:4@8#12' selector='registerFilterName:constructor:' type64='v32@0:8@16#24'/>
+<method type='v16@0:4@8@12' selector='registerIOProviderForReading:forUTI:' type64='v32@0:8@16@24'/>
+<method type='v16@0:4@8@12' selector='registerIOProviderForWriting:forUTI:' type64='v32@0:8@16@24'/>
+</informal_protocol>
+<informal_protocol name='ACShapeLayer'>
+<method type='@12@0:4@8' selector='addBezierPath:' type64='@24@0:8@16'/>
+<method type='@24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='addOvalWithBounds:' type64='@48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='@24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='addRectangleWithBounds:' type64='@48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='@24@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8' selector='addTextWithBounds:' type64='@48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16'/>
+<method type='@8@0:4' selector='graphics' type64='@16@0:8'/>
+<method type='@8@0:4' selector='selectedGraphics' type64='@16@0:8'/>
+</informal_protocol>
+<informal_protocol name='ACTextGraphic'>
+<method type='v12@0:4@8' selector='setHTMLString:' type64='v24@0:8@16'/>
+</informal_protocol>
+<informal_protocol name='ACToolPalette'>
+<method type='@8@0:4' selector='backColor' type64='@16@0:8'/>
+<method type='@8@0:4' selector='frontColor' type64='@16@0:8'/>
+<method type='v12@0:4@8' selector='setBackColor:' type64='v24@0:8@16'/>
+<method type='v12@0:4@8' selector='setFrontColor:' type64='v24@0:8@16'/>
+</informal_protocol>
+<informal_protocol name='ACUtilities'>
+<method type='B16@0:4@8@12' selector='crushPNGData:toPath:' type64='B32@0:8@16@24'/>
+</informal_protocol>
+<informal_protocol name='TSGradientTrustMeItsThere'>
+<method type='v28@0:4{_NSRect={_NSPoint=ff}{_NSSize=ff}}8f24' selector='fillRect:angle:' type64='v56@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16d48'/>
+<method type='@16@0:4@8@12' selector='gradientWithBeginningColor:endingColor:' type64='@32@0:8@16@24' class_method='true'/>
+</informal_protocol>
+</signatures>
View
37 plugins/acornplugin/JSEnablerPlugIn.m
@@ -189,6 +189,14 @@ - (void)findJSCocoaScriptsForPluginManager:(id<ACPluginManager>)pluginManager {
}
+- (void)setInt:(int)val withName:(NSString*)name jstalk:(JSTalk*)jstalk {
+ [jstalk executeString:[NSString stringWithFormat:@"var %@=%d;", name, val]];
+}
+
+- (void)JSTalk:(JSTalk*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
+ NSLog(@"Error executing script on line %ld", (long)lineNumber);
+ NSLog(@"%@", error);
+}
- (CIImage*)executeScriptForImage:(id<ACLayer>)currentLayer scriptPath:(NSString*)scriptPath {
@@ -205,6 +213,35 @@ - (CIImage*)executeScriptForImage:(id<ACLayer>)currentLayer scriptPath:(NSString
JSTalk *jstalk = [[[JSTalk alloc] init] autorelease];
+ [jstalk setErrorController:self];
+
+ // gen_bridge_metadata -c '-I.' ACPlugin.h > Acorn.bridgesupport
+ /*
+ NSURL *acornBridgesupportURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"Acorn" withExtension:@"bridgesupport"];
+ if (acornBridgesupportURL) {
+ [JSTalk loadBridgeSupportFileAtURL:acornBridgesupportURL];
+ }
+ else {
+ NSLog(@"Acorn.bridgesupport is missing");
+ }*/
+
+ // add some defines that are around in the ACPlugin.h header. This should really be in a bridge support
+ // xml file, but it's grabbing the values as Objects right now. I'll have to figure out what's going on
+ // and bring this back in some day.
+ /*
+ [self setInt:ACBitmapLayer withName:@"ACBitmapLayer" jstalk:jstalk];
+ [self setInt:ACBitmapLayer withName:@"ACShapeLayer" jstalk:jstalk];
+ [self setInt:ACGroupLayer withName:@"ACGroupLayer" jstalk:jstalk];
+
+ [self setInt:ACRectangleGraphic withName:@"ACRectangleGraphic" jstalk:jstalk];
+ [self setInt:ACOvalGraphic withName:@"ACOvalGraphic" jstalk:jstalk];
+ [self setInt:ACLineGraphic withName:@"ACLineGraphic" jstalk:jstalk];
+ [self setInt:ACTextGraphic withName:@"ACTextGraphic" jstalk:jstalk];
+ [self setInt:ACImageGraphic withName:@"ACImageGraphic" jstalk:jstalk];
+ [self setInt:ACBezierGraphic withName:@"ACBezierGraphic" jstalk:jstalk];
+ */
+
+
[jstalk executeString:theJavaScript];
/*
View
4 plugins/acornplugin/jsenabler.xcodeproj/project.pbxproj
@@ -70,6 +70,7 @@
CC2FDC9F0EB68C40005267D1 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC2FDC9E0EB68C40005267D1 /* JavaScriptCore.framework */; };
CC2FDCB00EB68CF4005267D1 /* libffi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CC2FDCAF0EB68CF4005267D1 /* libffi.dylib */; };
CC726D6C0F1568BC00EB02AF /* JSEnablerPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = CC726D6B0F1568BC00EB02AF /* JSEnablerPlugIn.m */; };
+ CC8CD6FB15EF262E00ABC795 /* Acorn.bridgesupport in Resources */ = {isa = PBXBuildFile; fileRef = CC8CD6FA15EF262E00ABC795 /* Acorn.bridgesupport */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -213,6 +214,7 @@
CC726D6B0F1568BC00EB02AF /* JSEnablerPlugIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSEnablerPlugIn.m; sourceTree = "<group>"; };
CC726D6D0F1568C700EB02AF /* jsenabler_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsenabler_Prefix.pch; sourceTree = "<group>"; };
CC726DF80F156BE500EB02AF /* ACPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ACPlugin.h; sourceTree = "<group>"; };
+ CC8CD6FA15EF262E00ABC795 /* Acorn.bridgesupport */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Acorn.bridgesupport; sourceTree = "<group>"; };
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
@@ -255,6 +257,7 @@
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
+ CC8CD6FA15EF262E00ABC795 /* Acorn.bridgesupport */,
8D5B49B7048680CD000E48DA /* Info.plist */,
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
);
@@ -493,6 +496,7 @@
CC168C681253B0D20072FE99 /* jslint-jscocoa.js in Resources */,
CC168C691253B0D20072FE99 /* class.js in Resources */,
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */,
+ CC8CD6FB15EF262E00ABC795 /* Acorn.bridgesupport in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
1 src/JSTalk.h
@@ -32,6 +32,7 @@
- (id)callFunctionNamed:(NSString*)name withArguments:(NSArray*)args;
- (BOOL)hasFunctionNamed:(NSString*)name;
++ (void)loadBridgeSupportFileAtURL:(NSURL*)url;
+ (void)listen;
+ (void)resetPlugins;
+ (void)loadPlugins;
View
4 src/JSTalk.m
@@ -47,6 +47,10 @@ + (void)setShouldLoadJSTPlugins:(BOOL)b {
JSTalkShouldLoadJSTPlugins = b;
}
++ (void)loadBridgeSupportFileAtURL:(NSURL*)url {
+ [[BridgeSupportController sharedController] loadBridgeSupport:[url path]];
+}
+
- (id)init {
self = [super init];
if ((self != nil)) {

0 comments on commit c080014

Please sign in to comment.
Something went wrong with that request. Please try again.