CPDFCompareResults.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // CPDFCompareResults.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import <ComPDFKit/CPDFKitPlatform.h>
  13. typedef NS_ENUM(NSInteger, CPDFCompareResultType) {
  14. CPDFCompareResultTypeNone = 0,
  15. CPDFCompareResultTypeDelete,
  16. CPDFCompareResultTypeInsert,
  17. CPDFCompareResultTypeReplace,
  18. CPDFCompareResultTypeChange,
  19. };
  20. @interface CPDFCompareResult : NSObject
  21. /**
  22. * Gets the type of a result of comparing content.
  23. */
  24. - (CPDFCompareResultType)type;
  25. /**
  26. * Gets a page index that compares the contents of the old document.
  27. */
  28. - (NSInteger)oldPageIndex;
  29. /**
  30. * Gets a page index that compares the contents of the new document.
  31. */
  32. - (NSInteger)newPageIndex;
  33. /**
  34. * Gets the page range of the old document content comparison results.
  35. */
  36. - (CGRect)oldBounds;
  37. /**
  38. * Gets the page range of the new document content comparison results.
  39. */
  40. - (CGRect)newBounds;
  41. @end
  42. @interface CPDFCompareResults : NSObject
  43. /**
  44. * Gets an array of results for all text compared in the document version.
  45. */
  46. - (NSArray <CPDFCompareResult *>*)textResults;
  47. /**
  48. * Gets an array of results for all image compared in the document version.
  49. */
  50. - (NSArray <CPDFCompareResult *>*)imageResults;
  51. /**
  52. * Gets the count of removal.
  53. */
  54. - (NSInteger)deleteCount;
  55. /**
  56. * Gets the count of insert.
  57. */
  58. - (NSInteger)insertCount;
  59. /**
  60. * Gets the count of replacement.
  61. */
  62. - (NSInteger)replaceCount;
  63. @end