NetSurf
|
HTML content object interface. More...
Go to the source code of this file.
Functions | |
bool | html_fetch_object (struct html_content *c, struct nsurl *url, struct box *box, content_type permitted_types, bool background) |
Start a fetch for an object required by a page. More... | |
nserror | html_object_free_objects (struct html_content *html) |
release memory of content objects associated with a HTML content More... | |
nserror | html_object_close_objects (struct html_content *html) |
close content of content objects associated with a HTML content More... | |
nserror | html_object_open_objects (struct html_content *html, struct browser_window *bw) |
open content of content objects associated with a HTML content More... | |
nserror | html_object_abort_objects (struct html_content *html) |
abort any content objects that have not completed fetching. More... | |
HTML content object interface.
Definition in file object.h.
bool html_fetch_object | ( | struct html_content * | c, |
struct nsurl * | url, | ||
struct box * | box, | ||
content_type | permitted_types, | ||
bool | background | ||
) |
Start a fetch for an object required by a page.
The created content object is added to the HTML content which is updated as the fetch progresses. The box (if any) is updated when the object content becomes done.
c | content of type CONTENT_HTML |
url | URL of object to fetch |
box | box that will contain the object or NULL if none |
permitted_types | bitmap of acceptable types |
background | this is a background image |
Definition at line 710 of file object.c.
References html_content::aborted, content::active, box::background, html_content::base, hlcache_child_context::charset, content_html_object::content, content_get_url(), html_content::encoding, hlcache_handle_retrieve(), HLCACHE_RETRIEVE_SNIFF_TYPE, html_object_callback(), html_object_nobox_callback(), NSERROR_NOMEM, NSERROR_OK, NSLOG, html_content::num_objects, html_content::object_list, content_html_object::permitted_types, content::quirks, and hlcache_child_context::quirks.
Referenced by box_construct_element(), box_construct_marker(), box_embed(), box_image(), box_input(), box_object(), and html_process_inserted_img().
nserror html_object_abort_objects | ( | struct html_content * | html | ) |
abort any content objects that have not completed fetching.
html | The html content to abort the objects from. |
Definition at line 621 of file object.c.
References content::active, html_content::base, content_html_object::box, content_html_object::content, content_get_status(), CONTENT_STATUS_DONE, CONTENT_STATUS_READY, hlcache_handle_abort(), hlcache_handle_release(), content_html_object::next, NSERROR_OK, NSLOG, and html_content::object_list.
Referenced by html_stop().
nserror html_object_close_objects | ( | struct html_content * | html | ) |
close content of content objects associated with a HTML content
html | The html content to close the objects from. |
Definition at line 663 of file object.c.
References content_html_object::box, content_html_object::content, content_close(), content_get_type(), CONTENT_HTML, CONTENT_NONE, guit, html_object_refresh(), netsurf_table::misc, content_html_object::next, NSERROR_OK, html_content::object_list, and gui_misc_table::schedule.
Referenced by html_close().
nserror html_object_free_objects | ( | struct html_content * | html | ) |
release memory of content objects associated with a HTML content
The content objects contents should have been previously closed with html_object_close_objects().
html | The html content to release the objects from. |
Definition at line 687 of file object.c.
References content_html_object::content, content_get_type(), CONTENT_HTML, guit, hlcache_handle_release(), html_object_refresh(), netsurf_table::misc, content_html_object::next, NSERROR_OK, NSLOG, html_content::object_list, and gui_misc_table::schedule.
Referenced by html_box_convert_done(), html_destroy(), and html_finish_conversion().
nserror html_object_open_objects | ( | struct html_content * | html, |
struct browser_window * | bw | ||
) |
open content of content objects associated with a HTML content
html | The html content to open the objects from. |
bw | Browser window handle to open contents with. |
Definition at line 598 of file object.c.
References html_content::base, content_html_object::box, content_html_object::content, content_get_type(), CONTENT_NONE, content_open(), content_html_object::next, NSERROR_OK, html_content::object_list, and box::object_params.
Referenced by html_open().