Module: Atk::StreamableContent

Defined in:
(unknown)

Overview

An interface whereby an object allows its backing content to be streamed to clients. Typical implementors would be images or icons, HTML content, or multimedia display/rendering widgets.

Negotiation of content type is allowed. Clients may examine the backing data and transform, convert, or parse the content in order to present it in an alternate form to end-users.

The AtkStreamableContent interface is particularly useful for saving, printing, or post-processing entire documents, or for persisting alternate views of a document. If document content itself is being serialized, stored, or converted, then use of the AtkStreamableContent interface can help address performance issues. Unlike most ATK interfaces, this interface is not strongly tied to the current user-agent view of the a particular document, but may in some cases give access to the underlying model data.

Instance Method Summary collapse

Instance Method Details

#get_mime_type(streamable, i) ⇒ String

should not free the character string.

Parameters:

  • streamable (Atk::StreamableContent)

    a GObject instance that implements AtkStreamableContent

  • i (Integer)

    a gint representing the position of the mime type starting from 0

Returns:

  • (String)

    a gchar* representing the specified mime type; the caller

#get_n_mime_types(streamable) ⇒ Integer

Returns a gint which is the number of mime types supported by the object.

Parameters:

Returns:

  • (Integer)

    a gint which is the number of mime types supported by the object.

#get_stream(streamable, mime_type) ⇒ GLib::IOChannel

specified mime type.

Parameters:

  • streamable (Atk::StreamableContent)

    a GObject instance that implements AtkStreamableContentIface

  • mime_type (String)

    a gchar* representing the mime type

Returns:

  • (GLib::IOChannel)

    A #GIOChannel which contains the content in the

#get_uri(streamable, mime_type) ⇒ String

for the default mime type. if no corresponding URI can be constructed.

Parameters:

  • streamable (Atk::StreamableContent)

    a GObject instance that implements AtkStreamableContentIface

  • mime_type (String)

    a gchar* representing the mime type, or NULL to request a URI

Returns:

  • (String)

    Returns a string representing a URI, or nil

#n_mime_typesInteger

Gets the number of mime types supported by this object.

Returns:

  • (Integer)

    a gint which is the number of mime types supported by the object.