refactor: split reader architecture and chrome handling
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
// MARK: - 分页接口定义
|
||||
|
||||
struct RDEPUBPageBreakDecision {
|
||||
var range: NSRange
|
||||
var reason: RDEPUBTextPageBreakReason
|
||||
var diagnostics: [String]
|
||||
}
|
||||
|
||||
protocol RDEPUBChapterPageCounting {
|
||||
func pageRanges(
|
||||
for attributedString: NSAttributedString,
|
||||
pageSize: CGSize,
|
||||
config: RDEPUBTextLayoutConfig,
|
||||
fragmentOffsets: [String: Int]
|
||||
) -> [RDEPUBPageBreakDecision]
|
||||
}
|
||||
|
||||
protocol RDEPUBPageFrameBuilding {
|
||||
func makeFrames(
|
||||
attributedString: NSAttributedString,
|
||||
pageSize: CGSize,
|
||||
config: RDEPUBTextLayoutConfig,
|
||||
fragmentOffsets: [String: Int]
|
||||
) -> [RDEPUBTextLayoutFrame]
|
||||
}
|
||||
Reference in New Issue
Block a user