diff --git a/monkey/browser.c b/monkey/browser.c index 4eef62538..dfd2dcf6c 100644 --- a/monkey/browser.c +++ b/monkey/browser.c @@ -28,6 +28,7 @@ #include "desktop/mouse.h" #include "desktop/gui_window.h" #include "desktop/browser.h" +#include "desktop/plotters.h" #include "content/hlcache.h" #include "monkey/browser.h" @@ -423,7 +424,7 @@ monkey_window_handle_redraw(int argc, char **argv) struct redraw_context ctx = { .interactive = true, .background_images = true, - .plot = &monkey_plotters + .plot = monkey_plotters }; if (argc != 3 && argc != 7) { diff --git a/monkey/plot.c b/monkey/plot.c index bd5b0a18f..50f812480 100644 --- a/monkey/plot.c +++ b/monkey/plot.c @@ -95,7 +95,7 @@ monkey_plot_clip(const struct rect *clip) return true; } -const struct plotter_table monkey_plotters = { +static const struct plotter_table plotters = { .clip = monkey_plot_clip, .arc = monkey_plot_arc, .disc = monkey_plot_disc, @@ -107,3 +107,5 @@ const struct plotter_table monkey_plotters = { .text = monkey_plot_text, .option_knockout = true, }; + +const struct plotter_table* monkey_plotters = &plotters; diff --git a/monkey/plot.h b/monkey/plot.h index 7be3d699b..3632bcf4a 100644 --- a/monkey/plot.h +++ b/monkey/plot.h @@ -1,5 +1,26 @@ +/* + * Copyright 2016 Vincent Sanders + * + * 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 . + */ -#include "desktop/plotters.h" +#ifndef NS_MONKEY_PLOT_H +#define NS_MONKEY_PLOT_H -extern const struct plotter_table monkey_plotters; +struct plotter_table; +extern const struct plotter_table *monkey_plotters; + +#endif