[project @ 2003-09-10 22:27:15 by jmb]
Add support for Draw and Sprite files svn path=/import/netsurf/; revision=281
This commit is contained in:
parent
f33b3e6f52
commit
b858507d90
|
@ -12,6 +12,12 @@ RMEnsure WindowManager 3.80 Error 0 NetSurf requires the Nested Window Manager.
|
|||
RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.02 RMLoad System:Modules.CallASWI
|
||||
RMEnsure UtilityModule 3.70 RMEnsure CallASWI 0.02 Error NetSurf requires the CallASWI module
|
||||
|
||||
| Ensure DrawFile module is installed
|
||||
| http://acorn.riscos.com/riscos/releases/drawfile.arc
|
||||
| Should be installed in !System.310.Modules
|
||||
RMEnsure UtilityModule 3.50 RMEnsure DrawFile 1.30 RMLoad System:Modules.DrawFile
|
||||
RMEnsure UtilityModule 3.50 RMEnsure DrawFile 1.30 Error NetSurf requires the DrawFile module
|
||||
|
||||
| Ensure SharedUnixLibrary is installed
|
||||
| http://www.chocky.org/unix/usage.html
|
||||
RMEnsure SharedUnixLibrary 1.02 RMLoad System:Modules.SharedULib
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$Id: TODO-HTML,v 1.4 2003/09/03 21:58:54 jmb Exp $
|
||||
$Id: TODO-HTML,v 1.5 2003/09/10 22:27:15 jmb Exp $
|
||||
|
||||
TODO-HTML file for NetSurf.
|
||||
|
||||
|
@ -25,7 +25,6 @@ Tables:
|
|||
column spanning (only colspan=0 needs implementing)
|
||||
|
||||
Images:
|
||||
display ALT text,
|
||||
MAP,
|
||||
AREA
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
/** \file
|
||||
* Content handling (implementation).
|
||||
*
|
||||
*
|
||||
* This implementation is based on the ::handler_map array, which maps
|
||||
* ::content_type to the functions which implement that type.
|
||||
*/
|
||||
|
@ -24,6 +24,8 @@
|
|||
#include "netsurf/riscos/jpeg.h"
|
||||
#include "netsurf/riscos/png.h"
|
||||
#include "netsurf/riscos/gif.h"
|
||||
#include "netsurf/riscos/sprite.h"
|
||||
#include "netsurf/riscos/draw.h"
|
||||
#include "netsurf/riscos/plugin.h"
|
||||
#endif
|
||||
#include "netsurf/utils/log.h"
|
||||
|
@ -38,9 +40,14 @@ struct mime_entry {
|
|||
/** A map from MIME type to ::content_type. Must be sorted by mime_type. */
|
||||
static const struct mime_entry mime_map[] = {
|
||||
#ifdef riscos
|
||||
{"application/drawfile", CONTENT_DRAW},
|
||||
{"application/x-drawfile", CONTENT_DRAW},
|
||||
{"image/drawfile", CONTENT_DRAW},
|
||||
{"image/gif", CONTENT_GIF},
|
||||
{"image/jpeg", CONTENT_JPEG},
|
||||
{"image/png", CONTENT_PNG},
|
||||
{"image/x-drawfile", CONTENT_DRAW},
|
||||
{"image/x-riscos-sprite", CONTENT_SPRITE},
|
||||
#endif
|
||||
{"text/css", CONTENT_CSS},
|
||||
{"text/html", CONTENT_HTML},
|
||||
|
@ -88,6 +95,10 @@ static const struct handler_entry handler_map[] = {
|
|||
nspng_reformat, nspng_destroy, nspng_redraw, 0, 0, 0},
|
||||
{nsgif_create, nsgif_process_data, nsgif_convert, nsgif_revive,
|
||||
nsgif_reformat, nsgif_destroy, nsgif_redraw, 0, 0, 0},
|
||||
{sprite_create, sprite_process_data, sprite_convert, sprite_revive,
|
||||
sprite_reformat, sprite_destroy, sprite_redraw, 0, 0, 0},
|
||||
{draw_create, draw_process_data, draw_convert, draw_revive,
|
||||
draw_reformat, draw_destroy, draw_redraw, 0, 0, 0},
|
||||
{plugin_create, plugin_process_data, plugin_convert, plugin_revive,
|
||||
plugin_reformat, plugin_destroy, plugin_redraw,
|
||||
plugin_add_instance, plugin_remove_instance,
|
||||
|
@ -296,7 +307,7 @@ void content_redraw(struct content *c, long x, long y,
|
|||
assert(c != 0);
|
||||
if (handler_map[c->type].redraw != 0)
|
||||
handler_map[c->type].redraw(c, x, y, width, height,
|
||||
clip_x0, clip_y0, clip_x1, clip_y1);
|
||||
clip_x0, clip_y0, clip_x1, clip_y1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#include "netsurf/riscos/jpeg.h"
|
||||
#include "netsurf/riscos/plugin.h"
|
||||
#include "netsurf/riscos/png.h"
|
||||
#include "netsurf/riscos/sprite.h"
|
||||
#include "netsurf/riscos/draw.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -52,6 +54,8 @@ typedef enum {
|
|||
#ifdef riscos
|
||||
CONTENT_PNG,
|
||||
CONTENT_GIF,
|
||||
CONTENT_SPRITE,
|
||||
CONTENT_DRAW,
|
||||
CONTENT_PLUGIN,
|
||||
#endif
|
||||
CONTENT_OTHER,
|
||||
|
@ -106,6 +110,8 @@ struct content {
|
|||
struct content_jpeg_data jpeg;
|
||||
struct content_png_data png;
|
||||
struct content_gif_data gif;
|
||||
struct content_sprite_data sprite;
|
||||
struct content_draw_data draw;
|
||||
struct content_plugin_data plugin;
|
||||
#endif
|
||||
struct content_other_data other;
|
||||
|
|
2
makefile
2
makefile
|
@ -13,7 +13,7 @@ OBJECTS_COMMON = cache.o content.o fetch.o fetchcache.o other.o \
|
|||
OBJECTS = $(OBJECTS_COMMON) \
|
||||
browser.o netsurf.o \
|
||||
dialog.o download.o gif.o gui.o jpeg.o menus.o png.o theme.o plugin.o \
|
||||
options.o filetype.o font.o uri.o htmlredraw.o
|
||||
options.o filetype.o font.o uri.o htmlredraw.o sprite.o draw.o
|
||||
OBJECTS_DEBUG = $(OBJECTS_COMMON) \
|
||||
netsurfd.o \
|
||||
optionsd.o filetyped.o fontd.o
|
||||
|
|
|
@ -20,10 +20,12 @@ struct type_entry {
|
|||
static const struct type_entry type_map[] = {
|
||||
{0x188, "application/x-shockwave-flash"},
|
||||
{0x695, "image/gif"},
|
||||
{0xaff, "image/x-drawfile"},
|
||||
{0xb60, "image/png"},
|
||||
{0xc85, "image/jpeg"},
|
||||
{0xf79, "text/css"},
|
||||
{0xfaf, "text/html"},
|
||||
{0xff9, "image/x-riscos-sprite"},
|
||||
{0xfff, "text/plain"},
|
||||
};
|
||||
#define TYPE_MAP_COUNT (sizeof(type_map) / sizeof(type_map[0]))
|
||||
|
|
Loading…
Reference in New Issue