27#include <proto/exec.h>
28#include <proto/intuition.h>
29#include <proto/utility.h>
77 struct Node *node = NULL;
86 NSLOG(netsurf, INFO,
"plugin_hack registered %s",
87 lwc_string_data(
type));
90 lwc_string_data(
type),
97 }
while (node != NULL);
105 bool quirks,
struct content **c)
115 llcache, fallback_charset, quirks);
121 *c = (
struct content *) plugin;
128 NSLOG(netsurf, INFO,
"amiga_plugin_hack_convert");
142 NSLOG(netsurf, INFO,
"amiga_plugin_hack_destroy %p", plugin);
153 .fill_colour = 0xffffff,
154 .stroke_colour = 0x000000,
160 NSLOG(netsurf, INFO,
"amiga_plugin_hack_redraw");
192 NSLOG(netsurf, INFO,
"amiga_plugin_hack_open %s",
207 NSLOG(netsurf, INFO,
"amiga_plugin_hack_close");
213 NSLOG(netsurf, INFO,
"amiga_plugin_hack_reformat");
226 NSLOG(netsurf, INFO,
"amiga_plugin_hack_clone");
247 *newc = (
struct content *) plugin;
259 lwc_string *plugincmd;
263 if(c == NULL)
return;
266 if(plugincmd == NULL)
return;
273 NSLOG(netsurf, INFO,
"Attempting to execute %s", full_cmd);
275 in = Open(
"NIL:", MODE_OLDFILE);
276 out = Open(
"NIL:", MODE_NEWFILE);
283 NP_Name,
"NetSurf External Process",
lwc_string * ami_mime_content_to_cmd(struct hlcache_handle *c)
struct Node * ami_mime_has_cmd(lwc_string **mimetype, struct Node *start_node)
Return all MIME types containing a plugincmd.
void content_destroy(struct content *c)
Destroy and free a content.
lwc_string * content__get_mime_type(struct content *c)
Retrieve mime-type of content.
void content_set_done(struct content *c)
Put a content in status CONTENT_STATUS_DONE.
nserror content__init(struct content *c, const content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, llcache_handle *llcache, const char *fallback_charset, bool quirks)
nsurl * content_get_url(struct content *c)
Retrieve URL associated with content.
nserror content__clone(const struct content *c, struct content *nc)
Clone a content's data members.
void content_set_ready(struct content *c)
Put a content in status CONTENT_STATUS_READY and unlock the content.
void content_set_status(struct content *c, const char *status_message)
Updates content with new status.
nserror content_factory_register_handler(const char *mime_type, const content_handler *handler)
Register a handler with the content factory.
Protected interface to Content handling.
@ CONTENT_STATUS_READY
Some parts of content still being loaded, but can be displayed.
@ CONTENT_STATUS_DONE
Content has completed all processing.
content_type
The type of a content.
@ CONTENT_PLUGIN
Navigator API Plugins.
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
@ NSERROR_CLONE_FAILED
Failed to clone handle.
Public content interface.
struct nsurl * hlcache_handle_get_url(const struct hlcache_handle *handle)
Retrieve the URL associated with a high level cache handle.
Target independent plotting interface.
static struct llcache_s * llcache
low level cache state
Low-level resource cache (interface)
#define NSLOG(catname, level, logmsg, args...)
Localised message support (interface).
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
char * ASPrintf(const char *fmt,...)
Minimal compatibility header for AmigaOS 3.
plot_font_style_t const *const plot_style_font
#define plot_style_int_to_fixed(v)
@ PLOT_OP_TYPE_SOLID
Solid colour.
static void amiga_plugin_hack_destroy(struct content *c)
void amiga_plugin_hack_execute(struct hlcache_handle *c)
static content_type amiga_plugin_hack_content_type(void)
static const content_handler amiga_plugin_hack_content_handler
nserror amiga_plugin_hack_init(void)
static nserror amiga_plugin_hack_create(const content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)
static nserror amiga_plugin_hack_clone(const struct content *old, struct content **newc)
struct amiga_plugin_hack_content amiga_plugin_hack_content
static nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params)
Handle a window containing a CONTENT_PLUGIN being opened.
static void amiga_plugin_hack_reformat(struct content *c, int width, int height)
static bool amiga_plugin_hack_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
static bool amiga_plugin_hack_convert(struct content *c)
static nserror amiga_plugin_hack_close(struct content *c)
Content operation function table.
nserror(* create)(const struct content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)
parameters to content redraw
int height
vertical dimension
int y
coordinate for top-left of redraw
int x
coordinate for top-left of redraw
int width
dimensions to render content at (for scaling contents with intrinsic dimensions)
Content which corresponds to a single URL.
bool quirks
Content is in quirks mode.
int height
Height dimension, if applicable.
char * fallback_charset
Fallback charset, or NULL.
int width
Width dimension, if applicable.
const struct content_handler * handler
Handler for content.
content_status status
Current status.
Representation of an HTTP parameter.
Handle to low-level cache object.
Parameters for object element and similar elements.
Plot style for stroke/fill plotters.
plot_operation_type_t fill_type
Fill plot type.
nserror(* text)(const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
nserror(* rectangle)(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rectangle)
Plots a rectangle.
const struct plotter_table * plot
Current plot operation table.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.