1
# class template for various html widgets
4
class PTVhtml(gobject.GObject):
6
'link-message': (gobject.SIGNAL_RUN_LAST,
8
([gobject.TYPE_STRING])),
9
'open-uri': (gobject.SIGNAL_RUN_LAST,
11
([gobject.TYPE_STRING]))
14
def __init__(self, view, home, share_path):
15
gobject.GObject.__init__(self)
21
"""does the widget support ajax"""
24
def post_show_init(self, widget):
25
"""widget must be a gtkscrolledwindow. HTML widget will install itself
26
in the scrolled window and show itself"""
29
def build_header(self, html):
30
"""build the html header needed (fonts, css, etc)
31
html is a string to be appended to the header before closing tags"""
34
def render(self, html, stream_url="file:///", image_id=None):
35
"""html is a string of html
36
stream_url is the 'root' path or whatever the terminology is
37
display_id is an object that an image downloader will compare against
38
to determine if it should continue displaying the image"""
41
def dl_interrupt(self):
42
"""stop downloading images (if applicable)"""