After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 375702 - AEOutput needs a generic "send" method
AEOutput needs a generic "send" method
Status: RESOLVED FIXED
Product: lsr
Classification: Deprecated
Component: core
0.3.x
Other Linux
: High normal
: 0.4.0
Assigned To: LSR maintainers
LSR maintainers
Depends on:
Blocks: 358186 368967
 
 
Reported: 2006-11-15 21:14 UTC by Peter Parente
Modified: 2006-11-27 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Parente 2006-11-15 21:14:09 UTC
Justification:

1) A Braille Perk needs to send the caret location to a device. This information could be attached to a style object, but it's really content, not presentation.  

2) We need a more generic method for sending information to an output device if we ever want to move the gnome-magnifier specific code to the device side of LSR instead of putting it right in the magnifier Perk. The magnifier needs to be informed of coordinates which really don't fit any of our current methods and seem ill placed if stuck on a style object.
Comment 1 Peter Parente 2006-11-16 21:36:54 UTC
Adding the sendData method suggests some ideas for refactoring our AEOutput classes. First, sendData should probably just be a generic method called send on the base AEOutput interface. A bare-minimum output device just needs to implement this method and deal with known "name" identifiers describing what to do with the given "value" and, for content values, a "style" dictating presentation preferences. A later magnifier device could just implement this base class and use send for all of its purposes (e.g. sending coordinates).

Sub-interfaces such as Audio and Braille can provide default implementations of send which dispatch known, common "name" descriptors to our already existing sendString, sendFilename, sendIndex, sendTalk, sendStop, etc. methods. A device developer can easily override this base implementation to add to the dispatch switch (e.g. more if/else statements).

This change indirectly affects two other methods. First, createDefaultStyles should become optional. It is hard to think of a scenario where a magnifier device would want to come up with a different style for the default groupings of semantic tags and even layers *on its own.* Therefore, createDistinctStyles is pretty pointless. The DeviceManager will fallback on using the default style object specified by the device for everything. This is not to say that a *user* will never want to change the style per semantic or event layer. For instance, I can imagine a user indicating that items changing the background (e.g. new gaim message) should create a temporary zoomer (i.e. to show the gaim message for 5 seconds). 

Second, parseString only makes sense on devices that have the concept of string output. This method might be better placed on an intermediate interface between the base class and audio/braille.
Comment 2 Peter Parente 2006-11-27 16:08:10 UTC
Added to CVS. Initial testing by Scott when implementing Braille.