From f8825b81e4e671abbf7f4cbc730030be9c265f69 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 20 Jun 2004 23:09:52 +0000 Subject: [project @ 2004-06-20 23:09:51 by bursa] Implement content_stop() and html_stop(). svn path=/import/netsurf/; revision=982 --- content/content.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'content/content.h') diff --git a/content/content.h b/content/content.h index 3fcbd39fe..478e16b9e 100644 --- a/content/content.h +++ b/content/content.h @@ -45,6 +45,8 @@ * content_convert -> ERROR [label=MSG_ERROR]; * READY -> READY [style=bold]; * READY -> DONE [label=MSG_DONE, style=bold]; + * READY -> content_stop; + * content_stop -> DONE [label=MSG_DONE]; * * TYPE_UNKNOWN [shape=ellipse]; * LOADING [shape=ellipse]; @@ -74,6 +76,10 @@ * * - type_redraw(): called to plot the content to screen. * + * - type_stop(): called when the user interrupts in status + * CONTENT_STATUS_READY. Must stop any processing and set the status to + * CONTENT_STATUS_DONE. Required iff the status can be CONTENT_STATUS_READY. + * * - type_(add|remove|reshape)_instance: ask James, this will probably * be redesigned sometime. * @@ -157,6 +163,7 @@ struct content_user void *p2, union content_msg_data data); void *p1; void *p2; + bool stop; struct content_user *next; }; @@ -266,6 +273,10 @@ void content_remove_user(struct content *c, void *p1, void *p2); void content_broadcast(struct content *c, content_msg msg, union content_msg_data data); +void content_stop(struct content *c, + void (*callback)(content_msg msg, struct content *c, void *p1, + void *p2, union content_msg_data data), + void *p1, void *p2); void content_add_instance(struct content *c, struct browser_window *bw, struct content *page, struct box *box, struct object_params *params, void **state); -- cgit v1.2.3