ReadViewSDK/Sources/RDEpubReaderView/EPUBUI/RDEPUBReaderToolViewProtocols.swift
shenlei d7fcda345d refactor: rename RDReaderView -> RDEpubReaderView, update pod config and docs
- Rename source module from RDReaderView to RDEpubReaderView
- Move all source files from Sources/RDReaderView/ to Sources/RDEpubReaderView/
- Update podspec: RDReaderView.podspec -> RDEpubReaderView.podspec
- Update Podfile, demo project, and CocoaPods config for new pod name
- Delete old RDReaderView pod support files from ReadViewDemo/Pods
- Add new RDEpubReaderView pod support files
- Update documentation (API ref, architecture, UML, conventions, etc.)
- Add FixedLayoutRotationTests
- Update .gitignore: exclude .DS_Store, manual unpack backups, _ssoft-output
2026-07-10 19:44:53 +09:00

70 lines
2.3 KiB
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import UIKit
/// 宿
/// `RDEPUBReaderTopToolView`
/// `RDEPUBReaderDependencies.makeTopToolView`
public protocol RDEPUBReaderTopToolViewProtocol: AnyObject {
/// /
var onBack: (() -> Void)? { get set }
///
var onSearch: (() -> Void)? { get set }
///
var onToggleBookmark: (() -> Void)? { get set }
///
func apply(theme: RDEPUBReaderTheme)
///
func setTitle(_ title: String?)
///
func setBookmarkEnabled(_ isEnabled: Bool)
///
func setBookmarkSelected(_ isSelected: Bool)
}
/// 宿 `RDEPUBReaderBottomToolView`
/// `RDEPUBReaderDependencies.makeBottomToolView`
public protocol RDEPUBReaderBottomToolViewProtocol: AnyObject {
///
var onShowTableOfContents: (() -> Void)? { get set }
///
var onShowBookmarks: (() -> Void)? { get set }
///
var onShowHighlights: (() -> Void)? { get set }
/// /
var onAddHighlight: (() -> Void)? { get set }
///
var onShowSettings: (() -> Void)? { get set }
///
func apply(theme: RDEPUBReaderTheme)
///
func updateVisibility(showsTableOfContents: Bool, allowsHighlights: Bool, showsSettingsPanel: Bool)
///
func setBookmarksEnabled(_ isEnabled: Bool)
///
func setAddHighlightEnabled(_ isEnabled: Bool)
///
func setHighlightsEnabled(_ isEnabled: Bool)
}
/// UIView
public typealias RDEPUBReaderTopToolViewProviding = UIView & RDEPUBReaderTopToolViewProtocol
/// UIView
public typealias RDEPUBReaderBottomToolViewProviding = UIView & RDEPUBReaderBottomToolViewProtocol