1 module libwasm.bindings.ProfileTimelineMarker; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.Performance; 7 8 @safe: 9 nothrow: 10 11 struct ProfileTimelineLayerRect { 12 nothrow: 13 JsHandle handle; 14 alias handle this; 15 this(Handle h) { 16 this.handle = JsHandle(h); 17 } 18 static auto create() { 19 return ProfileTimelineLayerRect(libwasm_add__object()); 20 } 21 void x()(int x) { 22 Object_Call_int__void(this.handle, "x", x); 23 } 24 int x()() { 25 return Object_Getter__int(this.handle, "x"); 26 } 27 void y()(int y) { 28 Object_Call_int__void(this.handle, "y", y); 29 } 30 int y()() { 31 return Object_Getter__int(this.handle, "y"); 32 } 33 void width()(int width) { 34 Object_Call_int__void(this.handle, "width", width); 35 } 36 int width()() { 37 return Object_Getter__int(this.handle, "width"); 38 } 39 void height()(int height) { 40 Object_Call_int__void(this.handle, "height", height); 41 } 42 int height()() { 43 return Object_Getter__int(this.handle, "height"); 44 } 45 } 46 struct ProfileTimelineMarker { 47 nothrow: 48 JsHandle handle; 49 alias handle this; 50 this(Handle h) { 51 this.handle = JsHandle(h); 52 } 53 static auto create() { 54 return ProfileTimelineMarker(libwasm_add__object()); 55 } 56 void name()(string name) { 57 Object_Call_string__void(this.handle, "name", name); 58 } 59 string name()() { 60 return Object_Getter__string(this.handle, "name"); 61 } 62 void start()(double start) { 63 Object_Call_double__void(this.handle, "start", start); 64 } 65 double start()() { 66 return Object_Getter__double(this.handle, "start"); 67 } 68 void end()(double end) { 69 Object_Call_double__void(this.handle, "end", end); 70 } 71 double end()() { 72 return Object_Getter__double(this.handle, "end"); 73 } 74 void stack(T0)(scope auto ref Optional!(T0) stack) if (isTOrPointer!(T0, JsObject)) { 75 Serialize_Object_VarArgCall!void(this.handle, "stack", "Optional!Handle", tuple(!stack.empty, cast(Handle)stack.front.handle)); 76 } 77 auto stack()() { 78 return recastOpt!(JsObject)(Object_Getter__OptionalHandle(this.handle, "stack")); 79 } 80 void processType()(ushort processType) { 81 Serialize_Object_VarArgCall!void(this.handle, "processType", "ushort", tuple(processType)); 82 } 83 ushort processType()() { 84 return Object_Getter__ushort(this.handle, "processType"); 85 } 86 void isOffMainThread()(bool isOffMainThread) { 87 Object_Call_bool__void(this.handle, "isOffMainThread", isOffMainThread); 88 } 89 bool isOffMainThread()() { 90 return Object_Getter__bool(this.handle, "isOffMainThread"); 91 } 92 void causeName()(string causeName) { 93 Object_Call_string__void(this.handle, "causeName", causeName); 94 } 95 string causeName()() { 96 return Object_Getter__string(this.handle, "causeName"); 97 } 98 void endStack(T0)(scope auto ref Optional!(T0) endStack) if (isTOrPointer!(T0, JsObject)) { 99 Serialize_Object_VarArgCall!void(this.handle, "endStack", "Optional!Handle", tuple(!endStack.empty, cast(Handle)endStack.front.handle)); 100 } 101 auto endStack()() { 102 return recastOpt!(JsObject)(Object_Getter__OptionalHandle(this.handle, "endStack")); 103 } 104 void type()(string type) { 105 Object_Call_string__void(this.handle, "type", type); 106 } 107 string type()() { 108 return Object_Getter__string(this.handle, "type"); 109 } 110 void eventPhase()(ushort eventPhase) { 111 Serialize_Object_VarArgCall!void(this.handle, "eventPhase", "ushort", tuple(eventPhase)); 112 } 113 ushort eventPhase()() { 114 return Object_Getter__ushort(this.handle, "eventPhase"); 115 } 116 void unixTime()(uint unixTime) { 117 Object_Call_uint__void(this.handle, "unixTime", unixTime); 118 } 119 uint unixTime()() { 120 return Object_Getter__uint(this.handle, "unixTime"); 121 } 122 void rectangles()(scope ref Sequence!(ProfileTimelineLayerRect) rectangles) { 123 Object_Call_Handle__void(this.handle, "rectangles", rectangles.handle); 124 } 125 auto rectangles()() { 126 return Sequence!(ProfileTimelineLayerRect)(Object_Getter__Handle(this.handle, "rectangles")); 127 } 128 void isAnimationOnly()(bool isAnimationOnly) { 129 Object_Call_bool__void(this.handle, "isAnimationOnly", isAnimationOnly); 130 } 131 bool isAnimationOnly()() { 132 return Object_Getter__bool(this.handle, "isAnimationOnly"); 133 } 134 void messagePortOperation()(ProfileTimelineMessagePortOperationType messagePortOperation) { 135 Object_Call_int__void(this.handle, "messagePortOperation", messagePortOperation); 136 } 137 ProfileTimelineMessagePortOperationType messagePortOperation()() { 138 return Object_Getter__int(this.handle, "messagePortOperation"); 139 } 140 void workerOperation()(ProfileTimelineWorkerOperationType workerOperation) { 141 Object_Call_int__void(this.handle, "workerOperation", workerOperation); 142 } 143 ProfileTimelineWorkerOperationType workerOperation()() { 144 return Object_Getter__int(this.handle, "workerOperation"); 145 } 146 } 147 enum ProfileTimelineMessagePortOperationType { 148 serializeData, 149 deserializeData 150 } 151 struct ProfileTimelineStackFrame { 152 nothrow: 153 JsHandle handle; 154 alias handle this; 155 this(Handle h) { 156 this.handle = JsHandle(h); 157 } 158 static auto create() { 159 return ProfileTimelineStackFrame(libwasm_add__object()); 160 } 161 void line()(int line) { 162 Object_Call_int__void(this.handle, "line", line); 163 } 164 int line()() { 165 return Object_Getter__int(this.handle, "line"); 166 } 167 void column()(int column) { 168 Object_Call_int__void(this.handle, "column", column); 169 } 170 int column()() { 171 return Object_Getter__int(this.handle, "column"); 172 } 173 void source()(string source) { 174 Object_Call_string__void(this.handle, "source", source); 175 } 176 string source()() { 177 return Object_Getter__string(this.handle, "source"); 178 } 179 void functionDisplayName()(string functionDisplayName) { 180 Object_Call_string__void(this.handle, "functionDisplayName", functionDisplayName); 181 } 182 string functionDisplayName()() { 183 return Object_Getter__string(this.handle, "functionDisplayName"); 184 } 185 void parent(T0)(scope auto ref Optional!(T0) parent) if (isTOrPointer!(T0, JsObject)) { 186 Serialize_Object_VarArgCall!void(this.handle, "parent", "Optional!Handle", tuple(!parent.empty, cast(Handle)parent.front.handle)); 187 } 188 auto parent()() { 189 return recastOpt!(JsObject)(Object_Getter__OptionalHandle(this.handle, "parent")); 190 } 191 void asyncParent(T0)(scope auto ref Optional!(T0) asyncParent) if (isTOrPointer!(T0, JsObject)) { 192 Serialize_Object_VarArgCall!void(this.handle, "asyncParent", "Optional!Handle", tuple(!asyncParent.empty, cast(Handle)asyncParent.front.handle)); 193 } 194 auto asyncParent()() { 195 return recastOpt!(JsObject)(Object_Getter__OptionalHandle(this.handle, "asyncParent")); 196 } 197 void asyncCause()(string asyncCause) { 198 Object_Call_string__void(this.handle, "asyncCause", asyncCause); 199 } 200 string asyncCause()() { 201 return Object_Getter__string(this.handle, "asyncCause"); 202 } 203 } 204 enum ProfileTimelineWorkerOperationType { 205 serializeDataOffMainThread, 206 serializeDataOnMainThread, 207 deserializeDataOffMainThread, 208 deserializeDataOnMainThread 209 } 210 211