Package pyAA :: Module Watcher :: Class WindowWatcher
[show private | hide private]
[frames | no frames]

Type WindowWatcher

object --+        
         |        
    AAbase --+    
             |    
       Watcher --+
                 |
                WindowWatcher


Watches once for a particular window open or close event.
Method Summary
  __init__(self)
Initialize an instance.
Defer.Deferred NotifyOnClose(self, hwnd)
Set a hook to watch for a window close event.
Defer.Deferred NotifyOnOpen(self, title, cls)
Set a hook to watch for a window open event.
  OnDestroyEvent(self, event)
Called when the target window is destroyed.
  OnShowEvent(self, event)
Called when the target window appears and has the focus.
boolean TestClass(self, ao, target_class)
Compares the window class of the provided object to the target window class.
  TestFeatures(self, ao)
Compares the features of the target window to the object that fired the event.
boolean TestTitle(self, ao, target_title)
Compares the lowercase title of the provided object to the lowercase target window title.
Inherited from Watcher: Destroy
Inherited from AAbase: AddReleaseHook, AddWinEventHook, Release
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variable Summary
dictionary dispatch: Dispatch to methods used for comparing window properties
dictionary features: Properties identifying the target window
Inherited from Watcher: result
Inherited from AAbase: release_hooks

Method Details

__init__(self)
(Constructor)

Initialize an instance.
Overrides:
pyAA.Watcher.Watcher.__init__

NotifyOnClose(self, hwnd)

Set a hook to watch for a window close event.
Parameters:
hwnd - Window handle of the target window
           (type=number)
Returns:
Result on which to notify about changes
           (type=Defer.Deferred)

NotifyOnOpen(self, title=None, cls=None)

Set a hook to watch for a window open event. Also watches for existing windows getting raised to the foreground.
Parameters:
title - Title of the target window
           (type=string)
cls - Window class of the target window
           (type=string)
Returns:
Result on which to notify about changes
           (type=Defer.Deferred)

OnDestroyEvent(self, event)

Called when the target window is destroyed.
Parameters:
event - Event that occurred
           (type=AA.WinEvent)

OnShowEvent(self, event)

Called when the target window appears and has the focus.
Parameters:
event - Event that occurred
           (type=AA.WinEvent)

TestClass(self, ao, target_class)

Compares the window class of the provided object to the target window class.
Parameters:
ao - Object that fired an event
           (type=AA.AccessibleObject)
target_class - Window class of the target window
           (type=string)
Returns:
True if the classes match, False otherwise
           (type=boolean)

TestFeatures(self, ao)

Compares the features of the target window to the object that fired the event.
Parameters:
ao - Object that fired an event
           (type=AA.AccessibleObject)

TestTitle(self, ao, target_title)

Compares the lowercase title of the provided object to the lowercase target window title.
Parameters:
ao - Object that fired an event
           (type=AA.AccessibleObject)
target_title - Window title of the target window
           (type=string)
Returns:
True if the titles match, False otherwise
           (type=boolean)

Instance Variable Details

dispatch

Dispatch to methods used for comparing window properties
Type:
dictionary

features

Properties identifying the target window
Type:
dictionary

Generated by Epydoc 2.1 on Thu Mar 10 23:08:34 2005 http://epydoc.sf.net