![]() |
![]() |
![]() |
midori Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <midori/midori.h> enum MidoriDelay; enum MidoriDownloadType; MidoriView; MidoriViewClass;GtkWidget * midori_view_add_info_bar (MidoriView *view
,,
GtkMessageType message_typeconst
,gchar *message,
GCallback response_cb,
gpointer user_dataconst
,gchar *first_button_text...
);gboolean midori_view_can_go_back (MidoriView *view
);gboolean midori_view_can_go_back_or_forward (MidoriView *view
,);
gint stepsgboolean midori_view_can_go_forward (MidoriView *view
);gboolean midori_view_can_view_source (MidoriView *view
);gboolean midori_view_can_zoom_in (MidoriView *view
);gboolean midori_view_can_zoom_out (MidoriView *view
);GtkWidget * midori_view_duplicate (MidoriView *view
);gboolean midori_view_execute_script (MidoriView *view
,const
,gchar *script); const
gchar **exceptiongchar * midori_view_fallback_extension (MidoriView *view
,const
); constgchar *extensiongchar * midori_view_get_display_title (MidoriView *view
); constgchar * midori_view_get_display_uri (MidoriView *view
); MidoriView * midori_view_get_for_widget ();
GtkWidget *web_viewGdkPixbuf * midori_view_get_icon (MidoriView *view
); constgchar * midori_view_get_icon_uri (MidoriView *view
);PangoEllipsizeMode midori_view_get_label_ellipsize (MidoriView *view
); constgchar * midori_view_get_link_uri (MidoriView *view
); MidoriLoadStatus midori_view_get_load_status (MidoriView *view
); constgchar * midori_view_get_next_page (MidoriView *view
); constgchar * midori_view_get_previous_page (MidoriView *view
);gdouble midori_view_get_progress (MidoriView *view
);KatzeItem * midori_view_get_proxy_item (MidoriView *view
);GtkWidget * midori_view_get_proxy_menu_item (MidoriView *view
);GtkWidget * midori_view_get_proxy_tab_label (MidoriView *view
);GList * midori_view_get_resources (MidoriView *view
); constgchar * midori_view_get_selected_text (MidoriView *view
);GdkPixbuf * midori_view_get_snapshot (MidoriView *view
,,
gint width);
gint heightGtkWidget * midori_view_get_tab_menu (MidoriView *view
);gboolean midori_view_get_tls_info (MidoriView *view
,,
void *request,
GTlsCertificate **tls_cert,
GTlsCertificateFlags *tls_flags);
gchar **hostnameGtkWidget * midori_view_get_web_view (MidoriView *view
);gfloat midori_view_get_zoom_level (MidoriView *view
);void midori_view_go_back (MidoriView *view
);void midori_view_go_back_or_forward (MidoriView *view
,);
gint stepsvoid midori_view_go_forward (MidoriView *view
);gboolean midori_view_has_selection (MidoriView *view
);gboolean midori_view_is_blank (MidoriView *view
);void midori_view_list_plugins (MidoriView *view
,,
GString *markup);
gboolean htmlvoid midori_view_list_versions (,
GString *markup);
gboolean htmlGtkWidget * midori_view_new_from_view (MidoriView *view
,,
KatzeItem *itemMidoriWebSettings *settings
);GtkWidget * midori_view_new_with_item (,
KatzeItem *itemMidoriWebSettings *settings
);GtkWidget * midori_view_new_with_title (const
,gchar *titleMidoriWebSettings *settings
,);
gboolean appendvoid midori_view_populate_popup (MidoriView *view
,,
GtkWidget *menu);
gboolean manualvoid midori_view_print (MidoriView *view
);void midori_view_reload (MidoriView *view
,);
gboolean from_cachegchar * midori_view_save_source (MidoriView *view
,const
,gchar *uriconst
,gchar *outfile);
gboolean use_domvoid midori_view_search_text (MidoriView *view
,const
,gchar *text,
gboolean case_sensitive);
gboolean forwardvoid midori_view_set_colors (MidoriView *view
,,
GdkColor *fg_color);
GdkColor *bg_colorvoid midori_view_set_html (MidoriView *view
,const
,gchar *dataconst
,gchar *uri);
void *web_framevoid midori_view_set_overlay_text (MidoriView *view
,const
);gchar *textvoid midori_view_set_settings (MidoriView *view
,MidoriWebSettings *settings
);void midori_view_set_uri (MidoriView *view
,const
);gchar *urivoid midori_view_set_zoom_level (MidoriView *view
,);
gfloat zoom_level
typedef enum { MIDORI_DELAY_UNDELAYED = -1, /* The view is in a regular undelayed state */ MIDORI_DELAY_DELAYED = 1, /* The view is delayed but has not displayed any indication of such */ MIDORI_DELAY_PENDING_UNDELAY = -2 /* The view is delayed and showing a message asking to be undelayed */ } MidoriDelay;
typedef enum { MIDORI_DOWNLOAD_CANCEL, MIDORI_DOWNLOAD_OPEN, MIDORI_DOWNLOAD_SAVE, MIDORI_DOWNLOAD_SAVE_AS, MIDORI_DOWNLOAD_OPEN_IN_VIEWER, } MidoriDownloadType;
GtkWidget * midori_view_add_info_bar (MidoriView *view
,,
GtkMessageType message_typeconst
,gchar *message,
GCallback response_cb,
gpointer user_dataconst
,gchar *first_button_text...
);
Adds an infobar (or equivalent) to the view. Activation of a button invokes the specified callback. The infobar is automatically destroyed if the location changes or reloads.
|
a MidoriView |
|
a |
|
a message string |
|
a response callback |
|
user data passed to the callback |
|
button text or stock ID |
|
first response ID, then more text - response ID pairs |
Returns : |
an infobar widget |
Since 0.2.9
gboolean midori_view_can_go_back (MidoriView *view
);
Determines whether the view can go back.
|
a MidoriView |
gboolean midori_view_can_go_back_or_forward (MidoriView *view
,);
gint steps
Determines whether the view can go back or forward by number of steps.
|
a MidoriView |
|
number of steps to jump in history |
Since 0.4.5
gboolean midori_view_execute_script (MidoriView *view
,const
,gchar *script);
gchar **exception
Execute a script on the view.
|
a MidoriView |
|
script code |
|
location to store an exception message |
Returns : |
TRUE |
constgchar * midori_view_fallback_extension (MidoriView *view
,const
);gchar *extension
constgchar * midori_view_get_display_title (MidoriView *view
);
Retrieves a string that is suitable for displaying as a title. Most of the time this will be the title or the current URI.
You can assume that the string is not NULL
|
a MidoriView |
Returns : |
a title string |
constgchar * midori_view_get_display_uri (MidoriView *view
);
Retrieves a string that is suitable for displaying.
Note that "about:blank" and "about:dial" are represented as "".
You can assume that the string is not NULL
|
a MidoriView |
Returns : |
an URI string |
MidoriView * midori_view_get_for_widget (GtkWidget *web_view
);
Determines the view appropriate for the specified widget.
|
a |
Returns : |
a MidoriView Since 0.4.5 |
GdkPixbuf * midori_view_get_icon (MidoriView *view
);
Retrieves the icon of the view, or a default icon. See
midori_view_get_icon_uri()
if you need to distinguish
the origin of an icon.
The returned icon is owned by the view
and must not be modified.
|
a MidoriView |
Returns : |
a NULL |
constgchar * midori_view_get_icon_uri (MidoriView *view
);
Retrieves the address of the icon of the view
if the loaded website has an icon, otherwise
NULL
midori_view_get_icon()
will still return a default icon.
The returned string is owned by the view
and must not be freed.
|
a MidoriView |
Returns : |
a string, or NULL |
Since 0.2.5
PangoEllipsizeMode midori_view_get_label_ellipsize (MidoriView *view
);
Determines how labels representing the view should be ellipsized, which is helpful for alternative labels.
|
a MidoriView |
Returns : |
how to ellipsize the label |
Since 0.1.9
constgchar * midori_view_get_link_uri (MidoriView *view
);
Retrieves the uri of the currently focused link, particularly while the mouse hovers a link or a context menu is being opened.
|
a MidoriView |
Returns : |
an URI string, or NULL |
constgchar * midori_view_get_next_page (MidoriView *view
);
Determines the next sub-page in the view.
|
a MidoriView |
Returns : |
an URI, or NULL |
Since 0.2.3
constgchar * midori_view_get_previous_page (MidoriView *view
);
Determines the previous sub-page in the view.
|
a MidoriView |
Returns : |
an URI, or NULL |
Since 0.2.3
gdouble midori_view_get_progress (MidoriView *view
);
Retrieves the current loading progress as a fraction between 0.0 and 1.0.
|
a MidoriView |
Returns : |
the current loading progress |
KatzeItem * midori_view_get_proxy_item (MidoriView *view
);
Retrieves a proxy item that can be used for bookmark storage as well as session management.
The item reflects changes to title (name), URI and MIME type (mime-type).
|
a MidoriView |
Returns : |
the proxy |
GtkWidget * midori_view_get_proxy_menu_item (MidoriView *view
);
Retrieves a proxy menu item that is typically added to a Window menu and which on activation switches to the right window/ tab.
The item is created on the first call and will be updated to reflect changes to the icon and title automatically.
The menu item is valid until it is removed from its container.
|
a MidoriView |
Returns : |
the proxy |
GtkWidget * midori_view_get_proxy_tab_label (MidoriView *view
);
midori_view_get_proxy_tab_label
has been deprecated since version 0.5.7 and should not be used in newly-written code. Don't use this label.
Retrieves a proxy tab label that is typically used when adding the view to a notebook.
|
a MidoriView |
Returns : |
the proxy |
constgchar * midori_view_get_selected_text (MidoriView *view
);
Retrieves the currently selected text.
|
a MidoriView |
Returns : |
the selected text, or NULL |
GdkPixbuf * midori_view_get_snapshot (MidoriView *view
,,
gint width);
gint height
midori_view_get_snapshot
is deprecated and should not be used in newly-written code. 0.5.4
Take a snapshot of the view at the given dimensions. The view has to be mapped on the screen.
If width and height are negative, the resulting image is going to be optimized for speed.
|
a MidoriView |
|
the desired width |
|
the desired height |
Returns : |
a newly allocated |
Since 0.2.1
GtkWidget * midori_view_get_tab_menu (MidoriView *view
);
midori_view_get_tab_menu
has been deprecated since version 0.5.7 and should not be used in newly-written code. Use MidoriNotebook API instead.
Retrieves a menu that is typically shown when right-clicking a tab label or equivalent representation.
|
a MidoriView |
Returns : |
a |
Since 0.1.8
gboolean midori_view_get_tls_info (MidoriView *view
,,
void *request,
GTlsCertificate **tls_cert,
GTlsCertificateFlags *tls_flags);
gchar **hostname
GtkWidget * midori_view_get_web_view (MidoriView *view
);
midori_view_get_web_view
has been deprecated since version 0.4.8 and should not be used in newly-written code. Use midori_tab_get_web_view()
instead.
|
a MidoriView |
Returns : |
The |
Since 0.2.5
gfloat midori_view_get_zoom_level (MidoriView *view
);
Determines the current zoom level of the view.
|
a MidoriView |
Returns : |
the current zoom level |
void midori_view_go_back (MidoriView *view
);
Goes back one page in the view.
|
a MidoriView |
void midori_view_go_back_or_forward (MidoriView *view
,);
gint steps
Goes back or forward in history.
|
a MidoriView |
|
number of steps to jump in history |
Since 0.4.5
gboolean midori_view_has_selection (MidoriView *view
);
Determines whether something in the view is selected.
This function returns FALSE
|
a MidoriView |
Returns : |
TRUE |
gboolean midori_view_is_blank (MidoriView *view
);
Determines whether the view is currently empty.
|
a MidoriView |
void midori_view_list_plugins (MidoriView *view
,,
GString *markup);
gboolean html
GtkWidget * midori_view_new_from_view (MidoriView *view
,,
KatzeItem *itemMidoriWebSettings *settings
);
GtkWidget * midori_view_new_with_item (,
KatzeItem *itemMidoriWebSettings *settings
);
midori_view_new_with_item
has been deprecated since version 0.5.8 and should not be used in newly-written code. Use midori_view_new_from_view instead.
Creates a new view, visible by default.
If a view
is specified the returned new view will share
its settings and if applicable re-use the rendering process.
When view
should be passed:
The new one created is a new tab/ window for the old view
A tab was duplicated
When view
may be passed:
Old and new view belong to the same website or group
Don't pass a view
if:
The new view is a completely new website
The item
may contain title, URI and minimized status and will be copied.
Usually settings
should be passed from an existing view or browser.
|
a predating, related MidoriView, or NULL |
|
a NULL |
|
a MidoriWebSettings, or NULL |
Returns : |
a new MidoriView |
Since 0.5.8
GtkWidget * midori_view_new_with_title (const
,gchar *titleMidoriWebSettings *settings
,);
gboolean append
midori_view_new_with_title
is deprecated and should not be used in newly-written code. 0.4.3
Creates a new view with the specified parameters that is visible by default.
|
a title, or NULL |
|
a MidoriWebSettings, or NULL |
|
if TRUE |
Returns : |
a new MidoriView |
Since 0.3.0
void midori_view_populate_popup (MidoriView *view
,,
GtkWidget *menu);
gboolean manual
midori_view_populate_popup
has been deprecated since version 0.5.5 and should not be used in newly-written code. Use midori_view_get_page_context_action()
Populates the given menu
with context menu items
according to the position of the mouse pointer. This
can be used in situations where a custom hotkey
opens the context menu or the default behaviour
needs to be intercepted.
manual
should usually be TRUE
menu
was created by the
|
a MidoriView |
|
a |
|
TRUE |
Since 0.2.5
void midori_view_print (MidoriView *view
);
Prints the contents of the view.
|
a MidoriView |
void midori_view_reload (MidoriView *view
,);
gboolean from_cache
Reloads the view.
|
a MidoriView |
|
whether to allow caching |
gchar * midori_view_save_source (MidoriView *view
,const
,gchar *uriconst
,gchar *outfile);
gboolean use_dom
Saves the data in the view to disk.
|
a MidoriView |
|
an alternative destination URI, or NULL |
|
a destination filename, or NULL |
Returns : |
the destination filename |
Since 0.4.4
void midori_view_search_text (MidoriView *view
,const
,gchar *text,
gboolean case_sensitive);
gboolean forward
Searches a text within the view.
|
a MidoriView |
|
a string |
|
case sensitivity |
|
whether to search forward |
void midori_view_set_colors (MidoriView *view
,,
GdkColor *fg_color);
GdkColor *bg_color
midori_view_set_colors
has been deprecated since version 0.5.7 and should not be used in newly-written code. Use fg_color/ bg_color on Midori.Tab.
Sets colors on the label.
|
a MidoriView |
|
a NULL |
|
a NULL |
void midori_view_set_html (MidoriView *view
,const
,gchar *dataconst
,gchar *uri);
void *web_frame
void midori_view_set_overlay_text (MidoriView *view
,const
);gchar *text
Show a specified URI or text on top of the view. Has no effect with < GTK+ 3.2.0.
|
a MidoriView |
|
a URI or text string |
Since 0.4.5
void midori_view_set_settings (MidoriView *view
,MidoriWebSettings *settings
);
Assigns a settings instance to the view.
|
a MidoriView |
|
a MidoriWebSettings |
void midori_view_set_uri (MidoriView *view
,const
);gchar *uri
Opens the specified URI in the view.
Since 0.3.0 a warning is shown if the view is not yet contained in a browser. This is because extensions can't monitor page loading if that happens.
|
a MidoriView |
void midori_view_set_zoom_level (MidoriView *view
,);
gfloat zoom_level
Sets the current zoom level of the view.
|
a MidoriView |
|
the new zoom level |