summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-24 10:54:32 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-24 10:54:32 +0100
commit4e7dcde2b056c16a96dde6adcadb29a65ca72fde (patch)
treee935f2978d0d0bd05fba9ca5c4e407a65b47f0c4 /monkey
parent1a22eb2b658215ccb1d5281a4b30a2055fe6b8f6 (diff)
downloadnetsurf-4e7dcde2b056c16a96dde6adcadb29a65ca72fde.tar.gz
netsurf-4e7dcde2b056c16a96dde6adcadb29a65ca72fde.tar.bz2
Update monkey to use bitmap render API
Diffstat (limited to 'monkey')
-rw-r--r--monkey/Makefile.target5
-rw-r--r--monkey/bitmap.c9
-rw-r--r--monkey/thumbnail.c30
3 files changed, 11 insertions, 33 deletions
diff --git a/monkey/Makefile.target b/monkey/Makefile.target
index cb7bf1717..4f73ad068 100644
--- a/monkey/Makefile.target
+++ b/monkey/Makefile.target
@@ -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))
diff --git a/monkey/bitmap.c b/monkey/bitmap.c
index 16c98b594..5605073ba 100644
--- a/monkey/bitmap.c
+++ b/monkey/bitmap.c
@@ -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;
diff --git a/monkey/thumbnail.c b/monkey/thumbnail.c
deleted file mode 100644
index b49944b12..000000000
--- a/monkey/thumbnail.c
+++ /dev/null
@@ -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;
-}