Gtk2::MozEmbed::main(3) Perl interface to the Mozilla embedding widget

SIGNALS

link_message (Gtk2::MozEmbed)
This signal is emitted when the link message changes. This happens when the user moves the mouse over a link in a web page. Please use Gtk2::MozEmbed::get_link_message to get the actual value of the link message.
js_status (Gtk2::MozEmbed)
This signal is emitted when the JavaScript status message changes. Please use Gtk2::MozEmbed::get_js_status to get the actual value of the js status message.
location (Gtk2::MozEmbed)
This signal is emitted any time that the location of the document has changed. Please use Gtk2::MozEmbed::get_location to get the actual value of the location.
title (Gtk2::MozEmbed)
This signal is emitted any time that the title of a document has changed. Please use the Gtk2::MozEmbed::get_title call to get the actual value of the title.
progress (Gtk2::MozEmbed, integer (cur), integer (max))
This signal is emitted any time that there is a change in the progress of loading a document.

The cur value indicates how much of the document has been downloaded.

The max value indicates the length of the document. If the value of max is less than one the full length of the document can not be determined.

net_state (Gtk2::MozEmbed, integer (flags), unsigned integer (status))
This signal is emitted when there's a change in the state of the loading of a document.
net_start (Gtk2::MozEmbed)
This signal is emitted any time that the load of a document has been started.
net_stop (Gtk2::MozEmbed)
This signal is emitted any time that the loading of a document has completed.
Gtk2::MozEmbed new_window (Gtk2::MozEmbed, Gtk2::MozEmbed::Chrome)
This signal is emitted any time that a new toplevel window is requested by the document. This will happen in the case of a window.open() in JavaScript. Responding to this signal allows you to surround a new toplevel window with your chrome.

You should return the newly created GtkMozEmbed object.

visibility (Gtk2::MozEmbed, boolean)
This signal is emitted when the toplevel window in question needs to be shown or hidden. If the visibility argument is TRUE then the window should be shown. If it's FALSE it should be hidden.
destroy_browser (Gtk2::MozEmbed)
This signal is emitted when the document as requested that the toplevel window be closed. This will happen in the case of a JavaScript window.close().
boolean open_uri (Gtk2::MozEmbed, string)
This signal is emitted when the document tries to load a new document, for example when someone clicks on a link in a web page. This signal gives the embedder the opportunity to keep the new document from being loaded. The uri argument is the uri that's going to be loaded.

If you return TRUE from this signal, the new document will NOT be loaded. If you return FALSE the new document will be loaded. This is somewhat non-intuitive. Think of it as the Mozilla engine is asking if you want to interrupt the loading of a new document. By returning TRUE you are saying ``don't load this document.''

integer dom_key_down (Gtk2::MozEmbed, Gtk2::MozEmbed::KeyEvent)
This signal is emitted when a key is pressed down. See the DOM Level 3 specification for more details.
integer dom_key_up (Gtk2::MozEmbed, Gtk2::MozEmbed::KeyEvent)
This signal is emitted when a key is released. See the DOM Level 3 specification for more details.
integer dom_key_press (Gtk2::MozEmbed, Gtk2::MozEmbed::KeyEvent)
This signal is presumably emitted when a key is pressed and released, i.e. i.e. a combination of ``dom_key_down'' in Gtk2::MozEmbed::main and ``dom_key_up'' in Gtk2::MozEmbed::main. (Note however that it seems to also get emitted repeatedly if you hold the key down.)
integer dom_mouse_down (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent)
This signal is emitted when ``a pointing device button is pressed over an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.'' See the DOM Level 3 specification for more details.
integer dom_mouse_up (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent)
This signal is emitted when "a pointing device button is released over an element. In the case of nested elements, this event type is always targeted at the most deeply nested element. See the DOM Level 3 specification for more details.
integer dom_mouse_click (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent)
This signal is emitted when ``a pointing device button is clicked over an element. The definition of a click depends on the environment configuration; i.e. may depend on the screen location or the delay between the press and release of the pointing device button. In any case, the target node must be the same between the mousedown, mouseup, and click.'' In other words, it's basically ``dom_mouse_down'' in Gtk2::MozEmbed::main followed quickly by ``dom_mouse_up'' in Gtk2::MozEmbed::main. See the DOM Level 3 specification for more details.
integer dom_mouse_dbl_click (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent)
This signal is emitted when a mouse button is double clicked on an element. (The only thing I found in the DOM Level 3 specification was an example showing that two click events occur for a double click.)
integer dom_mouse_over (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent)
This signal is emitted when ``a pointing device is moved onto an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.'' See the DOM Level 3 specification for more details.
integer dom_mouse_out (Gtk2::MozEmbed, Gtk2::MozEmbed::MouseEvent)
This signal is emitted when ``a pointing device is moved away from an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.'' See the DOM Level 3 specification for more details.

METHODS

widget or undef = Gtk2::MozEmbed->new

This function returns a new Gtk Mozilla embedding widget. On failure it will return undef.

$embed->append_data ($data)

  • $data (scalar)

This function allows you to append data to an already opened stream in the widget. You need to pass in the data that you want to append to the document.

boolean = $embed->can_go_back

This function will return whether or not you can go backwards in the document's navigation history. It will return TRUE if it can go backwards, FALSE if it can't.

boolean = $embed->can_go_forward

This function will return whether or not you can go forwards in the document's navigation history. It will return TRUE if it can go forwards, FALSE if it can't.

chrome = $embed->get_chrome_mask

This function gets the current chome mask for this window. Please see the documentation for Gtk2::MozEmbed::set_chrome_mask for the value of the return mask.

$embed->set_chrome_mask ($flags)

  • $flags (Gtk2::MozEmbed::Chrome)

This function is used to set the chome mask for this window.

$embed->close_stream

This function closes the stream that you have been using to append data manually to the embedding widget.

Gtk2::MozEmbed->set_comp_path ($aPath)

  • $aPath (string)

This function must be called before the first widget is created or XPCOM is initialized. It allows you to set the path to the mozilla components.

$embed->go_back

This function will go backwards one step in the document's navigation history.

$embed->go_forward

This function will go forward one step in the document's navigation history.

string = $embed->get_js_status

This function returns the js_status message if there is one.

string = $embed->get_link_message

This function returns the current link message of the document if there is one.

$embed->load_url ($url)

  • $url (string)

This function starts loading a url in the embedding widget. All loads are asynchronous. The url argument should be in the form of http://www.gnome.org.

string = $embed->get_location

This function will return the current location of the document.

$embed->open_stream ($base_uri, $mime_type)

  • $base_uri (string)
  • $mime_type (string)

This function is used to start loading a document from an external source into the embedding widget. You need to pass in the $base_uri for resolving internal links and and the $mime_type of the document.

Gtk2::MozEmbed->pop_startup

Gtk2::MozEmbed->set_profile_path ($aDir, $aName)

  • $aDir (string)
  • $aName (string)

Gtk2::MozEmbed->push_startup

$embed->reload ($flags)

  • $flags (Gtk2::MozEmbed::Reload)

This function reloads the document. The flags argument can be used to control the behaviour of the reload.

$embed->render_data ($data, $base_uri, $mime_type)

  • $data (scalar)
  • $base_uri (string)
  • $mime_type (string)

This function will allow you to take a chunk of random data and render it into the document. You need to pass in the data and the length of the data. The $base_uri is used to resolve internal references in the document and the $mime_type is used to determine how to render the document internally.

$embed->stop_load

This function will allow you to stop the load of a document that is being loaded in the widget.

string = $embed->get_title

This function will get the current title for a document.

ENUMS AND FLAGS

flags Gtk2::MozEmbed::Chrome

  • 'defaultchrome' / 'GTK_MOZ_EMBED_FLAG_DEFAULTCHROME'
  • 'windowborderson' / 'GTK_MOZ_EMBED_FLAG_WINDOWBORDERSON'
  • 'windowcloseon' / 'GTK_MOZ_EMBED_FLAG_WINDOWCLOSEON'
  • 'windowresizeon' / 'GTK_MOZ_EMBED_FLAG_WINDOWRESIZEON'
  • 'menubaron' / 'GTK_MOZ_EMBED_FLAG_MENUBARON'
  • 'toolbaron' / 'GTK_MOZ_EMBED_FLAG_TOOLBARON'
  • 'locationbaron' / 'GTK_MOZ_EMBED_FLAG_LOCATIONBARON'
  • 'statusbaron' / 'GTK_MOZ_EMBED_FLAG_STATUSBARON'
  • 'personaltoolbaron' / 'GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON'
  • 'scrollbarson' / 'GTK_MOZ_EMBED_FLAG_SCROLLBARSON'
  • 'titlebaron' / 'GTK_MOZ_EMBED_FLAG_TITLEBARON'
  • 'extrachromeon' / 'GTK_MOZ_EMBED_FLAG_EXTRACHROMEON'
  • 'allchrome' / 'GTK_MOZ_EMBED_FLAG_ALLCHROME'
  • 'windowraised' / 'GTK_MOZ_EMBED_FLAG_WINDOWRAISED'
  • 'windowlowered' / 'GTK_MOZ_EMBED_FLAG_WINDOWLOWERED'
  • 'centerscreen' / 'GTK_MOZ_EMBED_FLAG_CENTERSCREEN'
  • 'dependent' / 'GTK_MOZ_EMBED_FLAG_DEPENDENT'
  • 'modal' / 'GTK_MOZ_EMBED_FLAG_MODAL'
  • 'openasdialog' / 'GTK_MOZ_EMBED_FLAG_OPENASDIALOG'
  • 'openaschrome' / 'GTK_MOZ_EMBED_FLAG_OPENASCHROME'

flags Gtk2::MozEmbed::Reload

  • 'reloadnormal' / 'GTK_MOZ_EMBED_FLAG_RELOADNORMAL'
  • 'reloadbypasscache' / 'GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE'
  • 'reloadbypassproxy' / 'GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY'
  • 'reloadbypassproxyandcache' / 'GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE'
  • 'reloadcharset' / 'GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE'

COPYRIGHT

Copyright (C) 2004-2008 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2::MozEmbed for a full notice.