-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Cleaned up Rust documentation. - Added support for dragging BRAW Toolbox clips. - Set minimum deployment target to 12.6 to match Gyroflow. - Added Settings button. - General tidy-up.
- Loading branch information
1 parent
f1c1d73
commit eca0171
Showing
10 changed files
with
1,808 additions
and
1,228 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 @@ | ||
// | ||
// BRAWToolboxXMLReader.h | ||
// Gyroflow Toolbox Renderer | ||
// | ||
// Created by Chris Hocking on 3/8/2023. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface BRAWToolboxXMLReader : NSObject <NSXMLParserDelegate> | ||
|
||
@property (strong, nonatomic) NSString *currentElement; | ||
@property (strong, nonatomic) NSString *filePath; | ||
@property (strong, nonatomic) NSString *bookmarkData; | ||
@property (nonatomic) BOOL isBRAWToolbox; | ||
|
||
- (NSDictionary *)readXML:(NSString *)xmlString; | ||
|
||
@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,72 @@ | ||
// | ||
// BRAWToolboxXMLReader.m | ||
// Gyroflow Toolbox Renderer | ||
// | ||
// Created by Chris Hocking on 3/8/2023. | ||
// | ||
|
||
#import "BRAWToolboxXMLReader.h" | ||
|
||
//--------------------------------------------------------- | ||
// BRAW Toolbox XML Reader: | ||
//--------------------------------------------------------- | ||
|
||
@implementation BRAWToolboxXMLReader | ||
|
||
//--------------------------------------------------------- | ||
// Read XML file: | ||
//--------------------------------------------------------- | ||
- (NSDictionary *)readXML:(NSString *)xmlString { | ||
self.isBRAWToolbox = NO; | ||
NSData *data = [xmlString dataUsingEncoding:NSUTF8StringEncoding]; | ||
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data]; | ||
[parser setDelegate:self]; | ||
[parser parse]; | ||
|
||
if (self.filePath && self.bookmarkData) { | ||
return @{@"File Path": self.filePath, @"Bookmark Data": self.bookmarkData}; | ||
} | ||
return nil; | ||
} | ||
|
||
//--------------------------------------------------------- | ||
// XML Parser: | ||
//--------------------------------------------------------- | ||
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary<NSString *,NSString *> *)attributeDict { | ||
self.currentElement = elementName; | ||
|
||
if ([elementName isEqualToString:@"filter-video"] && [[attributeDict objectForKey:@"name"] isEqualToString:@"BRAW Toolbox"]) { | ||
self.isBRAWToolbox = YES; | ||
} | ||
|
||
if (self.isBRAWToolbox && [elementName isEqualToString:@"param"]) { | ||
if ([[attributeDict objectForKey:@"name"] isEqualToString:@"File Path"]) { | ||
self.filePath = [attributeDict objectForKey:@"value"]; | ||
} else if ([[attributeDict objectForKey:@"name"] isEqualToString:@"Bookmark Data"]) { | ||
self.bookmarkData = [attributeDict objectForKey:@"value"]; | ||
} | ||
} | ||
} | ||
|
||
//--------------------------------------------------------- | ||
// XML Parser: | ||
//--------------------------------------------------------- | ||
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { | ||
self.currentElement = nil; | ||
if ([elementName isEqualToString:@"filter-video"]) { | ||
self.isBRAWToolbox = NO; | ||
} | ||
} | ||
|
||
//--------------------------------------------------------- | ||
// Dealloc: | ||
//--------------------------------------------------------- | ||
- (void)dealloc { | ||
[_currentElement release]; | ||
[_filePath release]; | ||
[_bookmarkData release]; | ||
|
||
[super dealloc]; | ||
} | ||
|
||
@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
Oops, something went wrong.