gtkmozembed.MozEmbed — Embed Mozilla browser in Gtk application
class gtkmozembed.MozEmbed(gtk.Bin): |
Functionsdef gtkmozembed.push_startup()
def gtkmozembed.pop_startup()
def gtkmozembed.gtk_moz_embed_set_comp_path(
path
)def gtkmozembed.gtk_moz_embed_set_profile_path(
path
,name
)def gtkmozembed.set_comp_path(
path
)def gtkmozembed.set_profile_path(
path
,name
)
def callback( | |
def callback( | |
"location" | def callback( |
"title" | def callback( |
"progress" | def callback( |
def callback( | |
def callback( | |
"net-stop" | def callback( |
def callback( | |
def callback( | |
def callback( | |
"open-uri" | def callback( |
GtkMozEmbed is an easy-to-use widget that will allow you to embed a Mozilla browser window into your Gtk application.
It's designed to be easy to use and uncomplicated to make the barrier for use as low as possible. This means that the functionality exposed should cover about 80% of uses. If you want to get at some of Mozilla's higher brain functions it means that you will have to write your own embedding widget.
Here's a small example:
import gtk import gtkmozembed class TinyGecko: def __init__(self): self.moz = gtkmozembed.MozEmbed() win = gtk.Window() win.add(self.moz) win.show_all() # self.moz.load_url('http://www.pygtk.org') data = '<html><head><title>Hello</title></head><body>pygtk dev</body></html>' self.moz.render_data(data, long(len(data)), 'file:///', 'text/html') if __name__ == '__main__': TinyGecko() gtk.main()
gtkmozembed.MozEmbed(
)
Returns : | a new gtkmozembed.MozEmbed object.
|
Creates a new gtkmozembed.MozEmbed
object.
def load_url(url
)
| The url that have to be loaded. |
The load_url
() method 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.