NetSurf
|
Interface to text/html content handler. More...
#include <stdbool.h>
#include "netsurf/types.h"
#include "netsurf/content_type.h"
#include "netsurf/browser_window.h"
#include "netsurf/mouse.h"
#include "desktop/frame_types.h"
Go to the source code of this file.
Data Structures | |
struct | html_stylesheet |
Container for stylesheets used by an HTML document. More... | |
struct | html_script |
Container for scripts used by an HTML document. More... | |
struct | content_html_object |
An object (img, object, etc. More... | |
struct | content_html_frames |
Frame tree (frameset or frame tag) More... | |
struct | content_html_iframe |
Inline frame list (iframe tag) More... | |
Macros | |
#define | STYLESHEET_BASE 0 /* base style sheet */ |
#define | STYLESHEET_QUIRKS 1 /* quirks mode stylesheet */ |
#define | STYLESHEET_ADBLOCK 2 /* adblocking stylesheet */ |
#define | STYLESHEET_USER 3 /* user stylesheet */ |
#define | STYLESHEET_START 4 /* start of document stylesheets */ |
Functions | |
nserror | html_init (void) |
initialise content handler More... | |
void | html_redraw_a_box (struct hlcache_handle *h, struct box *box) |
redraw a specific box More... | |
struct content_html_frames * | html_get_frameset (struct hlcache_handle *h) |
obtain html frame content from handle More... | |
struct content_html_iframe * | html_get_iframe (struct hlcache_handle *h) |
obtain html iframe content from handle More... | |
const char * | html_get_base_target (struct hlcache_handle *h) |
obtain html base target from handle More... | |
void | html_set_file_gadget_filename (struct hlcache_handle *hl, struct form_control *gadget, const char *fn) |
set filename on a file gadget More... | |
struct html_stylesheet * | html_get_stylesheets (struct hlcache_handle *h, unsigned int *n) |
Retrieve stylesheets used by HTML document. More... | |
struct content_html_object * | html_get_objects (struct hlcache_handle *h, unsigned int *n) |
Retrieve objects used by HTML document. More... | |
bool | html_get_id_offset (struct hlcache_handle *h, lwc_string *frag_id, int *x, int *y) |
get the offset within the docuemnt of a fragment id More... | |
Interface to text/html content handler.
These functions should in general be called via the content interface.
Definition in file html.h.
#define STYLESHEET_START 4 /* start of document stylesheets */ |
const char * html_get_base_target | ( | hlcache_handle * | h | ) |
obtain html base target from handle
used by core browser
obtain html base target from handle
h | Content to retrieve base target from |
Definition at line 2054 of file html.c.
References html_content::base_target, and hlcache_handle_get_content().
Referenced by browser_window_find_target().
struct content_html_frames * html_get_frameset | ( | hlcache_handle * | h | ) |
obtain html frame content from handle
used by core browser
obtain html frame content from handle
h | Content to inspect |
Definition at line 2009 of file html.c.
References html_content::frameset, and hlcache_handle_get_content().
Referenced by browser_window_create_frameset(), and browser_window_recalculate_frameset().
bool html_get_id_offset | ( | hlcache_handle * | h, |
lwc_string * | frag_id, | ||
int * | x, | ||
int * | y | ||
) |
get the offset within the docuemnt of a fragment id
get the offset within the docuemnt of a fragment id
h | HTML document to search |
frag_id | String containing an element id |
x | Updated to global x coord iff id found |
y | Updated to global y coord iff id found |
Definition at line 2073 of file html.c.
References box_coords(), box_find_by_id(), content_get_type(), CONTENT_HTML, html_get_box_tree(), box::x, and box::y.
Referenced by frag_scroll().
struct content_html_iframe * html_get_iframe | ( | hlcache_handle * | h | ) |
obtain html iframe content from handle
used by core browser
obtain html iframe content from handle
h | Content to inspect |
Definition at line 2024 of file html.c.
References hlcache_handle_get_content(), and html_content::iframe.
Referenced by browser_window_create_iframes().
struct content_html_object * html_get_objects | ( | hlcache_handle * | h, |
unsigned int * | n | ||
) |
Retrieve objects used by HTML document.
h | Content to retrieve objects from |
n | Pointer to location to receive number of objects |
h | Content to retrieve objects from |
n | Pointer to location to receive number of objects |
Definition at line 60 of file object.c.
References hlcache_handle_get_content(), html_content::num_objects, and html_content::object_list.
Referenced by browser_window_reload(), and save_complete_save_html_objects().
struct html_stylesheet * html_get_stylesheets | ( | struct hlcache_handle * | h, |
unsigned int * | n | ||
) |
Retrieve stylesheets used by HTML document.
h | Content to retrieve stylesheets from |
n | Pointer to location to receive number of sheets |
Definition at line 498 of file css.c.
References hlcache_handle_get_content(), html_content::stylesheet_count, and html_content::stylesheets.
Referenced by browser_window_reload(), and save_complete_save_html_stylesheets().
nserror html_init | ( | void | ) |
initialise content handler
Definition at line 2382 of file html.c.
References content_factory_register_handler(), html_content_handler, html_css_init(), html_fini(), html_types, NOF_ELEMENTS, and NSERROR_OK.
Referenced by netsurf_init().
void html_redraw_a_box | ( | hlcache_handle * | h, |
struct box * | box | ||
) |
redraw a specific box
used by core browser
redraw a specific box
h | content containing the box, of type CONTENT_HTML |
box | box to redraw |
Definition at line 1111 of file html.c.
References BOTTOM, box_coords(), content_request_redraw(), box::height, LEFT, box::padding, RIGHT, TOP, box::width, box::x, and box::y.
Referenced by browser_window_invalidate_iframe(), and browser_window_scroll_callback().
void html_set_file_gadget_filename | ( | struct hlcache_handle * | hl, |
struct form_control * | gadget, | ||
const char * | fn | ||
) |
set filename on a file gadget
used by core browser
Definition at line 1666 of file html.c.
References box::gadget, hl, hlcache_handle_get_content(), and html__set_file_gadget_filename().
Referenced by browser_window_set_gadget_filename().