Skip to content

Commit

Permalink
[macOS] Tidy up imports (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Aug 31, 2021
1 parent 1bf0625 commit 02cf5de
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 13 deletions.
3 changes: 1 addition & 2 deletions macos/QMK Toolbox/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
//

#import <Cocoa/Cocoa.h>

#import "Printing.h"
#import "Flashing.h"
#import "USB.h"

@interface AppDelegate : NSObject <NSApplicationDelegate> {

Expand Down
5 changes: 4 additions & 1 deletion macos/QMK Toolbox/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
//

#import "AppDelegate.h"

#import "Constants.h"
#import "QMKWindow.h"
#import "Flashing.h"
#import "HIDConsoleListener.h"
#import "QMKWindow.h"
#import "USB.h"

@interface AppDelegate () <NSTextViewDelegate, NSComboBoxDelegate, HIDConsoleListenerDelegate, FlashingDelegate, USBDelegate>

Expand Down
1 change: 1 addition & 0 deletions macos/QMK Toolbox/Constants.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <Foundation/Foundation.h>

#import "Constants.h"

NSString * const QMKMicrocontrollerKey = @"Microcontroller";
4 changes: 2 additions & 2 deletions macos/QMK Toolbox/Flashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

#import <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
#include "Printing.h"

#import "Printing.h"

typedef enum {
APM32DFU,
Expand Down
1 change: 1 addition & 0 deletions macos/QMK Toolbox/Flashing.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "Flashing.h"

#import "USB.h"

@interface Flashing ()
Expand Down
1 change: 1 addition & 0 deletions macos/QMK Toolbox/HIDConsole/HIDConsoleDevice.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import <Foundation/Foundation.h>

#import <IOKit/hid/IOHIDDevice.h>

@class HIDConsoleDevice;
Expand Down
2 changes: 1 addition & 1 deletion macos/QMK Toolbox/HIDConsole/HIDConsoleListener.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <IOKit/hid/IOHIDManager.h>

#include "HIDConsoleDevice.h"
#import "HIDConsoleDevice.h"

@protocol HIDConsoleListenerDelegate <NSObject>
- (void)consoleDeviceDidConnect:(HIDConsoleDevice *)device;
Expand Down
3 changes: 1 addition & 2 deletions macos/QMK Toolbox/Printing.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Copyright © 2017 Jack Humbert. This code is licensed under MIT license (see LICENSE.md for details).
//

#import <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>

@interface Printing : NSObject

Expand Down
1 change: 0 additions & 1 deletion macos/QMK Toolbox/QMKWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import <Cocoa/Cocoa.h>
#import "AppDelegate.h"

@interface QMKWindow : NSWindow <NSDraggingDestination>

Expand Down
2 changes: 2 additions & 0 deletions macos/QMK Toolbox/QMKWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "QMKWindow.h"

#import "AppDelegate.h"

@implementation QMKWindow

- (void)setup {
Expand Down
2 changes: 1 addition & 1 deletion macos/QMK Toolbox/USB.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>

#import "Printing.h"
#import "Flashing.h"

Expand Down
7 changes: 4 additions & 3 deletions macos/QMK Toolbox/USB.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
// Copyright © 2017 Jack Humbert. This code is licensed under MIT license (see LICENSE.md for details).
//

#import <IOKit/usb/IOUSBLib.h>
#import <IOKit/serial/IOSerialKeys.h>
#import <IOKit/storage/IOMedia.h>

#import "USB.h"
#include <IOKit/usb/IOUSBLib.h>
#include <IOKit/serial/IOSerialKeys.h>
#include <IOKit/storage/IOMedia.h>

static io_iterator_t usbConnectedIter;
static io_iterator_t usbDisconnectedIter;
Expand Down

0 comments on commit 02cf5de

Please sign in to comment.