-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathCSKSketchHeaders.h
143 lines (115 loc) · 4.21 KB
/
CSKSketchHeaders.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//
// CSKSketchHeaders.h
// CSSketch Helper
//
// Created by John Coates on 10/5/15.
// Copyright © 2015 John Coates. All rights reserved.
//
// Description: This file stubs out headers for Sketch classes used. The're prefixed with CSK_ so we don't have
// to actually link to the Sketch binary, we just implement stub classes.
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
@class CSK_MSLayer, CSK_MSContentDrawView, CSK_MSStyle, CSK_MSStyleBorder, CSK_MSColor;
@class CSK_MSStyleShadow, CSK_MSPage, CSK_MSStyleFill, CSK_MSTextLayer, CSK_MSAbsoluteRect;
@interface CSK_MSColor : NSObject
@property(readonly, nonatomic) double red;
@property(readonly, nonatomic) double green;
@property(readonly, nonatomic) double blue;
@property(readonly, nonatomic) double alpha;
+ (id)colorWithRed:(double)arg1 green:(double)arg2 blue:(double)arg3 alpha:(double)arg4;
@end
@interface CSK_MSStylePartCollection : NSArray
- (id)addNewStylePart;
@end
@interface CSK_MSStyle
@property (readonly) CSK_MSStyleBorder *border;
@property (readonly) CSK_MSStyleShadow *shadow;
@property (readonly) CSK_MSStyleShadow *innerShadow;
@property(retain, nonatomic) CSK_MSStyleFill *fill;
@property(retain, nonatomic) CSK_MSStylePartCollection *borders;
@property(retain, nonatomic) CSK_MSStylePartCollection *shadows;
@property(retain, nonatomic) CSK_MSStylePartCollection *fills;
@end
@interface CSK_MSStyleFill
@property(nonatomic) unsigned long long fillType;
@property(copy, nonatomic) CSK_MSColor *color;
@end
@interface CSK_MSStyleBorder
@property(nonatomic) double thickness;
@property(nonatomic) long long position;
@property(copy, nonatomic) CSK_MSColor *color;
@end
@interface CSK_MSStyleShadow
@property(nonatomic) double spread;
@property(nonatomic) double offsetY;
@property(nonatomic) double offsetX;
@property(nonatomic) double blurRadius;
@property(copy, nonatomic) CSK_MSColor *color;
@end
@interface CSK_MSDocument : NSDocument
@property(retain, nonatomic) NSWindow *documentWindow;
- (CSK_MSPage *)currentPage;
- (CSK_MSContentDrawView *)currentView;
- (void)displayMessage:(NSString *)message;
- (void)reloadInspector;
- (NSArray *)selectedLayers;
@end
@interface CSK_MSLayer : NSObject
@property (readonly) NSString *name;
@property (readonly) NSArray *layers;
@property (readonly) NSString *objectID;
@property(nonatomic) struct CGRect frameInArtboard;
@property(nonatomic) struct CGRect rect;
@property (readonly) CSK_MSStyle *style;
@property(retain, nonatomic) CSK_MSAbsoluteRect *absoluteRect;
- (CSK_MSLayer *)parentArtboard;
// OLD Version of invalidateCachedImmutableModelObjects
// version < 3.5
- (void)invalidateLightweightCopy:(id)arg1;
// version >= 3.5
- (void)invalidateCachedImmutableModelObjects;
// groups only
// version < 3.5
- (BOOL)resizeRoot:(BOOL)resize;
// version >= 3.5
- (BOOL)resizeToFitChildrenWithOption:(long long)option;
- (void)hideSelectionTemporarily;
@end
@interface CSK_MSArtboardGroup : CSK_MSLayer
@property(nonatomic) BOOL hasBackgroundColor;
@property(copy, nonatomic) CSK_MSColor *backgroundColor;
@end
static const long long CSKMSLayerDirtyTypeTextColor = 3;
@interface CSK_MSTextLayer : CSK_MSLayer
@property(nonatomic) double fontSize;
@property(copy, nonatomic) NSString *stringValue;
@property(copy, nonatomic) CSK_MSColor *textColor;
@property(retain, nonatomic) NSTextStorage *storage;
- (void)markLayerDirtyOfType:(unsigned long long)arg1;
- (void)layerDidChange;
- (void)syncTextStyleAttributes;
- (void)prepareForUndo;
@end
@interface CSK_MSPage : CSK_MSLayer
@end
@interface CSK_MSPluginCommand : NSObject
- (id)valueForKey:(NSString *)key
onLayer:(CSK_MSLayer *)layer
forPluginIdentifier:(NSString *)identifier;
- (void)setValue:(id)value
forKey:(NSString *)key
onLayer:(CSK_MSLayer *)layer
forPluginIdentifier:(NSString *)pluginIdentifier;
@end
@interface CSK_MSContentDrawView : NSObject
// Sketch < 3.5
- (void)refresh;
// Sketch >= 3.5
- (void)refreshTiles;
// Sketch >= 3.8
- (void)refreshOverlayOfViews;
@end
@interface CSK_MSAbsoluteRect : NSObject
- (CGRect)rect;
- (void)setRect:(CGRect)rect;
@end