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
This commit is contained in:
Michael Drake 2011-02-19 22:17:54 +00:00
parent bd48a052a3
commit a66575dfeb
13 changed files with 18 additions and 18 deletions

View File

@ -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)) \

View File

@ -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)

View File

@ -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)

View File

@ -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"

View File

@ -20,6 +20,7 @@
#import "desktop/browser.h"
#import "desktop/plotters.h"
#import "desktop/thumbnail.h"
#import "content/urldb.h"
#import "image/bitmap.h"

View File

@ -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);

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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();

View File

@ -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"

View File

@ -20,6 +20,7 @@
#include "content/urldb.h"
#include "desktop/browser.h"
#include "desktop/thumbnail.h"
#include "utils/log.h"
#include "image/bitmap.h"