NetSurf
Functions
object.h File Reference

HTML content object interface. More...

This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

HTML content object interface.

Definition in file object.h.

Function Documentation

◆ html_fetch_object()

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.

Parameters
ccontent of type CONTENT_HTML
urlURL of object to fetch
boxbox that will contain the object or NULL if none
permitted_typesbitmap of acceptable types
backgroundthis is a background image
Returns
true on success, false on memory exhaustion

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ html_object_abort_objects()

nserror html_object_abort_objects ( struct html_content html)

abort any content objects that have not completed fetching.

Parameters
htmlThe html content to abort the objects from.
Returns
NSERROR_OK on success else appropriate error code.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ html_object_close_objects()

nserror html_object_close_objects ( struct html_content html)

close content of content objects associated with a HTML content

Parameters
htmlThe html content to close the objects from.
Returns
NSERROR_OK on success else appropriate error code.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ html_object_free_objects()

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().

Parameters
htmlThe html content to release the objects from.
Returns
NSERROR_OK on success else appropriate error code.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ html_object_open_objects()

nserror html_object_open_objects ( struct html_content html,
struct browser_window bw 
)

open content of content objects associated with a HTML content

Parameters
htmlThe html content to open the objects from.
bwBrowser window handle to open contents with.
Returns
NSERROR_OK on success else appropriate error code.

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().

Here is the call graph for this function:
Here is the caller graph for this function: