simple-rdp 0.8.3__cp314-cp314-win_amd64.whl → 0.8.4__cp314-cp314-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
simple_rdp/client.py CHANGED
@@ -409,7 +409,7 @@ class RDPClient:
409
409
  """
410
410
  return await self._display.screenshot()
411
411
 
412
- async def pointer_area_screenshot(self) -> tuple[Image.Image, tuple[int, int]]:
412
+ async def pointer_area_screenshot(self) -> tuple[Image.Image, tuple[int, int], tuple[int, int]]:
413
413
  """
414
414
  Capture a cropped area around the pointer position.
415
415
 
@@ -418,9 +418,10 @@ class RDPClient:
418
418
  near edges, the crop is clamped to stay within display bounds.
419
419
 
420
420
  Returns:
421
- Tuple of (cropped_image, (top_x, top_y)) where:
421
+ Tuple of (cropped_image, (top_x, top_y), (bottom_x, bottom_y)) where:
422
422
  - cropped_image: Cropped region with pointer composited
423
423
  - (top_x, top_y): Top-left corner position of crop relative to display
424
+ - (bottom_x, bottom_y): Bottom-right corner position of crop relative to display
424
425
  """
425
426
  return await self._display.pointer_area_screenshot()
426
427
 
simple_rdp/display.py CHANGED
@@ -528,7 +528,7 @@ class Display:
528
528
  img.save(path)
529
529
  logger.info(f"Screenshot saved to {path}")
530
530
 
531
- async def pointer_area_screenshot(self) -> tuple[Image.Image, tuple[int, int]]:
531
+ async def pointer_area_screenshot(self) -> tuple[Image.Image, tuple[int, int], tuple[int, int]]:
532
532
  """
533
533
  Capture a cropped area around the pointer position.
534
534
 
@@ -537,15 +537,16 @@ class Display:
537
537
  near edges, the crop is clamped to stay within display bounds.
538
538
 
539
539
  Returns:
540
- Tuple of (cropped_image, (top_x, top_y)) where:
540
+ Tuple of (cropped_image, (top_x, top_y), (bottom_x, bottom_y)) where:
541
541
  - cropped_image: Cropped region with pointer composited
542
542
  - (top_x, top_y): Top-left corner position of crop relative to display
543
+ - (bottom_x, bottom_y): Bottom-right corner position of crop relative to display
543
544
  """
544
545
  async with self._screen_lock:
545
546
  if self._raw_display_image is None:
546
547
  crop_w = self._width // 3
547
548
  crop_h = self._height // 3
548
- return (Image.new("RGB", (crop_w, crop_h), (0, 0, 0)), (0, 0))
549
+ return (Image.new("RGB", (crop_w, crop_h), (0, 0, 0)), (0, 0), (crop_w, crop_h))
549
550
 
550
551
  # Update final display image if dirty
551
552
  if self._final_display_image_dirty or self._final_display_image is None:
@@ -565,10 +566,14 @@ class Display:
565
566
  top_x = max(0, min(top_x, self._width - crop_w))
566
567
  top_y = max(0, min(top_y, self._height - crop_h))
567
568
 
569
+ # Calculate bottom-right corner
570
+ bottom_x = top_x + crop_w
571
+ bottom_y = top_y + crop_h
572
+
568
573
  # Crop the image
569
- cropped = self._final_display_image.crop((top_x, top_y, top_x + crop_w, top_y + crop_h))
574
+ cropped = self._final_display_image.crop((top_x, top_y, bottom_x, bottom_y))
570
575
 
571
- return (cropped.copy(), (top_x, top_y))
576
+ return (cropped.copy(), (top_x, top_y), (bottom_x, bottom_y))
572
577
 
573
578
  async def apply_bitmap(
574
579
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simple-rdp
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -0,0 +1,14 @@
1
+ simple_rdp\__init__.py,sha256=zJw8lC4mIERiJQJb1ziRaS5pUNGNcE1z8xuGymxwwB8,717
2
+ simple_rdp\_rle.cp314-win_amd64.pyd,sha256=5_0njnQW9VpiICuyhZQ5rJbe8EZmod2UFlnUE7o8m2I,195072
3
+ simple_rdp\capabilities.py,sha256=jAP3SYjPORIDLV0p2tKD21jq3ulthd6NgpYVJ2uv1vg,17797
4
+ simple_rdp\client.py,sha256=Gk7xKCW4PQeVPKzCDoztnXEFFG9Fvw7ov30ZR7cgh1M,72559
5
+ simple_rdp\credssp.py,sha256=nf75WpBvL8X7i4nT5o27tmfPCwkLhAfamBzMlXnd5CE,16370
6
+ simple_rdp\display.py,sha256=tcABxCzxU3fB0IfN8OC5ULjoFEAsbcLzsXQyM5BF7aE,40050
7
+ simple_rdp\input.py,sha256=nnSEac9t4j72ZdCvhhDMcXGu9KwoqRCdzpyZxnUg_AE,938
8
+ simple_rdp\mcs.py,sha256=egSTKViZVXd0uaUBPorc9ia79xa0XwUgnTm3u5G2eXw,26462
9
+ simple_rdp\pdu.py,sha256=GRat4fJ56zhSvy0QtP5tBqpClDNTCH6CPp9FELrXTxw,18713
10
+ simple_rdp-0.8.4.dist-info\METADATA,sha256=q68U4Zvv6n7QqwYg_K64gFDZ4TVrIz_OS8uCWrapQS8,11619
11
+ simple_rdp-0.8.4.dist-info\WHEEL,sha256=TASrtxyeL-Pi7odwPBMCgR1YebCHdBFZvgqiADG_4b0,97
12
+ simple_rdp-0.8.4.dist-info\entry_points.txt,sha256=CPwBu2L4Vh3MZwYYlTAotNUElilT43OKdi3UnHTTKQ4,66
13
+ simple_rdp-0.8.4.dist-info\licenses\LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
14
+ simple_rdp-0.8.4.dist-info\RECORD,,
@@ -1,14 +0,0 @@
1
- simple_rdp\__init__.py,sha256=zJw8lC4mIERiJQJb1ziRaS5pUNGNcE1z8xuGymxwwB8,717
2
- simple_rdp\_rle.cp314-win_amd64.pyd,sha256=lH0x7U3KgPc4o64v6AR-zQr1c7_zZ9wEcOzDFKOMl30,195072
3
- simple_rdp\capabilities.py,sha256=jAP3SYjPORIDLV0p2tKD21jq3ulthd6NgpYVJ2uv1vg,17797
4
- simple_rdp\client.py,sha256=4mhXFbcMMls-jSKdkXg_zniNFxsoQBD1xL5MBHLAybU,72426
5
- simple_rdp\credssp.py,sha256=nf75WpBvL8X7i4nT5o27tmfPCwkLhAfamBzMlXnd5CE,16370
6
- simple_rdp\display.py,sha256=cf31w5xPWh--vl3p6rnM3vNJrXr_ATx7gcE9JCOnQQ8,39764
7
- simple_rdp\input.py,sha256=nnSEac9t4j72ZdCvhhDMcXGu9KwoqRCdzpyZxnUg_AE,938
8
- simple_rdp\mcs.py,sha256=egSTKViZVXd0uaUBPorc9ia79xa0XwUgnTm3u5G2eXw,26462
9
- simple_rdp\pdu.py,sha256=GRat4fJ56zhSvy0QtP5tBqpClDNTCH6CPp9FELrXTxw,18713
10
- simple_rdp-0.8.3.dist-info\METADATA,sha256=N6LDHByeGL4X9V67HAsUE_eBLyvDDCLHuXep3_RTYrs,11619
11
- simple_rdp-0.8.3.dist-info\WHEEL,sha256=TASrtxyeL-Pi7odwPBMCgR1YebCHdBFZvgqiADG_4b0,97
12
- simple_rdp-0.8.3.dist-info\entry_points.txt,sha256=CPwBu2L4Vh3MZwYYlTAotNUElilT43OKdi3UnHTTKQ4,66
13
- simple_rdp-0.8.3.dist-info\licenses\LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
14
- simple_rdp-0.8.3.dist-info\RECORD,,