Skip to content
0.2.0-dev Download ZIP
81 lines ·2.8 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="TextServerManager" inherits="Object" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A singleton for managing [TextServer] implementations.
5 </brief_description>
6 <description>
7 [TextServerManager] is the API backend for loading, enumerating, and switching [TextServer]s.
8 [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.
9 </description>
10 <tutorials>
11 </tutorials>
12 <methods>
13 <method name="add_interface">
14 <return type="void" />
15 <param index="0" name="interface" type="TextServer" />
16 <description>
17 Registers a [TextServer] interface.
18 </description>
19 </method>
20 <method name="find_interface" qualifiers="const">
21 <return type="TextServer" />
22 <param index="0" name="name" type="String" />
23 <description>
24 Finds an interface by its [param name].
25 </description>
26 </method>
27 <method name="get_interface" qualifiers="const">
28 <return type="TextServer" />
29 <param index="0" name="idx" type="int" />
30 <description>
31 Returns the interface registered at a given index.
32 </description>
33 </method>
34 <method name="get_interface_count" qualifiers="const">
35 <return type="int" />
36 <description>
37 Returns the number of interfaces currently registered.
38 </description>
39 </method>
40 <method name="get_interfaces" qualifiers="const">
41 <return type="Dictionary[]" />
42 <description>
43 Returns a list of available interfaces, with the index and name of each interface.
44 </description>
45 </method>
46 <method name="get_primary_interface" qualifiers="const">
47 <return type="TextServer" />
48 <description>
49 Returns the primary [TextServer] interface currently in use.
50 </description>
51 </method>
52 <method name="remove_interface">
53 <return type="void" />
54 <param index="0" name="interface" type="TextServer" />
55 <description>
56 Removes an interface. All fonts and shaped text caches should be freed before removing an interface.
57 </description>
58 </method>
59 <method name="set_primary_interface">
60 <return type="void" />
61 <param index="0" name="index" type="TextServer" />
62 <description>
63 Sets the primary [TextServer] interface.
64 </description>
65 </method>
66 </methods>
67 <signals>
68 <signal name="interface_added">
69 <param index="0" name="interface_name" type="StringName" />
70 <description>
71 Emitted when a new interface has been added.
72 </description>
73 </signal>
74 <signal name="interface_removed">
75 <param index="0" name="interface_name" type="StringName" />
76 <description>
77 Emitted when an interface is removed.
78 </description>
79 </signal>
80 </signals>
81</class>