GcrUi.Renderer
Description: Reference for GcrUi.Renderer

### Interface

# GcrUiRenderer

#### Description [src]

    interface GcrUi.Renderer : GObject.Object

An interface that’s implemented by renderers which wish to render data to a `GcrViewer`.

The interaction between `GcrRenderer` and `GcrViewer` is not stable yet, and so new renderers cannot be implemented outside the Gcr library at this time.

To lookup a renderer for a given set of attributes, use the `gcr_renderer_create()` function. This will create and initialize a renderer that’s capable of viewing the data in those attributes.

#### Prerequisite

In order to implement Renderer, your type must inherit from `GObject`.

#### Implementations

- GcrCertificateRenderer
- GcrFailureRenderer
- GcrKeyRenderer

#### Functions

###### gcr_renderer_create

Create and initialize a renderer for the given attributes and label. These renderers should have been preregistered via gcr_renderer_register().

###### gcr_renderer_register

Register a renderer to be created when matching attributes are passed to gcr_renderer_create().

###### gcr_renderer_register_well_known

Register all the well known renderers for certificates and keys known to the Gcr library.

#### Instance methods

###### gcr_renderer_emit_data_changed

Emit the `GcrRenderer::data-changed` signal on the renderer. This is used by renderer implementations.

###### gcr_renderer_get_attributes

Get the PKCS#11 attributes, if any, set for this renderer to display.

###### gcr_renderer_popuplate_popup

Called by `GcrViewer` when about to display a popup menu for the content displayed by the renderer. The renderer can add a menu item if desired.

###### gcr_renderer_render_view

Render the contents of the renderer to the given viewer.

###### gcr_renderer_set_attributes

Set the PKCS#11 attributes for this renderer to display.

#### Properties

###### GcrUi.Renderer:attributes

The attributes to display.

###### GcrUi.Renderer:label

The label to display.

#### Signals

###### GcrUi.Renderer::data-changed

A signal that is emitted by the renderer when it’s data changed and should be rerendered.

#### Interface structure

    struct GcrUiRendererIface {
      GTypeInterface parent;
      void (* data_changed) (
        GcrRenderer* self
      );
      void (* render_view) (
        GcrRenderer* self,
        GcrViewer* viewer
      );
      void (* populate_popup) (
        GcrRenderer* self,
        GcrViewer* viewer,
        GtkMenu* menu
      );

    }

###### Interface members

`parent` |
    GTypeInterface
| The parent interface type.
`data_changed` |
    void (* data_changed) (
        GcrRenderer* self
      )
| No description available.
`render_view` |
    void (* render_view) (
        GcrRenderer* self,
        GcrViewer* viewer
      )
| No description available.
`populate_popup` |
    void (* populate_popup) (
        GcrRenderer* self,
        GcrViewer* viewer,
        GtkMenu* menu
      )
| No description available.

#### Virtual methods

###### GcrUi.Renderer.data_changed

No description available.

###### GcrUi.Renderer.populate_popup

No description available.

###### GcrUi.Renderer.render_view

Render the contents of the renderer to the given viewer.