Package Tools :: Module Atk
[hide private]
[frames] | no frames]

Module Atk

source code

Defines convenience methods for using Gnome ATK/GAIL accessibility platform, using the atk.py bindings. Allows Python developers to easily write accessible applications without knowledge of arcane ATK programming patterns and syntax.


Authors:
Brett Clippingdale, Pete Parente

Organization: IBM Corporation

Copyright: Copyright (c) 2005, 2007 IBM Corporation

License:

The BSD License

All rights reserved. This program and the accompanying materials are made available under the terms of the BSD license which accompanies this distribution, and is available at http://www.opensource.org/licenses/bsd-license.php

Functions [hide private]
 
setNameDesc(widget, name=None, description=None, row=None, col=0)
Sets the name, and description (optional), of a GTK+ widget.
source code
 
setRelation(source, atk_relation, *targets)
Sets the relation between a GTK+ source widget and one or more GTK+ target widgets.
source code
Function Details [hide private]

setNameDesc(widget, name=None, description=None, row=None, col=0)

source code 
Sets the name, and description (optional), of a GTK+ widget. Example code:
 import pyatk
 pyatk.setNameDesc(apply_button, 'Apply')
 pyatk.setNameDesc(up_button, 'Up', 'Move the selected item up")
 pyatk.setNameDesc(my_table, 'Y5Q3', 'Year Five, Quarter Three", 4, 2)
Parameters:
  • widget (gtk.Object) - Some GTK+ widget
  • name (string) - Accessible name to set
  • description (string) - Accessible description to set
  • row (integer) - row, if in a table/tree
  • col (integer) - column, if in a table/tree

setRelation(source, atk_relation, *targets)

source code 
Sets the relation between a GTK+ source widget and one or more GTK+ target widgets. Example code:
 import atk, pyatk
 pyatk.setRelation(item, atk.RELATION_LABELLED_BY, item_label)
 pyatk.setRelation(group_label, atk.RELATION_LABEL_FOR, member1, member2)
 pyatk.setRelation(spinner_button, atk.RELATION_CONTROLLER_FOR, spinner)
For a list and definition of ATK relationships, see: http://developer.gnome.org/doc/API/2.0/atk/AtkRelation.html
Parameters:
  • source (atk.Object) - Source accessible on which the relation will be set
  • atk_relation (atk.Relation) - Relation to set
  • targets (list of atk.Object) - Target accessibles of the relation