summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-08-11 22:08:26 +0000
committerJames Bursa <james@netsurf-browser.org>2004-08-11 22:08:26 +0000
commitacfb4c0adb113b0dfaff7f07e93be58fd4238bd6 (patch)
tree4d0775011a0f7502618b26308eb80139f28d68d3 /riscos
parent45b241906ed3b29ee6bd0e62fe71f1f5a7facba5 (diff)
downloadnetsurf-acfb4c0adb113b0dfaff7f07e93be58fd4238bd6.tar.gz
netsurf-acfb4c0adb113b0dfaff7f07e93be58fd4238bd6.tar.bz2
[project @ 2004-08-11 22:08:25 by bursa]
Remove content_add_instance(), content_remove_instance(), content_reshape_instance(). Add content_open(), content_close(). Implement for CONTENT_HTML. svn path=/import/netsurf/; revision=1213
Diffstat (limited to 'riscos')
-rw-r--r--riscos/htmlinstance.c62
-rw-r--r--riscos/plugin.c34
-rw-r--r--riscos/plugin.h11
3 files changed, 31 insertions, 76 deletions
diff --git a/riscos/htmlinstance.c b/riscos/htmlinstance.c
deleted file mode 100644
index ca239ddc8..000000000
--- a/riscos/htmlinstance.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This file is part of NetSurf, http://netsurf.sourceforge.net/
- * Licensed under the GNU General Public License,
- * http://www.opensource.org/licenses/gpl-license
- * Copyright 2003 James Bursa <bursa@users.sourceforge.net>
- */
-
-#include "netsurf/utils/config.h"
-#include "netsurf/content/content.h"
-#include "netsurf/desktop/browser.h"
-#include "netsurf/render/box.h"
-#include "netsurf/render/html.h"
-#include "netsurf/utils/log.h"
-
-void html_add_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state)
-{
- unsigned int i;
- for (i = 0; i != c->data.html.object_count; i++) {
- if (c->data.html.object[i].content == 0)
- continue;
- content_add_instance(c->data.html.object[i].content,
- bw, c,
- c->data.html.object[i].box,
- c->data.html.object[i].box->object_params,
- &c->data.html.object[i].box->object_state);
- }
-}
-
-
-void html_reshape_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state)
-{
- unsigned int i;
- for (i = 0; i != c->data.html.object_count; i++) {
- if (c->data.html.object[i].content == 0)
- continue;
- content_reshape_instance(c->data.html.object[i].content,
- bw, c,
- c->data.html.object[i].box,
- c->data.html.object[i].box->object_params,
- &c->data.html.object[i].box->object_state);
- }
-}
-
-void html_remove_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state)
-{
- unsigned int i;
- for (i = 0; i != c->data.html.object_count; i++) {
- if (c->data.html.object[i].content == 0)
- continue;
- content_remove_instance(c->data.html.object[i].content,
- bw, c,
- c->data.html.object[i].box,
- c->data.html.object[i].box->object_params,
- &c->data.html.object[i].box->object_state);
- }
-}
diff --git a/riscos/plugin.c b/riscos/plugin.c
index 4212e9541..61e907409 100644
--- a/riscos/plugin.c
+++ b/riscos/plugin.c
@@ -77,9 +77,9 @@ struct plugin_list *plugin_get_instance_from_list(plugin_b browser,
plugin_p plugin);
/* message handling */
-void plugin_open(wimp_message *message);
+void plugin_open_msg(wimp_message *message);
void plugin_opening(wimp_message *message);
-void plugin_close(wimp_message *message);
+void plugin_close_msg(wimp_message *message);
void plugin_closed(wimp_message *message);
void plugin_reshape_request(wimp_message *message);
void plugin_stream_new(wimp_message *message);
@@ -311,6 +311,18 @@ void plugin_add_instance(struct content *c, struct browser_window *bw,
}
+
+/**
+ * Handle a window containing a CONTENT_PLUGIN being opened.
+ */
+
+void plugin_open(struct content *c, struct browser_window *bw,
+ struct content *page, struct box *box,
+ struct object_params *params)
+{
+}
+
+
/**
* Process plugin_opening message flags
* NB: this is NOT externally visible.
@@ -390,6 +402,16 @@ void plugin_remove_instance(struct content *c, struct browser_window *bw,
plugin_remove_instance_from_list(params);
}
+
+/**
+ * Handle a window containing a CONTENT_PLUGIN being closed.
+ */
+
+void plugin_close(struct content *c)
+{
+}
+
+
/**
* The box containing the plugin has moved or resized,
* or the window containing the plugin has resized if standalone.
@@ -1114,11 +1136,11 @@ void plugin_msg_parse(wimp_message *message, int ack)
*/
case message_PLUG_IN_OPEN:
if(ack)
- plugin_open(message);
+ plugin_open_msg(message);
break;
case message_PLUG_IN_CLOSE:
if(ack)
- plugin_close(message);
+ plugin_close_msg(message);
break;
case message_PLUG_IN_RESHAPE:
case message_PLUG_IN_STREAM_AS_FILE:
@@ -1133,7 +1155,7 @@ void plugin_msg_parse(wimp_message *message, int ack)
/**
* Handles receipt of plugin_open messages
*/
-void plugin_open(wimp_message *message) {
+void plugin_open_msg(wimp_message *message) {
struct plugin_message *npm = plugin_get_message_from_linked_list(message->my_ref);
@@ -1167,7 +1189,7 @@ void plugin_opening(wimp_message *message) {
/**
* Handles receipt of plugin_close messages
*/
-void plugin_close(wimp_message *message) {
+void plugin_close_msg(wimp_message *message) {
struct plugin_message *npm = plugin_get_message_from_linked_list(message->my_ref);
diff --git a/riscos/plugin.h b/riscos/plugin.h
index dc032f566..72ff798f5 100644
--- a/riscos/plugin.h
+++ b/riscos/plugin.h
@@ -79,15 +79,10 @@ bool plugin_redraw(struct content *c, int x, int y,
int width, int height,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale);
-void plugin_add_instance(struct content *c, struct browser_window *bw,
+void plugin_open(struct content *c, struct browser_window *bw,
struct content *page, struct box *box,
- struct object_params *params, void **state);
-void plugin_remove_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state);
-void plugin_reshape_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state);
+ struct object_params *params);
+void plugin_close(struct content *c);
#endif