Changeset 150

Show
Ignore:
Timestamp:
07/02/08 15:02:36
Author:
slee
Message:

last reorg and noswtich option

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MANIFEST.in

    r100 r150  
    33include NEWS 
    44include ChangeLog 
     5include MANIFEST.in 
    56 
  • trunk/NEWS

    r132 r150  
     1============= 
     2Version 0.0.7 
     3============= 
     4 
     5What's new 
     6========== 
     7  * renamed as 'jambu' 
     8  * switch access can be disabled with --noswitch option 
     9    This means py game is not required (e.g for Solaris) 
     10  * new website http://jambu.fullmeasure.co.uk 
     11  * sorce code reorganised to match name change 
     12 
     13What's fixed 
     14============ 
     15  * Work arround for Firefox 3 web page 
     16 
     17 
    118============== 
    219Version 0.0.5 
  • trunk/README

    r129 r150  
    1 Jambu In Application 0.0.5 
    2 ========================== 
     1Jambu 0.0.7 
     2============ 
    33 
    4 ====================== 
    5 * What is jambuinapp
    6 ====================== 
     4================ 
     5* What is jambu
     6================ 
    77 
    8 Jambuinapp allows you to operate an application from switches or keys by  
     8Jambu allows you to operate an application from switches or keys by  
    99stepping around the UI rather than using an intermediate overlay (or OSK). 
    1010It uses the accessibility features of the Linux GNOME desktop.  
     
    1313and GTK accessibile apps (has been tested with gedit). 
    1414 
    15 Jambuinapp is part of a larger Jambu project: 
    16   http://www.oatsoft.org/trac/jambu 
     15Find out the latest about the Jambu project and get the latest version from: 
    1716 
    18 =========================== 
    19 * Where to get jambuinapp? 
    20 =========================== 
     17  http://jambu.fullmeasure.co.uk 
    2118 
    22 Get the installable tarball from 
     19===================== 
     20* Where to get jambu? 
     21===================== 
    2322 
    24   http://fullmeasure.co.uk/Jambu/jambuinapp-0.0.5.tar.gz 
     23Please see: 
    2524 
    26 or get the source from  
     25  http://jambu.fullmeasure.co.uk/download 
    2726 
    28   http://www.oatsoft.org/svn/jambu/inapp/tags/release-0.0.5 
     27Developers should see: 
    2928 
    30 or grab the *latest* source from SVN at: 
     29  http://jambu.fullmeasure.co.uk/community/development 
    3130 
    32   http://www.oatsoft.org/svn/jambu/inapp/trunk 
    33  
     31======================= 
     32* How to Install jambu? 
     33======================= 
    3434   
    35 ============================= 
    36 * How to install jambuinapp? 
    37 ============================= 
    38  
    39 Dependencies - what else you'll need 
    40 ------------------------------------ 
    41  
    42 GNOME Linux desktop with accessibility options enabled 
    43 python: http://python.org 
    44 pygtk: http://www.pygtk.org/ 
    45 pyatspi: http://live.gnome.org/GAP/PythonATSPI 
    46 pygame: http://www.pygame.org/ 
    47  
    48 * All latest versions (some may be available in your distro's package repositries) 
    49  
    50 In addition you'll want: 
    51 Minefield (aka Firefox 3.0)  
    52           http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ 
    53  
     35In addition you'll want: Firefox 3 
    5436           
    5537Installing  
    5638---------- 
    57 1) Unzip the tarball (e.g tar xvf jambuinapp-0.0.3.tar.gz) 
    58 2) cd (e.g. cd jambuinapp-0.0.3
     391) Unzip the tarball (e.g tar xvf jambui-0.0.7.tar.gz) 
     402) cd (e.g. cd jambu-0.0.7
    59413) python setup.py install (note run as root or sudo) 
    6042 
    61 Or to make the tarball from the source run: 
    62   python setup.py sdist 
    63 and the tarball will be created in the 'dist' folder. 
    6443 
    65 ========================= 
    66 * How to use jambuinapp
    67 ========================= 
     44==================== 
     45* How to use jambui
     46==================== 
    6847 
    6948When installed run: 
    7049 
    71  jambuinapp [--scan] [--showtree] Minefield | <other app name> 
    72    --scan           start auto scanning, otherwise manual 
    73    --showtree   show the GTKTreeView of accesible objects and other UI 
    74    --blink        blinking highlight, default is auto detect 
    75    --svg            svg highlight (requires transparency), default is auto detect 
    76  
    77 Or for local source execution run:  
    78   .../jambuinapp/src/jambu python InAppSelection.py Minefield 
     50 jambu [--scan] [--showtree] Firefox | <other app name> 
     51   --scan          start auto scanning, otherwise manual 
     52   --showtree      show the GTKTreeView of accesible objects and other UI 
     53   --blink         blinking highlight, default is auto detect 
     54   --svg           svg highlight (requires transparency), default is auto detect 
     55   --noswitch      dont use switch input (doesn't require pygame) 
     56   -h           usage 
    7957 
    8058Make sure Minefield is already open and make it the active application  
    8159again to be safe. 
     60 
     61Note for developers: 
     62-------------------- 
     63To run the local source version as apposed to the installed one run:  
     64  ./jambu Firefox 
     65 
     66To make the tarball from the source run: 
     67  python setup.py sdist 
     68and the tarball will be created in the 'dist' folder. 
    8269 
    8370Operation 
     
    8673perform the action for an interactive item. 'next' iterates around items in a 
    8774group and also the group itself to allow moving up and out of the group  
    88 (the highlight changes colour in this case). 
     75(the highlight changes colour in this case).  
     76 
     77See next section for gestures that invoke these actions 
    8978 
    9079If you have a Window Manager that supports transparency (like Compiz on Ubuntu) 
     
    10291action item -> Right Ctrl key, USB switch 1 or 6, right mouse button 
    10392 
    104 For the mouse gestures you need to dispaly the UI and leave the pointer in the  
     93For the mouse gestures you need to display the UI and leave the pointer in the  
    10594spaces between the buttons and menus do not display properly as the mouse 
    10695interferes. 
    10796 
    108 UserInterface 
     97User Interface 
    10998------------- 
    11099A tree view is presented for developer use. It shows the model of accessibles 
     
    113102 
    114103 
    115 ============================= 
     104============================ 
    116105* What known bugs are there? 
    117 ============================= 
     106============================ 
    118107 
    119108* If highlight disappears simply do a 'next' action. The temporary use of simulated 
  • trunk/setup.py

    r130 r150  
    1 """Jambu In Application Selection: step through a programs UI 
     1"""Jambu : direct stepped navigation control of a programs UI 
    22 
    3 Allows switcher users to control an application by stepping through it's UI""" 
     3Allows switch users to control an application by stepping through it's UI 
     4 
     5This file is a standard distutils config file.""" 
    46 
    57doclines = __doc__.split("\n") 
     
    1618 
    1719from distutils.core import setup 
    18 setup(name='jambuinapp', 
    19       version='0.0.5', 
     20setup(name='jambu', 
     21      version='0.0.7', 
    2022      maintainer="Full Measure", 
    2123      maintainer_email="jambu@fullmeasure.co.uk", 
    22       url = "http://www.oatsoft.org/trac/jambu", 
     24      url = "http://jambu.fullmeasure.co.uk", 
    2325      license = "http://www.opensource.org/licenses/bsd-license.php", 
    2426      platforms = ["any"], 
     
    2628      classifiers = filter(None, classifiers.split("\n")), 
    2729      long_description = "\n".join(doclines[2:]), 
    28       package_dir = {'': 'src'}, 
     30      package_dir = {'': 'src/lib'}, 
    2931      packages=['jambu'], 
    30       scripts=['src/jambuinapp'], 
     32      scripts=['src/jambu'], 
    3133      data_files=[('share/doc/jambu',  
    3234                   ['README', 'AUTHORS', 'LICENSE',  'NEWS', 'ChangeLog'])] 
  • trunk/src/jambu

    r148 r150  
    22''' 
    33Creates an instance of the program GUI and starts the main event loop. 
    4  
    5 @author: Peter Parente 
    6 @author: Eitan Isaacson 
    7 @organization: IBM Corporation 
    8 @copyright: Copyright (c) 2006 IBM Corporation 
    9 @license: BSD 
    104 
    115All rights reserved. This program and the accompanying materials are made  
     
    137is available at U{http://www.opensource.org/licenses/bsd-license.php} 
    148''' 
    15 #import sys, os 
    16 # Load gail module no matter what the desktop-wide settings are. 
    17 #os.environ['GTK_MODULES'] = 'gail:atk-bridge' 
    189 
    19 #import gnome 
    20 # make this program accessible 
    21 #props = { gnome.PARAM_APP_DATADIR : os.path.join(sys.prefix, 'share')} 
    22 #gnome.program_init('accerciser', '1.0.2', properties=props) 
     10import sys, os 
     11 
     12# if running locally  the we need to import from ../lib and don't care about . 
     13# otherwise if running /usr..../jambu then use normal sys.path to get jambu form site-packages 
     14prefix = os.path.commonprefix(['/usr', __file__]) 
     15if '/usr' != prefix: 
     16  sys.path[0] = os.path.join(sys.path[0], 'lib') 
    2317 
    2418import jambu 
  • trunk/src/lib/jambu/InAppSelection.py

    r148 r150  
    1212import ActionBrowser 
    1313 
    14 import Switch 
    15  
    16 _SWITCH_EVENT_MAP= {Switch.SWITCH_DOWN: 'switch-down' 
    17                 ,Switch.SWITCH_UP: 'switch-up' 
    18                 ,Switch.NO_EVENT: None} 
     14# switch module is run time imported 
     15Switch= None 
    1916 
    2017_ = lambda x: x 
     
    2320  '''The application''' 
    2421  def _getArgs(self): 
    25     args =dict(show_tree = False,   
     22    args =dict(use_switch = True, 
     23               show_tree = False,   
    2624               scan = False,  
    2725               app = None, 
     
    3836      elif arg == '--svg': 
    3937        args['hilight']='svg' 
     38      elif arg == '--noswitch': 
     39        args['use_switch']=False 
     40      elif arg == '--useswitch': 
     41        args['use_switch']=True 
    4042      elif not arg.startswith('--') and len(arg) > 2: 
    4143        args['app'] = arg 
     
    4446      print """Useage 
    4547------ 
    46 /usr/local/bin/jambuinapp --scan --showtree [gedit | Minefield] 
     48/usr/local/bin/jambu --scan --showtree [gedit | Minefield] 
    4749  --scan        start auto scanning, otherwise manual 
    4850  --showtree    show the GTKTreeView of accesible objects and other UI 
    4951  --blink       blinking highlight, default is auto detect 
    5052  --svg         svg highlight (requires transparency), default is auto detect 
     53  --noswitch    no switch access (so not require pygame to be installed) 
    5154 
    52 Make sure gedit/minefield is already open and make it the active application  
    53 again to be safe. 
     55Make sure Firefox 3 is already open and make it the active application  
     56to be safe. 
    5457""" 
    5558      sys.exit() 
     
    7679    self.window.set_keep_above(True) 
    7780 
    78     Switch.init() 
     81    if args['use_switch']: 
     82      global Switch 
     83      Switch = __import__('Switch', globals(),  locals(), [], -1) 
     84      self._SWITCH_EVENT_MAP= {Switch.SWITCH_DOWN: 'switch-down' 
     85                ,Switch.SWITCH_UP: 'switch-up' 
     86                ,Switch.NO_EVENT: None} 
    7987 
    80     gobject.timeout_add(250, self._onTimeout) 
     88      Switch.init() 
     89      gobject.timeout_add(250, self._onTimeout) 
    8190      
    8291  def main(self): 
     
    110119            pass  # not expected 
    111120      PumpQueuedEvents(pyatspi.Registry()) 
    112        #pyatspi.Registry.pumpQueuedEvents(); # should be ok now but stops menues working 
     121      #pyatspi.Registry.pumpQueuedEvents(); # should be ok now but stops menues working 
    113122      return True   # keep this function in idle processing 
    114123    gobject.idle_add(_onIdle) 
     
    126135    while True: 
    127136      event, p1, p2 = Switch.getEvent() 
    128       signal = _SWITCH_EVENT_MAP[event] 
     137      signal = self._SWITCH_EVENT_MAP[event] 
    129138      if not signal: 
    130139        break 
  • trunk/src/lib/jambu/__init__.py

    r100 r150  
    33 
    44@author: Steve Lee 
    5 @author: Eitan Isaacson 
    6 @author: Peter Parente 
    7 @organization: IBM Corporation 
    8 @copyright: Copyright (c) 2006, 2007 IBM Corporation 
     5@organization: Full Measure 
     6@copyright: Copyright (c) 2007, 2008 Full Measure 
    97@license: BSD 
    108 
     
    2018    'You pressed Ctrl+Z. This would normally freeze your keyboard') 
    2119  print _( 
    22     'Ctrl+Z has been disabled; use "accerciser &" instead from the command line') 
     20    'Ctrl+Z has been disabled; use "jambu &" instead from the command line') 
    2321signal.signal(signal.SIGTSTP, signal_handler) 
    24  
    25 # If pyatspi not installed seperately, add pyatspi zip file to the path 
    26 #try: 
    27 #  import pyatspi 
    28 #except ImportError: 
    29 #  sys.path.insert(1, os.path.join(os.path.dirname(__file__), 'pyatspi.zip')) 
    3022 
    3123def main():