Top |
Functions
GcrViewerWidget * | gcr_viewer_widget_new () |
void | gcr_viewer_widget_load_bytes () |
void | gcr_viewer_widget_load_data () |
void | gcr_viewer_widget_load_file () |
GcrParser * | gcr_viewer_widget_get_parser () |
GcrViewer * | gcr_viewer_widget_get_viewer () |
void | gcr_viewer_widget_show_error () |
void | gcr_viewer_widget_clear_error () |
const gchar * | gcr_viewer_widget_get_display_name () |
void | gcr_viewer_widget_set_display_name () |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBox ╰── GcrViewerWidget
Implemented Interfaces
GcrViewerWidget implements AtkImplementorIface, GtkBuildable and GtkOrientable.
Functions
gcr_viewer_widget_new ()
GcrViewerWidget *
gcr_viewer_widget_new (void
);
Create a new viewer widget.
gcr_viewer_widget_load_bytes ()
void gcr_viewer_widget_load_bytes (GcrViewerWidget *self
,const gchar *display_name
,GBytes *data
);
Parse and load some data to be displayed into the viewer widgets. The data may contain multiple parseable items if the format can contain multiple items.
gcr_viewer_widget_load_data ()
void gcr_viewer_widget_load_data (GcrViewerWidget *self
,const gchar *display_name
,const guchar *data
,gsize n_data
);
Parse and load some data to be displayed into the viewer widgets. The data may contain multiple parseable items if the format can contain multiple items.
This function will copy the data. Use gcr_viewer_widget_load_bytes()
to avoid
copying the data.
gcr_viewer_widget_load_file ()
void gcr_viewer_widget_load_file (GcrViewerWidget *self
,GFile *file
);
Display contents of a file in the viewer widget. Multiple files can be loaded.
gcr_viewer_widget_get_parser ()
GcrParser *
gcr_viewer_widget_get_parser (GcrViewerWidget *self
);
Get the parser used to parse loaded data into viewable items.
gcr_viewer_widget_get_viewer ()
GcrViewer *
gcr_viewer_widget_get_viewer (GcrViewerWidget *self
);
Get the viewer used to display the viewable items.
gcr_viewer_widget_show_error ()
void gcr_viewer_widget_show_error (GcrViewerWidget *self
,const gchar *message
,GError *error
);
Show an error on the viewer widget. This is displayed on a info bar near the edge of the widget.
gcr_viewer_widget_clear_error ()
void
gcr_viewer_widget_clear_error (GcrViewerWidget *self
);
Clear the error displayed on the viewer widget.
gcr_viewer_widget_get_display_name ()
const gchar *
gcr_viewer_widget_get_display_name (GcrViewerWidget *self
);
Get the display name for data being displayed. This is automatically calculated from a loaded file, or can be explicitly set.
Used as a hint when displaying a title for the data, but may be overridden by the parsed data.
gcr_viewer_widget_set_display_name ()
void gcr_viewer_widget_set_display_name (GcrViewerWidget *self
,const gchar *display_name
);
Set the display name for data being displayed. Once explicitly set it will no longer be calculated automatically by loading data.
Used as a hint when displaying a title for the data, but may be overridden by the parsed data.
Property Details
The “display-name”
property
“display-name” gchar *
Display name for data being displayed. This is automatically calculated from a loaded file, or can be explicitly set.
Used as a hint when displaying a title for the data, but may be overridden by the parsed data.
Flags: Read / Write
Default value: NULL
The “parser”
property
“parser” GcrParser *
The parser used to parse loaded data into viewable items.
Flags: Read
Signal Details
The “added”
signal
void user_function (GcrViewerWidget *self, GObject *renderer, GcrParsed *parsed, gpointer user_data)
This signal is emitted when an item is added to the viewer widget.
Parameters
self |
the viewer widget |
|
renderer |
the renderer that was added. |
[type GcrUi.Renderer] |
parsed |
the parsed item that was added. |
[type Gcr.Parsed] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last