NetSurf
Functions
imagemap.h File Reference

Interface to HTML imagemap. More...

#include <dom/dom.h>
Include dependency graph for imagemap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void imagemap_destroy (struct html_content *c)
 Destroy hashtable of imagemaps. More...
 
void imagemap_dump (struct html_content *c)
 Dump imagemap data to the log. More...
 
nserror imagemap_extract (struct html_content *c)
 Extract all imagemaps from a document tree. More...
 
struct nsurlimagemap_get (struct html_content *c, const char *key, unsigned long x, unsigned long y, unsigned long click_x, unsigned long click_y, const char **target)
 Retrieve url associated with imagemap entry. More...
 

Detailed Description

Interface to HTML imagemap.

Definition in file imagemap.h.

Function Documentation

◆ imagemap_destroy()

void imagemap_destroy ( html_content c)

Destroy hashtable of imagemaps.

Parameters
cThe containing content

Definition at line 200 of file imagemap.c.

References HASH_SIZE, imagemap_freelist(), html_content::imagemaps, imagemap::key, imagemap::list, and imagemap::next.

Referenced by html_destroy().

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

◆ imagemap_dump()

void imagemap_dump ( html_content c)

Dump imagemap data to the log.

Parameters
cThe containing content

Definition at line 231 of file imagemap.c.

References mapentry::bounds, mapentry::circle, HASH_SIZE, IMAGEMAP_CIRCLE, IMAGEMAP_DEFAULT, IMAGEMAP_POLY, IMAGEMAP_RECT, html_content::imagemaps, imagemap::key, imagemap::list, mapentry::next, imagemap::next, NSLOG, nsurl_access(), mapentry::num, mapentry::poly, mapentry::r, mapentry::rect, mapentry::type, mapentry::url, mapentry::x, mapentry::x0, mapentry::x1, mapentry::xcoords, mapentry::y, mapentry::y0, mapentry::y1, and mapentry::ycoords.

Here is the call graph for this function:

◆ imagemap_extract()

nserror imagemap_extract ( html_content c)

Extract all imagemaps from a document tree.

Parameters
cThe content to extract imagemaps from.
Returns
false on memory exhaustion, true otherwise
Todo:
check this
Todo:
check this

Definition at line 603 of file imagemap.c.

References html_content::document, imagemap_add(), imagemap_extract_map(), imagemap_freelist(), NSERROR_DOM, NSERROR_NOMEM, and NSERROR_OK.

Referenced by html_box_convert_done().

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

◆ imagemap_get()

struct nsurl * imagemap_get ( struct html_content c,
const char *  key,
unsigned long  x,
unsigned long  y,
unsigned long  click_x,
unsigned long  click_y,
const char **  target 
)

Retrieve url associated with imagemap entry.

Parameters
cThe containing content
keyThe map name to search for
xThe left edge of the containing box
yThe top edge of the containing box
click_xThe horizontal location of the click
click_yThe vertical location of the click
targetPointer to location to receive target pointer (if any)
Returns
The url associated with this area, or NULL if not found

Definition at line 737 of file imagemap.c.

References mapentry::bounds, mapentry::circle, IMAGEMAP_CIRCLE, IMAGEMAP_DEFAULT, imagemap_hash(), imagemap_point_in_poly(), IMAGEMAP_POLY, IMAGEMAP_RECT, html_content::imagemaps, imagemap::key, imagemap::list, mapentry::next, imagemap::next, mapentry::num, mapentry::poly, mapentry::r, mapentry::rect, mapentry::target, mapentry::type, mapentry::url, mapentry::x, mapentry::x0, mapentry::xcoords, mapentry::y, mapentry::y0, and mapentry::ycoords.

Referenced by get_mouse_action_node(), and html_get_contextual_content().

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