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

Method __init__

source/binding/Python/maa/controller.py:1237–1271  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1235 _callbacks: MaaCustomControllerCallbacks
1236
1237 def __init__(self):
1238 super().__init__()
1239 self._set_custom_api_properties()
1240
1241 self._callbacks = MaaCustomControllerCallbacks(
1242 CustomController._c_connect_agent,
1243 CustomController._c_connected_agent,
1244 CustomController._c_request_uuid_agent,
1245 CustomController._c_get_features_agent,
1246 CustomController._c_start_app_agent,
1247 CustomController._c_stop_app_agent,
1248 CustomController._c_screencap_agent,
1249 CustomController._c_click_agent,
1250 CustomController._c_swipe_agent,
1251 CustomController._c_touch_down_agent,
1252 CustomController._c_touch_move_agent,
1253 CustomController._c_touch_up_agent,
1254 CustomController._c_click_key_agent,
1255 CustomController._c_input_text_agent,
1256 CustomController._c_key_down_agent,
1257 CustomController._c_key_up_agent,
1258 CustomController._c_scroll_agent,
1259 CustomController._c_relative_move_agent,
1260 CustomController._c_shell_agent,
1261 CustomController._c_inactive_agent,
1262 CustomController._c_get_info_agent,
1263 )
1264
1265 self._handle = Library.framework().MaaCustomControllerCreate(
1266 self.c_handle,
1267 self.c_arg,
1268 )
1269
1270 if not self._handle:
1271 raise RuntimeError("Failed to create Custom controller.")
1272
1273 @property
1274 def c_handle(self) -> Any:

Callers

nothing calls this directly

Calls 4

frameworkMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected