This repository has been archived by the owner on Mar 5, 2021. It is now read-only.
forked from signalapp/Signal-Pods
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated pods.
- Loading branch information
Showing
186 changed files
with
24,727 additions
and
13,816 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Software License Agreement (BSD License) | ||
// | ||
// Copyright (c) 2010-2019, Deusty, LLC | ||
// All rights reserved. | ||
// | ||
// Redistribution and use of this software in source and binary forms, | ||
// with or without modification, are permitted provided that the following conditions are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright notice, | ||
// this list of conditions and the following disclaimer. | ||
// | ||
// * Neither the name of Deusty nor the names of its contributors may be used | ||
// to endorse or promote products derived from this software without specific | ||
// prior written permission of Deusty, LLC. | ||
|
||
#if TARGET_OS_OSX | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <QuartzCore/QuartzCore.h> | ||
|
||
/** | ||
* This class represents an NSColor replacement for CLI projects that don't link with AppKit | ||
**/ | ||
@interface CLIColor : NSObject | ||
|
||
/** | ||
* Convenience method for creating a `CLIColor` instance from RGBA params | ||
* | ||
* @param red red channel, between 0 and 1 | ||
* @param green green channel, between 0 and 1 | ||
* @param blue blue channel, between 0 and 1 | ||
* @param alpha alpha channel, between 0 and 1 | ||
*/ | ||
+ (CLIColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; | ||
|
||
/** | ||
* Get the RGBA components from a `CLIColor` | ||
* | ||
* @param red red channel, between 0 and 1 | ||
* @param green green channel, between 0 and 1 | ||
* @param blue blue channel, between 0 and 1 | ||
* @param alpha alpha channel, between 0 and 1 | ||
*/ | ||
- (void)getRed:(CGFloat *)red green:(CGFloat *)green blue:(CGFloat *)blue alpha:(CGFloat *)alpha NS_SWIFT_NAME(get(red:green:blue:alpha:)); | ||
|
||
@end | ||
|
||
#endif |
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,59 @@ | ||
// Software License Agreement (BSD License) | ||
// | ||
// Copyright (c) 2010-2019, Deusty, LLC | ||
// All rights reserved. | ||
// | ||
// Redistribution and use of this software in source and binary forms, | ||
// with or without modification, are permitted provided that the following conditions are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright notice, | ||
// this list of conditions and the following disclaimer. | ||
// | ||
// * Neither the name of Deusty nor the names of its contributors may be used | ||
// to endorse or promote products derived from this software without specific | ||
// prior written permission of Deusty, LLC. | ||
|
||
#if TARGET_OS_OSX | ||
|
||
#import "CLIColor.h" | ||
|
||
@interface CLIColor () { | ||
CGFloat _red, _green, _blue, _alpha; | ||
} | ||
|
||
@end | ||
|
||
|
||
@implementation CLIColor | ||
|
||
+ (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 | ||
|
||
#endif |
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 was deleted.
Oops, something went wrong.
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.