CefImitateInput.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright aXiuShen. All Rights Reserved.
  2. #pragma once
  3. #include "CoreMinimal.h"
  4. #include "Layout/Visibility.h"
  5. #include "Input/Reply.h"
  6. #include "Widgets/DeclarativeSyntaxSupport.h"
  7. #include "Widgets/SCompoundWidget.h"
  8. #include "Framework/SlateDelegates.h"
  9. #include "warp_macro.h"
  10. namespace cef {
  11. enum WebView_ImitateInput_Mouse
  12. {
  13. WebView_ImitateInput_Mouse_Down = 0,
  14. WebView_ImitateInput_Mouse_Up = 1,
  15. WebView_ImitateInput_Mouse_Move = 2,
  16. };
  17. enum WebView_ImitateInput_Key
  18. {
  19. WebView_ImitateInput_Key_Down = 0,
  20. WebView_ImitateInput_Key_Up = 1,
  21. WebView_ImitateInput_Key_Char = 2,
  22. };
  23. struct FImitateInput
  24. {
  25. public:
  26. /*
  27. * Show web content when Imitate Input
  28. */
  29. bool Show = true;
  30. /*
  31. * Time interval between events .ms , If the interval time is insufficient, call the AddDelay node to increase
  32. */
  33. int interval = 20;
  34. /*
  35. * Simulate event screen resolution. After setting, it can adapt to any resolution.
  36. * Please keep the size and webpixel values the same in the editor
  37. */
  38. FIntPoint Size = FIntPoint(0, 0);
  39. /*
  40. {"type":"delay","ms":3000}
  41. {"type":"input","text":"content"}
  42. {"type":"key_down","code":0,"character":0,"modify":0}
  43. {"type":"key_char","code":0,"character":0,"modify":0}
  44. {"type":"key_up","code":0,"character":0,"modify":0}
  45. {"type":"mouse_down","pos":{"x":128,"y":256}}
  46. {"type":"mouse_move","pos":{"x":128,"y":256}}
  47. {"type":"mouse_up","pos":{"x":128,"y":256}}
  48. */
  49. TArray<FString> Event;
  50. };
  51. enum class WebView_Keyboard_Mode : uint8
  52. {
  53. WebView_Keyboard_Mode_Scenes = 1,
  54. WebView_Keyboard_Mode_Blend = 0,
  55. WebView_Keyboard_Mode_Both = 2,
  56. };
  57. }