Module gtkindiclient :: Class _indistream
[show private | hide private]
[frames | no frames]

Class _indistream

_blocking_indi_object_handler --+        
                                |        
          gui_indi_object_handler --+    
                                    |    
           indi_vector_identifier --+    
                                    |    
           indi_custom_vector_handler --+
                                        |
                                       _indistream


A general purpose preview.
Method Summary
  __init__(self, devicename, drawingareawidget)
BooleanType _area_expose_cb(self, area, event)
A callback method called by GTK in order to ask the image to redraw itself
NoneType blob_received(self, blob)
called when an indiblob with format .stream has been received from the server.
NoneType disable(self)
Disables data reception
NoneType on_indiobject_changed(self, vector)
called when the indinumbervector containing the parameters of the preview has been received from the server
NoneType reset(self)
Clear buffer, and enable stream
    Inherited from indi_custom_vector_handler
NoneType configure(self, vector)
This hander method will be called only once.
indivector get_vector(self)
Returns the indivector this handler is associated with.
    Inherited from gui_indi_object_handler
NoneType on_blocked(self, *args)
The method _blocking_on_gui_changed is called by the GUI, in order to inform us, that a widget has changed.
NoneType on_gui_changed(self, *args)
Important: Implement your GUI callback here but link you GUI callback signal to {_blocking_on_gui_changed} (see on_blocked if you want to know why)
NoneType set_bidirectional(self)
installs callbacks of the GUI that will call the function _blocking_on_gui_changed if the user changes the the GUI object associated with this gui_indi_object_handler .
NoneType unset_bidirectional(self)
uninstalls the GUI callback installed with set_bidirectional (see set_bidirectional for details)
NoneType _blocking_on_gui_changed(self, *args)
Called by the GUI whenever the widget associated with this handler has changed.
    Inherited from _blocking_indi_object_handler
NoneType _block(self)
activates the block.
BooleanType _is_blocked(self)
Return True if blocked , False otherwise
NoneType _unblock(self)
releases the block.
NoneType indi_object_change_notify(self, *args)
This method activates the block, calls the method on_indiobject_changed (It is called by bigindiclient.process_events each time an INDI object has been received)

Instance Variable Summary
Gtk.DrawingArea area: A GTK Drawingarea widget
StringType devicename: The name of the device
BooleanType enabled: The preview will not be updated if set to False
array pbuf: a 24 bit RGB 8 bit greyscale buffer containing the current image
    Inherited from indi_custom_vector_handler
indiclient indi: The indiclient instance calling this handler (will be set by indiclient automatically)
StringType type: The type of the handler
StringType vectorname: The name of the indivector this handler is associated with
    Inherited from _blocking_indi_object_handler
IntType _blocked: A counter incremented each time the _block method is called and decremented by _unblock, >0 means blocked, ==0 mean unblocked

Method Details

__init__(self, devicename, drawingareawidget)
(Constructor)

Parameters:
devicename - The name of the device
           (type=StringType)
drawingareawidget - A GTK Drawingarea widget
           (type=Gtk.DrawingArea)
Overrides:
indiclient.indi_custom_vector_handler.__init__

_area_expose_cb(self, area, event)

A callback method called by GTK in order to ask the image to redraw itself
Parameters:
area - The GTK.DrawingArea to be redrawn.
           (type=GTK.DrawingArea)
event - A GTK.Event (not used, but required by GTK).
           (type=GTK.Event)
Returns:
True
           (type=BooleanType)

blob_received(self, blob)

called when an indiblob with format .stream has been received from the server.

It copies its contends into pbuf and queues the image for redrawing.
Parameters:
blob - BLOB containing the data for the preview.
           (type=indiblob)
Returns:
None
           (type=NoneType)

disable(self)

Disables data reception
Returns:
None
           (type=NoneType)

on_indiobject_changed(self, vector)

called when the indinumbervector containing the parameters of the preview has been received from the server
Parameters:
vector - indinumbervector containing the parameters of the preview.
           (type=indinumbervector)
Returns:
None
           (type=NoneType)
Overrides:
indiclient.indi_custom_vector_handler.on_indiobject_changed

reset(self)

Clear buffer, and enable stream
Returns:
None
           (type=NoneType)

Instance Variable Details

area

A GTK Drawingarea widget
Type:
Gtk.DrawingArea

devicename

The name of the device
Type:
StringType

enabled

The preview will not be updated if set to False
Type:
BooleanType

pbuf

a 24 bit RGB 8 bit greyscale buffer containing the current image
Type:
array

Generated by Epydoc 2.1 on Sat Sep 10 10:26:03 2005 http://epydoc.sf.net