Skip to content

Commit

Permalink
Added PyWinBox module to replace MyBox class (which replaced PyRect m…
Browse files Browse the repository at this point in the history
…odule)
  • Loading branch information
Kalmat committed May 23, 2023
1 parent ddb0dfe commit 4de2875
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Binary file modified dist/PyWinCtl-dev0.1-py3-none-any.whl
Binary file not shown.
13 changes: 3 additions & 10 deletions src/pywinctl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from typing import Any, cast, List, Tuple, Union

import pymonctl as pmc # type: ignore[import]
from pywinbox import PyWinBox, Box, Rect, Point, Size
from pywinbox import PyWinBox, defaultOnQuery, defaultOnSet, Box, Rect, Point, Size


__all__ = [
Expand Down Expand Up @@ -102,7 +102,7 @@ def _levenshtein(seq1: str, seq2: str) -> float:
class BaseWindow(ABC):

def __init__(self, handle):
self._box: PyBox = PyBox(pybox.defaultOnQuery, pybox.defaultOnSet, handle)
self._box: PyWinBox = PyWinBox(defaultOnQuery, defaultOnSet, handle)

def __str__(self):
r = self._box.box
Expand Down Expand Up @@ -414,17 +414,10 @@ def box(self) -> Box:
def box(self, value: Union[Box, Tuple[int, int, int, int]]):
self._box.box = value

@property
def bbox(self) -> BoundingBox:
return self._box.bbox

@bbox.setter
def bbox(self, value: Union[BoundingBox, Tuple[int, int, int, int]]):
self._box.bbox = value

@property
def rect(self) -> Rect:
return self._box.rect
bbox = rect

@rect.setter
def rect(self, value: Union[Rect, Tuple[int, int, int, int]]):
Expand Down

0 comments on commit 4de2875

Please sign in to comment.