Commit c5a4d181 authored by Damiano Galassi's avatar Damiano Galassi

MacGui: enable and fix more warnings. Review nullability annotations.

parent 76d08e5d
......@@ -25,7 +25,7 @@ typedef void (^HBPlayableObverser)(void);
@implementation HBAVPlayerRateObserver
- (void)postNotification;
- (void)postNotification
{
self.block();
}
......@@ -284,7 +284,7 @@ typedef void (^HBPlayableObverser)(void);
#pragma mark public methods
- (void)loadPlayableValueAsynchronouslyWithCompletionHandler:(nullable void (^)(void))handler;
- (void)loadPlayableValueAsynchronouslyWithCompletionHandler:(nullable void (^)(void))handler
{
if (self.isLoaded)
{
......
......@@ -24,15 +24,15 @@ typedef NS_ENUM(NSUInteger, HBAddPresetControllerMode) {
@interface HBAddPresetController ()
@property (unsafe_unretained) IBOutlet NSTextField *name;
@property (unsafe_unretained) IBOutlet NSTextField *desc;
@property (nonatomic, unsafe_unretained) IBOutlet NSTextField *name;
@property (nonatomic, unsafe_unretained) IBOutlet NSTextField *desc;
@property (unsafe_unretained) IBOutlet NSPopUpButton *categories;
@property (nonatomic, unsafe_unretained) IBOutlet NSPopUpButton *categories;
@property (unsafe_unretained) IBOutlet NSPopUpButton *picSettingsPopUp;
@property (unsafe_unretained) IBOutlet NSTextField *picWidth;
@property (unsafe_unretained) IBOutlet NSTextField *picHeight;
@property (unsafe_unretained) IBOutlet NSBox *picWidthHeightBox;
@property (nonatomic, unsafe_unretained) IBOutlet NSPopUpButton *picSettingsPopUp;
@property (nonatomic, unsafe_unretained) IBOutlet NSTextField *picWidth;
@property (nonatomic, unsafe_unretained) IBOutlet NSTextField *picHeight;
@property (nonatomic, unsafe_unretained) IBOutlet NSBox *picWidthHeightBox;
@property (nonatomic, strong) HBPreset *preset;
@property (nonatomic, strong) HBMutablePreset *mutablePreset;
......
......@@ -27,7 +27,7 @@
@property (nonatomic, strong) HBPresetsManager *presetsManager;
@property (nonatomic, strong) HBPresetsMenuBuilder *presetsMenuBuilder;
@property (unsafe_unretained) IBOutlet NSMenu *presetsMenu;
@property (nonatomic, unsafe_unretained) IBOutlet NSMenu *presetsMenu;
@property (nonatomic, strong) HBPreferencesController *preferencesController;
......
......@@ -7,5 +7,4 @@
#import <Cocoa/Cocoa.h>
@interface HBApplication : NSApplication
@end
......@@ -54,7 +54,7 @@ NSString *HBAudioEncoderChangedNotification = @"HBAudioEncoderChangedNotificatio
#pragma mark - Data Source
- (NSDictionary<NSString *, id> *)sourceTrackAtIndex:(NSUInteger)idx;
- (NSDictionary<NSString *, id> *)sourceTrackAtIndex:(NSUInteger)idx
{
return self.sourceTracks[idx];
}
......@@ -73,7 +73,7 @@ NSString *HBAudioEncoderChangedNotification = @"HBAudioEncoderChangedNotificatio
#pragma mark - Delegate
- (void)track:(HBAudioTrack *)track didChangeSourceFrom:(NSUInteger)oldSourceIdx;
- (void)track:(HBAudioTrack *)track didChangeSourceFrom:(NSUInteger)oldSourceIdx
{
// If the source was changed to None, remove the track
if (track.sourceTrackIdx == NONE_TRACK_INDEX)
......@@ -321,7 +321,7 @@ fail:
return self.tracks[index];
}
- (void)insertObject:(HBAudioTrack *)track inTracksAtIndex:(NSUInteger)index;
- (void)insertObject:(HBAudioTrack *)track inTracksAtIndex:(NSUInteger)index
{
[[self.undo prepareWithInvocationTarget:self] removeObjectFromTracksAtIndex:index];
[self.tracks insertObject:track atIndex:index];
......
......@@ -8,11 +8,13 @@
@class HBAudio;
/**
* HBAudioController
*/
NS_ASSUME_NONNULL_BEGIN
@interface HBAudioController : NSViewController
@property (nonatomic, readwrite, weak) HBAudio *audio;
@end
NS_ASSUME_NONNULL_END
......@@ -509,7 +509,7 @@ fail:
return self.tracksArray[index];
}
- (void)insertObject:(HBAudioTrackPreset *)track inTracksArrayAtIndex:(NSUInteger)index;
- (void)insertObject:(HBAudioTrackPreset *)track inTracksArrayAtIndex:(NSUInteger)index
{
[[self.undo prepareWithInvocationTarget:self] removeObjectFromTracksArrayAtIndex:index];
[self.tracksArray insertObject:track atIndex:index];
......
......@@ -8,8 +8,13 @@
@class HBAudioDefaults;
NS_ASSUME_NONNULL_BEGIN
@interface HBAudioDefaultsController : NSWindowController
- (instancetype)initWithSettings:(HBAudioDefaults *)settings;
@end
NS_ASSUME_NONNULL_END
......@@ -17,10 +17,10 @@ static void *HBAudioDefaultsContext = &HBAudioDefaultsContext;
@property (nonatomic, readonly, strong) HBLanguagesSelection *languagesList;
@property (unsafe_unretained) IBOutlet HBLanguageArrayController *tableController;
@property (unsafe_unretained) IBOutlet NSButton *showAllButton;
@property (nonatomic, unsafe_unretained) IBOutlet HBLanguageArrayController *tableController;
@property (nonatomic, unsafe_unretained) IBOutlet NSButton *showAllButton;
@property (unsafe_unretained) IBOutlet NSArrayController *tracksController;
@property (nonatomic, unsafe_unretained) IBOutlet NSArrayController *tracksController;
@end
......
......@@ -45,7 +45,7 @@ NSString *keyAudioTrackLanguageIsoCode = @"keyAudioTrackLanguageIsoCode";
- (instancetype)initWithTrackIdx:(NSUInteger)index
container:(int)container
dataSource:(id<HBAudioTrackDataSource>)dataSource
delegate:(id<HBAudioTrackDelegate>)delegate;
delegate:(id<HBAudioTrackDelegate>)delegate
{
self = [super init];
if (self)
......
......@@ -8,11 +8,13 @@
@class HBJob;
/**
* HBChapterTitlesController
*/
NS_ASSUME_NONNULL_BEGIN
@interface HBChapterTitlesController : NSViewController
@property (nonatomic, readwrite, weak) HBJob *job;
@end
NS_ASSUME_NONNULL_END
......@@ -43,7 +43,7 @@
// <one>
// <John said, "Hello there.">
// <three>
+ (nullable NSArray<NSArray<NSString *> *> *)HB_arrayWithContentsOfCSVURL:(NSURL *)url;
+ (nullable NSArray<NSArray<NSString *> *> *)HB_arrayWithContentsOfCSVURL:(NSURL *)url
{
NSString *str = [[NSString alloc] initWithContentsOfURL:url encoding:NSUTF8StringEncoding error:NULL];
......@@ -157,7 +157,7 @@
@interface HBChapterTitlesController () <NSTableViewDataSource, NSTableViewDelegate>
@property (weak) IBOutlet NSTableView *table;
@property (nonatomic, weak) IBOutlet NSTableView *table;
@property (nonatomic, readwrite, strong) NSArray<HBChapter *> *chapterTitles;
@end
......
......@@ -12,6 +12,8 @@
@class HBJob;
NS_ASSUME_NONNULL_BEGIN
@interface HBController : NSWindowController
- (instancetype)initWithDelegate:(HBAppDelegate *)delegate queue:(HBQueue *)queue presetsManager:(HBPresetsManager *)manager;
......@@ -42,5 +44,7 @@
- (IBAction)deletePreset:(id)sender;
- (IBAction)reloadPreset:(id)sender;
@end
NS_ASSUME_NONNULL_END
......@@ -160,7 +160,7 @@ static void *HBControllerScanCoreContext = &HBControllerScanCoreContext;
@implementation HBController
- (instancetype)initWithDelegate:(HBAppDelegate *)delegate queue:(HBQueue *)queue presetsManager:(HBPresetsManager *)manager;
- (instancetype)initWithDelegate:(HBAppDelegate *)delegate queue:(HBQueue *)queue presetsManager:(HBPresetsManager *)manager
{
self = [super initWithWindowNibName:@"MainWindow"];
if (self)
......@@ -394,7 +394,7 @@ static void *HBControllerScanCoreContext = &HBControllerScanCoreContext;
[self _touchBar_validateUserInterfaceItems];
}
NSUInteger count = self.queue.pendingItemsCount;
self.showQueueToolbarItem.badgeValue = count ? @(count).stringValue : nil;
self.showQueueToolbarItem.badgeValue = count ? @(count).stringValue : @"";
}
- (void)updateToolbarButtonsStateForScanCore:(HBState)state
......@@ -592,7 +592,7 @@ static void *HBControllerScanCoreContext = &HBControllerScanCoreContext;
{
if ([NSUserDefaults.standardUserDefaults boolForKey:HBShowOpenPanelAtLaunch])
{
[self browseSources:nil];
[self browseSources:self];
}
}
}
......@@ -1168,7 +1168,7 @@ static void *HBControllerScanCoreContext = &HBControllerScanCoreContext;
[self doAddTitlesToQueue:titles];
}
- (void)doAddTitlesToQueue:(NSArray<HBTitle *> *)titles;
- (void)doAddTitlesToQueue:(NSArray<HBTitle *> *)titles
{
NSMutableArray<HBJob *> *jobs = [[NSMutableArray alloc] init];
BOOL fileExists = NO;
......@@ -1321,7 +1321,7 @@ static void *HBControllerScanCoreContext = &HBControllerScanCoreContext;
}
}
- (void)reloadPreset:(id)sender;
- (void)reloadPreset:(id)sender
{
// Reload the currently selected preset if it is selected.
if (self.currentPreset != NULL)
......
......@@ -391,7 +391,7 @@ typedef void (^HBCoreCleanupHandler)(void);
hb_image_close(&image);
}
if (angle || flipped)
if (img && (angle || flipped))
{
CGImageRef rotatedImg = CGImageRotated(img, angle, flipped);
CGImageRelease(img);
......@@ -410,7 +410,7 @@ typedef void (^HBCoreCleanupHandler)(void);
#pragma mark - Encodes
- (void)encodeJob:(HBJob *)job progressHandler:(HBCoreProgressHandler)progressHandler completionHandler:(HBCoreCompletionHandler)completionHandler;
- (void)encodeJob:(HBJob *)job progressHandler:(HBCoreProgressHandler)progressHandler completionHandler:(HBCoreCompletionHandler)completionHandler
{
NSAssert(self.state == HBStateIdle, @"[HBCore encodeJob:] called while another scan or encode already in progress");
NSAssert(job, @"[HBCore encodeJob:] called with nil job");
......
......@@ -25,4 +25,5 @@ NS_ASSUME_NONNULL_BEGIN
@end
NS_ASSUME_NONNULL_END
\ No newline at end of file
NS_ASSUME_NONNULL_END
......@@ -6,6 +6,8 @@
#import <Cocoa/Cocoa.h>
NS_ASSUME_NONNULL_BEGIN
@interface HBDockTextField : NSTextField
@property (nonatomic, copy) NSString *textToDisplay;
......@@ -15,3 +17,6 @@
- (void)changeGradientColors:(NSColor *)startColor endColor:(NSColor *)endColor;
@end
NS_ASSUME_NONNULL_END
......@@ -6,6 +6,8 @@
#import <Cocoa/Cocoa.h>
NS_ASSUME_NONNULL_BEGIN
@interface HBDockTile : NSObject
- (instancetype)init NS_UNAVAILABLE;
......@@ -31,3 +33,6 @@
- (void)updateDockIcon:(double)progress hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds;
@end
NS_ASSUME_NONNULL_END
......@@ -7,6 +7,8 @@
#import <Cocoa/Cocoa.h>
#import "HBHUD.h"
NS_ASSUME_NONNULL_BEGIN
@protocol HBEncodingProgressHUDControllerDelegate <NSObject>
- (void)cancelEncoding;
......@@ -17,7 +19,10 @@
@property (nonatomic, nullable, assign) id<HBEncodingProgressHUDControllerDelegate> delegate;
@property (nonatomic, nonnull) NSString *info;
@property (nonatomic) NSString *info;
@property (nonatomic) double progress;
@end
NS_ASSUME_NONNULL_END
......@@ -8,8 +8,8 @@
@interface HBEncodingProgressHUDController ()
@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
@property (weak) IBOutlet NSTextField *infoLabel;
@property (nonatomic, weak) IBOutlet NSProgressIndicator *progressIndicator;
@property (nonatomic, weak) IBOutlet NSTextField *infoLabel;
@end
......
......@@ -14,8 +14,8 @@ typedef NS_ENUM(NSUInteger, HBExceptionAlertControllerResult) {
@interface HBExceptionAlertController : NSWindowController
// Properties are used by bindings
@property (copy) NSString *exceptionMessage;
@property (copy) NSAttributedString *exceptionBacktrace;
@property (nonatomic, copy) NSString *exceptionMessage;
@property (nonatomic, copy) NSAttributedString *exceptionBacktrace;
- (IBAction)btnCrashClicked:(id)sender;
- (IBAction)btnContinueClicked:(id)sender;
......
......@@ -68,7 +68,14 @@ static NSDictionary * filterParamsToNamesDict(hb_filter_param_t * (f)(int), int
- (id)transformedValue:(id)value
{
return [[self.dict allKeysForObject:value] firstObject];
if (value)
{
return [[self.dict allKeysForObject:value] firstObject];
}
else
{
return nil;
}
}
+ (BOOL)allowsReverseTransformation
......
......@@ -8,8 +8,13 @@
@class HBFilters;
NS_ASSUME_NONNULL_BEGIN
@interface HBFiltersViewController : NSViewController
@property (nonatomic, readwrite, weak) HBFilters *filters;
@end
NS_ASSUME_NONNULL_END
......@@ -6,6 +6,11 @@
#import <Foundation/Foundation.h>
CGImageRef CreateScaledCGImageFromCGImage(CGImageRef image, CGFloat thumbnailHeight);
CGImageRef CGImageRotated(CGImageRef imgRef, CGFloat angle, BOOL flipped) CF_RETURNS_RETAINED;
CF_ASSUME_NONNULL_BEGIN
CGImageRef __nullable CreateScaledCGImageFromCGImage(CGImageRef image, CGFloat thumbnailHeight);
CGImageRef __nullable CGImageRotated(CGImageRef imgRef, CGFloat angle, BOOL flipped) CF_RETURNS_RETAINED;
CGColorSpaceRef copyColorSpace(int primaries, int transfer, int matrix);
CF_ASSUME_NONNULL_END
//
// HBJob+HBJob_Private.h
// HandBrake
//
// Created by Damiano Galassi on 29/10/16.
//
//
/* HBJob+HBJob_Private.h $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
#import <HandBrakeKit/HandBrakeKit.h>
#import "HBSecurityAccessToken.h"
NS_ASSUME_NONNULL_BEGIN
@interface HBJob (Private) <HBSecurityScope>
@end
......@@ -71,3 +71,5 @@
@end
NS_ASSUME_NONNULL_END
......@@ -71,6 +71,8 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
_chapterTitles = [title.chapters copy];
_presetName = @"";
[self applyPreset:preset];
}
......
......@@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, readwrite) BOOL isDragginEnabled;
@property (unsafe_unretained) IBOutlet NSTableView *tableView;
@property (nonatomic, unsafe_unretained) IBOutlet NSTableView *tableView;
@end
......
......@@ -15,7 +15,7 @@
@implementation HBMutablePreset
- (void)setObject:(id)obj forKey:(NSString *)key;
- (void)setObject:(id)obj forKey:(NSString *)key
{
self.content[key] = obj;
}
......
......@@ -13,7 +13,7 @@
NSDateFormatter *_formatter;
}
- (nullable instancetype)initWithFileURL:(NSURL *)url;
- (nullable instancetype)initWithFileURL:(NSURL *)url
{
self = [super init];
if (self)
......
......@@ -8,9 +8,14 @@
@class HBPicture;
NS_ASSUME_NONNULL_BEGIN
@interface HBPictureController : NSWindowController <NSWindowDelegate>
@property (nonatomic, readwrite, strong) HBPicture *picture;
@property (nonatomic, readwrite, assign) NSWindowController *previewController;
@end
NS_ASSUME_NONNULL_END
......@@ -10,16 +10,16 @@
@interface HBPictureHUDController ()
@property (weak) IBOutlet NSTextField *scaleLabel;
@property (weak) IBOutlet NSTextField *infoLabel;
@property (nonatomic, weak) IBOutlet NSTextField *scaleLabel;
@property (nonatomic, weak) IBOutlet NSTextField *infoLabel;
@property (weak) IBOutlet NSSlider *slider;
@property (nonatomic, weak) IBOutlet NSSlider *slider;
@property (weak) IBOutlet NSPopUpButton *durationPopUp;
@property (weak) IBOutlet NSButton *scaleToScreenButton;
@property (nonatomic, weak) IBOutlet NSPopUpButton *durationPopUp;
@property (nonatomic, weak) IBOutlet NSButton *scaleToScreenButton;
@property (weak) IBOutlet NSTextField *durationLabel;
@property (weak) IBOutlet NSTextField *durationUnitLabel;
@property (nonatomic, weak) IBOutlet NSTextField *durationLabel;
@property (nonatomic, weak) IBOutlet NSTextField *durationUnitLabel;
@property (nonatomic) BOOL fitToView;
@property (nonatomic) BOOL ignoreUpdates;
......
......@@ -8,8 +8,13 @@
@class HBPicture;
NS_ASSUME_NONNULL_BEGIN
@interface HBPictureViewController : NSViewController
@property (nonatomic, readwrite, weak) HBPicture *picture;
@end
NS_ASSUME_NONNULL_END
......@@ -12,8 +12,8 @@ static void *HBPictureViewControllerContext = &HBPictureViewControllerContext;
@interface HBPictureViewController ()
@property (weak) IBOutlet NSStepper *widthStepper;
@property (weak) IBOutlet NSStepper *heightStepper;
@property (nonatomic, weak) IBOutlet NSStepper *widthStepper;
@property (nonatomic, weak) IBOutlet NSStepper *heightStepper;
@property (nonatomic, readwrite) NSColor *labelColor;
......
......@@ -54,4 +54,5 @@ NS_ASSUME_NONNULL_BEGIN
@end
NS_ASSUME_NONNULL_END
\ No newline at end of file
NS_ASSUME_NONNULL_END
......@@ -8,6 +8,8 @@
#import "HBPlayer.h"
#import "HBHUD.h"
NS_ASSUME_NONNULL_BEGIN
@protocol HBPlayerHUDControllerDelegate <NSObject>
- (void)stopPlayer;
......@@ -17,7 +19,9 @@
@interface HBPlayerHUDController : NSViewController <HBHUD>
@property (nonatomic, nullable, assign) id<HBPlayerHUDControllerDelegate> delegate;
@property (nonatomic, nullable) id<HBPlayer> player;
@end
NS_ASSUME_NONNULL_END
......@@ -9,15 +9,15 @@
@interface HBPlayerHUDController ()
@property (weak) IBOutlet NSButton *playButton;
@property (weak) IBOutlet NSSlider *slider;
@property (nonatomic, weak) IBOutlet NSButton *playButton;
@property (nonatomic, weak) IBOutlet NSSlider *slider;
@property (weak) IBOutlet NSSlider *volumeSlider;
@property (nonatomic, weak) IBOutlet NSSlider *volumeSlider;
@property (weak) IBOutlet NSTextField *currentTimeLabel;
@property (weak) IBOutlet NSTextField *remaingTimeLabel;
@property (nonatomic, weak) IBOutlet NSTextField *currentTimeLabel;
@property (nonatomic, weak) IBOutlet NSTextField *remaingTimeLabel;
@property (weak) IBOutlet NSPopUpButton *tracksSelection;
@property (nonatomic, weak) IBOutlet NSPopUpButton *tracksSelection;
@property (nonatomic, readwrite) id rateObserver;
@property (nonatomic, readwrite) id periodicObserver;
......@@ -338,7 +338,7 @@
return YES;
}
- (BOOL)HB_scrollWheel:(NSEvent *)theEvent;
- (BOOL)HB_scrollWheel:(NSEvent *)theEvent
{
if (theEvent.deltaY < 0)
{
......@@ -466,7 +466,7 @@ static NSTouchBarItemIdentifier HBTouchBarTimeSlider = @"fr.handbrake.timeSlider
slider.maxValue = duration;
}
- (NSString *)_timeToString:(NSTimeInterval)timeInSeconds negative:(BOOL)negative;
- (NSString *)_timeToString:(NSTimeInterval)timeInSeconds negative:(BOOL)negative
{
UInt16 seconds = (UInt16)fmod(timeInSeconds, 60.0);
UInt16 minutes = (UInt16)fmod(timeInSeconds / 60.0, 60.0);
......
......@@ -18,4 +18,5 @@ NS_ASSUME_NONNULL_BEGIN
@end
NS_ASSUME_NONNULL_END
\ No newline at end of file
NS_ASSUME_NONNULL_END
......@@ -57,8 +57,8 @@ NSString * const HBQueueAutoClearCompletedItems = @"HBQueueAutoClearCompletedIt
IBOutlet NSTextField * fSendEncodeToAppField;
}
@property (unsafe_unretained) IBOutlet NSTokenField *formatTokenField;
@property (unsafe_unretained) IBOutlet NSTokenField *builtInTokenField;
@property (nonatomic, unsafe_unretained) IBOutlet NSTokenField *formatTokenField;
@property (nonatomic, unsafe_unretained) IBOutlet NSTokenField *builtInTokenField;
@property (nonatomic, readonly, strong) NSArray *buildInFormatTokens;
@property (nonatomic, strong) NSArray *matches;
......
......@@ -53,7 +53,7 @@
return self;
}
- (instancetype)initWithName:(NSString *)title content:(NSDictionary *)content builtIn:(BOOL)builtIn;
- (instancetype)initWithName:(NSString *)title content:(NSDictionary *)content builtIn:(BOOL)builtIn
{
self = [self init];
if (self)
......@@ -69,7 +69,7 @@
return self;
}
- (instancetype)initWithCategoryName:(NSString *)title builtIn:(BOOL)builtIn;
- (instancetype)initWithCategoryName:(NSString *)title builtIn:(BOOL)builtIn
{
self = [self init];
if (self)
......@@ -110,7 +110,7 @@
return self;
}
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url error:(NSError **)outError
- (nullable instancetype)initWithContentsOfURL:(NSURL *)url error:(NSError * __autoreleasing *)outError
{
NSParameterAssert(url);
......@@ -246,7 +246,7 @@
return output;
}
- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically format:(HBPresetFormat)format removeRoot:(BOOL)removeRoot;
- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically format:(HBPresetFormat)format removeRoot:(BOOL)removeRoot
{
BOOL success = NO;
NSArray *presetList;
......
......@@ -124,7 +124,7 @@ typedef NS_ENUM(NSUInteger, HBPresetLoadingResult) {
HBPresetLoadingResultFailed
};
- (NSDictionary *)dictionaryWithPresetsAtURL:(NSURL *)url backup:(BOOL)backup result:(HBPresetLoadingResult *)result;
- (NSDictionary *)dictionaryWithPresetsAtURL:(NSURL *)url backup:(BOOL)backup result:(HBPresetLoadingResult *)result
{
NSData *presetData = [[NSData alloc] initWithContentsOfURL:url];
......@@ -180,7 +180,7 @@ typedef NS_ENUM(NSUInteger, HBPresetLoadingResult) {
return nil;
}
- (void)loadPresetsFromURL:(NSURL *)url;
- (void)loadPresetsFromURL:(NSURL *)url
{
HBPresetLoadingResult result;
NSDictionary *presetsDict;
......
......@@ -8,6 +8,8 @@
@import HandBrakeKit;
NS_ASSUME_NONNULL_BEGIN
@interface HBPresetsMenuBuilder : NSObject
@property (nonatomic, readonly) NSMenu *menu;
......@@ -20,3 +22,6 @@
- (void)build;
@end
NS_ASSUME_NONNULL_END
......@@ -10,11 +10,15 @@
@class HBPicture;
@class HBController;
NS_ASSUME_NONNULL_BEGIN
@interface HBPreviewController : NSWindowController <NSWindowDelegate>
@property (nonatomic, strong) HBPreviewGenerator *generator;
@property (nonatomic, strong) HBPicture *picture;
@property (nonatomic, strong, nullable) HBPreviewGenerator *generator;
@property (nonatomic, strong, nullable) HBPicture *picture;
@property (nonatomic, assign) HBController *documentController;
@end