mirror of
https://github.com/WerWolv/ImHex
synced 2024-10-18 08:42:27 +00:00
parent
a5498995ff
commit
5027f36d95
|
@ -10,6 +10,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
void openWebpageMacos(const char *url) {
|
||||
CFURLRef urlRef = CFURLCreateWithBytes(NULL, (uint8_t*)(url), strlen(url), kCFStringEncodingASCII, NULL);
|
||||
LSOpenCFURLRef(urlRef, NULL);
|
||||
|
@ -30,4 +32,20 @@
|
|||
return [[NSScreen mainScreen] backingScaleFactor];
|
||||
}
|
||||
|
||||
@interface HexDocument : NSDocument
|
||||
|
||||
@property (nonatomic, strong) NSData *fileData;
|
||||
|
||||
@end
|
||||
|
||||
@implementation HexDocument
|
||||
|
||||
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError {
|
||||
// Set the file data to the given data
|
||||
self.fileData = data;
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
2
resources/dist/macos/Info.plist.in
vendored
2
resources/dist/macos/Info.plist.in
vendored
|
@ -20,7 +20,7 @@
|
|||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>NSDocumentClass</key>
|
||||
<string>NSDocument</string>
|
||||
<string>HexDocument</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>All Files</string>
|
||||
</dict>
|
||||
|
|
Loading…
Reference in a new issue