forked from shadowfacts/Tusker
30 lines
640 B
Swift
30 lines
640 B
Swift
//
|
|
// ComposeInput.swift
|
|
// ComposeUI
|
|
//
|
|
// Created by Shadowfacts on 3/5/23.
|
|
//
|
|
|
|
import Foundation
|
|
import Combine
|
|
import UIKit
|
|
|
|
protocol ComposeInput: AnyObject, ObservableObject {
|
|
var toolbarElements: [ToolbarElement] { get }
|
|
var textInputMode: UITextInputMode? { get }
|
|
|
|
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
|
|
}
|