Skip to content
Snippets Groups Projects
Commit 0ae8cb1b authored by C.W. Betts's avatar C.W. Betts
Browse files

Have the delegates be of type 'id<protocol>' instead of 'NSObject<protocol>*'.

parent 67e5b0c0
No related branches found
No related tags found
No related merge requests found
Showing
with 31 additions and 31 deletions
Loading
Loading
@@ -32,11 +32,11 @@ typedef NS_ENUM(NSInteger, ContextMenuActions) {
IBOutlet NSTableColumn *actionColumn_;
IBOutlet NSTableColumn *parameterColumn_;
NSMutableArray *model_;
NSObject<ContextMenuActionPrefsDelegate> *delegate_;
id<ContextMenuActionPrefsDelegate> delegate_;
BOOL hasSelection_;
}
 
@property (nonatomic, assign) NSObject<ContextMenuActionPrefsDelegate> *delegate;
@property (nonatomic, assign) id<ContextMenuActionPrefsDelegate> delegate;
@property (nonatomic, assign) BOOL hasSelection;
 
+ (ContextMenuActions)actionForActionDict:(NSDictionary *)dict;
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@
* dragging a splitter finishes. */
@interface PTYSplitView : NSSplitView
 
- (NSObject<PTYSplitViewDelegate> *)delegate;
- (void)setDelegate:(NSObject<PTYSplitViewDelegate> *)delegate;
- (id<PTYSplitViewDelegate>)delegate;
- (void)setDelegate:(id<PTYSplitViewDelegate>)delegate;
 
@end
Loading
Loading
@@ -11,12 +11,12 @@
 
@implementation PTYSplitView
 
- (NSObject<PTYSplitViewDelegate> *)delegate
- (id<PTYSplitViewDelegate>)delegate
{
return (NSObject<PTYSplitViewDelegate> *) [super delegate];
}
 
- (void)setDelegate:(NSObject<PTYSplitViewDelegate> *)delegate
- (void)setDelegate:(id<PTYSplitViewDelegate>)delegate
{
[super setDelegate:delegate];
}
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@
 
@interface PointerController : NSObject
 
@property (nonatomic, assign) NSObject<PointerControllerDelegate> *delegate;
@property (nonatomic, assign) id<PointerControllerDelegate> delegate;
 
- (BOOL)mouseDown:(NSEvent *)event withTouches:(int)numTouches ignoreOption:(BOOL)ignoreOption;
- (BOOL)mouseUp:(NSEvent *)event withTouches:(int)numTouches;
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@
#import "PreferencePanel.h"
 
@implementation PointerController {
NSObject<PointerControllerDelegate> *delegate_;
id<PointerControllerDelegate> delegate_;
int mouseDownButton_;
int clicks_;
 
Loading
Loading
Loading
Loading
@@ -52,7 +52,7 @@ const CGFloat kDefaultTagsWidth = 80;
NSTableColumn* commandColumn_;
NSTableColumn* shortcutColumn_;
NSTableColumn* tagsColumn_;
NSObject<ProfileListViewDelegate> *delegate_;
id<ProfileListViewDelegate> delegate_;
NSSet* selectedGuids_;
BOOL debug;
ProfileModelWrapper *dataSource_;
Loading
Loading
Loading
Loading
@@ -15,9 +15,9 @@
 
@interface ProfileTableView : NSTableView
{
NSObject<ProfileTableMenuHandler> *handler_;
id<ProfileTableMenuHandler> handler_;
}
 
- (void)setMenuHandler:(NSObject<ProfileTableMenuHandler> *)handler;
- (void)setMenuHandler:(id<ProfileTableMenuHandler>)handler;
 
@end
Loading
Loading
@@ -29,7 +29,7 @@
[super dealloc];
}
 
- (void)setMenuHandler:(NSObject<ProfileTableMenuHandler> *)handler
- (void)setMenuHandler:(id<ProfileTableMenuHandler>)handler
{
handler_ = handler;
}
Loading
Loading
Loading
Loading
@@ -22,7 +22,7 @@
@interface SessionTitleView : NSView
 
@property (nonatomic, copy) NSString *title;
@property (nonatomic, assign) NSObject<SessionTitleViewDelegate> *delegate;
@property (nonatomic, assign) id<SessionTitleViewDelegate> delegate;
@property (nonatomic, assign) double dimmingAmount;
@property (nonatomic, assign) int ordinal;
 
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ static const CGFloat kButtonSize = 17;
NSTextField *label_;
NSButton *closeButton_;
NSButton *menuButton_;
NSObject<SessionTitleViewDelegate> *delegate_;
id<SessionTitleViewDelegate> delegate_;
double dimmingAmount_;
}
 
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@
@interface SmartSelectionController : NSWindowController <ContextMenuActionPrefsDelegate> {
NSString *guid_;
BOOL hasSelection_;
IBOutlet NSObject<SmartSelectionDelegate> *delegate_; // weak
IBOutlet id<SmartSelectionDelegate> delegate_; // weak
IBOutlet NSTableView *tableView_;
IBOutlet NSTableColumn *regexColumn_;
IBOutlet NSTableColumn *notesColumn_;
Loading
Loading
@@ -30,7 +30,7 @@
 
@property (nonatomic, copy) NSString *guid;
@property (nonatomic, assign) BOOL hasSelection;
@property (nonatomic, assign) NSObject<SmartSelectionDelegate> *delegate;
@property (nonatomic, assign) id<SmartSelectionDelegate> delegate;
 
+ (BOOL)logDebugInfo;
+ (double)precisionInRule:(NSDictionary *)rule;
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ typedef NS_ENUM(NSInteger, ControlCommand) {
};
 
@interface TmuxGateway : NSObject {
NSObject<TmuxGatewayDelegate> *delegate_; // weak
id<TmuxGatewayDelegate> delegate_; // weak
 
// Data from parsing an incoming command
ControlCommand command_;
Loading
Loading
@@ -72,7 +72,7 @@ typedef NS_ENUM(NSInteger, ControlCommand) {
@property(nonatomic, assign) BOOL tmuxLogging;
@property(nonatomic, readonly) NSWindowController<iTermWindowController> *window;
 
- (id)initWithDelegate:(NSObject<TmuxGatewayDelegate> *)delegate;
- (id)initWithDelegate:(id<TmuxGatewayDelegate>)delegate;
 
// Returns any unconsumed data if tmux mode is exited.
// The token must be TMUX_xxx.
Loading
Loading
@@ -106,6 +106,6 @@ typedef NS_ENUM(NSInteger, ControlCommand) {
 
- (void)sendKeys:(NSData *)data toWindowPane:(int)windowPane;
- (void)detach;
- (NSObject<TmuxGatewayDelegate> *)delegate;
- (id<TmuxGatewayDelegate>)delegate;
 
@end
Loading
Loading
@@ -42,7 +42,7 @@ static NSString *kCommandIsLastInList = @"lastInList";
BOOL disconnected_;
}
 
- (id)initWithDelegate:(NSObject<TmuxGatewayDelegate> *)delegate
- (id)initWithDelegate:(id<TmuxGatewayDelegate>)delegate
{
self = [super init];
if (self) {
Loading
Loading
@@ -522,7 +522,7 @@ error:
detachSent_ = YES;
}
 
- (NSObject<TmuxGatewayDelegate> *)delegate
- (id<TmuxGatewayDelegate>)delegate
{
return delegate_;
}
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@
@interface TmuxSessionsTable : NSObject <NSTableViewDelegate, NSTableViewDataSource> {
NSMutableArray *model_;
BOOL canAttachToSelectedSession_;
NSObject<TmuxSessionsTableProtocol> *delegate_; // weak
id<TmuxSessionsTableProtocol> delegate_; // weak
 
IBOutlet NSTableColumn *checkColumn_;
IBOutlet NSTableColumn *nameColumn_;
Loading
Loading
@@ -38,7 +38,7 @@
IBOutlet NSButton *removeButton_;
}
 
@property (nonatomic, assign) NSObject<TmuxSessionsTableProtocol> *delegate;
@property (nonatomic, assign) id<TmuxSessionsTableProtocol> delegate;
 
- (void)setSessions:(NSArray *)names;
- (NSString *)selectedSessionName;
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@ extern NSString *kWindowPasteboardType;
[super dealloc];
}
 
- (void)setDelegate:(NSObject<TmuxSessionsTableProtocol> *)delegate
- (void)setDelegate:(id<TmuxSessionsTableProtocol>)delegate
{
delegate_ = delegate;
[self setSessions:[delegate_ sessions]];
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ extern NSString *kWindowPasteboardType;
 
@interface TmuxWindowsTable : NSObject <NSTableViewDelegate, NSTableViewDataSource> {
NSMutableArray *model_;
NSObject<TmuxWindowsTableProtocol> *delegate_; // weak
id<TmuxWindowsTableProtocol> delegate_; // weak
NSMutableArray *filteredModel_;
 
IBOutlet NSTableView *tableView_;
Loading
Loading
@@ -40,7 +40,7 @@ extern NSString *kWindowPasteboardType;
IBOutlet NSSearchField *searchField_;
}
 
@property (nonatomic, assign) NSObject<TmuxWindowsTableProtocol> *delegate;
@property (nonatomic, assign) id<TmuxWindowsTableProtocol> delegate;
 
- (void)setWindows:(NSArray *)windows;
- (void)setNameOfWindowWithId:(int)wid to:(NSString *)newName;
Loading
Loading
Loading
Loading
@@ -48,7 +48,7 @@ NSString *kWindowPasteboardType = @"kWindowPasteboardType";
[super dealloc];
}
 
- (void)setDelegate:(NSObject<TmuxWindowsTableProtocol> *)delegate
- (void)setDelegate:(id<TmuxWindowsTableProtocol>)delegate
{
delegate_ = delegate;
[delegate_ reloadWindows];
Loading
Loading
Loading
Loading
@@ -18,7 +18,7 @@
 
@property (nonatomic, copy) NSString *guid;
@property (nonatomic, assign) BOOL hasSelection;
@property (nonatomic, assign) IBOutlet NSObject<TriggerDelegate> *delegate;
@property (nonatomic, assign) IBOutlet id<TriggerDelegate> delegate;
@property (nonatomic, readonly) NSTableView *tableView;
 
- (void)windowWillOpen;
Loading
Loading
Loading
Loading
@@ -61,7 +61,7 @@
@property (nonatomic, assign) id<ToolWrapperDelegate> delegate;
 
- (void)relayout;
- (NSObject<ToolbeltTool> *)tool;
- (id<ToolbeltTool>)tool;
- (void)removeToolSubviews;
- (CGFloat)minimumHeight;
 
Loading
Loading
Loading
Loading
@@ -136,11 +136,11 @@ static const CGFloat kCloseButtonLeftMargin = 5;
[_title setEditable:NO];
}
 
- (NSObject<ToolbeltTool> *)tool {
- (id<ToolbeltTool>)tool {
if ([[_container subviews] count] == 0) {
return nil;
}
return (NSObject<ToolbeltTool> *)[[_container subviews] firstObject];
return (id<ToolbeltTool>)[[_container subviews] firstObject];
}
 
@end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment