diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-02-19 22:17:54 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-02-19 22:17:54 +0000 |
commit | a66575dfebd6460d5134c22543458030c7ae817d (patch) | |
tree | 183be1a6e9f58240198614e373030ad791562de8 | |
parent | bd48a052a3b621233438bce25915aa3360502730 (diff) | |
download | netsurf-a66575dfebd6460d5134c22543458030c7ae817d.tar.gz netsurf-a66575dfebd6460d5134c22543458030c7ae817d.tar.bz2 |
Remove thumbnail_create() from browser.h. Make RO front end use the core thumbnail_redraw function. Make other front ends include the right header for thumbnail_create().
svn path=/trunk/netsurf/; revision=11716
-rw-r--r-- | Makefile.sources | 3 | ||||
-rwxr-xr-x | amiga/thumbnail.c | 1 | ||||
-rwxr-xr-x | atari/thumbnail.c | 2 | ||||
-rw-r--r-- | beos/beos_thumbnail.cpp | 1 | ||||
-rw-r--r-- | cocoa/thumbnail.m | 1 | ||||
-rw-r--r-- | desktop/browser.h | 4 | ||||
-rw-r--r-- | desktop/history_core.c | 1 | ||||
-rw-r--r-- | framebuffer/thumbnail.c | 2 | ||||
-rw-r--r-- | gtk/thumbnail.c | 1 | ||||
-rw-r--r-- | riscos/save.c | 1 | ||||
-rw-r--r-- | riscos/thumbnail.c | 17 | ||||
-rw-r--r-- | riscos/window.c | 1 | ||||
-rw-r--r-- | windows/thumbnail.c | 1 |
13 files changed, 18 insertions, 18 deletions
diff --git a/Makefile.sources b/Makefile.sources index a8e18e1c0..6ca7cfcab 100644 --- a/Makefile.sources +++ b/Makefile.sources @@ -19,7 +19,8 @@ S_UTILS := base64.c filename.c hashtable.c http.c locale.c messages.c \ S_DESKTOP := cookies.c history_global_core.c hotlist.c knockout.c \ mouse.c options.c plot_style.c print.c search.c searchweb.c \ - scroll.c sslcert.c textarea.c tree.c tree_url_node.c version.c \ + scroll.c sslcert.c textarea.c thumbnail.c tree.c \ + tree_url_node.c version.c # S_COMMON are sources common to all builds S_COMMON := $(addprefix content/,$(S_CONTENT)) \ diff --git a/amiga/thumbnail.c b/amiga/thumbnail.c index 44bd985cb..bbad817f6 100755 --- a/amiga/thumbnail.c +++ b/amiga/thumbnail.c @@ -31,6 +31,7 @@ #include "amiga/options.h" #include "content/urldb.h" #include "desktop/plotters.h" +#include "desktop/thumbnail.h" bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, const char *url) diff --git a/atari/thumbnail.c b/atari/thumbnail.c index d267271bf..ff1c09eed 100755 --- a/atari/thumbnail.c +++ b/atari/thumbnail.c @@ -16,7 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "desktop/browser.h" +#include "desktop/thumbnail.h" bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap, const char *url) diff --git a/beos/beos_thumbnail.cpp b/beos/beos_thumbnail.cpp index c093d34d4..7f9395a34 100644 --- a/beos/beos_thumbnail.cpp +++ b/beos/beos_thumbnail.cpp @@ -33,6 +33,7 @@ extern "C" { #include "content/urldb.h" #include "desktop/plotters.h" #include "desktop/browser.h" +#include "desktop/thumbnail.h" #include "image/bitmap.h" #include "render/font.h" #include "utils/log.h" diff --git a/cocoa/thumbnail.m b/cocoa/thumbnail.m index 70185affe..26f1a7a65 100644 --- a/cocoa/thumbnail.m +++ b/cocoa/thumbnail.m @@ -20,6 +20,7 @@ #import "desktop/browser.h" #import "desktop/plotters.h" +#import "desktop/thumbnail.h" #import "content/urldb.h" #import "image/bitmap.h" diff --git a/desktop/browser.h b/desktop/browser.h index c12f2113c..9f80d7c05 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -291,10 +291,6 @@ void global_history_add(const char *url); void global_history_add_recent(const char *url); char **global_history_get_recent(int *count); -/* In platform specific thumbnail.c. */ -bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap, - const char *url); - /* In platform specific schedule.c. */ void schedule(int t, void (*callback)(void *p), void *p); void schedule_remove(void (*callback)(void *p), void *p); diff --git a/desktop/history_core.c b/desktop/history_core.c index 96a760a9d..0449a3d18 100644 --- a/desktop/history_core.c +++ b/desktop/history_core.c @@ -34,6 +34,7 @@ #include "desktop/gui.h" #include "desktop/history_core.h" #include "desktop/plotters.h" +#include "desktop/thumbnail.h" #include "image/bitmap.h" #include "render/font.h" #include "utils/log.h" diff --git a/framebuffer/thumbnail.c b/framebuffer/thumbnail.c index 47340fd6c..50b9ba932 100644 --- a/framebuffer/thumbnail.c +++ b/framebuffer/thumbnail.c @@ -16,7 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "desktop/browser.h" +#include "desktop/thumbnail.h" #include "content/urldb.h" bool diff --git a/gtk/thumbnail.c b/gtk/thumbnail.c index 19bea0548..2523919e6 100644 --- a/gtk/thumbnail.c +++ b/gtk/thumbnail.c @@ -31,6 +31,7 @@ #include "content/urldb.h" #include "desktop/plotters.h" #include "desktop/browser.h" +#include "desktop/thumbnail.h" #include "gtk/scaffolding.h" #include "gtk/plotters.h" #include "gtk/bitmap.h" diff --git a/riscos/save.c b/riscos/save.c index 2430c13aa..a47de318f 100644 --- a/riscos/save.c +++ b/riscos/save.c @@ -43,6 +43,7 @@ #include "desktop/save_complete.h" #include "desktop/save_text.h" #include "desktop/selection.h" +#include "desktop/thumbnail.h" #include "image/bitmap.h" #include "render/box.h" #include "render/form.h" diff --git a/riscos/thumbnail.c b/riscos/thumbnail.c index fba43f6bf..9229ebd2e 100644 --- a/riscos/thumbnail.c +++ b/riscos/thumbnail.c @@ -35,6 +35,7 @@ #include "content/hlcache.h" #include "content/urldb.h" #include "desktop/plotters.h" +#include "desktop/thumbnail.h" #include "image/bitmap.h" #include "render/font.h" #include "riscos/bitmap.h" @@ -83,7 +84,6 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, { float scale = 1.0; struct thumbnail_save_area *save_area; - struct rect clip; osspriteop_area *sprite_area = NULL; osspriteop_header *sprite_header = NULL; _kernel_oserror *error; @@ -115,10 +115,9 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, ro_plot_origin_x = 0; ro_plot_origin_y = bitmap->height * 2; if (content_get_width(content)) - scale = (float)bitmap->width / - (float)content_get_width(content); + scale = thumbnail_get_redraw_scale(content, bitmap->width); + ro_plot_set_scale(scale); - current_redraw_browser = NULL; /* no selection */ /* switch output and redraw */ save_area = thumbnail_switch_output(sprite_area, sprite_header); @@ -130,13 +129,9 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, rufl_invalidate_cache(); colourtrans_set_gcol(os_COLOUR_WHITE, colourtrans_SET_BG_GCOL, os_ACTION_OVERWRITE, 0); - os_clg(); - clip.x0 = 0; - clip.y0 = 0; - clip.x1 = bitmap->width; - clip.y1 = bitmap->height; - content_redraw(content, 0, 0, bitmap->width, bitmap->height, - &clip, scale, 0xFFFFFF); + + thumbnail_redraw(content, bitmap->width, bitmap->height); + thumbnail_restore_output(save_area); rufl_invalidate_cache(); diff --git a/riscos/window.c b/riscos/window.c index ab5fcab3c..1aa2a82f2 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -50,6 +50,7 @@ #include "desktop/mouse.h" #include "desktop/plotters.h" #include "desktop/textinput.h" +#include "desktop/thumbnail.h" #include "desktop/tree.h" #include "desktop/gui.h" #include "render/box.h" diff --git a/windows/thumbnail.c b/windows/thumbnail.c index 729e642dd..83c72facc 100644 --- a/windows/thumbnail.c +++ b/windows/thumbnail.c @@ -20,6 +20,7 @@ #include "content/urldb.h" #include "desktop/browser.h" +#include "desktop/thumbnail.h" #include "utils/log.h" #include "image/bitmap.h" |