explorerservice.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // @ts-check
  2. // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
  3. // This file is automatically generated. DO NOT EDIT
  4. /**
  5. * explorerService 缓存最近一次从资源管理器读到的鼠标悬停项(完整路径)。
  6. * 后台轮询:当前台窗口是资源管理器且有鼠标悬停项时更新缓存。
  7. * 当检测到悬停项发生变化(与上次缓存不同)时,在鼠标旁弹出临时提示
  8. * 显示完整路径(复用系统级 mousealert 置顶气泡,无需切换到 Wails 窗口)。
  9. *
  10. * 可启停:Start/Stop 可反复调用(「配置→系统」关闭标签功能时 Stop 停止轮询,
  11. * 重新启用时 Start 再启动)。Stop 关闭 stopCh 令 pollLoop 退出;Start 重建
  12. * stopCh 并启动新 pollLoop。
  13. * @module
  14. */
  15. // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  16. // @ts-ignore: Unused imports
  17. import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
  18. /**
  19. * LastSelection 返回最近一次读到的悬停项完整路径,无则 ""。
  20. * 注意:方法名保留 LastSelection 以匹配 Wails 绑定(绑定 ID 哈希只依赖方法全名,
  21. * 改方法名会导致前端绑定失效)。语义已从「选中项列表」变为「悬停项单个路径」。
  22. * @returns {$CancellablePromise<string>}
  23. */
  24. export function LastSelection() {
  25. return $Call.ByID(869620300);
  26. }
  27. /**
  28. * Start 启动后台轮询 goroutine。若已在运行则无操作;Stop 后再次调用可重新启动。
  29. * @returns {$CancellablePromise<void>}
  30. */
  31. export function Start() {
  32. return $Call.ByID(1659257734);
  33. }
  34. /**
  35. * Stop 停止后台轮询。若已停止则无操作。
  36. * @returns {$CancellablePromise<void>}
  37. */
  38. export function Stop() {
  39. return $Call.ByID(19212526);
  40. }