diff --git a/Meta/Lagom/Contrib/MacPDF/AppDelegate.h b/Meta/Lagom/Contrib/MacPDF/AppDelegate.h index e69d4425b4..13517b3ccb 100644 --- a/Meta/Lagom/Contrib/MacPDF/AppDelegate.h +++ b/Meta/Lagom/Contrib/MacPDF/AppDelegate.h @@ -1,9 +1,10 @@ -// -// AppDelegate.h -// SerenityPDF -// -// Created by Nico Weber on 7/22/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once // Several AK types conflict with MacOS types. #define FixedPoint FixedPointMacOS @@ -11,5 +12,4 @@ #undef FixedPoint @interface AppDelegate : NSObject - @end diff --git a/Meta/Lagom/Contrib/MacPDF/AppDelegate.mm b/Meta/Lagom/Contrib/MacPDF/AppDelegate.mm index c23e6ce808..b82e438769 100644 --- a/Meta/Lagom/Contrib/MacPDF/AppDelegate.mm +++ b/Meta/Lagom/Contrib/MacPDF/AppDelegate.mm @@ -1,16 +1,14 @@ -// -// AppDelegate.m -// SerenityPDF -// -// Created by Nico Weber on 7/22/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ #import "AppDelegate.h" #include @interface AppDelegate () - @property (strong) IBOutlet NSWindow* window; @end @@ -18,7 +16,6 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNotification { - // Insert code here to initialize your application // FIXME: copy the fonts to the bundle or something auto source_root = DeprecatedString("/Users/thakis/src/serenity"); Gfx::FontDatabase::set_default_fonts_lookup_path(DeprecatedString::formatted("{}/Base/res/fonts", source_root)); @@ -26,7 +23,6 @@ - (void)applicationWillTerminate:(NSNotification*)aNotification { - // Insert code here to tear down your application } - (BOOL)applicationSupportsSecureRestorableState:(NSApplication*)app diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h index 54615473ee..78e6b1d7bc 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h @@ -1,9 +1,10 @@ -// -// LagomPDFDocument.h -// SerenityPDF -// -// Created by Nico Weber on 9/21/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once // Several AK types conflict with MacOS types. #define FixedPoint FixedPointMacOS diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm index b4ae0ba9bd..a35147d080 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm @@ -1,9 +1,8 @@ -// -// LagomPDFDocument.m -// SerenityPDF -// -// Created by Nico Weber on 9/21/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ #import "LagomPDFDocument.h" @@ -74,8 +73,6 @@ - (NSString*)windowNibName { - // Override to return the nib file name of the document. - // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead. return @"LagomPDFDocument"; } @@ -96,8 +93,6 @@ - (NSData*)dataOfType:(NSString*)typeName error:(NSError**)outError { - // Insert code here to write your document to data of the specified type. If outError != NULL, ensure that you create and set an appropriate error if you return nil. - // Alternatively, you could remove this method and override -fileWrapperOfType:error:, -writeToURL:ofType:error:, or -writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead. if (outError) { *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:nil]; } @@ -106,10 +101,6 @@ - (BOOL)readFromData:(NSData*)data ofType:(NSString*)typeName error:(NSError**)outError { - // Insert code here to read your document from the given data of the specified type. If outError != NULL, ensure that you create and set an appropriate error if you return NO. - // Alternatively, you could remove this method and override -readFromFileWrapper:ofType:error: or -readFromURL:ofType:error: instead. - // If you do, you should also override -isEntireFileLoaded to return NO if the contents are lazily loaded. - if (![[UTType typeWithIdentifier:typeName] conformsToType:UTTypePDF]) { if (outError) { *outError = [NSError errorWithDomain:NSOSStatusErrorDomain diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.h b/Meta/Lagom/Contrib/MacPDF/LagomPDFView.h index 14dfee67d2..28f79b039c 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.h +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFView.h @@ -1,9 +1,8 @@ -// -// PDFView.h -// SerenityPDF -// -// Created by Nico Weber on 7/22/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ #pragma once diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm b/Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm index 5e51f0a740..75ff0a019f 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm @@ -1,9 +1,8 @@ -// -// PDFView.m -// SerenityPDF -// -// Created by Nico Weber on 7/22/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ #import "LagomPDFView.h" diff --git a/Meta/Lagom/Contrib/MacPDF/main.mm b/Meta/Lagom/Contrib/MacPDF/main.mm index 3eda97b856..7aaf40a7d8 100644 --- a/Meta/Lagom/Contrib/MacPDF/main.mm +++ b/Meta/Lagom/Contrib/MacPDF/main.mm @@ -1,16 +1,12 @@ -// -// main.m -// SerenityPDF -// -// Created by Nico Weber on 7/22/23. -// +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ #import int main(int argc, char const* argv[]) { - @autoreleasepool { - // Setup code that might create autoreleased objects goes here. - } return NSApplicationMain(argc, argv); }