📄 atkcomponent.xml
字号:
<refentry id="AtkComponent"><refmeta><refentrytitle role="top_of_page" id="AtkComponent.top_of_page">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><!--[<xref linkend="desc" endterm="desc.title"/>]--></refnamediv><refsynopsisdiv id="AtkComponent.synopsis" role="synopsis"><title role="synopsis.title">Synopsis</title><synopsis> <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);<link linkend="gdouble">gdouble</link> <link linkend="atk-component-get-alpha">atk_component_get_alpha</link> (<link linkend="AtkComponent">AtkComponent</link> *component);</synopsis></refsynopsisdiv><refsect1 id="AtkComponent.object-hierarchy" role="object_hierarchy"><title role="object_hierarchy.title">Object Hierarchy</title><synopsis> <link linkend="GInterface">GInterface</link> +----AtkComponent</synopsis></refsect1><refsect1 id="AtkComponent.implementations" role="implementations"><title role="implementations.title">Known Implementations</title><para>AtkComponent is implemented by <link linkend="AtkNoOpObject">AtkNoOpObject</link>.</para></refsect1><refsect1 id="AtkComponent.signals" role="signal_proto"><title role="signal_proto.title">Signals</title><synopsis> "<link linkend="AtkComponent-bounds-changed">bounds-changed</link>" : Run Last</synopsis></refsect1><refsect1 id="AtkComponent.description" role="desc"><title role="desc.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 id="AtkComponent.details" role="details"><title role="details.title">Details</title><refsect2 id="AtkComponent-struct" role="struct"><title>AtkComponent</title><indexterm zone="AtkComponent-struct"><primary>AtkComponent</primary></indexterm><programlisting>typedef struct _AtkComponent AtkComponent;</programlisting><para>The AtkComponent structure does not contain any fields.</para></refsect2><refsect2 id="atk-component-add-focus-handler" role="function"><title>atk_component_add_focus_handler ()</title><indexterm zone="atk-component-add-focus-handler"><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 id="atk-component-contains" role="function"><title>atk_component_contains ()</title><indexterm zone="atk-component-contains"><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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -