Hi,
  I am embedding the gecko engine in my Vc++ application and I need
to
parse links in order to find the coordinate position (or a RECT
structure) of each link on a web page. I found the following code in
order to loop against the collection :

 nsCOMPtr<nsIDOMHTMLCollection> links;
    domdoc->GetLinks(getter_AddRefs(links));


    PRUint32 numnodes;
    links->GetLength(&numnodes);


    nsCOMPtr<nsIDOMNode> link;
    for (unsigned int i = 0; i < numnodes; i++)
    {
        links->Item(i, getter_AddRefs(link));


/*
        nsCOMPtr<nsIDOMHTMLImageElement>    image =
(do_QueryInterface(link));
        nsCOMPtr<nsIDOMHTMLLinkElement>     alink =
(do_QueryInterface(link));
        nsCOMPtr<nsIDOMHTMLAnchorElement>   anchor =
(do_QueryInterface(link));
*/


    }


but I do not know how to find the clickable area around each links.
Thank you for any help.


_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to