2023-04-16 17:23:13 +00:00
|
|
|
//
|
|
|
|
// ComposeInput.swift
|
|
|
|
// ComposeUI
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 3/5/23.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import Combine
|
2023-05-05 14:13:20 +00:00
|
|
|
import UIKit
|
2023-04-16 17:23:13 +00:00
|
|
|
|
|
|
|
protocol ComposeInput: AnyObject, ObservableObject {
|
|
|
|
var toolbarElements: [ToolbarElement] { get }
|
2023-05-05 14:13:20 +00:00
|
|
|
var textInputMode: UITextInputMode? { get }
|
2023-04-16 17:23:13 +00:00
|
|
|
|
|
|
|
var autocompleteState: AutocompleteState? { get }
|
|
|
|
var autocompleteStatePublisher: Published<AutocompleteState?>.Publisher { get }
|
|
|
|
|
|
|
|
func autocomplete(with string: String)
|
|
|
|
|
|
|
|
func applyFormat(_ format: StatusFormat)
|
|
|
|
|
|
|
|
func beginAutocompletingEmoji()
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ToolbarElement {
|
|
|
|
case emojiPicker
|
|
|
|
case formattingButtons
|
|
|
|
}
|