From f99771d46fe95533877c23ee87d4a60e3c6ccb78 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 30 Sep 2023 18:55:00 -0400 Subject: [PATCH] MacPDF: Rename LagomPDFView to MacPDFView --- Meta/Lagom/Contrib/MacPDF/CMakeLists.txt | 2 +- Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h | 6 +++--- Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.xib | 3 +-- .../Contrib/MacPDF/{LagomPDFView.h => MacPDFView.h} | 6 +++--- .../Contrib/MacPDF/{LagomPDFView.mm => MacPDFView.mm} | 10 +++++----- 5 files changed, 13 insertions(+), 14 deletions(-) rename Meta/Lagom/Contrib/MacPDF/{LagomPDFView.h => MacPDFView.h} (78%) rename Meta/Lagom/Contrib/MacPDF/{LagomPDFView.mm => MacPDFView.mm} (95%) diff --git a/Meta/Lagom/Contrib/MacPDF/CMakeLists.txt b/Meta/Lagom/Contrib/MacPDF/CMakeLists.txt index 20f5b9a7f1..39c4613193 100644 --- a/Meta/Lagom/Contrib/MacPDF/CMakeLists.txt +++ b/Meta/Lagom/Contrib/MacPDF/CMakeLists.txt @@ -18,7 +18,7 @@ add_executable(MacPDF MACOSX_BUNDLE main.mm AppDelegate.mm LagomPDFDocument.mm - LagomPDFView.mm + MacPDFView.mm ) target_compile_options(MacPDF PRIVATE -fobjc-arc diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h index 78e6b1d7bc..9f2acc1757 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.h @@ -11,13 +11,13 @@ #import #undef FixedPoint -#import "LagomPDFView.h" +#import "MacPDFView.h" NS_ASSUME_NONNULL_BEGIN -@interface LagomPDFDocument : NSDocument +@interface LagomPDFDocument : NSDocument { - IBOutlet LagomPDFView* _pdfView; + IBOutlet MacPDFView* _pdfView; } - (IBAction)showGoToPageDialog:(id)sender; diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.xib b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.xib index b6d2b325e1..cd4ffb2eb4 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.xib +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.xib @@ -1,7 +1,6 @@ - @@ -20,7 +19,7 @@ - + diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.h b/Meta/Lagom/Contrib/MacPDF/MacPDFView.h similarity index 78% rename from Meta/Lagom/Contrib/MacPDF/LagomPDFView.h rename to Meta/Lagom/Contrib/MacPDF/MacPDFView.h index 28f79b039c..98e7975fc8 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.h +++ b/Meta/Lagom/Contrib/MacPDF/MacPDFView.h @@ -14,16 +14,16 @@ #include #include -@protocol LagomPDFViewDelegate +@protocol MacPDFViewDelegate - (void)pageChanged; @end -@interface LagomPDFView : NSView +@interface MacPDFView : NSView - (void)setDocument:(WeakPtr)doc; - (void)goToPage:(int)page; - (int)page; -- (void)setDelegate:(id)delegate; +- (void)setDelegate:(id)delegate; @end diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm b/Meta/Lagom/Contrib/MacPDF/MacPDFView.mm similarity index 95% rename from Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm rename to Meta/Lagom/Contrib/MacPDF/MacPDFView.mm index 0355a5d181..fec7aa5672 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFView.mm +++ b/Meta/Lagom/Contrib/MacPDF/MacPDFView.mm @@ -4,18 +4,18 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#import "LagomPDFView.h" +#import "MacPDFView.h" #include #include #include -@interface LagomPDFView () +@interface MacPDFView () { WeakPtr _doc; NSBitmapImageRep* _cachedBitmap; int _page_index; - __weak id _delegate; + __weak id _delegate; } @end @@ -58,7 +58,7 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr bitmap_p) return bmp; } -@implementation LagomPDFView +@implementation MacPDFView // Called from LagomPDFDocument - (void)setDocument:(WeakPtr)doc @@ -90,7 +90,7 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr bitmap_p) return _page_index + 1; } -- (void)setDelegate:(id)delegate +- (void)setDelegate:(id)delegate { _delegate = delegate; }