Revision: 13822
          http://sourceforge.net/p/skim-app/code/13822
Author:   hofman
Date:     2023-12-03 23:46:26 +0000 (Sun, 03 Dec 2023)
Log Message:
-----------
use nullability qualifiers in headers

Modified Paths:
--------------
    trunk/SKNPDFAnnotationNote_SKExtensions.m
    trunk/SkimNotes/NSFileManager_SKNExtensions.h
    trunk/SkimNotes/NSFileManager_SKNToolExtensions.h
    trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
    trunk/SkimNotes/PDFDocument_SKNExtensions.h
    trunk/SkimNotes/SKNAgentListener.h
    trunk/SkimNotes/SKNAgentListenerProtocol.h
    trunk/SkimNotes/SKNDocument.h
    trunk/SkimNotes/SKNExtendedAttributeManager.h
    trunk/SkimNotes/SKNPDFAnnotationNote.h
    trunk/SkimNotes/SKNPDFAnnotationNote.m
    trunk/SkimNotes/SKNSkimReader.h
    trunk/SkimNotes/SKNUtilities.h
    trunk/SkimNotes/SKNXPCAgentListenerProtocol.h
    trunk/SkimNotes/SKNXPCSkimReader.h
    trunk/SkimNotes/SkimNotes.rtf

Modified: trunk/SKNPDFAnnotationNote_SKExtensions.m
===================================================================
--- trunk/SKNPDFAnnotationNote_SKExtensions.m   2023-12-03 10:41:47 UTC (rev 
13821)
+++ trunk/SKNPDFAnnotationNote_SKExtensions.m   2023-12-03 23:46:26 UTC (rev 
13822)
@@ -51,6 +51,8 @@
 
 @interface SKNPDFAnnotationNote (SKPrivateDeclarations)
 - (NSTextStorage *)mutableText;
+- (NSArray *)texts;
+- (void)setTexts:(NSArray *)texts;
 @end
 
 @implementation SKNPDFAnnotationNote (SKExtensions)
@@ -58,8 +60,7 @@
 - (void)setDefaultSkimNoteProperties {
     [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKAnchoredNoteColorKey]];
     [self setIconType:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKAnchoredNoteIconTypeKey]];
-    [texts release];
-    texts = [[NSArray alloc] initWithObjects:[[[SKNoteText alloc] 
initWithNote:self] autorelease], nil];
+    [self setTexts:@[[[[SKNoteText alloc] initWithNote:self] autorelease]]];
     [self setPopup:nil];
 }
 
@@ -75,7 +76,7 @@
 - (BOOL)hasNoteText { return YES; }
 
 - (SKNoteText *)noteText {
-    return [texts firstObject];
+    return [[self texts] firstObject];
 }
 
 - (NSString *)textString {

Modified: trunk/SkimNotes/NSFileManager_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNExtensions.h       2023-12-03 10:41:47 UTC 
(rev 13821)
+++ trunk/SkimNotes/NSFileManager_SKNExtensions.h       2023-12-03 23:46:26 UTC 
(rev 13822)
@@ -43,6 +43,8 @@
 */
 #import <Foundation/Foundation.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 /*!
  @enum        SKNSkimNotesWritingOptions
  @abstract    Options for writing Skim notes.
@@ -69,7 +71,7 @@
     @param      outError If there is an error reading the Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     An array of dictionaries with Skim note properties, an empty 
array if no Skim notes were found, or <code>NULL</code> if there was an error 
reading the Skim notes.
 */
-- (NSArray *)readSkimNotesFromExtendedAttributesAtURL:(NSURL *)aURL 
error:(NSError **)outError;
+- (nullable NSArray *)readSkimNotesFromExtendedAttributesAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Reads text Skim notes as a string from the extended attributes 
of a file.
@@ -78,7 +80,7 @@
     @param      outError If there is an error reading the text Skim notes, 
upon return contains an <code>NSError</code> object that describes the problem.
     @result     A string representation of the Skim notes, an empty string if 
no text Skim notes were found, or <code>NULL</code> if there was an error 
reading the text Skim notes.
 */
-- (NSString *)readSkimTextNotesFromExtendedAttributesAtURL:(NSURL *)aURL 
error:(NSError **)outError;
+- (nullable NSString *)readSkimTextNotesFromExtendedAttributesAtURL:(NSURL 
*)aURL error:(NSError **)outError;
 
 /*!
     @abstract   Reads rich text Skim notes as RTF data from the extended 
attributes of a file.
@@ -87,7 +89,7 @@
     @param      outError If there is an error reading the RTF Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     <code>NSData</code> for an RTF representation of the Skim 
notes, an empty <code>NSData</code> object if no RTF Skim notes were found, or 
<code>NULL</code> if there was an error reading the RTF Skim notes.
 */
-- (NSData *)readSkimRTFNotesFromExtendedAttributesAtURL:(NSURL *)aURL 
error:(NSError **)outError;
+- (nullable NSData *)readSkimRTFNotesFromExtendedAttributesAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Reads Skim notes as an array of property dictionaries from the 
contents of a PDF bundle.
@@ -96,7 +98,7 @@
     @param      outError If there is an error reading the Skim notes, upon 
return contains an NSError object that describes the problem.
     @result     An array of dictionaries with Skim note properties, an empty 
array if no Skim notes were found, or <code>NULL</code> if there was an error 
reading the Skim notes.
 */
-- (NSArray *)readSkimNotesFromPDFBundleAtURL:(NSURL *)aURL error:(NSError 
**)outError;
+- (nullable NSArray *)readSkimNotesFromPDFBundleAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Reads text Skim notes as a string from the contents of a PDF 
bundle.
@@ -105,7 +107,7 @@
     @param      outError If there is an error reading the text Skim notes, 
upon return contains an <code>NSError</code> object that describes the problem.
     @result     A string representation of the Skim notes, an empty string if 
no text Skim notes were found, or <code>NULL</code> if there was an error 
reading the text Skim notes.
 */
-- (NSString *)readSkimTextNotesFromPDFBundleAtURL:(NSURL *)aURL error:(NSError 
**)outError;
+- (nullable NSString *)readSkimTextNotesFromPDFBundleAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Reads rich text Skim notes as RTF data from the contents of a 
PDF bundle.
@@ -114,7 +116,7 @@
     @param      outError If there is an error reading the RTF Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     <code>NSData</code> for an RTF representation of the Skim 
notes, an empty <code>NSData</code> object if no RTF Skim notes were found, or 
<code>NULL</code> if there was an error reading the RTF Skim notes.
 */
-- (NSData *)readSkimRTFNotesFromPDFBundleAtURL:(NSURL *)aURL error:(NSError 
**)outError;
+- (nullable NSData *)readSkimRTFNotesFromPDFBundleAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Reads Skim notes as an array of property dictionaries from the 
contents of a .skim file.
@@ -123,7 +125,7 @@
     @param      outError If there is an error reading the Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     An array of dictionaries with Skim note properties, an empty 
array if no Skim notes were found, or <code>NULL</code> if there was an error 
reading the Skim notes.
 */
-- (NSArray *)readSkimNotesFromSkimFileAtURL:(NSURL *)aURL error:(NSError 
**)outError;
+- (nullable NSArray *)readSkimNotesFromSkimFileAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Writes Skim notes passed as an array of property dictionaries 
to the extended attributes of a file, as well as a defaultrepresentation for 
text Skim notes and RTF Skim notes.
@@ -133,7 +135,7 @@
     @param      outError If there is an error writing the Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     Returns <code>YES</code> if writing out the Skim notes was 
successful; otherwise returns <code>NO</code>.
 */
-- (BOOL)writeSkimNotes:(NSArray *)notes toExtendedAttributesAtURL:(NSURL 
*)aURL error:(NSError **)outError;
+- (BOOL)writeSkimNotes:(nullable NSArray *)notes 
toExtendedAttributesAtURL:(NSURL *)aURL error:(NSError **)outError;
 
 /*!
     @abstract   Writes Skim notes passed as an array of property dictionaries 
to the extended attributes of a file, as well as text Skim notes and RTF Skim 
notes.  The array is converted to <code>NSData</code> using 
<code>NSKeyedArchiver</code>.
@@ -145,7 +147,7 @@
     @param      outError If there is an error writing the Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     Returns <code>YES</code> if writing out the Skim notes was 
successful; otherwise returns <code>NO</code>.
 */
-- (BOOL)writeSkimNotes:(NSArray *)notes textNotes:(NSString *)notesString 
richTextNotes:(NSData *)notesRTFData toExtendedAttributesAtURL:(NSURL *)aURL 
error:(NSError **)outError;
+- (BOOL)writeSkimNotes:(nullable NSArray *)notes textNotes:(nullable NSString 
*)notesString richTextNotes:(nullable NSData *)notesRTFData 
toExtendedAttributesAtURL:(NSURL *)aURL error:(NSError **)outError;
 
 /*!
  @abstract   Writes Skim notes passed as an array of property dictionaries to 
the extended attributes of a file, as well as text Skim notes and RTF Skim 
notes.  The array is converted to <code>NSData</code> using 
<code>NSKeyedArchiver</code> or as plist data, depending on the options.
@@ -158,7 +160,7 @@
  @param      outError If there is an error writing the Skim notes, upon return 
contains an <code>NSError</code> object that describes the problem.
  @result     Returns <code>YES</code> if writing out the Skim notes was 
successful; otherwise returns <code>NO</code>.
  */
-- (BOOL)writeSkimNotes:(NSArray *)notes textNotes:(NSString *)notesString 
richTextNotes:(NSData *)notesRTFData toExtendedAttributesAtURL:(NSURL *)aURL 
options:(SKNSkimNotesWritingOptions)options error:(NSError **)outError;
+- (BOOL)writeSkimNotes:(nullable NSArray *)notes textNotes:(nullable NSString 
*)notesString richTextNotes:(nullable NSData *)notesRTFData 
toExtendedAttributesAtURL:(NSURL *)aURL 
options:(SKNSkimNotesWritingOptions)options error:(NSError **)outError;
 
 /*!
     @abstract   Writes Skim notes passed as an array of property dictionaries 
to a .skim file.
@@ -168,7 +170,7 @@
     @param      outError If there is an error writing the Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     Returns <code>YES</code> if writing out the Skim notes was 
successful; otherwise returns <code>NO</code>.
 */
-- (BOOL)writeSkimNotes:(NSArray *)notes toSkimFileAtURL:(NSURL *)aURL 
error:(NSError **)outError;
+- (BOOL)writeSkimNotes:(nullable NSArray *)notes toSkimFileAtURL:(NSURL *)aURL 
error:(NSError **)outError;
 
 /*!
     @abstract   Writes Skim notes passed as an array of property dictionaries 
to a .skim file.  The array is converted to <code>NSData</code> using 
<code>NSKeyedArchiver</code> or as plist data, depending on the options.
@@ -179,7 +181,7 @@
     @param      outError If there is an error writing the Skim notes, upon 
return contains an <code>NSError</code> object that describes the problem.
     @result     Returns <code>YES</code> if writing out the Skim notes was 
successful; otherwise returns <code>NO</code>.
 */
-- (BOOL)writeSkimNotes:(NSArray *)notes toSkimFileAtURL:(NSURL *)aURL 
options:(SKNSkimNotesWritingOptions)options error:(NSError **)outError;
+- (BOOL)writeSkimNotes:(nullable NSArray *)notes toSkimFileAtURL:(NSURL *)aURL 
options:(SKNSkimNotesWritingOptions)options error:(NSError **)outError;
 
 /*!
     @abstract   Returns the file URL for the file of a given type inside a PDF 
bundle.
@@ -210,7 +212,7 @@
     @param      data The data object to extract the notes from, either an 
archive or plist data.
     @result     An array of dictionaries containing Skim notes properties.
 */
-extern NSArray *SKNSkimNotesFromData(NSData *data);
+extern NSArray * _Nullable SKNSkimNotesFromData(NSData * _Nullable data);
 
 /*!
     @abstract   Returns data for the Skim notes.
@@ -219,7 +221,7 @@
     @param      asPlist Whether to create universal plist data rather than 
archived data.  Always returns plist data on iOS.
     @result     A data representation of the notes.
 */
-extern NSData *SKNDataFromSkimNotes(NSArray *notes, BOOL asPlist);
+extern NSData * _Nullable SKNDataFromSkimNotes(NSArray * _Nullable notes, BOOL 
asPlist);
 
 /*!
     @abstract   Returns a string representation of Skim notes.
@@ -227,7 +229,7 @@
     @param      noteDicts An array of dictionaries containing Skim note 
properties, as returned by the properties of a <code>PDFAnnotation</code>.
     @result     A string representation of the notes.
 */
-extern NSString *SKNSkimTextNotes(NSArray *noteDicts);
+extern NSString * _Nullable SKNSkimTextNotes(NSArray * _Nullable noteDicts);
 
 /*!
     @abstract   Returns an RTF data representation of Skim notes.
@@ -235,4 +237,6 @@
     @param      noteDicts An array of dictionaries containing Skim note 
properties, as returned by the properties of a <code>PDFAnnotation</code>.
     @result     An RTF data representation of the notes.
 */
-extern NSData *SKNSkimRTFNotes(NSArray *noteDicts);
+extern NSData * _Nullable SKNSkimRTFNotes(NSArray * _Nullable noteDicts);
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/NSFileManager_SKNToolExtensions.h
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNToolExtensions.h   2023-12-03 10:41:47 UTC 
(rev 13821)
+++ trunk/SkimNotes/NSFileManager_SKNToolExtensions.h   2023-12-03 23:46:26 UTC 
(rev 13822)
@@ -38,6 +38,8 @@
 
 #import <Foundation/Foundation.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 enum {
     SKNNonSyncable = -1,
     SKNAnySyncable = 0,
@@ -47,11 +49,11 @@
 
 @interface NSFileManager (SKNToolExtensions)
 
-- (NSData *)SkimNotesAtPath:(NSString *)path error:(NSError **)outError;
-- (NSString *)SkimTextNotesAtPath:(NSString *)path error:(NSError **)outError;
-- (NSData *)SkimRTFNotesAtPath:(NSString *)path error:(NSError **)outError;
+- (nullable NSData *)SkimNotesAtPath:(NSString *)path error:(NSError 
**)outError;
+- (nullable NSString *)SkimTextNotesAtPath:(NSString *)path error:(NSError 
**)outError;
+- (nullable NSData *)SkimRTFNotesAtPath:(NSString *)path error:(NSError 
**)outError;
 
-- (BOOL)writeSkimNotes:(NSData *)notesData textNotes:(NSString *)textNotes 
RTFNotes:(NSData *)rtfNotesData atPath:(NSString *)path syncable:(BOOL)syncable 
error:(NSError **)outError;
+- (BOOL)writeSkimNotes:(nullable NSData *)notesData textNotes:(nullable 
NSString *)textNotes RTFNotes:(nullable NSData *)rtfNotesData atPath:(NSString 
*)path syncable:(BOOL)syncable error:(NSError **)outError;
 
 - (BOOL)removeSkimNotesAtPath:(NSString *)path error:(NSError **)outError;
 
@@ -58,3 +60,5 @@
 - (BOOL)hasSkimNotesAtPath:(NSString *)path syncable:(SKNSyncability)syncable;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.h       2023-12-03 10:41:47 UTC 
(rev 13821)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.h       2023-12-03 23:46:26 UTC 
(rev 13822)
@@ -44,6 +44,8 @@
 #import <Foundation/Foundation.h>
 #import <PDFKit/PDFKit.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 #ifndef PDFRect
 #define PDFRect NSRect
 #endif
@@ -265,7 +267,7 @@
     @param      bounds The bounding box of the annotation, in page space.
     @result     An initialized Skim note annotation instance, or 
<code>NULL</code> if the object could not be initialized.
 */
-- (id)initSkimNoteWithBounds:(NSRect)bounds;
+- (nullable id)initSkimNoteWithBounds:(NSRect)bounds;
 #endif
 
 /*!
@@ -275,7 +277,7 @@
     @param      type The type of the note .
     @result     An initialized Skim note annotation instance, or 
<code>NULL</code> if the object could not be initialized.
 */
-- (id)initSkimNoteWithBounds:(PDFRect)bounds forType:(NSString *)type;
+- (nullable id)initSkimNoteWithBounds:(PDFRect)bounds forType:(NSString *)type;
 
 /*!
     @abstract   Initializes a new Skim note annotation with the given 
properties.
@@ -283,7 +285,7 @@
     @param      dict A dictionary with Skim notes properties, as returned from 
properties.  This is required to contain values for <code>"type"</code> and 
<code>"bounds"</code>.
     @result     An initialized Skim note annotation instance, or 
<code>NULL</code> if the object could not be initialized.
 */
-- (id)initSkimNoteWithProperties:(NSDictionary *)dict;
+- (nullable id)initSkimNoteWithProperties:(NSDictionary *)dict;
 
 /*!
     @abstract   The Skim notes properties.
@@ -304,7 +306,7 @@
     @discussion By default, this is just the same as the contents.  However 
for <code>SKNPDFAnnotationNote</code> the contents will contain both string and 
text.  Normally you set this by setting the <code>content</code> property.
     @result     A string representing the string value associated with the 
annotation.
 */
-@property (nonatomic, retain) NSString *string;
+@property (nonatomic, strong, nullable) NSString *string;
 
 /*!
     @abstract   Method to get the points from a path of an Ink Skim note.
@@ -451,3 +453,5 @@
 @end
 
 #endif
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/PDFDocument_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/PDFDocument_SKNExtensions.h 2023-12-03 10:41:47 UTC (rev 
13821)
+++ trunk/SkimNotes/PDFDocument_SKNExtensions.h 2023-12-03 23:46:26 UTC (rev 
13822)
@@ -44,6 +44,7 @@
 #import <Foundation/Foundation.h>
 #import <PDFKit/PDFKit.h>
 
+NS_ASSUME_NONNULL_BEGIN
 
 /*!
     @category    
@@ -60,7 +61,7 @@
     @param      notes An array of <code>PDFAnnotation</code> objects 
initialized using the Skim note properties read from the extended attributes or 
bundled Skim file.
     @result     The initialized <code>PDFDocument</code>.
 */
-- (id)initWithURL:(NSURL *)url readSkimNotes:(NSArray **)notes;
+- (nullable id)initWithURL:(NSURL *)url readSkimNotes:(NSArray * _Nullable * 
_Nullable)notes;
 
 /*!
     @method     
@@ -69,6 +70,8 @@
     @param      noteDicts An array of dictionaries containing Skim note 
properties as returned by the properties of <code>PDFAnnotation</code> objects.
     @result     An array of <code>PDFAnnotation</code> objects initialized 
using the Skim note properties read from the extended attributes or bundled 
Skim file.
 */
-- (NSArray *)addSkimNotesWithProperties:(NSArray *)noteDicts;
+- (nullable NSArray *)addSkimNotesWithProperties:(NSArray *)noteDicts;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNAgentListener.h
===================================================================
--- trunk/SkimNotes/SKNAgentListener.h  2023-12-03 10:41:47 UTC (rev 13821)
+++ trunk/SkimNotes/SKNAgentListener.h  2023-12-03 23:46:26 UTC (rev 13822)
@@ -37,6 +37,7 @@
 
 #import <Foundation/Foundation.h>
 
+NS_ASSUME_NONNULL_BEGIN
 
 @interface SKNAgentListener : NSObject
 {
@@ -50,6 +51,8 @@
 #endif
 }
 
-- (id)initWithServerName:(NSString *)serverName xpc:(BOOL)isXPC;
+- (nullable id)initWithServerName:(nullable NSString *)serverName 
xpc:(BOOL)isXPC;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNAgentListenerProtocol.h
===================================================================
--- trunk/SkimNotes/SKNAgentListenerProtocol.h  2023-12-03 10:41:47 UTC (rev 
13821)
+++ trunk/SkimNotes/SKNAgentListenerProtocol.h  2023-12-03 23:46:26 UTC (rev 
13822)
@@ -35,10 +35,16 @@
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
 @protocol SKNAgentListenerProtocol
 
-- (bycopy NSData *)SkimNotesAtPath:(in bycopy NSString *)aFile;
-- (bycopy NSData *)RTFNotesAtPath:(in bycopy NSString *)aFile;
-- (bycopy NSData *)textNotesAtPath:(in bycopy NSString *)aFile 
encoding:(NSStringEncoding)encoding;
+- (bycopy nullable NSData *)SkimNotesAtPath:(in bycopy NSString *)aFile;
+- (bycopy nullable NSData *)RTFNotesAtPath:(in bycopy NSString *)aFile;
+- (bycopy nullable NSData *)textNotesAtPath:(in bycopy NSString *)aFile 
encoding:(NSStringEncoding)encoding;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNDocument.h
===================================================================
--- trunk/SkimNotes/SKNDocument.h       2023-12-03 10:41:47 UTC (rev 13821)
+++ trunk/SkimNotes/SKNDocument.h       2023-12-03 23:46:26 UTC (rev 13822)
@@ -39,6 +39,8 @@
 
 #import <Cocoa/Cocoa.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 // Uncomment one of these five #defines
 
 #define FrameworkSample
@@ -50,9 +52,11 @@
 @interface SKNDocument : NSDocument {
     NSArray *_notes;
 }
-@property (nonatomic, copy) NSArray *notes;
+@property (nonatomic, copy, nullable) NSArray *notes;
 @end
 
 
 @interface SKNPlusOneTransformer : NSValueTransformer
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNExtendedAttributeManager.h
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.h       2023-12-03 10:41:47 UTC 
(rev 13821)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.h       2023-12-03 23:46:26 UTC 
(rev 13822)
@@ -42,6 +42,8 @@
 */
 #import <Foundation/Foundation.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 /*!
     @enum        SKNXattrFlags 
     @abstract    Options for writing extended attributes.
@@ -128,7 +130,7 @@
     @param      prefix Defaults to <code>"net_sourceforge_skim-app"</code> for 
the shared instance.  If <code>nil</code>, the manager never splits attributes.
     @result     An initialized EA manager object.  This may be one of the 
shared managers.
 */
-- (id)initWithPrefix:(NSString *)prefix;
+- (id)initWithPrefix:(NSString * _Nullable)prefix;
 
 /*!
     @abstract   Return a list of extended attributes for the given file.
@@ -139,7 +141,7 @@
     @param      error Error object describing the error if <code>nil</code> 
was returned.
     @result     Array of strings or <code>nil</code> if an error occurred.
 */
-- (NSArray *)extendedAttributeNamesAtPath:(NSString *)path 
traverseLink:(BOOL)follow error:(NSError **)error;
+- (nullable NSArray *)extendedAttributeNamesAtPath:(NSString *)path 
traverseLink:(BOOL)follow error:(NSError **)error;
 
 /*!
     @abstract   Return the extended attribute named <code>attr</code> for a 
given file.
@@ -150,7 +152,7 @@
     @param      error Error object describing the error if <code>nil</code> 
was returned.
     @result     Data object representing the extended attribute or 
<code>nil</code> if an error occurred.
 */
-- (NSData *)extendedAttributeNamed:(NSString *)attr atPath:(NSString *)path 
traverseLink:(BOOL)follow error:(NSError **)error;
+- (nullable NSData *)extendedAttributeNamed:(NSString *)attr atPath:(NSString 
*)path traverseLink:(BOOL)follow error:(NSError **)error;
 
 /*!
     @abstract   Returns all extended attributes for the given file, each as an 
<code>NSData</code> object.
@@ -160,7 +162,7 @@
     @param      error Error object describing the error if <code>nil</code> 
was returned.
     @result     Dictionary of data objects as values and strings as key, or 
<code>nil</code> if an error occurred.
 */
-- (NSDictionary *)allExtendedAttributesAtPath:(NSString *)path 
traverseLink:(BOOL)follow error:(NSError **)error;
+- (nullable NSDictionary *)allExtendedAttributesAtPath:(NSString *)path 
traverseLink:(BOOL)follow error:(NSError **)error;
 
 /*!
     @abstract   Returns a property list using NSPropertyListSerialization.
@@ -171,7 +173,7 @@
     @param      error Error object describing the error if <code>nil</code> 
was returned.
     @result     A property list object <code>nil</code> if an error occurred.
 */
-- (id)propertyListFromExtendedAttributeNamed:(NSString *)attr atPath:(NSString 
*)path traverseLink:(BOOL)follow error:(NSError **)error;
+- (nullable id)propertyListFromExtendedAttributeNamed:(NSString *)attr 
atPath:(NSString *)path traverseLink:(BOOL)follow error:(NSError **)error;
 
 /*!
     @abstract   Sets the value of attribute named <code>attr</code> to 
<code>value</code>, which is an <code>NSData</code> object.
@@ -221,3 +223,5 @@
 - (BOOL)removeAllExtendedAttributesAtPath:(NSString *)path 
traverseLink:(BOOL)follow error:(NSError **)error;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNPDFAnnotationNote.h
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.h      2023-12-03 10:41:47 UTC (rev 
13821)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.h      2023-12-03 23:46:26 UTC (rev 
13822)
@@ -44,6 +44,8 @@
 #import <Foundation/Foundation.h>
 #import <PDFKit/PDFKit.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 #ifndef PDFKitPlatformImage
 #define PDFKitPlatformImage NSImage
 #endif
@@ -92,19 +94,19 @@
     @discussion This should give a short string value for the anchored note 
annotation.  Setting this updates the contents using 
<code>updateContents</code>.
     @result     A string representing the string value associated with the 
annotation.
 */
-@property (nonatomic, copy) NSString *string;
+@property (nonatomic, copy, nullable) NSString *string;
 
 /*!
     @abstract   The rich text of the annotation.
     @discussion This is the longer rich text contents of the anchored note 
annotation.  Setting this updates the contents using 
<code>updateContents</code>.
 */
-@property (nonatomic, copy) NSAttributedString *text;
+@property (nonatomic, copy, nullable) NSAttributedString *text;
 
 /*!
     @abstract   The image of the annotation.
     @discussion 
 */
-@property (nonatomic, retain) PDFKitPlatformImage *image;
+@property (nonatomic, strong, nullable) PDFKitPlatformImage *image;
 
 /*!
     @abstract   Synchronizes the contents of the annotation with the string 
and text.
@@ -113,3 +115,5 @@
 - (void)updateContents;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m      2023-12-03 10:41:47 UTC (rev 
13821)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m      2023-12-03 23:46:26 UTC (rev 
13822)
@@ -70,7 +70,7 @@
 
 @interface SKNPDFAnnotationNote ()
 @property (nonatomic, readonly) NSTextStorage *mutableText;
-@property (nonatomic, retain) NSArray *texts;
+@property (nonatomic, strong, nullable) NSArray *texts;
 @end
 
 #endif

Modified: trunk/SkimNotes/SKNSkimReader.h
===================================================================
--- trunk/SkimNotes/SKNSkimReader.h     2023-12-03 10:41:47 UTC (rev 13821)
+++ trunk/SkimNotes/SKNSkimReader.h     2023-12-03 23:46:26 UTC (rev 13822)
@@ -38,6 +38,7 @@
 
 #import <Cocoa/Cocoa.h>
 
+NS_ASSUME_NONNULL_BEGIN
 
 @interface SKNSkimReader : NSObject {
     NSString *_agentIdentifier;
@@ -51,10 +52,12 @@
 @property (class, nonatomic, readonly) SKNSkimReader *sharedReader;
 
 // this should only be set before any of the following calls is made
-@property (nonatomic, retain) NSString *agentIdentifier;
+@property (nonatomic, strong, nullable) NSString *agentIdentifier;
 
-- (NSData *)SkimNotesAtURL:(NSURL *)fileURL;
-- (NSData *)RTFNotesAtURL:(NSURL *)fileURL;
-- (NSString *)textNotesAtURL:(NSURL *)fileURL;
+- (nullable NSData *)SkimNotesAtURL:(NSURL *)fileURL;
+- (nullable NSData *)RTFNotesAtURL:(NSURL *)fileURL;
+- (nullable NSString *)textNotesAtURL:(NSURL *)fileURL;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNUtilities.h
===================================================================
--- trunk/SkimNotes/SKNUtilities.h      2023-12-03 10:41:47 UTC (rev 13821)
+++ trunk/SkimNotes/SKNUtilities.h      2023-12-03 23:46:26 UTC (rev 13822)
@@ -38,6 +38,8 @@
 
 #import <Foundation/Foundation.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 #define SKIM_NOTES_KEY      @"net_sourceforge_skim-app_notes"
 #define SKIM_RTF_NOTES_KEY  @"net_sourceforge_skim-app_rtf_notes"
 #define SKIM_TEXT_NOTES_KEY @"net_sourceforge_skim-app_text_notes"
@@ -50,8 +52,10 @@
 #define RTF_EXTENSION   @"rtf"
 #define FDF_EXTENSION   @"fdf"
 
-extern NSString *SKNSkimTextNotes(NSArray *noteDicts);
-extern NSData *SKNSkimRTFNotes(NSArray *noteDicts);
+extern NSString * _Nullable SKNSkimTextNotes(NSArray * _Nullable noteDicts);
+extern NSData * _Nullable SKNSkimRTFNotes(NSArray * _Nullable noteDicts);
 
-extern NSArray *SKNSkimNotesFromData(NSData *data);
-extern NSData *SKNDataFromSkimNotes(NSArray *noteDicts, BOOL asPlist);
+extern NSArray * _Nullable SKNSkimNotesFromData(NSData * _Nullable data);
+extern NSData * _Nullable SKNDataFromSkimNotes(NSArray * _Nullable noteDicts, 
BOOL asPlist);
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNXPCAgentListenerProtocol.h
===================================================================
--- trunk/SkimNotes/SKNXPCAgentListenerProtocol.h       2023-12-03 10:41:47 UTC 
(rev 13821)
+++ trunk/SkimNotes/SKNXPCAgentListenerProtocol.h       2023-12-03 23:46:26 UTC 
(rev 13822)
@@ -36,10 +36,16 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
 @protocol SKNXPCAgentListenerProtocol
 
-- (void)readSkimNotesAtURL:(NSURL *)aURL reply:(void (^)(NSData *))reply;
-- (void)readRTFNotesAtURL:(NSURL *)aURL reply:(void (^)(NSData *))reply;
-- (void)readTextNotesAtURL:(NSURL *)aURL reply:(void (^)(NSString *))reply;
+- (void)readSkimNotesAtURL:(NSURL *)aURL reply:(void (^)(NSData * 
_Nullable))reply;
+- (void)readRTFNotesAtURL:(NSURL *)aURL reply:(void (^)(NSData * 
_Nullable))reply;
+- (void)readTextNotesAtURL:(NSURL *)aURL reply:(void (^)(NSString * 
_Nullable))reply;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SKNXPCSkimReader.h
===================================================================
--- trunk/SkimNotes/SKNXPCSkimReader.h  2023-12-03 10:41:47 UTC (rev 13821)
+++ trunk/SkimNotes/SKNXPCSkimReader.h  2023-12-03 23:46:26 UTC (rev 13822)
@@ -38,6 +38,7 @@
 
 #import <Cocoa/Cocoa.h>
 
+NS_ASSUME_NONNULL_BEGIN
 
 @interface SKNXPCSkimReader : NSObject {
     NSString *_agentIdentifier;
@@ -49,18 +50,20 @@
 @property (class, nonatomic, readonly) SKNXPCSkimReader *sharedReader;
 
 // this should only be set before any of the following calls is made
-@property (nonatomic, retain) NSString *agentIdentifier;
+@property (nonatomic, strong, nullable) NSString *agentIdentifier;
 
 // should use either the synchronous or the asynchronous methods, not both
 
 // synchronous retrieval
-- (NSData *)SkimNotesAtURL:(NSURL *)fileURL;
-- (NSData *)RTFNotesAtURL:(NSURL *)fileURL;
-- (NSString *)textNotesAtURL:(NSURL *)fileURL;
+- (nullable NSData *)SkimNotesAtURL:(NSURL *)fileURL;
+- (nullable NSData *)RTFNotesAtURL:(NSURL *)fileURL;
+- (nullable NSString *)textNotesAtURL:(NSURL *)fileURL;
 
 // asynchronous retrieval
-- (void)readSkimNotesAtURL:(NSURL *)fileURL reply:(void (^)(NSData *))reply;
-- (void)readRTFNotesAtURL:(NSURL *)fileURL reply:(void (^)(NSData *))reply;
-- (void)readTextNotesAtURL:(NSURL *)fileURL reply:(void (^)(NSString *))reply;
+- (void)readSkimNotesAtURL:(NSURL *)fileURL reply:(void (^)(NSData * 
_Nullable))reply;
+- (void)readRTFNotesAtURL:(NSURL *)fileURL reply:(void (^)(NSData * 
_Nullable))reply;
+- (void)readTextNotesAtURL:(NSURL *)fileURL reply:(void (^)(NSString * 
_Nullable))reply;
 
 @end
+
+NS_ASSUME_NONNULL_END

Modified: trunk/SkimNotes/SkimNotes.rtf
===================================================================
--- trunk/SkimNotes/SkimNotes.rtf       2023-12-03 10:41:47 UTC (rev 13821)
+++ trunk/SkimNotes/SkimNotes.rtf       2023-12-03 23:46:26 UTC (rev 13822)
@@ -170,7 +170,7 @@
 
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
 
 \f1\fs24 \cf0 \CocoaLigature1 \
-The code does not support deployment targets lower than 10.6 currently.\
+The code does not support deployment targets lower than 10.6 currently.  When 
building using older Xcode versions, also the nullability qualifiers and macros 
in the headers may have to be removed.\
 \
 Also you may want to support older architectures by changing the 
 \f3\fs22 \CocoaLigature0 ARCHS

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to