as-screenshot-private 3 APPSTREAM Library
as-screenshot-private

## Functions

AsContext * | as_screenshot_get_context ()
void | as_screenshot_set_context ()
gboolean | as_screenshot_load_from_xml ()
void | as_screenshot_to_xml_node ()
gboolean | as_screenshot_load_from_yaml ()
void | as_screenshot_emit_yaml ()
void | as_screenshot_to_variant ()
gboolean | as_screenshot_set_from_variant ()

## Description

## Functions

### as_screenshot_get_context ()

    AsContext *
    as_screenshot_get_context (AsScreenshot *screenshot);

#### Parameters

screenshot | an AsScreenshot instance. |

#### Returns

the AsContext associated with this screenshot. This function may return `NULL` if no context is set.

Since: 0.11.2

as_screenshot_get_context

### as_screenshot_set_context ()

    void
    as_screenshot_set_context (AsScreenshot *screenshot,
                               AsContext *context);

Sets the document context this screenshot is associated with.

#### Parameters

screenshot | an AsScreenshot instance. |
context | the AsContext. |

Since: 0.11.2

as_screenshot_set_context

### as_screenshot_load_from_xml ()

    gboolean
    as_screenshot_load_from_xml (AsScreenshot *screenshot,
                                 AsContext *ctx,
                                 xmlNode *node,
                                 GError **error);

Loads data from an XML node.

#### Parameters

screenshot | an AsScreenshot instance. |
ctx | the AppStream document context. |
node | the XML node. |
error | a GError. |

as_screenshot_load_from_xml

### as_screenshot_to_xml_node ()

    void
    as_screenshot_to_xml_node (AsScreenshot *screenshot,
                               AsContext *ctx,
                               xmlNode *root);

Serializes the data to an XML node.

#### Parameters

screenshot | an AsScreenshot instance. |
ctx | the AppStream document context. |
root | XML node to attach the new nodes to. |

as_screenshot_to_xml_node

### as_screenshot_load_from_yaml ()

    gboolean
    as_screenshot_load_from_yaml (AsScreenshot *screenshot,
                                  AsContext *ctx,
                                  GNode *node,
                                  GError **error);

Loads data from a YAML field.

#### Parameters

screenshot | an AsScreenshot instance. |
ctx | the AppStream document context. |
node | the YAML node. |
error | a GError. |

as_screenshot_load_from_yaml

### as_screenshot_emit_yaml ()

    void
    as_screenshot_emit_yaml (AsScreenshot *screenshot,
                             AsContext *ctx,
                             yaml_emitter_t *emitter);

Emit YAML data for this object.

#### Parameters

screenshot | an AsScreenshot instance. |
ctx | the AppStream document context. |
emitter | The YAML emitter to emit data on. |

as_screenshot_emit_yaml

### as_screenshot_to_variant ()

    void
    as_screenshot_to_variant (AsScreenshot *screenshot,
                              GVariantBuilder *builder);

Serialize the current active state of this object to a GVariant for use in the on-disk binary cache.

#### Parameters

screenshot | an AsScreenshot instance. |
builder | A GVariantBuilder |

as_screenshot_to_variant

### as_screenshot_set_from_variant ()

    gboolean
    as_screenshot_set_from_variant (AsScreenshot *screenshot,
                                    GVariant *variant,
                                    const gchar *locale);

Read the active state of this object from a GVariant serialization. This is used by the on-disk binary cache.

#### Parameters

screenshot | an AsScreenshot instance. |
variant | The GVariant to read from. |

as_screenshot_set_from_variant

## Types and Values