~cosmin.lupu/+junk/penguintv

« back to all changes in this revision

Viewing changes to penguintv/html/PTVhtml.py

  • Committer: cosmin.lupu at gmail
  • Date: 2010-04-27 16:47:43 UTC
  • Revision ID: cosmin.lupu@gmail.com-20100427164743-ds8xrqonipp5ovdf
initial packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# class template for various html widgets
 
2
import gobject
 
3
 
 
4
class PTVhtml(gobject.GObject):
 
5
        __gsignals__ = {
 
6
        'link-message': (gobject.SIGNAL_RUN_LAST, 
 
7
                           gobject.TYPE_NONE, 
 
8
                           ([gobject.TYPE_STRING])),
 
9
                'open-uri': (gobject.SIGNAL_RUN_LAST, 
 
10
                           gobject.TYPE_NONE, 
 
11
                           ([gobject.TYPE_STRING]))
 
12
    }      
 
13
 
 
14
        def __init__(self, view, home, share_path):
 
15
                gobject.GObject.__init__(self)
 
16
                
 
17
        def finish(self):
 
18
                assert False
 
19
                
 
20
        def is_ajax_ok(self):
 
21
                """does the widget support ajax"""
 
22
                assert False
 
23
                
 
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"""
 
27
                assert False
 
28
        
 
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"""
 
32
                assert False
 
33
                
 
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"""
 
39
                assert False
 
40
                
 
41
        def dl_interrupt(self):
 
42
                """stop downloading images (if applicable)"""
 
43
                assert False
 
44
                
 
45