diff options
Diffstat (limited to 'frontends/amiga/dt_sound.c')
-rw-r--r-- | frontends/amiga/dt_sound.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c index e0f48da83..16b4f7c62 100644 --- a/frontends/amiga/dt_sound.c +++ b/frontends/amiga/dt_sound.c @@ -23,6 +23,8 @@ #ifdef WITH_AMIGA_DATATYPES #include "amiga/os3support.h" +#include <string.h> + #include <proto/datatypes.h> #include <proto/dos.h> #include <proto/intuition.h> @@ -33,9 +35,10 @@ #include "utils/messages.h" #include "netsurf/plotters.h" #include "netsurf/content.h" -#include "render/box.h" +#include "html/box.h" #include "content/llcache.h" #include "content/content_protected.h" +#include "content/content_factory.h" #include "amiga/filetype.h" #include "amiga/datatypes.h" @@ -57,7 +60,7 @@ static void amiga_dt_sound_destroy(struct content *c); static bool amiga_dt_sound_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx); -static void amiga_dt_sound_open(struct content *c, struct browser_window *bw, +static nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params); static nserror amiga_dt_sound_clone(const struct content *old, struct content **newc); static content_type amiga_dt_sound_content_type(void); @@ -150,10 +153,10 @@ bool amiga_dt_sound_convert(struct content *c) amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; int width = 50, height = 50; - const uint8 *data; - ULONG size; + const uint8_t *data; + size_t size; - data = (uint8 *)content__get_source_data(c, &size); + data = content__get_source_data(c, &size); plugin->dto = NewDTObject(NULL, DTA_SourceType, DTST_MEMORY, @@ -195,7 +198,7 @@ bool amiga_dt_sound_redraw(struct content *c, .fill_type = PLOT_OP_TYPE_SOLID, .fill_colour = 0xffffff, .stroke_colour = 0x000000, - .stroke_width = 1, + .stroke_width = plot_style_int_to_fixed(1), }; struct rect rect; @@ -220,7 +223,7 @@ bool amiga_dt_sound_redraw(struct content *c, } -void amiga_dt_sound_open(struct content *c, struct browser_window *bw, +nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params) { amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; @@ -247,7 +250,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw, if(plugin->dto && (plugin->immediate == true)) amiga_dt_sound_play(plugin->dto); - return; + return NSERROR_OK; } |