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

Method __init__

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

Source from the content-addressed store, hash-verified

256 _own: bool
257
258 def __init__(self, c_handle: Optional[MaaImageBufferHandle] = None):
259 self._set_api_properties()
260
261 if c_handle:
262 self._handle = c_handle
263 self._own = False
264 else:
265 self._handle = Library.framework().MaaImageBufferCreate()
266 self._own = True
267
268 if not self._handle:
269 raise RuntimeError("Failed to create string buffer.")
270
271 def __del__(self):
272 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