📄 atktext.xml
字号:
is from the word end before the offset to the word end at or after theoffset.</para><para>The returned string will contain the word at the offset if the offsetis inside a word and will contain the word after to the offset if the offset is not inside a word.</para><para>If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returnedstring is from the sentence start at or before the offset to the sentencestart after the offset.</para><para>The returned string will contain the sentence at the offset if the offsetis inside a sentence and will contain the sentence before the offset if the offset is not inside a sentence.</para><para>If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned stringis from the sentence end before the offset to the sentence end at orafter the offset.</para><para>The returned string will contain the sentence at the offset if the offsetis inside a sentence and will contain the sentence after the offset if the offset is not inside a sentence.</para><para>If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returnedstring is from the line start at or before the offset to the linestart after the offset.</para><para>If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned stringis from the line end before the offset to the line end at or afterthe offset.</para><para></para><variablelist role="params"><varlistentry><term><parameter>text</parameter> :</term><listitem><simpara> an <link linkend="AtkText"><type>AtkText</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>offset</parameter> :</term><listitem><simpara> position</simpara></listitem></varlistentry><varlistentry><term><parameter>boundary_type</parameter> :</term><listitem><simpara> An <link linkend="AtkTextBoundary"><type>AtkTextBoundary</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>start_offset</parameter> :</term><listitem><simpara> the start offset of the returned string</simpara></listitem></varlistentry><varlistentry><term><parameter>end_offset</parameter> :</term><listitem><simpara> the offset of the first character after the returned substring</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the text at <parameter>offset</parameter> bounded by the specified <parameter>boundary_type</parameter>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-text-get-text-before-offset" role="function"><title>atk_text_get_text_before_offset ()</title><indexterm zone="atk-text-get-text-before-offset"><primary>atk_text_get_text_before_offset</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* atk_text_get_text_before_offset (<link linkend="AtkText">AtkText</link> *text, <link linkend="gint">gint</link> offset, <link linkend="AtkTextBoundary">AtkTextBoundary</link> boundary_type, <link linkend="gint">gint</link> *start_offset, <link linkend="gint">gint</link> *end_offset);</programlisting><para>Gets the specified text.</para><para>If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character before theoffset is returned.</para><para>If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned stringis from the word start before the word start before the offset to the word start before the offset.</para><para>The returned string will contain the word before the offset if the offsetis inside a word and will contain the word before the word before the offset if the offset is not inside a word.</para><para>If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned stringis from the word end before the word end at or before the offset to the word end at or before the offset.</para><para>The returned string will contain the word before the offset if the offsetis inside a word or if the offset is not inside a word.</para><para>If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returnedstring is from the sentence start before the sentence start before the offset to the sentence start before the offset.</para><para>The returned string will contain the sentence before the offset if the offset is inside a sentence and will contain the sentence before the sentence before the offset if the offset is not inside a sentence.</para><para>If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned stringis from the sentence end before the sentence end at or before the offset to the sentence end at or before the offset.</para><para>The returned string will contain the sentence before the offset if the offset is inside a sentence or if the offset is not inside a sentence.</para><para>If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returnedstring is from the line start before the line start ar or before the offset to the line start ar or before the offset.</para><para>If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned stringis from the line end before the line end before the offset to the line end before the offset.</para><para></para><variablelist role="params"><varlistentry><term><parameter>text</parameter> :</term><listitem><simpara> an <link linkend="AtkText"><type>AtkText</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>offset</parameter> :</term><listitem><simpara> position</simpara></listitem></varlistentry><varlistentry><term><parameter>boundary_type</parameter> :</term><listitem><simpara> An <link linkend="AtkTextBoundary"><type>AtkTextBoundary</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>start_offset</parameter> :</term><listitem><simpara> the start offset of the returned string</simpara></listitem></varlistentry><varlistentry><term><parameter>end_offset</parameter> :</term><listitem><simpara> the offset of the first character after the returned substring</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the text before <parameter>offset</parameter> bounded by the specified <parameter>boundary_type</parameter>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-text-get-caret-offset" role="function"><title>atk_text_get_caret_offset ()</title><indexterm zone="atk-text-get-caret-offset"><primary>atk_text_get_caret_offset</primary></indexterm><programlisting><link linkend="gint">gint</link> atk_text_get_caret_offset (<link linkend="AtkText">AtkText</link> *text);</programlisting><para>Gets the offset position of the caret (cursor).</para><para></para><variablelist role="params"><varlistentry><term><parameter>text</parameter> :</term><listitem><simpara> an <link linkend="AtkText"><type>AtkText</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the offset position of the caret (cursor).</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-text-get-character-extents" role="function"><title>atk_text_get_character_extents ()</title><indexterm zone="atk-text-get-character-extents"><primary>atk_text_get_character_extents</primary></indexterm><programlisting><link linkend="void">void</link> atk_text_get_character_extents (<link linkend="AtkText">AtkText</link> *text, <link linkend="gint">gint</link> offset, <link linkend="gint">gint</link> *x, <link linkend="gint">gint</link> *y, <link linkend="gint">gint</link> *width, <link linkend="gint">gint</link> *height, <link linkend="AtkCoordType">AtkCoordType</link> coords);</programlisting><para>Get the bounding box containing the glyph representing the character at a particular text offset.</para><para></para><variablelist role="params"><varlistentry><term><parameter>text</parameter> :</term><listitem><simpara> an <link linkend="AtkText"><type>AtkText</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>offset</parameter> :</term><listitem><simpara> The offset of the text character for which bounding information is required.</simpara></listitem></varlistentry><varlistentry><term><parameter>x</parameter> :</term><listitem><simpara> Pointer for the x cordinate of the bounding box</simpara></listitem></varlistentry><varlistentry><term><parameter>y</parameter> :</term><listitem><simpara> Pointer for the y cordinate of the bounding box</simpara></listitem></varlistentry><varlistentry><term><parameter>width</parameter> :</term><listitem><simpara> Pointer for the width of the bounding box</simpara></listitem></varlistentry><varlistentry><term><parameter>height</parameter> :</term><listitem><simpara> Pointer for the height of the bounding box</simpara></listitem></varlistentry><varlistentry><term><parameter>coords</parameter> :</term><listitem><simpara> specify whether coordinates are relative to the screen or widget window </simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-text-get-run-attributes" role="function"><title>atk_text_get_run_attributes ()</title><indexterm zone="atk-text-get-run-attributes"><primary>atk_text_get_run_attributes</primary></indexterm><programlisting><link linkend="AtkAttributeSet">AtkAttributeSet</link>* atk_text_get_run_attributes (<link linkend="AtkText">AtkText</link> *text, <link linkend="gint">gint</link> offset, <link linkend="gint">gint</link> *start_offset, <link linkend="gint">gint</link> *end_offset);</programlisting><para>Creates an <link linkend="AtkAttributeSet"><type>AtkAttributeSet</type></link> which consists of the attributes explicitlyset at the position <parameter>offset</parameter> in the text. <parameter>start_offset</parameter> and <parameter>end_offset</parameter> areset to the start and end of the range around <parameter>offset</parameter> where the attributes areinvariant. Note that <parameter>end_offset</parameter> is the offset of the first characterafter the range. See the enum AtkTextAttribute for types of text attributes that can be returned. Note that other attributes may also be returned.</para><para></para><variablelist role="params"><varlistentry><term><parameter>text</parameter> :</term><listitem><simpara> an <link linkend="AtkText"><type>AtkText</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>offset</parameter> :</term><listitem><simpara> the offset at which to get the attributes</simpara></listitem></varlistentry><varlistentry><term><parameter>start_offset</parameter> :</term><listitem><simpara> the address to put the start offset of the range</simpara></listitem></varlistentry><varlistentry><term><parameter>end_offset</parameter> :</term><listitem><simpara> the address to put the end offset of the range</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="AtkAttributeSet"><type>AtkAttributeSet</type></link> which contains the attributes explicitly setat <parameter>offset</parameter>. This <link linkend="AtkAttributeSet"><type>AtkAttributeSet</type></link> should be freed by a call to<link linkend="atk-attribute-set-free"><function>atk_attribute_set_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="atk-text-get-default-attributes" role="function"><title>atk_text_get_default_attributes ()</title><indexterm zone="atk-text-get-default-attributes"><primary>atk_text_get_default_attributes</primary></indexterm><programlisting><link linkend="AtkAttributeSet">AtkAttributeSet</link>* atk_text_get_default_attributes (<link linkend="AtkText">AtkText</link> *text);</programlisting><para>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -