67 lines
1.7 KiB
Objective-C
67 lines
1.7 KiB
Objective-C
#import <Cocoa/Cocoa.h>
|
|
#import <Carbon/Carbon.h>
|
|
#import <LuaSkin/LuaSkin.h>
|
|
|
|
// Declare our Lua userdata object and a storage container for them
|
|
typedef struct _drawing_t {
|
|
void *window;
|
|
// hs.drawing objects created outside of this module might have reason to avoid the
|
|
// auto-close of this modules __gc
|
|
BOOL skipClose ;
|
|
} drawing_t;
|
|
|
|
// Objective-C class interface definitions
|
|
@interface HSDrawingWindow : NSPanel <NSWindowDelegate>
|
|
@end
|
|
|
|
@interface HSDrawingView : NSView {
|
|
lua_State *L;
|
|
}
|
|
@property int mouseUpCallbackRef;
|
|
@property int mouseDownCallbackRef;
|
|
@property BOOL HSFill;
|
|
@property BOOL HSStroke;
|
|
@property CGFloat HSLineWidth;
|
|
@property (nonatomic, strong) NSColor *HSFillColor;
|
|
@property (nonatomic, strong) NSColor *HSGradientStartColor;
|
|
@property (nonatomic, strong) NSColor *HSGradientEndColor;
|
|
@property int HSGradientAngle;
|
|
@property (nonatomic, strong) NSColor *HSStrokeColor;
|
|
@property CGFloat HSRoundedRectXRadius;
|
|
@property CGFloat HSRoundedRectYRadius;
|
|
@property BOOL clipToRect ;
|
|
@property NSRect rectClippingBoundry ;
|
|
@end
|
|
|
|
@interface HSDrawingViewCircle : HSDrawingView
|
|
@end
|
|
|
|
@interface HSDrawingViewEllipticalArc : HSDrawingView
|
|
@property CGFloat startAngle;
|
|
@property CGFloat endAngle;
|
|
@end
|
|
|
|
@interface HSDrawingViewRect : HSDrawingView
|
|
@end
|
|
|
|
@interface HSDrawingViewLine : HSDrawingView
|
|
@property NSPoint origin;
|
|
@property NSPoint end;
|
|
@end
|
|
|
|
@interface HSDrawingViewText : HSDrawingView
|
|
@property (nonatomic, strong) NSTextField *textField;
|
|
@end
|
|
|
|
@interface HSDrawingTextField : NSTextField
|
|
@end
|
|
|
|
@interface HSDrawingViewImage : HSDrawingView
|
|
@property (nonatomic, strong) NSImageView *HSImageView;
|
|
@property (nonatomic, strong) NSImage *HSImage;
|
|
@end
|
|
|
|
@interface HSDrawingNSImageView : NSImageView
|
|
@end
|
|
|