pub unsafe extern "C" fn MaaKWinControllerCreate(
device_node: *const c_char,
screen_width: c_int,
screen_height: c_int,
use_win32_vk_code: MaaBool,
) -> *mut MaaControllerExpand description
@brief Create a KWin (pure Wayland) controller for Linux.
@param device_node The uinput device node path (e.g., “/dev/uinput”). @param screen_width The screen width in pixels. @param screen_height The screen height in pixels. @param use_win32_vk_code If true, key codes passed to click_key / key_down / key_up are interpreted as Win32 Virtual-Key codes (VK_*) and translated to Linux evdev codes internally. If false, key codes are passed through as raw evdev codes. @return The controller handle, or nullptr on failure.
@note This controller is designed for KWin (pure Wayland) on Linux. @note Input is simulated via /dev/uinput (kernel-level virtual touchscreen). @note Screencap is implemented via PipeWire / xdg-desktop-portal (KDE/KWin). Captures the foreground monitor in fullscreen mode. @note Requires user authorization via the screen sharing dialog (xdg-desktop-portal). @note Requires write permission to /dev/uinput (typically via the “input” group). @note Only single touch is supported (contact must be 0).