From acfb4c0adb113b0dfaff7f07e93be58fd4238bd6 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 11 Aug 2004 22:08:26 +0000 Subject: [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 --- content/content.h | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'content/content.h') diff --git a/content/content.h b/content/content.h index c3116c5c5..48a15ed00 100644 --- a/content/content.h +++ b/content/content.h @@ -35,7 +35,7 @@ * content_create -> TYPE_UNKNOWN [style=bold]; * TYPE_UNKNOWN -> content_set_type [style=bold]; * content_set_type -> LOADING [label=MSG_LOADING, style=bold]; - * content_set_type -> LOADING [label="MSG_NEWPTR\nMSG_LOADING",style=bold]; + * content_set_type -> LOADING [label="MSG_NEWPTR\nMSG_LOADING"]; * content_set_type -> ERROR [label=MSG_ERROR]; * LOADING -> content_process_data [style=bold]; * content_process_data -> LOADING [style=bold]; @@ -81,8 +81,12 @@ * 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. + * - type_open(): called when a window containing the content is + * opened. Probably only makes sense if no_share is set for the content type + * in handler_map. Optional. + * + * - type_close(): called when the window containing the content is + * closed. Optional. * * - type_create(), type_process_data(), type_convert(): * if an error occurs, must broadcast CONTENT_MSG_ERROR and return false. @@ -248,17 +252,6 @@ struct content { } error_list[40]; unsigned int error_count; /**< Number of valid error entries. */ - /** Browser window that this content is in, valid only if - * handler_map[type].no_share and 1 user, 0 if not visible. */ - struct browser_window *owning_bw; - /** Box window that this content is in, valid only if - * handler_map[type].no_share and 1 user, 0 if not in an HTML tree. */ - struct box *owning_box; - /** Parameters of or , valid only if - * handler_map[type].no_share and 1 user, 0 if not in an or - * . */ - struct object_params *params; - struct content *prev; /**< Previous in global content list. */ struct content *next; /**< Next in global content list. */ }; @@ -303,15 +296,10 @@ 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); -void content_remove_instance(struct content *c, struct browser_window *bw, - struct content *page, struct box *box, - struct object_params *params, void **state); -void content_reshape_instance(struct content *c, struct browser_window *bw, +void content_open(struct content *c, struct browser_window *bw, struct content *page, struct box *box, - struct object_params *params, void **state); + struct object_params *params); +void content_close(struct content *c); void content_add_error(struct content *c, const char *token, unsigned int line); -- cgit v1.2.3