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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<refentry id="AsScreenshot">
<refmeta>
<refentrytitle role="top_of_page" id="AsScreenshot.top_of_page">AsScreenshot</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
APPSTREAM Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AsScreenshot</refname>
<refpurpose>Object representing a single screenshot</refpurpose>
</refnamediv>
<refsect1 id="AsScreenshot.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="AsScreenshotKind"><returnvalue>AsScreenshotKind</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-screenshot-kind-from-string">as_screenshot_kind_from_string</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
</entry><entry role="function_name"><link linkend="as-screenshot-kind-to-string">as_screenshot_kind_to_string</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-screenshot-is-valid">as_screenshot_is_valid</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsScreenshot"><returnvalue>AsScreenshot</returnvalue></link> *
</entry><entry role="function_name"><link linkend="as-screenshot-new">as_screenshot_new</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsScreenshotKind"><returnvalue>AsScreenshotKind</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-screenshot-get-kind">as_screenshot_get_kind</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-screenshot-set-kind">as_screenshot_set_kind</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
</entry><entry role="function_name"><link linkend="as-screenshot-get-caption">as_screenshot_get_caption</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-screenshot-set-caption">as_screenshot_set_caption</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link> *
</entry><entry role="function_name"><link linkend="as-screenshot-get-images">as_screenshot_get_images</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-screenshot-add-image">as_screenshot_add_image</link> <phrase role="c_punctuation">()</phrase></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsScreenshot.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="AsScreenshotKind">AsScreenshotKind</link></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsScreenshot.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen> <link linkend="GObject">GObject</link>
<phrase role="lineart">╰──</phrase> AsScreenshot
</screen>
</refsect1>
<refsect1 id="AsScreenshot.description" role="desc">
<title role="desc.title">Description</title>
<para>Screenshots have a localized caption and also contain a number of images
of different resolution.</para>
<para>See also: <link linkend="AsImage"><type>AsImage</type></link></para>
</refsect1>
<refsect1 id="AsScreenshot.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="as-screenshot-kind-from-string" role="function">
<title>as_screenshot_kind_from_string ()</title>
<indexterm zone="as-screenshot-kind-from-string"><primary>as_screenshot_kind_from_string</primary></indexterm>
<programlisting language="C"><link linkend="AsScreenshotKind"><returnvalue>AsScreenshotKind</returnvalue></link>
as_screenshot_kind_from_string (<parameter>const <link linkend="gchar"><type>gchar</type></link> *kind</parameter>);</programlisting>
<para>Converts the text representation to an enumerated value.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>kind</para></entry>
<entry role="parameter_description"><para>the string.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a <link linkend="AsScreenshotKind"><literal>AsScreenshotKind</literal></link>, or
<link linkend="AS-SCREENSHOT-KIND-UNKNOWN:CAPS"><literal>AS_SCREENSHOT_KIND_UNKNOWN</literal></link> if not known. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-kind-to-string" role="function">
<title>as_screenshot_kind_to_string ()</title>
<indexterm zone="as-screenshot-kind-to-string"><primary>as_screenshot_kind_to_string</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
as_screenshot_kind_to_string (<parameter><link linkend="AsScreenshotKind"><type>AsScreenshotKind</type></link> kind</parameter>);</programlisting>
<para>Converts the enumerated value to an text representation.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>kind</para></entry>
<entry role="parameter_description"><para>the <link linkend="AsScreenshotKind"><type>AsScreenshotKind</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> string version of <parameter>kind</parameter>
</para>
<para></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-is-valid" role="function">
<title>as_screenshot_is_valid ()</title>
<indexterm zone="as-screenshot-is-valid"><primary>as_screenshot_is_valid</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
as_screenshot_is_valid (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>);</programlisting>
<para>Performs a quick validation on this screenshot</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> TRUE if the screenshot is a complete <link linkend="AsScreenshot"><type>AsScreenshot</type></link></para>
<para></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-new" role="function">
<title>as_screenshot_new ()</title>
<indexterm zone="as-screenshot-new"><primary>as_screenshot_new</primary></indexterm>
<programlisting language="C"><link linkend="AsScreenshot"><returnvalue>AsScreenshot</returnvalue></link> *
as_screenshot_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="AsScreenshot"><type>AsScreenshot</type></link>.</para>
<refsect3 role="returns">
<title>Returns</title>
<para> a <link linkend="AsScreenshot"><type>AsScreenshot</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-get-kind" role="function">
<title>as_screenshot_get_kind ()</title>
<indexterm zone="as-screenshot-get-kind"><primary>as_screenshot_get_kind</primary></indexterm>
<programlisting language="C"><link linkend="AsScreenshotKind"><returnvalue>AsScreenshotKind</returnvalue></link>
as_screenshot_get_kind (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>);</programlisting>
<para>Gets the screenshot kind.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a <link linkend="AsScreenshotKind"><type>AsScreenshotKind</type></link></para>
<para></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-set-kind" role="function">
<title>as_screenshot_set_kind ()</title>
<indexterm zone="as-screenshot-set-kind"><primary>as_screenshot_set_kind</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_screenshot_set_kind (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>,
<parameter><link linkend="AsScreenshotKind"><type>AsScreenshotKind</type></link> kind</parameter>);</programlisting>
<para>Sets the screenshot kind.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>kind</para></entry>
<entry role="parameter_description"><para>the <link linkend="AsScreenshotKind"><type>AsScreenshotKind</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-screenshot-get-caption" role="function">
<title>as_screenshot_get_caption ()</title>
<indexterm zone="as-screenshot-get-caption"><primary>as_screenshot_get_caption</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
as_screenshot_get_caption (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>);</programlisting>
<para>Gets the image caption</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> the caption</para>
<para></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-set-caption" role="function">
<title>as_screenshot_set_caption ()</title>
<indexterm zone="as-screenshot-set-caption"><primary>as_screenshot_set_caption</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_screenshot_set_caption (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *caption</parameter>);</programlisting>
<para>Sets a caption on the screenshot</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>caption</para></entry>
<entry role="parameter_description"><para>the caption text.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-screenshot-get-images" role="function">
<title>as_screenshot_get_images ()</title>
<indexterm zone="as-screenshot-get-images"><primary>as_screenshot_get_images</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link> *
as_screenshot_get_images (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>);</programlisting>
<para>Gets the image sizes included in the screenshot.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> an array. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> AsImage][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-screenshot-add-image" role="function">
<title>as_screenshot_add_image ()</title>
<indexterm zone="as-screenshot-add-image"><primary>as_screenshot_add_image</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_screenshot_add_image (<parameter><link linkend="AsScreenshot"><type>AsScreenshot</type></link> *screenshot</parameter>,
<parameter><link linkend="AsImage"><type>AsImage</type></link> *image</parameter>);</programlisting>
<para>Adds an image to the screenshot.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>screenshot</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsScreenshot"><type>AsScreenshot</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>image</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsImage"><type>AsImage</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
</refsect1>
<refsect1 id="AsScreenshot.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AsScreenshotKind" role="enum">
<title>enum AsScreenshotKind</title>
<indexterm zone="AsScreenshotKind"><primary>AsScreenshotKind</primary></indexterm>
<para>The screenshot type.</para>
<refsect3 role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="AS-SCREENSHOT-KIND-UNKNOWN:CAPS">AS_SCREENSHOT_KIND_UNKNOWN</para></entry>
<entry role="enum_member_description"><para>Type invalid or not known</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="AS-SCREENSHOT-KIND-NORMAL:CAPS">AS_SCREENSHOT_KIND_NORMAL</para></entry>
<entry role="enum_member_description"><para>Optional screenshot</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="AS-SCREENSHOT-KIND-DEFAULT:CAPS">AS_SCREENSHOT_KIND_DEFAULT</para></entry>
<entry role="enum_member_description"><para>Screenshot to show by default</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
</refsect1>
</refentry>
|