Package NVDAObjects :: Package window :: Class Window
[hide private]
[frames] | no frames]

Class Window

source code

                   object --+            
                            |            
baseObject.AutoPropertyObject --+        
                                |        
      baseObject.ScriptableObject --+    
                                    |    
                           NVDAObject --+
                                        |
                                       Window

An NVDAObject for a window

Nested Classes [hide private]

Inherited from NVDAObject: TextInfo, __metaclass__

Instance Methods [hide private]
 
findOverlayClasses(self, clsList)
Chooses overlay classes which should be added to this object's class structure after the object has been initially instantiated.
source code
 
__init__(self, windowHandle=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
boolean
_isEqual(self, other)
Calculates if this object is equal to another object.
source code
basestring
_get_name(self)
The name or label of this object (example: the text of a button).
source code
int
_get_role(self)
The role or type of control this object represents (example: button, list, dialog).
source code
 
_get_windowClassName(self) source code
 
_get_windowControlID(self) source code
tuple of int
_get_location(self)
The location of this object on the screen.
source code
 
_get_displayText(self)
The text at this object's location according to the display model for this object's window.
source code
 
redraw(self)
Redraw the display for this object.
source code
 
_get_windowText(self) source code
int
_get_processID(self)
Retreaves an identifyer of the process this object is a part of.
source code
 
_get_windowThreadID(self) source code
NVDAObject or None
_get_next(self)
Retreaves the object directly after this object with the same parent.
source code
NVDAObject or None
_get_previous(self)
Retreaves the object directly before this object with the same parent.
source code
NVDAObject or None
_get_firstChild(self)
Retreaves the first object that this object contains.
source code
NVDAObject or None
_get_lastChild(self)
Retreaves the last object that this object contains.
source code
NVDAObject or None
_get_parent(self)
Retreaves this object's parent (the object that contains this object).
source code
 
_get_isInForeground(self)
Finds out if this object is currently within the foreground.
source code
set of int
_get_states(self)
Retreaves the current states of this object (example: selected, focused).
source code
 
_get_windowStyle(self) source code
 
_get_isWindowUnicode(self) source code
 
correctAPIForRelation(self, obj, relation=None) source code
 
_get_processHandle(self) source code
list of str
_get_devInfo(self)
Information about this object useful to developers.
source code

Inherited from NVDAObject: __eq__, __ne__, doAction, event_becomeNavigatorObject, event_caret, event_descriptionChange, event_focusEntered, event_foreground, event_gainFocus, event_mouseMove, event_nameChange, event_stateChange, event_typedCharacter, event_valueChange, getActionName, makeTextInfo, reportFocus, scrollIntoView, setFocus

Inherited from baseObject.ScriptableObject: bindGesture, bindGestures, clearGestureBindings, getScript

Inherited from baseObject.AutoPropertyObject: invalidateCache

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
generator
getPossibleAPIClasses(cls, kwargs, relation=None)
Provides a generator which can generate all the possible API classes (in priority order) that inherit directly from the class it was called on.
source code
boolean
kwargsFromSuper(cls, kwargs, relation=None)
Finds out if this class can be instanciated from the given super kwargs.
source code
string
normalizeWindowClassName(cls, name)
Removes unneeded information from a window class name (e.g.
source code

Inherited from NVDAObject: findBestAPIClass

Inherited from baseObject.AutoPropertyObject: invalidateCaches

Static Methods [hide private]

Inherited from NVDAObject: objectFromPoint, objectInForeground, objectWithFocus

Class Variables [hide private]
  normalizedWindowClassNameCache = {}

Inherited from NVDAObject: beTransparentToMouse, cachePropertiesByDefault, presType_content, presType_layout, presType_unavailable, tableCellCoordsInName

Instance Variables [hide private]
string windowClassName
the window's class
int windowControlID
the window's control ID
int windowHandle
The window's handle
list of two ints windowProcessID
The window's [processID,threadID]
string windowText
The window's text (using winUser.WM_GETTEXT)

Inherited from NVDAObject: textRepresentationLineLength

Inherited from NVDAObject (private): _mouseEntered

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getPossibleAPIClasses(cls, kwargs, relation=None)
Class Method

source code 

Provides a generator which can generate all the possible API classes (in priority order) that inherit directly from the class it was called on.

Parameters:
  • relation - the relationship of a possible new object of this type to another object creating it (e.g. parent).
  • type - string
  • kwargs - the arguments necessary to construct an object of the class this method was called on.
Returns: generator
a generator
Overrides: NVDAObject.getPossibleAPIClasses
(inherited documentation)

findOverlayClasses(self, clsList)

source code 

Chooses overlay classes which should be added to this object's class structure after the object has been initially instantiated. After an NVDAObject class (normally an API-level class) is instantiated, this method is called on the instance to choose appropriate overlay classes. This method may use properties, etc. on the instance to make this choice. The object's class structure is then mutated to contain these classes. initOverlayClass is then called for each class which was not part of the initially instantiated object. This process allows an NVDAObject to be dynamically created using the most appropriate NVDAObject subclass at each API level. Classes should be listed with subclasses first. That is, subclasses should generally call super and then append their own classes to the list. For example: Called on an IAccessible NVDAObjectThe list might contain DialogIaccessible (a subclass of IAccessible), Edit (a subclass of Window).

Parameters:
  • clsList - The list of classes, which will be modified by this method if appropriate.
Overrides: NVDAObject.findOverlayClasses
(inherited documentation)

kwargsFromSuper(cls, kwargs, relation=None)
Class Method

source code 

Finds out if this class can be instanciated from the given super kwargs. If so it updates the kwargs to contain everything it will need to instanciate this class, and returns True. If this class can not be instanciated, it returns False and kwargs is not touched.

Parameters:
  • relation - why is this class being instanciated? parent, focus, foreground etc...
  • kwargs - the kwargs for constructing this class's super class.
Returns: boolean
Overrides: NVDAObject.kwargsFromSuper
(inherited documentation)

__init__(self, windowHandle=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_isEqual(self, other)

source code 

Calculates if this object is equal to another object. Used by NVDAObject.__eq__.

Parameters:
  • other - the other object to compare with.
Returns: boolean
True if equal, false otherwise.
Overrides: NVDAObject._isEqual
(inherited documentation)

_get_name(self)

source code 

The name or label of this object (example: the text of a button).

Returns: basestring
Overrides: NVDAObject._get_name
(inherited documentation)

_get_role(self)

source code 

The role or type of control this object represents (example: button, list, dialog).

Returns: int
a ROLE_* constant from controlTypes
Overrides: NVDAObject._get_role
(inherited documentation)

_get_location(self)

source code 

The location of this object on the screen.

Returns: tuple of int
left, top, width and height of the object.
Overrides: NVDAObject._get_location
(inherited documentation)

_get_processID(self)

source code 

Retreaves an identifyer of the process this object is a part of.

Returns: int
Overrides: NVDAObject._get_processID
(inherited documentation)

_get_next(self)

source code 

Retreaves the object directly after this object with the same parent.

Returns: NVDAObject or None
the next object if it exists else None.
Overrides: NVDAObject._get_next
(inherited documentation)

_get_previous(self)

source code 

Retreaves the object directly before this object with the same parent.

Returns: NVDAObject or None
the previous object if it exists else None.
Overrides: NVDAObject._get_previous
(inherited documentation)

_get_firstChild(self)

source code 

Retreaves the first object that this object contains.

Returns: NVDAObject or None
the first child object if it exists else None.
Overrides: NVDAObject._get_firstChild
(inherited documentation)

_get_lastChild(self)

source code 

Retreaves the last object that this object contains.

Returns: NVDAObject or None
the last child object if it exists else None.
Overrides: NVDAObject._get_lastChild
(inherited documentation)

_get_parent(self)

source code 

Retreaves this object's parent (the object that contains this object).

Returns: NVDAObject or None
the parent object if it exists else None.
Overrides: NVDAObject._get_parent
(inherited documentation)

_get_isInForeground(self)

source code 

Finds out if this object is currently within the foreground.

Overrides: NVDAObject._get_isInForeground
(inherited documentation)

_get_states(self)

source code 

Retreaves the current states of this object (example: selected, focused).

Returns: set of int
a set of STATE_* constants from controlTypes.
Overrides: NVDAObject._get_states
(inherited documentation)

normalizeWindowClassName(cls, name)
Class Method

source code 

Removes unneeded information from a window class name (e.g. ATL: and windows forms info), and or maps it to a much more well-known compatible class name. Conversions are also cached for future normalizations.

Parameters:
  • name (string) - the window class name to normalize
Returns: string
the normalized window class name

_get_devInfo(self)

source code 

Information about this object useful to developers. Subclasses may extend this, calling the superclass property first.

Returns: list of str
A list of text strings providing information about this object useful to developers.
Overrides: NVDAObject._get_devInfo
(inherited documentation)