diff options
Diffstat (limited to 'frontends/amiga/dt_anim.c')
-rw-r--r-- | frontends/amiga/dt_anim.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c index bd049206c..1162d7214 100644 --- a/frontends/amiga/dt_anim.c +++ b/frontends/amiga/dt_anim.c @@ -40,7 +40,9 @@ #include "netsurf/plotters.h" #include "netsurf/bitmap.h" #include "netsurf/content.h" +#include "content/content.h" #include "content/content_protected.h" +#include "content/content_factory.h" #include "content/llcache.h" #include "amiga/bitmap.h" @@ -72,9 +74,9 @@ static void amiga_dt_anim_destroy(struct content *c); static bool amiga_dt_anim_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx); -static void amiga_dt_anim_open(struct content *c, struct browser_window *bw, +static nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params); -static void amiga_dt_anim_close(struct content *c); +static nserror amiga_dt_anim_close(struct content *c); static nserror amiga_dt_anim_clone(const struct content *old, struct content **newc); static content_type amiga_dt_anim_content_type(void); @@ -167,15 +169,15 @@ bool amiga_dt_anim_convert(struct content *c) amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c; union content_msg_data msg_data; int width, height; - const uint8 *data; + const uint8_t *data; + size_t size; UBYTE *bm_buffer; - ULONG size; struct BitMapHeader *bmh; - unsigned int bm_flags = BITMAP_NEW | BITMAP_OPAQUE; + unsigned int bm_flags = BITMAP_OPAQUE; struct adtFrame adt_frame; APTR clut; - data = (uint8 *)content__get_source_data(c, &size); + data = content__get_source_data(c, &size); if((plugin->dto = NewDTObject(NULL, DTA_SourceType, DTST_MEMORY, @@ -189,7 +191,8 @@ bool amiga_dt_anim_convert(struct content *c) plugin->bitmap = amiga_bitmap_create(width, height, bm_flags); if (!plugin->bitmap) { - msg_data.error = messages_get("NoMemory"); + msg_data.errordata.errorcode = NSERROR_NOMEM; + msg_data.errordata.errormsg = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } @@ -287,18 +290,18 @@ bool amiga_dt_anim_redraw(struct content *c, * \param box box containing c, or 0 if not an object * \param params object parameters, or 0 if not an object */ -void amiga_dt_anim_open(struct content *c, struct browser_window *bw, +nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params) { NSLOG(netsurf, INFO, "amiga_dt_anim_open"); - return; + return NSERROR_OK; } -void amiga_dt_anim_close(struct content *c) +nserror amiga_dt_anim_close(struct content *c) { NSLOG(netsurf, INFO, "amiga_dt_anim_close"); - return; + return NSERROR_OK; } void amiga_dt_anim_reformat(struct content *c, int width, int height) |