mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
26 lines
1.3 KiB
Swift
26 lines
1.3 KiB
Swift
import Foundation
|
|
import UIKit
|
|
import Postbox
|
|
import TelegramCore
|
|
import AsyncDisplayKit
|
|
import TelegramPresentationData
|
|
import TelegramUIPreferences
|
|
import AccountContext
|
|
import ContextUI
|
|
|
|
protocol InstantPageItem {
|
|
var frame: CGRect { get set }
|
|
var wantsNode: Bool { get }
|
|
var medias: [InstantPageMedia] { get }
|
|
var separatesTiles: Bool { get }
|
|
|
|
func matchesAnchor(_ anchor: String) -> Bool
|
|
func drawInTile(context: CGContext)
|
|
func node(context: AccountContext, strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, theme: InstantPageTheme, sourcePeerType: MediaAutoDownloadPeerType, openMedia: @escaping (InstantPageMedia) -> Void, longPressMedia: @escaping (InstantPageMedia) -> Void, activatePinchPreview: ((PinchSourceContainerNode) -> Void)?, pinchPreviewFinished: ((InstantPageNode) -> Void)?, openPeer: @escaping (EnginePeer) -> Void, openUrl: @escaping (InstantPageUrlItem) -> Void, updateWebEmbedHeight: @escaping (CGFloat) -> Void, updateDetailsExpanded: @escaping (Bool) -> Void, currentExpandedDetails: [Int : Bool]?) -> InstantPageNode?
|
|
func matchesNode(_ node: InstantPageNode) -> Bool
|
|
func linkSelectionRects(at point: CGPoint) -> [CGRect]
|
|
|
|
func distanceThresholdGroup() -> Int?
|
|
func distanceThresholdWithGroupCount(_ count: Int) -> CGFloat
|
|
}
|