The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mozilla::DOM - Perl interface to the Mozilla DOM interface

SYNOPSIS

  # In Makefile.PL (see Gtk2::MozEmbed for an example)
  my $embed = ExtUtils::Depends->new('Mozilla::DOM');
  $embed->set_inc(...);
  ...

  # You also need to compile with C++
  WriteMakefile(
      ...
      CC => 'c++',
      XSOPT => '-C++',
      $embed->get_makefile_vars,
  );

ABSTRACT

The current purpose of this module is to wrap DOM event methods to be used with the Gtk2::MozEmbed module, which allows you to use GtkMozEmbed from Perl. GtkMozEmbed in turn allows you to use Mozilla's Gecko as a Gtk widget. Gtk2::MozEmbed has signal marshallers which rely on this module to map between the nsIDOM* interfaces and Gtk-Perl. There's nothing in this module (as far as I know) that is specific to GtkMozEmbed, however, so other Perl modules based on Gecko could use this (if they existed).

Future plans include wrapping more DOM interfaces such as nsIWebBrowser (requiring support in Gtk2::MozEmbed for gtk_moz_embed_get_nsIWebBrowser), nsIDOMWindow, and nsIDOMDocument. With this, you'd get access to the DOM, with methods such as GetElementsByTagName. Adding more support for DOM events would allow finding out more about an event and its targets, initiating events, and adding listeners. The idea is to then be able to script a Gecko-based browser from Perl. However, for the moment the functionality provided by this module probably isn't very useful.

SEE ALSO

Mozilla::DOM::index
Gtk2::MozEmbed
DOM Level 3 specification

In particular the sections on Key and Mouse events.

/usr/include/mozilla/gtkembedmoz/gtkmozembed.h
/usr/include/mozilla/gtkembedmoz/gtkmozembed_internal.h

The header files for GtkMozEmbed.

TestGtkEmbed.cpp

A C++ example of using GtkMozEmbed to make a minimal browser.

/usr/include/mozilla/nsIDOMKeyEvent.h
/usr/include/mozilla/nsIDOMMouseEvent.h

The header files for Mozilla's KeyEvent and MouseEvent interfaces.

http://mozilla.org/html/projects/embedding/PublicAPIs.html

Description of the Mozilla Public API

http://mozilla.org/html/projects/embedding/faq.html

Gecko Embedding FAQ

http://mozilla.org/html/unix/gtk-embedding.html

GtkMozEmbed: Gtk Mozilla Embedding Widget

AUTHORS

Scott Lanning <lannings at who dot int>

with a lot of help from Torsten Schoenfeld <kaffeetisch at gmx dot de>.

COPYRIGHT

Copyright (C) 2005 by Scott Lanning