<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextServerManager" inherits="Object" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		A singleton for managing [TextServer] implementations.
	</brief_description>
	<description>
		[TextServerManager] is the API backend for loading, enumerating, and switching [TextServer]s.
		[b]Note:[/b] Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="add_interface">
			<return type="void" />
			<param index="0" name="interface" type="TextServer" />
			<description>
				Registers a [TextServer] interface.
			</description>
		</method>
		<method name="find_interface" qualifiers="const">
			<return type="TextServer" />
			<param index="0" name="name" type="String" />
			<description>
				Finds an interface by its [param name].
			</description>
		</method>
		<method name="get_interface" qualifiers="const">
			<return type="TextServer" />
			<param index="0" name="idx" type="int" />
			<description>
				Returns the interface registered at a given index.
			</description>
		</method>
		<method name="get_interface_count" qualifiers="const">
			<return type="int" />
			<description>
				Returns the number of interfaces currently registered.
			</description>
		</method>
		<method name="get_interfaces" qualifiers="const">
			<return type="Dictionary[]" />
			<description>
				Returns a list of available interfaces, with the index and name of each interface.
			</description>
		</method>
		<method name="get_primary_interface" qualifiers="const">
			<return type="TextServer" />
			<description>
				Returns the primary [TextServer] interface currently in use.
			</description>
		</method>
		<method name="remove_interface">
			<return type="void" />
			<param index="0" name="interface" type="TextServer" />
			<description>
				Removes an interface. All fonts and shaped text caches should be freed before removing an interface.
			</description>
		</method>
		<method name="set_primary_interface">
			<return type="void" />
			<param index="0" name="index" type="TextServer" />
			<description>
				Sets the primary [TextServer] interface.
			</description>
		</method>
	</methods>
	<signals>
		<signal name="interface_added">
			<param index="0" name="interface_name" type="StringName" />
			<description>
				Emitted when a new interface has been added.
			</description>
		</signal>
		<signal name="interface_removed">
			<param index="0" name="interface_name" type="StringName" />
			<description>
				Emitted when an interface is removed.
			</description>
		</signal>
	</signals>
</class>
