📄 atkcomponent.xml
字号:
<refentry id="AtkComponent"><refmeta><refentrytitle>AtkComponent</refentrytitle><manvolnum>3</manvolnum><refmiscinfo>ATK Library</refmiscinfo></refmeta><refnamediv><refname>AtkComponent</refname><refpurpose>The ATK interface provided by UI components which occupy a physical area onthe screen.</refpurpose></refnamediv><refsynopsisdiv><title>Synopsis</title><synopsis>struct <link linkend="AtkComponent-struct">AtkComponent</link>;<link linkend="guint">guint</link> <link linkend="atk-component-add-focus-handler">atk_component_add_focus_handler</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="AtkFocusHandler">AtkFocusHandler</link> handler);<link linkend="gboolean">gboolean</link> <link linkend="atk-component-contains">atk_component_contains</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> x, <link linkend="gint">gint</link> y, <link linkend="AtkCoordType">AtkCoordType</link> coord_type);<link linkend="void">void</link> <link linkend="atk-component-get-extents">atk_component_get_extents</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <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> coord_type);<link linkend="AtkLayer">AtkLayer</link> <link linkend="atk-component-get-layer">atk_component_get_layer</link> (<link linkend="AtkComponent">AtkComponent</link> *component);<link linkend="gint">gint</link> <link linkend="atk-component-get-mdi-zorder">atk_component_get_mdi_zorder</link> (<link linkend="AtkComponent">AtkComponent</link> *component);<link linkend="void">void</link> <link linkend="atk-component-get-position">atk_component_get_position</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> *x, <link linkend="gint">gint</link> *y, <link linkend="AtkCoordType">AtkCoordType</link> coord_type);<link linkend="void">void</link> <link linkend="atk-component-get-size">atk_component_get_size</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> *width, <link linkend="gint">gint</link> *height);<link linkend="gboolean">gboolean</link> <link linkend="atk-component-grab-focus">atk_component_grab_focus</link> (<link linkend="AtkComponent">AtkComponent</link> *component);<link linkend="AtkObject">AtkObject</link>* <link linkend="atk-component-ref-accessible-at-point">atk_component_ref_accessible_at_point</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> x, <link linkend="gint">gint</link> y, <link linkend="AtkCoordType">AtkCoordType</link> coord_type);<link linkend="void">void</link> <link linkend="atk-component-remove-focus-handler">atk_component_remove_focus_handler</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="guint">guint</link> handler_id);<link linkend="gboolean">gboolean</link> <link linkend="atk-component-set-extents">atk_component_set_extents</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <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> coord_type);<link linkend="gboolean">gboolean</link> <link linkend="atk-component-set-position">atk_component_set_position</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> x, <link linkend="gint">gint</link> y, <link linkend="AtkCoordType">AtkCoordType</link> coord_type);<link linkend="gboolean">gboolean</link> <link linkend="atk-component-set-size">atk_component_set_size</link> (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> width, <link linkend="gint">gint</link> height);</synopsis></refsynopsisdiv><refsect1><title>Object Hierarchy</title><synopsis> <link linkend="GInterface">GInterface</link> +----AtkComponent</synopsis></refsect1><refsect1><title>Known Implementations</title><para>AtkComponent is implemented by <link linkend="AtkNoOpObject">AtkNoOpObject</link>.</para></refsect1><refsect1><title>Description</title><para><link linkend="AtkComponent"><type>AtkComponent</type></link> should be implemented by most if not all UI elements withan actual on-screen presence, i.e. components which can be said to havea screen-coordinate bounding box. Virtually all widgets will need tohave <link linkend="AtkComponent"><type>AtkComponent</type></link> implementations provided for their corresponding<link linkend="AtkObject"><type>AtkObject</type></link> class. In short, only UI elements which are *not* GUIelements will omit this ATK interface.</para><para>A possible exception might be textual information with a transparentbackground, in which case text glyph bounding box information isprovided by <link linkend="AtkText"><type>AtkText</type></link>.</para></refsect1><refsect1><title>Details</title><refsect2><title><anchor id="AtkComponent-struct"/>struct AtkComponent</title><indexterm><primary>AtkComponent</primary></indexterm><programlisting>struct AtkComponent;</programlisting><para>The AtkComponent structure does not contain any fields.</para></refsect2><refsect2><title><anchor id="atk-component-add-focus-handler"/>atk_component_add_focus_handler ()</title><indexterm><primary>atk_component_add_focus_handler</primary></indexterm><programlisting><link linkend="guint">guint</link> atk_component_add_focus_handler (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="AtkFocusHandler">AtkFocusHandler</link> handler);</programlisting><para>Add the specified handler to the set of functions to be called when this object receives focus events (in or out). If the handler isalready added it is not added again</para><para></para><variablelist role="params"><varlistentry><term><parameter>component</parameter> :</term><listitem><simpara> The <link linkend="AtkComponent"><type>AtkComponent</type></link> to attach the <parameter>handler</parameter> to</simpara></listitem></varlistentry><varlistentry><term><parameter>handler</parameter> :</term><listitem><simpara> The <link linkend="AtkFocusHandler"><type>AtkFocusHandler</type></link> to be attached to <parameter>component</parameter></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a handler id which can be used in atk_component_remove_focus_handleror zero if the handler was already added.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-component-contains"/>atk_component_contains ()</title><indexterm><primary>atk_component_contains</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> atk_component_contains (<link linkend="AtkComponent">AtkComponent</link> *component, <link linkend="gint">gint</link> x, <link linkend="gint">gint</link> y, <link linkend="AtkCoordType">AtkCoordType</link> coord_type);</programlisting><para>Checks whether the specified point is within the extent of the <parameter>component</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>component</parameter> :</term><listitem><simpara> the <link linkend="AtkComponent"><type>AtkComponent</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>x</parameter> :</term><listitem><simpara> x coordinate</simpara></listitem></varlistentry><varlistentry><term><parameter>y</parameter> :</term><listitem><simpara> y coordinate</simpara></listitem></varlistentry><varlistentry><term><parameter>coord_type</parameter> :</term><listitem><simpara> specifies whether the coordinates are relative to the screenor to the components top level window</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <literal>TRUE</literal> or <literal>FALSE</literal> indicating whether the specified point is withinthe extent of the <parameter>component</parameter> or not</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-component-get-extents"/>atk_component_get_extents ()</title><indexterm><primary>atk_component_get_extents</primary></indexterm><programlisting><link linkend="void">void</link> atk_component_get_extents (<link linkend="AtkComponent">AtkComponent</link> *component, <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> coord_type);</programlisting><para>Gets the rectangle which gives the extent of the <parameter>component</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>component</parameter> :</term><listitem><simpara> an <link linkend="AtkComponent"><type>AtkComponent</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>x</parameter> :</term><listitem><simpara> address of <link linkend="gint"><type>gint</type></link> to put x coordinate</simpara></listitem></varlistentry><varlistentry><term><parameter>y</parameter> :</term><listitem><simpara> address of <link linkend="gint"><type>gint</type></link> to put y coordinate</simpara></listitem></varlistentry><varlistentry><term><parameter>width</parameter> :</term><listitem><simpara> address of <link linkend="gint"><type>gint</type></link> to put width</simpara></listitem></varlistentry><varlistentry><term><parameter>height</parameter> :</term><listitem><simpara> address of <link linkend="gint"><type>gint</type></link> to put height</simpara></listitem></varlistentry><varlistentry><term><parameter>coord_type</parameter> :</term><listitem><simpara> specifies whether the coordinates are relative to the screenor to the components top level window</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-component-get-layer"/>atk_component_get_layer ()</title><indexterm><primary>atk_component_get_layer</primary></indexterm><programlisting><link linkend="AtkLayer">AtkLayer</link> atk_component_get_layer (<link linkend="AtkComponent">AtkComponent</link> *component);</programlisting><para>Gets the layer of the component.</para><para></para><variablelist role="params"><varlistentry><term><parameter>component</parameter> :</term><listitem><simpara> an <link linkend="AtkComponent"><type>AtkComponent</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="AtkLayer"><type>AtkLayer</type></link> which is the layer of the component</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-component-get-mdi-zorder"/>atk_component_get_mdi_zorder ()</title><indexterm><primary>atk_component_get_mdi_zorder</primary></indexterm><programlisting><link linkend="gint">gint</link> atk_component_get_mdi_zorder (<link linkend="AtkComponent">AtkComponent</link> *component);</programlisting>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -