From 102810842f05fb14b4d6d1c936b1e470078a5f16 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 25 Apr 2010 18:48:04 +0200 Subject: [PATCH] Expose browsers in MidoriApp as GList --- midori/midori-app.c | 16 ++++++++++++++++ midori/midori-app.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/midori/midori-app.c b/midori/midori-app.c index 29910036..0758bb2e 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -1146,7 +1146,23 @@ midori_app_create_browser (MidoriApp* app) "history", app->history, NULL); } +/** + * midori_app_get_browsers: + * @app: a #MidoriApp + * + * Retrieves the browsers as a list. + * + * Return value: a newly allocated #Glist of #MidoriBrowser + * + * Since: 0.2.5 + **/ +GList* +midori_app_get_browsers (MidoriApp* app) +{ + g_return_val_if_fail (MIDORI_IS_APP (app), NULL); + return katze_array_get_items (app->browsers); +} /** * midori_app_quit: * @app: a #MidoriApp diff --git a/midori/midori-app.h b/midori/midori-app.h index 7c280967..8eeef4af 100644 --- a/midori/midori-app.h +++ b/midori/midori-app.h @@ -65,6 +65,9 @@ midori_app_add_browser (MidoriApp* app, MidoriBrowser* midori_app_create_browser (MidoriApp* app); +GList* +midori_app_get_browsers (MidoriApp* app); + void midori_app_quit (MidoriApp* app); -- 2.39.5