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)
| 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 |
nothing calls this directly
no test coverage detected