MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / get_child_at

Method get_child_at

pydevd_attach_to_process/winappdbg/window.py:480–511  ·  view source on GitHub ↗

Get the child window located at the given coordinates. If no such window exists an exception is raised. @see: L{get_children} @type x: int @param x: Horizontal coordinate. @type y: int @param y: Vertical coordinate. @type bAllow

(self, x, y, bAllowTransparency=True)

Source from the content-addressed store, hash-verified

478 return self
479
480 def get_child_at(self, x, y, bAllowTransparency=True):
481 """
482 Get the child window located at the given coordinates. If no such
483 window exists an exception is raised.
484
485 @see: L{get_children}
486
487 @type x: int
488 @param x: Horizontal coordinate.
489
490 @type y: int
491 @param y: Vertical coordinate.
492
493 @type bAllowTransparency: bool
494 @param bAllowTransparency: If C{True} transparent areas in windows are
495 ignored, returning the window behind them. If C{False} transparent
496 areas are treated just like any other area.
497
498 @rtype: L{Window}
499 @return: Child window at the requested position, or C{None} if there
500 is no window at those coordinates.
501 """
502 try:
503 if bAllowTransparency:
504 hWnd = win32.RealChildWindowFromPoint(self.get_handle(), (x, y))
505 else:
506 hWnd = win32.ChildWindowFromPoint(self.get_handle(), (x, y))
507 if hWnd:
508 return self.__get_window(hWnd)
509 except WindowsError:
510 pass
511 return None
512
513 # ------------------------------------------------------------------------------
514

Callers

nothing calls this directly

Calls 2

get_handleMethod · 0.95
__get_windowMethod · 0.95

Tested by

no test coverage detected