(*add_browser) (MidoriApp* app,
MidoriBrowser* browser);
void
+ (*remove_browser) (MidoriApp* app,
+ MidoriBrowser* browser);
+ void
(*quit) (MidoriApp* app);
};
enum {
ADD_BROWSER,
+ REMOVE_BROWSER,
QUIT,
LAST_SIGNAL
midori_browser_destroy_cb (MidoriBrowser* browser,
MidoriApp* app)
{
+ g_signal_emit (app, signals[REMOVE_BROWSER], 0, browser);
katze_array_remove_item (app->browsers, browser);
if (!katze_array_is_empty (app->browsers))
return FALSE;
G_TYPE_NONE, 1,
MIDORI_TYPE_BROWSER);
+ /**
+ * MidoriApp::remove-browser:
+ * @app: the object on which the signal is emitted
+ * @browser: a #MidoriBrowser
+ *
+ * A new browser is being added to the app.
+ *
+ * Since: 0.1.7
+ */
+ signals[REMOVE_BROWSER] = g_signal_new (
+ "remove-browser",
+ G_TYPE_FROM_CLASS (class),
+ (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+ 0,
+ 0,
+ NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ MIDORI_TYPE_BROWSER);
+
signals[QUIT] = g_signal_new (
"quit",
G_TYPE_FROM_CLASS (class),
*
* Return value: a new #MidoriBrowser
*
- * Since: 1.0.2
+ * Since: 0.1.2
**/
MidoriBrowser*
midori_app_create_browser (MidoriApp* app)