mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:10:48 +00:00
Add methods for NSFontAssetRequest.
This commit is contained in:
parent
a761a01eb5
commit
8bdb4ffe16
2 changed files with 41 additions and 1 deletions
|
@ -26,6 +26,8 @@
|
|||
#define _NSFontAssetRequest_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSProgress.h>
|
||||
#import <Foundation/NSError.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_13, GS_API_LATEST)
|
||||
|
||||
|
@ -33,7 +35,23 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@interface NSFontAssetRequest : NSObject
|
||||
enum {
|
||||
NSFontAssetRequestOptionUsesStandardUI = 1 << 0, // Use standard system UI for downloading.
|
||||
};
|
||||
typedef NSUInteger NSFontAssetRequestOptions;
|
||||
|
||||
DEFINE_BLOCK_TYPE(GSFontAssetCompletionHandler, BOOL, NSError*);
|
||||
|
||||
@interface NSFontAssetRequest : NSObject <NSProgressReporting>
|
||||
|
||||
- (instancetype) initWithFontDescriptors: (NSArray *)fontDescriptors
|
||||
options: (NSFontAssetRequestOptions)options;
|
||||
|
||||
- (NSArray *) downloadedFontDescriptors;
|
||||
|
||||
- (NSProgress *) progress;
|
||||
|
||||
- (void)downloadFontAssetsWithCompletionHandler: (GSFontAssetCompletionHandler)completionHandler;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -26,5 +26,27 @@
|
|||
|
||||
@implementation NSFontAssetRequest
|
||||
|
||||
- (instancetype) initWithFontDescriptors: (NSArray *)fontDescriptors
|
||||
options: (NSFontAssetRequestOptions)options
|
||||
{
|
||||
return [super init];
|
||||
}
|
||||
|
||||
- (NSArray *) downloadedFontDescriptors
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSProgress *) progress
|
||||
{
|
||||
return [NSProgress progressWithTotalUnitCount: 0.0];
|
||||
}
|
||||
|
||||
- (void)downloadFontAssetsWithCompletionHandler: (GSFontAssetCompletionHandler)completionHandler
|
||||
{
|
||||
NSError *error = nil;
|
||||
CALL_BLOCK(completionHandler, error);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue