Update monkey to use bitmap render API

This commit is contained in:
Vincent Sanders 2015-04-24 10:54:32 +01:00
parent 1a22eb2b65
commit 4e7dcde2b0
3 changed files with 11 additions and 33 deletions

View File

@ -57,9 +57,8 @@ endif
# ----------------------------------------------------------------------------
# S_MONKEY are sources purely for the MONKEY build
S_MONKEY := main.c utils.c filetype.c schedule.c \
bitmap.c plot.c browser.c download.c thumbnail.c \
401login.c cert.c font.c poll.c dispatch.c fetch.c
S_MONKEY := main.c utils.c filetype.c schedule.c bitmap.c plot.c browser.c \
download.c 401login.c cert.c font.c poll.c dispatch.c fetch.c
S_MONKEY := $(addprefix monkey/,$(S_MONKEY))

View File

@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "utils/errors.h"
#include "image/bitmap.h"
#include "monkey/bitmap.h"
@ -123,6 +124,13 @@ static int bitmap_get_height(void *bitmap)
return bmap->height;
}
static nserror bitmap_render(struct bitmap *bitmap,
struct hlcache_handle *content)
{
fprintf(stdout, "GENERIC BITMAP RENDER\n");
return NSERROR_OK;
}
static struct gui_bitmap_table bitmap_table = {
.create = bitmap_create,
.destroy = bitmap_destroy,
@ -136,6 +144,7 @@ static struct gui_bitmap_table bitmap_table = {
.get_bpp = bitmap_get_bpp,
.save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
struct gui_bitmap_table *monkey_bitmap_table = &bitmap_table;

View File

@ -1,30 +0,0 @@
/*
* Copyright 2011 Daniel Silverstone <dsilvers@digital-scurf.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
* NetSurf is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* NetSurf is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include "desktop/thumbnail.h"
#include "content/hlcache.h"
#include "monkey/browser.h"
bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap)
{
fprintf(stdout, "GENERIC THUMBNAIL\n");
return false;
}