1 module libwasm.bindings.CaretStateChangedEvent; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.DOMRect; 7 import libwasm.bindings.Event; 8 9 @safe: 10 nothrow: 11 12 enum CaretChangedReason { 13 visibilitychange, 14 updateposition, 15 longpressonemptycontent, 16 taponcaret, 17 presscaret, 18 releasecaret, 19 scroll 20 } 21 struct CaretStateChangedEvent { 22 nothrow: 23 libwasm.bindings.Event.Event _parent; 24 alias _parent this; 25 this(Handle h) { 26 _parent = .Event(h); 27 } 28 bool collapsed()() { 29 return Object_Getter__bool(this._parent, "collapsed"); 30 } 31 auto boundingClientRect()() { 32 return recastOpt!(DOMRectReadOnly)(Object_Getter__OptionalHandle(this._parent, "boundingClientRect")); 33 } 34 CaretChangedReason reason()() { 35 return Object_Getter__int(this._parent, "reason"); 36 } 37 bool caretVisible()() { 38 return Object_Getter__bool(this._parent, "caretVisible"); 39 } 40 bool caretVisuallyVisible()() { 41 return Object_Getter__bool(this._parent, "caretVisuallyVisible"); 42 } 43 bool selectionVisible()() { 44 return Object_Getter__bool(this._parent, "selectionVisible"); 45 } 46 bool selectionEditable()() { 47 return Object_Getter__bool(this._parent, "selectionEditable"); 48 } 49 string selectedTextContent()() { 50 return Object_Getter__string(this._parent, "selectedTextContent"); 51 } 52 } 53 struct CaretStateChangedEventInit { 54 nothrow: 55 libwasm.bindings.Event.EventInit _parent; 56 alias _parent this; 57 this(Handle h) { 58 _parent = .EventInit(h); 59 } 60 static auto create() { 61 return CaretStateChangedEventInit(libwasm_add__object()); 62 } 63 void collapsed()(bool collapsed) { 64 Object_Call_bool__void(this._parent, "collapsed", collapsed); 65 } 66 bool collapsed()() { 67 return Object_Getter__bool(this._parent, "collapsed"); 68 } 69 void boundingClientRect(T0)(scope auto ref Optional!(T0) boundingClientRect) if (isTOrPointer!(T0, DOMRectReadOnly)) { 70 Serialize_Object_VarArgCall!void(this._parent, "boundingClientRect", "Optional!Handle", tuple(!boundingClientRect.empty, cast(Handle)boundingClientRect.front.handle)); 71 } 72 auto boundingClientRect()() { 73 return recastOpt!(DOMRectReadOnly)(Object_Getter__OptionalHandle(this._parent, "boundingClientRect")); 74 } 75 void reason()(CaretChangedReason reason) { 76 Object_Call_int__void(this._parent, "reason", reason); 77 } 78 CaretChangedReason reason()() { 79 return Object_Getter__int(this._parent, "reason"); 80 } 81 void caretVisible()(bool caretVisible) { 82 Object_Call_bool__void(this._parent, "caretVisible", caretVisible); 83 } 84 bool caretVisible()() { 85 return Object_Getter__bool(this._parent, "caretVisible"); 86 } 87 void caretVisuallyVisible()(bool caretVisuallyVisible) { 88 Object_Call_bool__void(this._parent, "caretVisuallyVisible", caretVisuallyVisible); 89 } 90 bool caretVisuallyVisible()() { 91 return Object_Getter__bool(this._parent, "caretVisuallyVisible"); 92 } 93 void selectionVisible()(bool selectionVisible) { 94 Object_Call_bool__void(this._parent, "selectionVisible", selectionVisible); 95 } 96 bool selectionVisible()() { 97 return Object_Getter__bool(this._parent, "selectionVisible"); 98 } 99 void selectionEditable()(bool selectionEditable) { 100 Object_Call_bool__void(this._parent, "selectionEditable", selectionEditable); 101 } 102 bool selectionEditable()() { 103 return Object_Getter__bool(this._parent, "selectionEditable"); 104 } 105 void selectedTextContent()(string selectedTextContent) { 106 Object_Call_string__void(this._parent, "selectedTextContent", selectedTextContent); 107 } 108 string selectedTextContent()() { 109 return Object_Getter__string(this._parent, "selectedTextContent"); 110 } 111 } 112 113