Top |
Functions
GcrRenderer * | gcr_renderer_create () |
void | gcr_renderer_register () |
GckAttributes * | gcr_renderer_get_attributes () |
void | gcr_renderer_set_attributes () |
void | gcr_renderer_popuplate_popup () |
void | gcr_renderer_render_view () |
void | gcr_renderer_emit_data_changed () |
void | gcr_renderer_register_well_known () |
Description
A GcrRenderer is 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.
Functions
gcr_renderer_create ()
GcrRenderer * gcr_renderer_create (const gchar *label
,GckAttributes *attrs
);
Create and initialize a renderer for the given attributes and label. These
renderers should have been preregistered via gcr_renderer_register()
.
gcr_renderer_register ()
void gcr_renderer_register (GType renderer_type
,GckAttributes *attrs
);
Register a renderer to be created when matching attributes are passed to
gcr_renderer_create()
.
gcr_renderer_get_attributes ()
GckAttributes *
gcr_renderer_get_attributes (GcrRenderer *self
);
Get the PKCS#11 attributes, if any, set for this renderer to display.
gcr_renderer_set_attributes ()
void gcr_renderer_set_attributes (GcrRenderer *self
,GckAttributes *attrs
);
Set the PKCS#11 attributes for this renderer to display.
gcr_renderer_popuplate_popup ()
void gcr_renderer_popuplate_popup (GcrRenderer *self
,GcrViewer *viewer
,GtkMenu *menu
);
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 ()
void gcr_renderer_render_view (GcrRenderer *self
,GcrViewer *viewer
);
Render the contents of the renderer to the given viewer.
gcr_renderer_emit_data_changed ()
void
gcr_renderer_emit_data_changed (GcrRenderer *self
);
Emit the “data-changed” signal on the renderer. This is used by renderer implementations.
Types and Values
struct GcrRendererIface
struct GcrRendererIface { GTypeInterface parent; /* signals */ void (*data_changed) (GcrRenderer *self); /* virtual */ void (*render_view) (GcrRenderer *self, GcrViewer *viewer); void (*populate_popup) (GcrRenderer *self, GcrViewer *viewer, GtkMenu *menu); };
The interface for GcrRenderer
Property Details
The “attributes”
property
“attributes” GckAttributes *
The attributes to display.
Flags: Read / Write
Signal Details
The “data-changed”
signal
void user_function (GcrRenderer *gcrrenderer, gpointer user_data)
A signal that is emitted by the renderer when it's data changed and should be rerendered.
Flags: Run Last