Swiftgram/TelegramUI/InstantPageItem.swift
2017-09-05 21:27:04 +03:00

19 lines
706 B
Swift

import Foundation
import Postbox
import TelegramCore
protocol InstantPageItem {
var frame: CGRect { get set }
var wantsNode: Bool { get }
var medias: [InstantPageMedia] { get }
func matchesAnchor(_ anchor: String) -> Bool
func drawInTile(context: CGContext)
func node(account: Account, strings: PresentationStrings, theme: InstantPageTheme, openMedia: @escaping (InstantPageMedia) -> Void, openPeer: @escaping (PeerId) -> Void) -> InstantPageNode?
func matchesNode(_ node: InstantPageNode) -> Bool
func linkSelectionRects(at point: CGPoint) -> [CGRect]
func distanceThresholdGroup() -> Int?
func distanceThresholdWithGroupCount(_ count: Int) -> CGFloat
}