Skip to content
com.emacsos.zero.ZeroPinyinService1.ZeroPinyinServiceInterface.xml 2.99 KiB
Newer Older
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" >
<node>
  <interface name="com.emacsos.zero.ZeroPinyinService1.ZeroPinyinServiceInterface">
    <!--
	GetCandidatesV2:

	Difference to GetCandidates: A fuzzy_flag param is added.

	@preedit_str: the preedit string
	@fetch_size: how many candidates to fetch
	@fuzzy_flag: fuzzy flag when matching candidate
	             0 0b0 no fuzzy matching
	             1 0b1 enable fuzzy match on z<->zh, c<->ch, s<->sh
	             2 0b10 enable fuzzy match on l<->n
	             fuzzy flag numbers can be combined with bit or.
	@candidates: the candidates
	@matched_preedit_str_lengths: the matched str length in preedit str for
	                              each candidate

	Get candidates for a preedit string. This method will fetch at least
	fetch_size candidates if they exists. However, this method is allowed to
	return more candidates than fetch_size.

    -->
    <method name="GetCandidatesV2">
      <arg type="s" name="preedit_str"/>
      <arg type="u" name="fetch_size"/>
      <arg type="u" name="fuzzy_flag"/>
      <arg type="as" name="candidates" direction="out"/>
      <arg type="au" name="matched_preedit_str_lengths" direction="out"/>
      <arg type="aa(ii)" name="candidates_pinyin_indices" direction="out"/>
    </method>
    <!--
	GetCandidates:
	@preedit_str: the preedit string
	@fetch_size: how many candidates to fetch
	@candidates: the candidates
	@matched_preedit_str_lengths: the matched str length in preedit str for
	                              each candidate

	Get candidates for a preedit string. This method will fetch at least
	fetch_size candidates if they exists. However, this method is allowed to
	return more candidates than fetch_size.

    -->
    <method name="GetCandidates">
      <arg type="s" name="preedit_str"/>
      <arg type="u" name="fetch_size"/>
      <arg type="as" name="candidates" direction="out"/>
      <arg type="au" name="matched_preedit_str_lengths" direction="out"/>
      <arg type="aa(ii)" name="candidates_pinyin_indices" direction="out"/>
    </method>

    <!-- CommitCandidate

	 @candidate: the candidate user committed
	 @candidate_pinyin_indices: the corresponding element in GetCandidates
	                            candidates_pinyin_indices out param.

	 This will allow zero-pinyin-service to add candidate to user db and
	 revert DeleteCandidate effect.
    -->
    <method name="CommitCandidate">
      <arg type="s" name="candidate"/>
      <arg type="a(ii)" name="candidate_pinyin_indices"/>
    <!-- DeleteCandidate

	 @candidate: the candidate to delete.

	 This will make given candidate disappear for current user in future
	 typing. delete single character is not allowed. it will be a no-op.
    -->
    <method name="DeleteCandidate">
      <arg type="s" name="candidate"/>
    </method>

    <method name="Quit"/>

    <annotation name="org.gtk.GDBus.C.Name" value="ZeroPinyinService"/>
  </interface>
</node>