MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / __init__

Method __init__

source/binding/Python/maa/buffer.py:544–555  ·  view source on GitHub ↗
(self, c_handle: Optional[MaaRectHandle] = None)

Source from the content-addressed store, hash-verified

542 _own: bool
543
544 def __init__(self, c_handle: Optional[MaaRectHandle] = None):
545 self._set_api_properties()
546
547 if c_handle:
548 self._handle = c_handle
549 self._own = False
550 else:
551 self._handle = Library.framework().MaaRectCreate()
552 self._own = True
553
554 if not self._handle:
555 raise RuntimeError("Failed to create rect buffer.")
556
557 def __del__(self):
558 if self._handle and self._own:

Callers

nothing calls this directly

Calls 2

_set_api_propertiesMethod · 0.95
frameworkMethod · 0.80

Tested by

no test coverage detected