![]() |
![]() |
![]() |
midori Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <midori/midori.h> MidoriApp; MidoriAppClass;void midori_app_add_browser (MidoriApp *app
,);
MidoriBrowser *browserMidoriBrowser * midori_app_create_browser (MidoriApp *app
);MidoriBrowser * midori_app_get_browser (MidoriApp *app
);GList * midori_app_get_browsers (MidoriApp *app
);gboolean midori_app_get_crashed (MidoriApp *app
); constgchar * midori_app_get_name (MidoriApp *app
);gboolean midori_app_instance_is_running (MidoriApp *app
);gboolean midori_app_instance_send_activate (MidoriApp *app
);gboolean midori_app_instance_send_new_browser (MidoriApp *app
);gboolean midori_app_instance_send_uris (MidoriApp *app
,); MidoriApp * midori_app_new (
gchar **urisconst
); MidoriApp * midori_app_new_proxy (gchar *nameMidoriApp *app
);void midori_app_quit (MidoriApp *app
);gboolean midori_app_send_command (MidoriApp *app
,);
gchar **commandvoid midori_app_send_notification (MidoriApp *app
,const
,gchar *titleconst
);gchar *messagevoid midori_app_set_instance_is_running ();
gboolean is_runningvoid midori_app_setup (,
gint *argc,
gchar ** *argument_vectorconst
);GOptionEntry *entriesgboolean midori_debug (const
);gchar *tokenvoid midori_error (const
,gchar *format...
);
void midori_app_add_browser (MidoriApp *app
,);
MidoriBrowser *browser
Adds a
The app will take care of the browser's new-window and quit signals, as well as watch window closing so that the last closed window quits the app. Also the app watches focus changes to indicate the 'current' browser.
MidoriBrowser * midori_app_create_browser (MidoriApp *app
);
Creates a app
.
Note that creating a browser this way can be a lot faster than setting it up manually.
|
a MidoriApp |
Returns : |
a new |
Since 0.1.2
MidoriBrowser * midori_app_get_browser (MidoriApp *app
);
Determines the current browser, which is the one that was last focussed.
|
a MidoriApp |
Returns : |
the current |
Since 0.2.5
GList * midori_app_get_browsers (MidoriApp *app
);
Retrieves the browsers as a list.
|
a MidoriApp |
Returns : |
a newly allocated |
Since 0.2.5
gboolean midori_app_instance_is_running (MidoriApp *app
);
Determines whether an instance of Midori is already running on the default display.
Use the "name" property if you want to run more than one instance.
|
a MidoriApp |
Returns : |
TRUE |
gboolean midori_app_instance_send_activate (MidoriApp *app
);
Sends a message to an instance of Midori already running on the default display, asking to activate it.
Practically the current browser will be focussed.
|
a MidoriApp |
Returns : |
TRUE |
gboolean midori_app_instance_send_new_browser (MidoriApp *app
);
Sends a message to an instance of Midori already running on the default display, asking to open a new browser.
|
a MidoriApp |
Returns : |
TRUE |
gboolean midori_app_instance_send_uris (MidoriApp *app
,);
gchar **uris
Sends a message to an instance of Midori already
running on the default display, asking to open uris
.
The strings in uris
will each be opened in a new tab.
|
a MidoriApp |
|
a string vector of URIs |
Returns : |
TRUE |
MidoriApp * midori_app_new (const gchar *name
);
Instantiates a new MidoriApp singleton.
Returns : |
a new MidoriApp |
MidoriApp * midori_app_new_proxy (MidoriApp *app
);
Instantiates a proxy MidoriApp that can be passed to untrusted code or for sensitive use cases. Properties can be freely changed.
Since 0.5.0
void midori_app_quit (MidoriApp *app
);
Quits the MidoriApp.
Since 0.1.2 the "quit" signal is always emitted before quitting.
|
a MidoriApp |
gboolean midori_app_send_command (MidoriApp *app
,);
gchar **command
Sends a command to an instance of Midori, which is either the current process or an already running instance with the same name on the default display.
Names of GtkAction objects of MidoriBrowser are recognized as commands.
|
a MidoriApp |
|
a string vector of a command to execute |
Returns : |
TRUE |
Since 0.1.8
void midori_app_send_notification (MidoriApp *app
,const
,gchar *titleconst
);gchar *message
Send
There is no guarantee that the message has been sent and displayed, as there might not be any notification service available.
Since 0.1.7
|
a MidoriApp |
|
title of the notification |
|
text of the notification, or NULL |
void midori_app_set_instance_is_running ();
gboolean is_running
void midori_app_setup (,
gint *argc,
gchar ** *argument_vectorconst
);GOptionEntry *entries
Saves the argument vector, initializes threading and registers several custom stock items and prepares localization.
Since 0.4.2