home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / pyatspi / constants.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  6.2 KB  |  198 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''
  5. Defines constants used throughout this wrapper.
  6.  
  7. @author: Peter Parente
  8. @author: Pete Brunet
  9. @organization: IBM Corporation
  10. @copyright: Copyright (c) 2005, 2007 IBM Corporation
  11. @license: LGPL
  12.  
  13. This library is free software; you can redistribute it and/or
  14. modify it under the terms of the GNU Library General Public
  15. License as published by the Free Software Foundation; either
  16. version 2 of the License, or (at your option) any later version.
  17.  
  18. This library is distributed in the hope that it will be useful,
  19. but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  21. Library General Public License for more details.
  22.  
  23. You should have received a copy of the GNU Library General Public
  24. License along with this library; if not, write to the
  25. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  26. Boston, MA 02111-1307, USA.
  27.  
  28. Portions of this code originally licensed and copyright (c) 2005, 2007
  29. IBM Corporation under the BSD license, available at
  30. U{http://www.opensource.org/licenses/bsd-license.php}
  31. '''
  32. import ORBit
  33. import Accessibility
  34. import utils
  35. acc_dict = vars(Accessibility)
  36. ALL_INTERFACES = []
  37. not_interfaces = [
  38.     'RoleSet',
  39.     'StateSet',
  40.     'DeviceEventListener',
  41.     'LoginHelper',
  42.     'ContentStream',
  43.     'DeviceEventController',
  44.     'RegistryDeviceEventListener',
  45.     'EventListener',
  46.     'Relation',
  47.     'CommandListener',
  48.     'Selector']
  49. for obj in acc_dict.values():
  50.     
  51.     try:
  52.         kind = obj.__typecode__.kind
  53.     except AttributeError:
  54.         continue
  55.  
  56.     if kind == ORBit.CORBA.tk_objref and utils.getInterfaceName(obj) not in not_interfaces:
  57.         ALL_INTERFACES.append(obj)
  58.         continue
  59.  
  60. del not_interfaces
  61. del obj
  62. del kind
  63. DESKTOP_COORDS = 0
  64. WINDOW_COORDS = 1
  65. MOUSE_B1P = 'b1p'
  66. MOUSE_B1R = 'b1r'
  67. MOUSE_B1C = 'b1c'
  68. MOUSE_B1D = 'b1d'
  69. MOUSE_B2P = 'b2p'
  70. MOUSE_B2R = 'b2r'
  71. MOUSE_B2C = 'b2c'
  72. MOUSE_B2D = 'b2d'
  73. MOUSE_B3P = 'b3p'
  74. MOUSE_B3R = 'b3r'
  75. MOUSE_B3C = 'b3c'
  76. MOUSE_B3D = 'b3d'
  77. MOUSE_ABS = 'abs'
  78. MOUSE_REL = 'rel'
  79. CACHE_INTERFACES = 0
  80. CACHE_PROPERTIES = 1
  81. CACHE_EVENTS = [
  82.     'object:property-change:accessible-name',
  83.     'object:property-change:accessible-description',
  84.     'object:property-change:accessible-role',
  85.     'object:property-change:accessible-parent']
  86. EVENT_TREE = {
  87.     'terminal': [
  88.         'terminal:line-changed',
  89.         'terminal:columncount-changed',
  90.         'terminal:linecount-changed',
  91.         'terminal:application-changed',
  92.         'terminal:charwidth-changed'],
  93.     'document': [
  94.         'document:load-complete',
  95.         'document:reload',
  96.         'document:load-stopped',
  97.         'document:content-changed',
  98.         'document:attributes-changed'],
  99.     'object': [
  100.         'object:property-change',
  101.         'object:bounds-changed',
  102.         'object:link-selected',
  103.         'object:state-changed',
  104.         'object:children-changed',
  105.         'object:visible-data-changed',
  106.         'object:selection-changed',
  107.         'object:model-changed',
  108.         'object:active-descendant-changed',
  109.         'object:row-inserted',
  110.         'object:row-reordered',
  111.         'object:row-deleted',
  112.         'object:column-inserted',
  113.         'object:column-reordered',
  114.         'object:column-deleted',
  115.         'object:text-bounds-changed',
  116.         'object:text-selection-changed',
  117.         'object:text-changed',
  118.         'object:text-attributes-changed',
  119.         'object:text-caret-moved',
  120.         'object:attributes-changed'],
  121.     'object:text-changed': [
  122.         'object:text-changed:insert',
  123.         'object:text-changed:delete'],
  124.     'object:property-change': [
  125.         'object:property-change:accessible-parent',
  126.         'object:property-change:accessible-name',
  127.         'object:property-change:accessible-description',
  128.         'object:property-change:accessible-value',
  129.         'object:property-change:accessible-role',
  130.         'object:property-change:accessible-table-caption',
  131.         'object:property-change:accessible-table-column-description',
  132.         'object:property-change:accessible-table-column-header',
  133.         'object:property-change:accessible-table-row-description',
  134.         'object:property-change:accessible-table-row-header',
  135.         'object:property-change:accessible-table-summary'],
  136.     'object:children-changed': [
  137.         'object:children-changed:add',
  138.         'object:children-changed:remove'],
  139.     'object:state-changed': [
  140.         'object:state-changed:'],
  141.     'mouse': [
  142.         'mouse:abs',
  143.         'mouse:rel',
  144.         'mouse:button'],
  145.     'mouse:button': [
  146.         'mouse:button:1p',
  147.         'mouse:button:1r',
  148.         'mouse:button:2p',
  149.         'mouse:button:2r',
  150.         'mouse:button:3p',
  151.         'mouse:button:3r'],
  152.     'window': [
  153.         'window:minimize',
  154.         'window:maximize',
  155.         'window:restore',
  156.         'window:close',
  157.         'window:create',
  158.         'window:reparent',
  159.         'window:desktop-create',
  160.         'window:desktop-destroy',
  161.         'window:activate',
  162.         'window:deactivate',
  163.         'window:raise',
  164.         'window:lower',
  165.         'window:move',
  166.         'window:resize',
  167.         'window:shade',
  168.         'window:unshade',
  169.         'window:restyle'],
  170.     'focus': [
  171.         'focus:'] }
  172. loc_dict = locals()
  173. prefixes = [
  174.     'ROLE_',
  175.     'STATE_',
  176.     'TEXT_',
  177.     'MODIFIER_',
  178.     'LOCALE_',
  179.     'RELATION_',
  180.     'KEY_',
  181.     'MATCH_',
  182.     'SORT_',
  183.     'LAYER_']
  184. values = (lambda .0: for name, value in .0:
  185. if [](_[1]):
  186. (name, value)[]continuelen)(acc_dict.items())
  187. loc_dict.update(dict(values))
  188. STATE_VALUE_TO_NAME = dict((lambda .0: for name, value in .0:
  189. if name.startswith('STATE_'):
  190. (value, name[6:].lower().replace('_', ' '))continue)(acc_dict.items()))
  191. RELATION_VALUE_TO_NAME = dict((lambda .0: for name, value in .0:
  192. if name.startswith('RELATION_'):
  193. (value, name[9:].lower().replace('_', ' '))continue)(acc_dict.items()))
  194. del acc_dict
  195. del loc_dict
  196. del prefixes
  197. del values
  198.