| midori Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <midori/midori.h> struct MidoriBrowserClass;MidoriBrowser * midori_browser_new (void);void midori_browser_add_tab (,MidoriBrowser *browser);GtkWidget *widgetvoid midori_browser_close_tab (,MidoriBrowser *browser);GtkWidget *widgetGtkWidget * midori_browser_add_item (,MidoriBrowser *browser);KatzeItem *itemGtkWidget * midori_browser_add_uri (,MidoriBrowser *browserconst);gchar *urivoid midori_browser_activate_action (,MidoriBrowser *browserconst);gchar *namevoid midori_browser_assert_action (,MidoriBrowser *browserconst);gchar *namevoid midori_browser_block_action (,MidoriBrowser *browser);GtkAction *actionvoid midori_browser_unblock_action (,MidoriBrowser *browser);GtkAction *actionvoid midori_browser_set_action_visible (,MidoriBrowser *browserconst,gchar *name);gboolean visibleGtkActionGroup * midori_browser_get_action_group ();MidoriBrowser *browservoid midori_browser_set_current_uri (,MidoriBrowser *browserconst); constgchar *urigchar * midori_browser_get_current_uri ();MidoriBrowser *browservoid midori_browser_set_current_page_smartly (,MidoriBrowser *browser);gint nvoid midori_browser_set_current_tab_smartly (,MidoriBrowser *browser);GtkWidget *viewvoid midori_browser_set_current_page (,MidoriBrowser *browser);gint ngint midori_browser_get_current_page ();MidoriBrowser *browservoid midori_browser_set_current_item (,MidoriBrowser *browser);KatzeItem *itemGtkWidget * midori_browser_get_nth_tab (,MidoriBrowser *browser);gint nvoid midori_browser_set_current_tab (,MidoriBrowser *browser); #define midori_browser_set_tabGtkWidget *widgetGtkWidget * midori_browser_get_current_tab (); #define midori_browser_get_tabMidoriBrowser *browsergint midori_browser_page_num (,MidoriBrowser *browser);GtkWidget *viewGList * midori_browser_get_tabs ();MidoriBrowser *browsergint midori_browser_get_n_pages ();MidoriBrowser *browserKatzeArray * midori_browser_get_proxy_array ();MidoriBrowser *browserMidoriBrowser * midori_browser_get_for_widget ();GtkWidget *widgetvoid midori_browser_quit (); constMidoriBrowser *browsergchar ** midori_browser_get_toolbar_actions (); MidoriWebSettings * midori_browser_get_settings (MidoriBrowser *browser);MidoriBrowser *browservoid midori_browser_update_history (,KatzeItem *itemconst,gchar *typeconst);gchar *eventvoid midori_browser_save_uri (,MidoriBrowser *browserMidoriView *view,const);gchar *urivoid midori_browser_set_inactivity_reset (,MidoriBrowser *browser);gint inactivity_reset
struct MidoriBrowserClass {
GtkWindowClass parent_class;
/* Signals */
void
(*window_object_cleared) (MidoriBrowser* browser,
#ifndef HAVE_WEBKIT2
WebKitWebFrame* web_frame,
#else
void* web_frame,
#endif
JSContextRef* context,
JSObjectRef* window_object);
void
(*statusbar_text_changed) (MidoriBrowser* browser,
const gchar* text);
void
(*element_motion) (MidoriBrowser* browser,
const gchar* link_uri);
void
(*new_window) (MidoriBrowser* browser,
const gchar* uri);
void
(*add_tab) (MidoriBrowser* browser,
GtkWidget* view);
void
(*remove_tab) (MidoriBrowser* browser,
GtkWidget* view);
void
(*activate_action) (MidoriBrowser* browser,
const gchar* name);
void
(*quit) (MidoriBrowser* browser);
};
MidoriBrowser * midori_browser_new (void);
Creates a new browser widget.
A browser is a window with a menubar, toolbars, a notebook, panels and a statusbar. You should mostly treat it as an opaque widget.
Returns : |
a new |
void midori_browser_add_tab (,MidoriBrowser *browser);GtkWidget *widget
Appends a view in the form of a new tab and creates an according item in the Window menu.
|
a |
|
a view |
Since 0.4.9: Return type is void
void midori_browser_close_tab (,MidoriBrowser *browser);GtkWidget *widget
Closes an existing view, removing it and its associated menu item from the browser.
|
a |
|
a view |
GtkWidget * midori_browser_add_item (,MidoriBrowser *browser);KatzeItem *item
|
a |
|
an item |
Returns : |
a |
Since 0.4.9: Return type is GtkWidget*
GtkWidget * midori_browser_add_uri (,MidoriBrowser *browserconst);gchar *uri
Appends an uri in the form of a new view.
|
a |
|
an URI |
Returns : |
a |
Since 0.4.9: Return type is GtkWidget*
void midori_browser_activate_action (,MidoriBrowser *browserconst);gchar *name
Activates the specified action. See also midori_browser_assert_action().
|
a |
|
action, setting=value expression or extension=true|false |
void midori_browser_assert_action (,MidoriBrowser *browserconst);gchar *name
Assert that name is a valid action or setting expression,
if it fails the program will terminate with an error.
To be used with command line interfaces.
|
a |
|
action, setting=value expression or extension=true|false |
Since 0.5.0
void midori_browser_block_action (,MidoriBrowser *browser);GtkAction *action
Blocks built-in behavior of the specified action without
disabling it, which gives you a chance to connect your
own signal handling.
Call midori_browser_unblock_action() to undo the effect.
|
a |
|
the action to be blocked |
Since 0.3.4
void midori_browser_unblock_action (,MidoriBrowser *browser);GtkAction *action
Restores built-in behavior of the specified action after
previously blocking it with midori_browser_block_action().
|
a |
|
the action to be unblocked |
Since 0.3.4
void midori_browser_set_action_visible (,MidoriBrowser *browserconst,gchar *name);gboolean visible
GtkActionGroup * midori_browser_get_action_group ();MidoriBrowser *browser
Retrieves the action group holding all actions used by the browser. It allows obtaining individual actions and adding new actions.
|
a |
Returns : |
the action group of the browser |
Since 0.1.4
void midori_browser_set_current_uri (,MidoriBrowser *browserconst);gchar *uri
Loads the specified URI in the current view.
If the current view is opaque, and cannot load new pages, it will automatically open a new tab.
|
a |
|
an URI |
constgchar * midori_browser_get_current_uri ();MidoriBrowser *browser
Determines the URI loaded in the current view.
If there is no view present at all, NULL
|
a |
Returns : |
the current URI, or NULL |
void midori_browser_set_current_page_smartly (,MidoriBrowser *browser);gint n
void midori_browser_set_current_tab_smartly (,MidoriBrowser *browser);GtkWidget *view
Switches to the tab containing view iff open-tabs-in-the-background is FALSE
|
a |
|
a |
Since 0.4.9
void midori_browser_set_current_page (,MidoriBrowser *browser);gint n
Switches to the page with the index n.
The widget will also grab the focus automatically.
|
a |
|
the index of a page |
gint midori_browser_get_current_page ();MidoriBrowser *browser
Determines the currently selected page.
If there is no page present at all, NULL
|
a |
Returns : |
the selected page, or -1 |
void midori_browser_set_current_item (,MidoriBrowser *browser);KatzeItem *item
Switches to the page containing item, see also midori_browser_set_current_page().
The widget will also grab the focus automatically.
|
a |
|
a |
Since 0.4.8
GtkWidget * midori_browser_get_nth_tab (,MidoriBrowser *browser);gint n
Retrieves the tab at the position page.
If there is no page present at all, NULL
|
a |
|
the index of a tab |
Returns : |
the selected page, or -1 |
Since 0.1.9
void midori_browser_set_current_tab (,MidoriBrowser *browser);GtkWidget *widget
#define midori_browser_set_tab midori_browser_set_current_tab
Switches to the page containing view.
The widget will also grab the focus automatically.
|
a |
|
a |
Since 0.2.6
GtkWidget * midori_browser_get_current_tab ();MidoriBrowser *browser
#define midori_browser_get_tab midori_browser_get_current_tab
Retrieves the currently selected tab.
If there is no tab present at all, NULL
See also midori_browser_get_current_page().
|
a |
Returns : |
the selected tab, or NULL |
Since 0.2.6
gint midori_browser_page_num (,MidoriBrowser *browser);GtkWidget *view
Retrieves the position of widget in the browser.
If there is no page present at all, -1 is returned.
|
a |
|
a widget in the browser |
Returns : |
the index of the widget, or -1 |
Since 0.4.5
GList * midori_browser_get_tabs ();MidoriBrowser *browser
Retrieves the tabs as a list.
|
a |
Returns : |
a newly allocated |
Since 0.2.5
KatzeArray * midori_browser_get_proxy_array ();MidoriBrowser *browser
Retrieves a proxy array representing the respective proxy items. The array is updated automatically.
|
a |
Returns : |
the proxy |
MidoriBrowser * midori_browser_get_for_widget ();GtkWidget *widget
Determines the browser appropriate for the specified widget.
|
a |
Returns : |
a |
void midori_browser_quit ();MidoriBrowser *browser
Quits the browser, including any other browser windows.
This function relys on the application implementing the MidoriBrowser::quit signal. If the browser was added to the MidoriApp, this is handled automatically.
|
a |
constgchar ** midori_browser_get_toolbar_actions ();MidoriBrowser *browser
Retrieves a list of actions which are suitable for use in a toolbar.
Returns : |
a NULL-terminated array of strings with actions |
Since 0.1.8
MidoriWebSettings * midori_browser_get_settings (MidoriBrowser *browser);
Retrieves the settings instance of the browser.
Returns : |
a MidoriWebSettings instance |
Since 0.2.5
void midori_browser_update_history (,KatzeItem *itemconst,gchar *typeconst);gchar *event
|
a |
|
"website", "bookmark" or "download" |
|
"access", "leave", "modify", "delete" |
Since 0.4.7
void midori_browser_save_uri (,MidoriBrowser *browserMidoriView *view,const);gchar *uri