-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from rivera-ernesto/better_cl_support
Improve support for OS X command line tools
- Loading branch information
Showing
15 changed files
with
628 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// CLIColor.h | ||
// CocoaLumberjack | ||
// | ||
// Created by Ernesto Rivera on 2013/12/27. | ||
// | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
/** | ||
Simple NSColor replacement for CLI projects that don't link with AppKit | ||
*/ | ||
@interface CLIColor : NSObject | ||
|
||
+ (CLIColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; | ||
- (void)getRed:(CGFloat *)red green:(CGFloat *)green blue:(CGFloat *)blue alpha:(CGFloat *)alpha; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// CLIColor.m | ||
// CocoaLumberjack | ||
// | ||
// Created by Ernesto Rivera on 2013/12/27. | ||
// | ||
// | ||
|
||
#import "CLIColor.h" | ||
|
||
@implementation CLIColor | ||
{ | ||
CGFloat _red, _green, _blue, _alpha; | ||
} | ||
|
||
+(CLIColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha | ||
{ | ||
CLIColor * color = [CLIColor new]; | ||
color->_red = red; | ||
color->_green = green; | ||
color->_blue = blue; | ||
color->_alpha = alpha; | ||
return color; | ||
} | ||
|
||
- (void)getRed:(CGFloat *)red green:(CGFloat *)green blue:(CGFloat *)blue alpha:(CGFloat *)alpha | ||
{ | ||
if (red) *red = _red; | ||
if (green) *green = _green; | ||
if (blue) *blue = _blue; | ||
if (alpha) *alpha = _alpha; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.