Module braille :: Class BrailleDisplayDriver
[hide private]
[frames] | no frames]

Class BrailleDisplayDriver

source code

                   object --+    
                            |    
baseObject.AutoPropertyObject --+
                                |
                               BrailleDisplayDriver

Abstract base braille display driver. Each braille display driver should be a separate Python module in the root brailleDisplayDrivers directory containing a BrailleDisplayDriver class which inherits from this base class.

At a minimum, drivers must set name and description and override the check method. To display braille, numCells and display must be implemented.

Drivers should dispatch input such as presses of buttons, wheels or other controls using the inputCore framework. They should subclass BrailleDisplayGesture and execute instances of those gestures using inputCore.manager.executeGesture. These gestures can be mapped in gestureMap. A driver can also inherit baseObject.ScriptableObject to provide display specific scripts.

Nested Classes [hide private]

Inherited from baseObject.AutoPropertyObject: __metaclass__

Instance Methods [hide private]
 
terminate(self)
Terminate this display driver.
source code
int
_get_numCells(self)
Obtain the number of braille cells on this display.
source code
 
display(self, cells)
Display the given braille cells.
source code

Inherited from baseObject.AutoPropertyObject: __init__, invalidateCache

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
bool
check(cls)
Determine whether this braille display is available.
source code

Inherited from baseObject.AutoPropertyObject: invalidateCaches

Class Variables [hide private]
  name = ""
  description = ""
  gestureMap = None
hash(x)

Inherited from baseObject.AutoPropertyObject: cachePropertiesByDefault

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

check(cls)
Class Method

source code 

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns False. For example, if this display is not present, False should be returned.

Returns: bool
True if this display is available, False if not.

terminate(self)

source code 

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first.

Postcondition: This instance can no longer be used unless it is constructed again.

_get_numCells(self)

source code 

Obtain the number of braille cells on this display.

Returns: int
The number of cells.

Note: 0 indicates that braille should be disabled.

display(self, cells)

source code 

Display the given braille cells.

Parameters:
  • cells ([int, ...]) - The braille cells to display.