File: pygtk-atkimage.xml

package info (click to toggle)
pygtk 2.24.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 26,760 kB
  • ctags: 8,260
  • sloc: xml: 182,079; sh: 10,297; python: 10,161; ansic: 2,861; makefile: 1,358
file content (162 lines) | stat: -rw-r--r-- 6,185 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-atkimage">

  <refnamediv>
    <refname>atk.Image</refname>
      <refpurpose>the ATK Interface implemented by components that expose
      image or pixmap content on-screen.  </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>atk.Image</classname></ooclass>
      <ooclass><classname>gobject.GInterface</classname></ooclass>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkimage--get-image-description">get_image_description</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkimage--get-image-size">get_image_size</link></methodname>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkimage--set-image-description">set_image_description</link></methodname>
        <methodparam><parameter role="keyword">description</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkimage--get-image-position">get_image_position</link></methodname>
        <methodparam><parameter role="keyword">coord_type</parameter></methodparam>
      </methodsynopsis>
</classsynopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para><link
    linkend="class-atkimage"><classname>atk.Image</classname></link> should
    be implemented by <link
    linkend="class-atkobject"><classname>atk.Object</classname></link>
    subtypes on behalf of components which display image/pixmap information
    onscreen, and which provide information (other than just widget borders,
    etc.) via that image content.  For instance, icons, buttons with icons,
    toolbar elements, and image viewing panes typically should implement
    <link
    linkend="class-atkimage"><classname>atk.Image</classname></link>.</para>

    <para><link
    linkend="class-atkimage"><classname>atk.Image</classname></link>
    primarily provides two types of information: coordinate information
    (useful for screen review mode of screenreaders, and for use by onscreen
    magnifiers), and descriptive information.  The descriptive information
    is provided for alternative, text-only presentation of the most
    significant information present in the image.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-atkimage--get-image-description">
      <title>atk.Image.get_image_description</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_image_description</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a string representing the image
          description</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Get a textual description of this image.</para>

    </refsect2>

    <refsect2 id="method-atkimage--get-image-size">
      <title>atk.Image.get_image_size</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_image_size</methodname>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a 2-tuple containing the width and height of
          the image</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Get the width and height in pixels for the specified image. The
      width and height are returned as -1 if the values cannot be
      obtained.</para>

    </refsect2>

    <refsect2 id="method-atkimage--set-image-description">
      <title>atk.Image.set_image_description</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_image_description</methodname>
        <methodparam><parameter role="keyword">description</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">description</parameter>&nbsp;:</term>
          <listitem><simpara>a string description to set for
          <parameter>image</parameter></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>True if operation could be
          completed.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Sets the textual description for this image.</para>

    </refsect2>

    <refsect2 id="method-atkimage--get-image-position">
      <title>atk.Image.get_image_position</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_image_position</methodname>
        <methodparam><parameter role="keyword">coord_type</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">coord_type</parameter>&nbsp;:</term>
          <listitem><simpara>specifies whether the coordinates are relative
          to the screen or to the components top level window - one of the
          <xref linkend="atk-coord-type-constants"
          endterm="atk-coord-type-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a 2-tuple containing the x and y coordinates of
          the image</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the position of the image in the form of a point specifying
      the images top-left corner.  The values of x and y are returned as -1
      if the values cannot be obtained.</para>

    </refsect2>

  </refsect1>

</refentry>