Skip to content

Commit

Permalink
Non-aliased Plugin Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Curtis committed Jan 27, 2016
1 parent 326d6fc commit 5fb9d86
Show file tree
Hide file tree
Showing 37 changed files with 2,052 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
//
// MCSPluginController.h
// MCSketchPluginFramework
//
// Created by Matt Curtis on 10/11/15.
// Copyright © 2015 Matt. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "SketchRuntime.h"

#import "MochaRuntime.h"

#import "MCSPluginUserDefaults.h"

#import "MCSPluginUpdater.h"


// Notifications

extern NSString *const MCSPluginSelectionDidChangeNotification;

extern NSString *const MCSPluginCurrentArtboardDidChangeNotification;

extern NSString *const MCSPluginCurrentDocumentDidChangeNotification;

extern NSString *const MCSPluginAllDocumentsClosedNotification;

// Notification Keys

extern NSString *const MCSPluginNotificationDocumentKey;

extern NSString *const MCSPluginNotificationDocumentWindowKey;


@interface MCSPluginController : NSObject

@property (nonatomic, readonly) NSString *loadedVersion;


@property (nonatomic) MSPluginCommand *pluginCommand;

@property (nonatomic) MSPluginBundle *plugin;

@property (nonatomic, readonly) MCSPluginUserDefaults *userDefaults;

@property (nonatomic, readonly) MCSPluginUpdater *updater;


+ (instancetype) pluginController:(MSPluginBundle*)plugin pluginCommand:(MSPluginCommand*)pluginCommand;

+ (instancetype) pluginController;


+ (NSAlert*) alertWithTitle:(NSString*)title information:(NSString*)information run:(BOOL)run;

+ (NSAlert*) alertWithTitle:(NSString*)title information:(NSString*)information;


- (void) applicationDidBecomeActive;


- (void) allDocumentsDidClose;

- (void) currentDocumentDidChange:(NSNotification*)notification;

- (void) currentSelectionDidChange:(NSNotification*)notification;

- (void) currentArtboardDidChange:(NSNotification*)notification;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// MCSPluginUpdater.h
// MCSketchPluginFramework
//
// Created by Matt Curtis on 11/23/15.
// Copyright © 2015 Matt. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface MCSPluginUpdater : NSObject

@property (nonatomic) NSString *pluginIdentifier;

- (BOOL) isNewerPluginBundleAvailableLocally:(NSString*)loadedVersion;

- (void) showUpdateRestartPrompt;

- (void) relaunchSketch;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// MCSPluginUserDefaults.h
// MCSketchPluginFramework
//
// Created by Matt Curtis on 11/23/15.
// Copyright © 2015 Matt. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MCSPluginUserDefaults : NSUserDefaults

@property (nonatomic) NSString *pluginIdentifier;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// MCSPluginUserDefaultsController.h
// MCSketchPluginFramework
//
// Created by Matt Curtis on 11/23/15.
// Copyright © 2015 Matt. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "MCSPluginUserDefaults.h"


@interface MCSPluginUserDefaultsController : NSUserDefaultsController

- (MCSPluginUserDefaults*) userDefaultsProxy;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// MCSketchPluginFramework.h
// MCSketchPluginFramework
//
// Created by Matt Curtis on 10/2/15.
// Copyright © 2015 Matt. All rights reserved.
//

#import <Cocoa/Cocoa.h>

//! Project version number for MCSketchPluginFramework.
FOUNDATION_EXPORT double MCSketchPluginFrameworkVersionNumber;

//! Project version string for MCSketchPluginFramework.
FOUNDATION_EXPORT const unsigned char MCSketchPluginFrameworkVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <MCSketchPluginFramework/PublicHeader.h>

#import <MCSketchPluginFramework/MochaRuntime.h>

#import <MCSketchPluginFramework/SketchRuntime.h>

#import <MCSketchPluginFramework/Utilities.h>

#import <MCSketchPluginFramework/MCSPluginUserDefaults.h>

#import <MCSketchPluginFramework/MCSPluginUserDefaultsController.h>

#import <MCSketchPluginFramework/MCSPluginUpdater.h>

#import <MCSketchPluginFramework/MCSPluginController.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// MochaRuntime.h
// MCSketchPluginFramework
//
// Created by Matt Curtis on 10/2/15.
// Copyright © 2015 Matt. All rights reserved.
//

#import <AppKit/AppKit.h>

#import <JavaScriptCore/JavaScriptCore.h>


#define MOJavaScriptObject_Class GetClass(@"MOJavaScriptObject")

@interface MOJavaScriptObject : NSObject

@property (readonly) JSObjectRef JSObject;

@property (readonly) JSContextRef JSContext;

@end

0 comments on commit 5fb9d86

Please sign in to comment.