From c9dc0c5d552fbccaa3a4f1b23bd143f450101873 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 27 Oct 2009 22:58:11 +0100 Subject: [PATCH] Make midori_view_get_snapshot a public function --- midori/midori-browser.c | 5 ----- midori/midori-view.c | 22 ++++++++++++++++------ midori/midori-view.h | 5 +++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index e675dcf8..819f2943 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -996,11 +996,6 @@ midori_browser_speed_dial_get_next_free_slot (void) return slot_id; } -GdkPixbuf* -midori_view_get_snapshot (MidoriView* view, - guint width, - guint height); - static void midori_browser_add_speed_dial (MidoriBrowser* browser) { diff --git a/midori/midori-view.c b/midori/midori-view.c index 2f8bedc0..d9de94e9 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -47,11 +47,6 @@ midori_search_action_get_icon (KatzeNet* net, static void midori_view_construct_web_view (MidoriView* view); -GdkPixbuf* -midori_view_get_snapshot (MidoriView* view, - gint width, - gint height); - static void midori_view_item_meta_data_changed (KatzeItem* item, const gchar* key, @@ -4056,7 +4051,22 @@ midori_view_execute_script (MidoriView* view, return TRUE; } -/* For now this is private API */ +/** + * midori_view_get_snapshot + * @view: a #MidoriView + * @width: the desired width + * @height: the desired height + * + * Take a snapshot of the view at the given dimensions. The + * view has to be mapped on the screen. + * + * If width and height are negative, the resulting + * image is going to be optimized for speed. + * + * Returns: a newly allocated #GdkPixbuf + * + * Since: 0.2.1 + **/ GdkPixbuf* midori_view_get_snapshot (MidoriView* view, gint width, diff --git a/midori/midori-view.h b/midori/midori-view.h index 0dbfc52b..fc798fbd 100644 --- a/midori/midori-view.h +++ b/midori/midori-view.h @@ -195,6 +195,11 @@ midori_view_execute_script (MidoriView* view, const gchar* script, gchar** exception); +GdkPixbuf* +midori_view_get_snapshot (MidoriView* view, + gint width, + gint height); + G_END_DECLS #endif /* __MIDORI_VIEW_H__ */ -- 2.39.5