<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://fcitx-im.org/index.php?action=history&amp;feed=atom&amp;title=Translations%3ADevelop_an_simple_input_method%2F56%2Fzh-cn</id>
	<title>Translations:Develop an simple input method/56/zh-cn - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://fcitx-im.org/index.php?action=history&amp;feed=atom&amp;title=Translations%3ADevelop_an_simple_input_method%2F56%2Fzh-cn"/>
	<link rel="alternate" type="text/html" href="https://fcitx-im.org/index.php?title=Translations:Develop_an_simple_input_method/56/zh-cn&amp;action=history"/>
	<updated>2026-05-03T16:43:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://fcitx-im.org/index.php?title=Translations:Develop_an_simple_input_method/56/zh-cn&amp;diff=45734&amp;oldid=prev</id>
		<title>Matrikslee: Created page with &quot;== 存储不同输入上下文的状态 == Fcitx 允许不同的输入上下文保持不同的状态。状态通常是指部分类型化的文本和所有其他关联的数据...&quot;</title>
		<link rel="alternate" type="text/html" href="https://fcitx-im.org/index.php?title=Translations:Develop_an_simple_input_method/56/zh-cn&amp;diff=45734&amp;oldid=prev"/>
		<updated>2023-04-19T03:38:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 存储不同输入上下文的状态 == Fcitx 允许不同的输入上下文保持不同的状态。状态通常是指部分类型化的文本和所有其他关联的数据...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 存储不同输入上下文的状态 ==&lt;br /&gt;
Fcitx 允许不同的输入上下文保持不同的状态。状态通常是指部分类型化的文本和所有其他关联的数据结构。在这个区位码的例子里面，状态是用户已经输入的数字。为了表示这一点，Fcitx 提供了一个方便的类 [https://codedocs.xyz/fcitx/fcitx5/classfcitx_1_1InputBuffer.html InputBuffer] 让输入法引擎可以便捷地使用这个类来编辑内部状态。为了在构造输入上下文时自动构造状态，Fcitx 提供了一个名为 InputContextProperty 的框架。为了使用它，您首先需要通过 registerProperty 向 [https://codedocs.xyz/fcitx/fcitx5/classfcitx_1_1InputContextManager.html InputContextManager] 注册一个工厂类。每个属性都需要有一个全局唯一的名称。  名称可以是人类可以理解的东西。在这个区位码的例子里面，我使用的是“quweiState”。使用更好的名称的好处是，以防万一您正在开发一些交叉插件（另一个插件需要访问该插件的某些内部状态），您可以使用这个通用名称将其加载到不同的插件中。如果您不需要从外部访问，那么名称并不重要。&lt;/div&gt;</summary>
		<author><name>Matrikslee</name></author>
	</entry>
</feed>