Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Dark Mode #449

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b10de6f
Add support for dark mode
LEOYoon-Tsaw Aug 29, 2020
9842eb0
cerate a SquirrelLayout class to store layout parameters to support d…
LEOYoon-Tsaw Aug 29, 2020
e138e9b
Potential fix for dark edge in darkmode
LEOYoon-Tsaw Sep 5, 2020
7f04e9d
Make SquirrelPanel directly inherit NSWindow
LEOYoon-Tsaw Sep 13, 2020
577e3a3
Support native scheme
LEOYoon-Tsaw Sep 13, 2020
b97877f
Fix the gap between hilighted candidate and preedit area
LEOYoon-Tsaw Sep 14, 2020
843596e
Add support for dark mode
LEOYoon-Tsaw Aug 29, 2020
749c10e
cerate a SquirrelLayout class to store layout parameters to support d…
LEOYoon-Tsaw Aug 29, 2020
3abd2ec
Potential fix for dark edge in darkmode
LEOYoon-Tsaw Sep 5, 2020
a190913
Make SquirrelPanel directly inherit NSWindow
LEOYoon-Tsaw Sep 13, 2020
27f771d
Support native scheme
LEOYoon-Tsaw Sep 13, 2020
44149a8
ALWAYS_SEARCH_USER_PATHS is depracated
LEOYoon-Tsaw Sep 21, 2020
26d2334
Make more room between preedit and candidates when hilighted corner r…
LEOYoon-Tsaw Jan 18, 2021
8fbbd8c
Make linespace work for linear layout as well
LEOYoon-Tsaw Jan 26, 2021
47afba6
build(Sparkle.framework): remove SPM package and add framework files
kuoruan Jan 28, 2021
78d147c
build(Makefile): build specified architecture: make ARCHS='arm64'
lotem Jan 28, 2021
6ab9191
Add support for dark mode
LEOYoon-Tsaw Aug 29, 2020
8f73623
cerate a SquirrelLayout class to store layout parameters to support d…
LEOYoon-Tsaw Aug 29, 2020
376b140
Potential fix for dark edge in darkmode
LEOYoon-Tsaw Sep 5, 2020
60b157c
Make SquirrelPanel directly inherit NSWindow
LEOYoon-Tsaw Sep 13, 2020
a083fb0
Support native scheme
LEOYoon-Tsaw Sep 13, 2020
051a406
Fix the gap between hilighted candidate and preedit area
LEOYoon-Tsaw Sep 14, 2020
5d1b20c
Add support for dark mode
LEOYoon-Tsaw Aug 29, 2020
fa9a540
cerate a SquirrelLayout class to store layout parameters to support d…
LEOYoon-Tsaw Aug 29, 2020
47209c3
Potential fix for dark edge in darkmode
LEOYoon-Tsaw Sep 5, 2020
461b7c9
Make SquirrelPanel directly inherit NSWindow
LEOYoon-Tsaw Sep 13, 2020
d16d97f
Support native scheme
LEOYoon-Tsaw Sep 13, 2020
3ceea99
ALWAYS_SEARCH_USER_PATHS is depracated
LEOYoon-Tsaw Sep 21, 2020
a1884c7
Make more room between preedit and candidates when hilighted corner r…
LEOYoon-Tsaw Jan 18, 2021
710a409
Make linespace work for linear layout as well
LEOYoon-Tsaw Jan 26, 2021
74ec58d
Merge branch 'dark_mode' of https://github.com/LEOYoon-Tsaw/squirrel …
LEOYoon-Tsaw Jan 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Frameworks/Sparkle.framework/Headers
1 change: 1 addition & 0 deletions Frameworks/Sparkle.framework/Modules
1 change: 1 addition & 0 deletions Frameworks/Sparkle.framework/PrivateHeaders
1 change: 1 addition & 0 deletions Frameworks/Sparkle.framework/Resources
1 change: 1 addition & 0 deletions Frameworks/Sparkle.framework/Sparkle
43 changes: 43 additions & 0 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SPUDownloadData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// SPUDownloadData.h
// Sparkle
//
// Created by Mayur Pawashe on 8/10/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif

#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

/*!
* A class for containing downloaded data along with some information about it.
*/
SU_EXPORT @interface SPUDownloadData : NSObject <NSSecureCoding>

- (instancetype)initWithData:(NSData *)data textEncodingName:(NSString * _Nullable)textEncodingName MIMEType:(NSString * _Nullable)MIMEType;

/*!
* The raw data that was downloaded.
*/
@property (nonatomic, readonly) NSData *data;

/*!
* The IANA charset encoding name if available. Eg: "utf-8"
*/
@property (nonatomic, readonly, nullable, copy) NSString *textEncodingName;

/*!
* The MIME type if available. Eg: "text/plain"
*/
@property (nonatomic, readonly, nullable, copy) NSString *MIMEType;

@end

NS_ASSUME_NONNULL_END
25 changes: 25 additions & 0 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SPUDownloader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// SPUDownloader.h
// Downloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SPUDownloaderProtocol.h"

@protocol SPUDownloaderDelegate;

// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
@interface SPUDownloader : NSObject <SPUDownloaderProtocol>

// Due to XPC remote object reasons, this delegate is strongly referenced
// Invoke cleanup when done with this instance
- (instancetype)initWithDelegate:(id <SPUDownloaderDelegate>)delegate;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// SPUDownloaderDelegate.h
// Sparkle
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif

NS_ASSUME_NONNULL_BEGIN

@class SPUDownloadData;

@protocol SPUDownloaderDelegate <NSObject>

// This is only invoked for persistent downloads
- (void)downloaderDidSetDestinationName:(NSString *)destinationName temporaryDirectory:(NSString *)temporaryDirectory;

// Under rare cases, this may be called more than once, in which case the current progress should be reset back to 0
// This is only invoked for persistent downloads
- (void)downloaderDidReceiveExpectedContentLength:(int64_t)expectedContentLength;

// This is only invoked for persistent downloads
- (void)downloaderDidReceiveDataOfLength:(uint64_t)length;

// downloadData is nil if this is a persisent download, otherwise it's non-nil if it's a temporary download
- (void)downloaderDidFinishWithTemporaryDownloadData:(SPUDownloadData * _Nullable)downloadData;

- (void)downloaderDidFailWithError:(NSError *)error;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SPUDownloaderDeprecated.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//

#import "SPUDownloader.h"

@interface SPUDownloaderDeprecated : SPUDownloader <SPUDownloaderProtocol>

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// SPUDownloaderProtocol.h
// PersistentDownloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif

NS_ASSUME_NONNULL_BEGIN

@class SPUURLRequest;

// The protocol that this service will vend as its API. This header file will also need to be visible to the process hosting the service.
@protocol SPUDownloaderProtocol

- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)request bundleIdentifier:(NSString *)bundleIdentifier desiredFilename:(NSString *)desiredFilename;

- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request;

- (void)downloadDidFinish;

- (void)cleanup;

- (void)cancel;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// SPUDownloaderSession.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SPUDownloader.h"
#import "SPUDownloaderProtocol.h"

NS_CLASS_AVAILABLE(NSURLSESSION_AVAILABLE, 7_0)
@interface SPUDownloaderSession : SPUDownloader <SPUDownloaderProtocol>

@end
35 changes: 35 additions & 0 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SPUURLRequest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// SPUURLRequest.h
// Sparkle
//
// Created by Mayur Pawashe on 5/19/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif

NS_ASSUME_NONNULL_BEGIN

// A class that wraps NSURLRequest and implements NSSecureCoding
// This class exists because NSURLRequest did not support NSSecureCoding in macOS 10.8
// I have not verified if NSURLRequest in 10.9 implements NSSecureCoding or not
@interface SPUURLRequest : NSObject <NSSecureCoding>

// Creates a new URL request
// Only these properties are currently tracked:
// * URL
// * Cache policy
// * Timeout interval
// * HTTP header fields
// * networkServiceType
+ (instancetype)URLRequestWithRequest:(NSURLRequest *)request;

@property (nonatomic, readonly) NSURLRequest *request;

@end

NS_ASSUME_NONNULL_END
35 changes: 35 additions & 0 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SUAppcast.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//

#ifndef SUAPPCAST_H
#define SUAPPCAST_H

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"

NS_ASSUME_NONNULL_BEGIN

@class SUAppcastItem;
SU_EXPORT @interface SUAppcast : NSObject

@property (copy, nullable) NSString *userAgentString;
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;

- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err;
- (SUAppcast *)copyWithoutDeltaUpdates;

@property (readonly, copy, nullable) NSArray *items;
@end

NS_ASSUME_NONNULL_END

#endif
54 changes: 54 additions & 0 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//

#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
@class SUSignatures;

SU_EXPORT @interface SUAppcastItem : NSObject
@property (copy, readonly) NSString *title;
@property (copy, readonly) NSString *dateString;
@property (copy, readonly) NSDate *date;
@property (copy, readonly) NSString *itemDescription;
@property (strong, readonly) NSURL *releaseNotesURL;
@property (strong, readonly) SUSignatures *signatures;
@property (copy, readonly) NSString *minimumSystemVersion;
@property (copy, readonly) NSString *maximumSystemVersion;
@property (strong, readonly) NSURL *fileURL;
@property (nonatomic, readonly) uint64_t contentLength;
@property (copy, readonly) NSString *versionString;
@property (copy, readonly) NSString *osString;
@property (copy, readonly) NSString *displayVersionString;
@property (copy, readonly) NSDictionary *deltaUpdates;
@property (strong, readonly) NSURL *infoURL;
@property (copy, readonly) NSNumber* phasedRolloutInterval;

// Initializes with data from a dictionary provided by the RSS class.
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict failureReason:(NSString **)error;

@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
@property (getter=isMacOsUpdate, readonly) BOOL macOsUpdate;
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;

// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
@property (readonly, copy) NSDictionary *propertiesDictionary;

- (NSURL *)infoURL;

@end

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// SUCodeSigningVerifier.h
// Sparkle
//
// Created by Andy Matuschak on 7/5/12.
//
//

#ifndef SUCODESIGNINGVERIFIER_H
#define SUCODESIGNINGVERIFIER_H

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"

SU_EXPORT @interface SUCodeSigningVerifier : NSObject
+ (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundlePath matchesSignatureAtBundleURL:(NSURL *)newBundlePath error:(NSError **)error;
+ (BOOL)codeSignatureIsValidAtBundleURL:(NSURL *)bundlePath error:(NSError **)error;
+ (BOOL)bundleAtURLIsCodeSigned:(NSURL *)bundlePath;
+ (NSDictionary *)codeSignatureInfoAtBundleURL:(NSURL *)bundlePath;
@end

#endif