midori-app

midori-app

Functions

Includes

#include <midori/midori.h>

Description

Functions

midori_app_new ()

MidoriApp *
midori_app_new (const gchar *name);

Instantiates a new MidoriApp singleton.

Returns

a new MidoriApp


midori_app_new_proxy ()

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.

Parameters

app

a MidoriApp, or NULL

 

Returns

a new MidoriApp

Since: 0.5.0


midori_app_get_name ()

const gchar *
midori_app_get_name (MidoriApp *app);

midori_app_get_crashed ()

gboolean
midori_app_get_crashed (MidoriApp *app);

midori_app_set_instance_is_running ()

void
midori_app_set_instance_is_running (gboolean is_running);

midori_app_instance_is_running ()

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.

Parameters

app

a MidoriApp

 

Returns

TRUE if an instance is already running


midori_app_instance_send_activate ()

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.

Parameters

app

a MidoriApp

 

Returns

TRUE if the message was sent successfully


midori_app_instance_send_new_browser ()

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.

Parameters

app

a MidoriApp

 

Returns

TRUE if the message was sent successfully


midori_app_instance_send_uris ()

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.

Parameters

app

a MidoriApp

 

uris

a string vector of URIs

 

Returns

TRUE if the message was sent successfully


midori_app_send_command ()

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.

Parameters

app

a MidoriApp

 

command

a string vector of a command to execute

 

Returns

TRUE if the message was sent successfully

Since: 0.1.8


midori_app_add_browser ()

void
midori_app_add_browser (MidoriApp *app,
                        MidoriBrowser *browser);

Adds a MidoriBrowser to the MidoriApp.

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.

Parameters

app

a MidoriApp

 

browser

a MidoriBrowser

 

Returns

a new MidoriApp


midori_app_create_browser ()

MidoriBrowser *
midori_app_create_browser (MidoriApp *app);

Creates a MidoriBrowser which inherits its settings, bookmarks, trash, search engines and history from app .

Note that creating a browser this way can be a lot faster than setting it up manually.

Parameters

app

a MidoriApp

 

Returns

a new MidoriBrowser

Since: 0.1.2


midori_app_get_browser ()

MidoriBrowser *
midori_app_get_browser (MidoriApp *app);

Determines the current browser, which is the one that was last focussed.

Parameters

app

a MidoriApp

 

Returns

the current MidoriBrowser

Since: 0.2.5


midori_app_get_browsers ()

GList *
midori_app_get_browsers (MidoriApp *app);

Retrieves the browsers as a list.

Parameters

app

a MidoriApp

 

Returns

a newly allocated Glist of MidoriBrowser.

[transfer container][element-type Midori.Browser]

Since: 0.2.5


midori_app_quit ()

void
midori_app_quit (MidoriApp *app);

Quits the MidoriApp.

Since 0.1.2 the "quit" signal is always emitted before quitting.

Parameters

app

a MidoriApp

 

midori_app_send_notification ()

void
midori_app_send_notification (MidoriApp *app,
                              const gchar *title,
                              const gchar *message);

Send message to a notification service to display it.

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

Parameters

app

a MidoriApp

 

title

title of the notification

 

message

text of the notification, or NULL

 

midori_app_setup ()

void
midori_app_setup (gint *argc,
                  gchar ** *argument_vector,
                  const GOptionEntry *entries);

Saves the argument vector, initializes threading and registers several custom stock items and prepares localization.

Since: 0.4.2


midori_debug ()

gboolean
midori_debug (const gchar *token);

midori_error ()

void
midori_error (const gchar *format,
              ...);

Types and Values