/++ +/ module wit.pumpkin.plugin.display.imports; import wit.common; public import wit.pumpkin.plugin.display.common; static import wit.pumpkin.plugin.text.imports; static import wit.pumpkin.plugin.item_stack.imports; static import wit.pumpkin.plugin.uuid.imports; static import wit.pumpkin.plugin.world.imports; package (wit) void __wit_bindgen_component_type_force_link() pure @nogc nothrow => imported!"wit.pumpkin.plugin.plugin".__wit_bindgen_component_type_force_link(); /++ +/ alias Entity = wit.pumpkin.plugin.world.imports.Entity; /++ +/ alias TextComponent = wit.pumpkin.plugin.text.imports.TextComponent; /++ +/ alias ItemStack = wit.pumpkin.plugin.item_stack.imports.ItemStack; /++ Common base resource for all display entities. +/ struct DisplayEntity { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } /++ +/ static Option!(DisplayEntity) fromEntity(Entity.Borrow entity) @trusted nothrow { align(4) void[8] _retArea = void; __import_fromEntity(entity.__handle, _retArea.ptr); Option!(DisplayEntity) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { auto _handle2 = DisplayEntity(*(cast(uint*)(_retArea.ptr + 4))); _option3 = Option!(DisplayEntity).makeSome(_handle2); } else { _option3 = Option!(DisplayEntity).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[static]display-entity.from-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:static:display_entity.from_entity") static private extern(C) void __import_fromEntity(uint, void*) nothrow; pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } @wasmImport!("pumpkin:plugin/display@0.1.0", "[resource-drop]display-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:resource_drop:display_entity") static private extern(C) void __import_drop(uint) @nogc nothrow; pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) typeof(this) witClone() const @safe @nogc nothrow { return typeof(this)(__handle); } // TODO: make RAII? disable copy for the own Borrow borrow() => Borrow(__handle); alias borrow this; struct Borrow { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } pragma(inline, true) Borrow witClone() const @safe @nogc nothrow { return Borrow(__handle); } /++ +/ Entity getEntity() @trusted nothrow { auto _ret = __import_getEntity(this.__handle); auto _handle0 = Entity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_entity") static private extern(C) uint __import_getEntity(uint) nothrow; /++ +/ DisplayTransformation getTransformation() @trusted nothrow { align(4) void[56] _retArea = void; __import_getTransformation(this.__handle, _retArea.ptr); Vector3f _record0 = { x: *(cast(float*)(_retArea.ptr + 0)), y: *(cast(float*)(_retArea.ptr + 4)), z: *(cast(float*)(_retArea.ptr + 8)), }; Vector3f _record1 = { x: *(cast(float*)(_retArea.ptr + 12)), y: *(cast(float*)(_retArea.ptr + 16)), z: *(cast(float*)(_retArea.ptr + 20)), }; Quaternionf _record2 = { x: *(cast(float*)(_retArea.ptr + 24)), y: *(cast(float*)(_retArea.ptr + 28)), z: *(cast(float*)(_retArea.ptr + 32)), w: *(cast(float*)(_retArea.ptr + 36)), }; Quaternionf _record3 = { x: *(cast(float*)(_retArea.ptr + 40)), y: *(cast(float*)(_retArea.ptr + 44)), z: *(cast(float*)(_retArea.ptr + 48)), w: *(cast(float*)(_retArea.ptr + 52)), }; DisplayTransformation _record4 = { translation: _record0, scale: _record1, leftRotation: _record2, rightRotation: _record3, }; auto _flush5 = _record4; return _flush5; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-transformation") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_transformation") static private extern(C) void __import_getTransformation(uint, void*) nothrow; /++ +/ void setTransformation(in DisplayTransformation transformation) @trusted nothrow { __import_setTransformation(this.__handle, transformation.translation.x, transformation.translation.y, transformation.translation.z, transformation.scale.x, transformation.scale.y, transformation.scale.z, transformation.leftRotation.x, transformation.leftRotation.y, transformation.leftRotation.z, transformation.leftRotation.w, transformation.rightRotation.x, transformation.rightRotation.y, transformation.rightRotation.z, transformation.rightRotation.w); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-transformation") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_transformation") static private extern(C) void __import_setTransformation(uint, float, float, float, float, float, float, float, float, float, float, float, float, float, float) nothrow; /++ +/ int getInterpolationDuration() @trusted nothrow { auto _ret = __import_getInterpolationDuration(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-interpolation-duration") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_interpolation_duration") static private extern(C) uint __import_getInterpolationDuration(uint) nothrow; /++ +/ void setInterpolationDuration(int duration) @trusted nothrow { __import_setInterpolationDuration(this.__handle, cast(uint)(duration)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-interpolation-duration") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_interpolation_duration") static private extern(C) void __import_setInterpolationDuration(uint, uint) nothrow; /++ +/ int getInterpolationStart() @trusted nothrow { auto _ret = __import_getInterpolationStart(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-interpolation-start") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_interpolation_start") static private extern(C) uint __import_getInterpolationStart(uint) nothrow; /++ +/ void setInterpolationStart(int deltaTicks) @trusted nothrow { __import_setInterpolationStart(this.__handle, cast(uint)(deltaTicks)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-interpolation-start") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_interpolation_start") static private extern(C) void __import_setInterpolationStart(uint, uint) nothrow; /++ +/ int getTeleportDuration() @trusted nothrow { auto _ret = __import_getTeleportDuration(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-teleport-duration") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_teleport_duration") static private extern(C) uint __import_getTeleportDuration(uint) nothrow; /++ +/ void setTeleportDuration(int duration) @trusted nothrow { __import_setTeleportDuration(this.__handle, cast(uint)(duration)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-teleport-duration") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_teleport_duration") static private extern(C) void __import_setTeleportDuration(uint, uint) nothrow; /++ +/ BillboardMode getBillboard() @trusted nothrow { auto _ret = __import_getBillboard(this.__handle); return cast(BillboardMode)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-billboard") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_billboard") static private extern(C) uint __import_getBillboard(uint) nothrow; /++ +/ void setBillboard(BillboardMode mode) @trusted nothrow { __import_setBillboard(this.__handle, cast(uint)(mode)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-billboard") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_billboard") static private extern(C) void __import_setBillboard(uint, uint) nothrow; /++ +/ float getViewRange() @trusted nothrow { auto _ret = __import_getViewRange(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-view-range") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_view_range") static private extern(C) float __import_getViewRange(uint) nothrow; /++ +/ void setViewRange(float range) @trusted nothrow { __import_setViewRange(this.__handle, range); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-view-range") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_view_range") static private extern(C) void __import_setViewRange(uint, float) nothrow; /++ +/ float getShadowRadius() @trusted nothrow { auto _ret = __import_getShadowRadius(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-shadow-radius") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_shadow_radius") static private extern(C) float __import_getShadowRadius(uint) nothrow; /++ +/ void setShadowRadius(float radius) @trusted nothrow { __import_setShadowRadius(this.__handle, radius); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-shadow-radius") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_shadow_radius") static private extern(C) void __import_setShadowRadius(uint, float) nothrow; /++ +/ float getShadowStrength() @trusted nothrow { auto _ret = __import_getShadowStrength(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-shadow-strength") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_shadow_strength") static private extern(C) float __import_getShadowStrength(uint) nothrow; /++ +/ void setShadowStrength(float strength) @trusted nothrow { __import_setShadowStrength(this.__handle, strength); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-shadow-strength") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_shadow_strength") static private extern(C) void __import_setShadowStrength(uint, float) nothrow; /++ +/ float getDisplayWidth() @trusted nothrow { auto _ret = __import_getDisplayWidth(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-display-width") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_display_width") static private extern(C) float __import_getDisplayWidth(uint) nothrow; /++ +/ void setDisplayWidth(float width) @trusted nothrow { __import_setDisplayWidth(this.__handle, width); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-display-width") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_display_width") static private extern(C) void __import_setDisplayWidth(uint, float) nothrow; /++ +/ float getDisplayHeight() @trusted nothrow { auto _ret = __import_getDisplayHeight(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-display-height") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_display_height") static private extern(C) float __import_getDisplayHeight(uint) nothrow; /++ +/ void setDisplayHeight(float height) @trusted nothrow { __import_setDisplayHeight(this.__handle, height); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-display-height") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_display_height") static private extern(C) void __import_setDisplayHeight(uint, float) nothrow; /++ +/ int getGlowColorOverride() @trusted nothrow { auto _ret = __import_getGlowColorOverride(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-glow-color-override") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_glow_color_override") static private extern(C) uint __import_getGlowColorOverride(uint) nothrow; /++ +/ void setGlowColorOverride(int color) @trusted nothrow { __import_setGlowColorOverride(this.__handle, cast(uint)(color)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-glow-color-override") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_glow_color_override") static private extern(C) void __import_setGlowColorOverride(uint, uint) nothrow; /++ +/ int getBrightness() @trusted nothrow { auto _ret = __import_getBrightness(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.get-brightness") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.get_brightness") static private extern(C) uint __import_getBrightness(uint) nothrow; /++ +/ void setBrightness(int brightness) @trusted nothrow { __import_setBrightness(this.__handle, cast(uint)(brightness)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]display-entity.set-brightness") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:display_entity.set_brightness") static private extern(C) void __import_setBrightness(uint, uint) nothrow; } } /++ Resource specifically for Block Display entities. +/ struct BlockDisplayEntity { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } /++ +/ static Option!(BlockDisplayEntity) fromEntity(Entity.Borrow entity) @trusted nothrow { align(4) void[8] _retArea = void; __import_fromEntity(entity.__handle, _retArea.ptr); Option!(BlockDisplayEntity) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { auto _handle2 = BlockDisplayEntity(*(cast(uint*)(_retArea.ptr + 4))); _option3 = Option!(BlockDisplayEntity).makeSome(_handle2); } else { _option3 = Option!(BlockDisplayEntity).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[static]block-display-entity.from-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:static:block_display_entity.from_entity") static private extern(C) void __import_fromEntity(uint, void*) nothrow; pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } @wasmImport!("pumpkin:plugin/display@0.1.0", "[resource-drop]block-display-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:resource_drop:block_display_entity") static private extern(C) void __import_drop(uint) @nogc nothrow; pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) typeof(this) witClone() const @safe @nogc nothrow { return typeof(this)(__handle); } // TODO: make RAII? disable copy for the own Borrow borrow() => Borrow(__handle); alias borrow this; struct Borrow { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } pragma(inline, true) Borrow witClone() const @safe @nogc nothrow { return Borrow(__handle); } /++ +/ DisplayEntity getDisplay() @trusted nothrow { auto _ret = __import_getDisplay(this.__handle); auto _handle0 = DisplayEntity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]block-display-entity.get-display") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:block_display_entity.get_display") static private extern(C) uint __import_getDisplay(uint) nothrow; /++ +/ Entity getEntity() @trusted nothrow { auto _ret = __import_getEntity(this.__handle); auto _handle0 = Entity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]block-display-entity.get-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:block_display_entity.get_entity") static private extern(C) uint __import_getEntity(uint) nothrow; /++ +/ ushort getBlockStateId() @trusted nothrow { auto _ret = __import_getBlockStateId(this.__handle); return cast(ushort)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]block-display-entity.get-block-state-id") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:block_display_entity.get_block_state_id") static private extern(C) uint __import_getBlockStateId(uint) nothrow; /++ +/ void setBlockStateId(ushort stateId) @trusted nothrow { __import_setBlockStateId(this.__handle, cast(uint)(stateId)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]block-display-entity.set-block-state-id") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:block_display_entity.set_block_state_id") static private extern(C) void __import_setBlockStateId(uint, uint) nothrow; } } /++ Resource specifically for Item Display entities. +/ struct ItemDisplayEntity { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } /++ +/ static Option!(ItemDisplayEntity) fromEntity(Entity.Borrow entity) @trusted nothrow { align(4) void[8] _retArea = void; __import_fromEntity(entity.__handle, _retArea.ptr); Option!(ItemDisplayEntity) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { auto _handle2 = ItemDisplayEntity(*(cast(uint*)(_retArea.ptr + 4))); _option3 = Option!(ItemDisplayEntity).makeSome(_handle2); } else { _option3 = Option!(ItemDisplayEntity).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[static]item-display-entity.from-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:static:item_display_entity.from_entity") static private extern(C) void __import_fromEntity(uint, void*) nothrow; pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } @wasmImport!("pumpkin:plugin/display@0.1.0", "[resource-drop]item-display-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:resource_drop:item_display_entity") static private extern(C) void __import_drop(uint) @nogc nothrow; pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) typeof(this) witClone() const @safe @nogc nothrow { return typeof(this)(__handle); } // TODO: make RAII? disable copy for the own Borrow borrow() => Borrow(__handle); alias borrow this; struct Borrow { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } pragma(inline, true) Borrow witClone() const @safe @nogc nothrow { return Borrow(__handle); } /++ +/ DisplayEntity getDisplay() @trusted nothrow { auto _ret = __import_getDisplay(this.__handle); auto _handle0 = DisplayEntity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]item-display-entity.get-display") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:item_display_entity.get_display") static private extern(C) uint __import_getDisplay(uint) nothrow; /++ +/ Entity getEntity() @trusted nothrow { auto _ret = __import_getEntity(this.__handle); auto _handle0 = Entity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]item-display-entity.get-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:item_display_entity.get_entity") static private extern(C) uint __import_getEntity(uint) nothrow; /++ +/ Option!(ItemStack) getItem() @trusted nothrow { align(4) void[8] _retArea = void; __import_getItem(this.__handle, _retArea.ptr); Option!(ItemStack) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { auto _handle2 = ItemStack(*(cast(uint*)(_retArea.ptr + 4))); _option3 = Option!(ItemStack).makeSome(_handle2); } else { _option3 = Option!(ItemStack).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]item-display-entity.get-item") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:item_display_entity.get_item") static private extern(C) void __import_getItem(uint, void*) nothrow; /++ +/ void setItem(in Option!(ItemStack) item) @trusted nothrow { uint _option4 = void; uint _option5 = void; if (item.isSome) { ref _payload3 = item.unwrap(); _option4 = 1; _option5 = _payload3.__handle; } else { _option4 = 0; _option5 = 0; } __import_setItem(this.__handle, _option4, _option5); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]item-display-entity.set-item") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:item_display_entity.set_item") static private extern(C) void __import_setItem(uint, uint, uint) nothrow; /++ +/ ItemDisplayMode getItemDisplayMode() @trusted nothrow { auto _ret = __import_getItemDisplayMode(this.__handle); return cast(ItemDisplayMode)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]item-display-entity.get-item-display-mode") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:item_display_entity.get_item_display_mode") static private extern(C) uint __import_getItemDisplayMode(uint) nothrow; /++ +/ void setItemDisplayMode(ItemDisplayMode mode) @trusted nothrow { __import_setItemDisplayMode(this.__handle, cast(uint)(mode)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]item-display-entity.set-item-display-mode") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:item_display_entity.set_item_display_mode") static private extern(C) void __import_setItemDisplayMode(uint, uint) nothrow; } } /++ Resource specifically for Text Display entities. +/ struct TextDisplayEntity { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } /++ +/ static Option!(TextDisplayEntity) fromEntity(Entity.Borrow entity) @trusted nothrow { align(4) void[8] _retArea = void; __import_fromEntity(entity.__handle, _retArea.ptr); Option!(TextDisplayEntity) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { auto _handle2 = TextDisplayEntity(*(cast(uint*)(_retArea.ptr + 4))); _option3 = Option!(TextDisplayEntity).makeSome(_handle2); } else { _option3 = Option!(TextDisplayEntity).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[static]text-display-entity.from-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:static:text_display_entity.from_entity") static private extern(C) void __import_fromEntity(uint, void*) nothrow; pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } @wasmImport!("pumpkin:plugin/display@0.1.0", "[resource-drop]text-display-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:resource_drop:text_display_entity") static private extern(C) void __import_drop(uint) @nogc nothrow; pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) typeof(this) witClone() const @safe @nogc nothrow { return typeof(this)(__handle); } // TODO: make RAII? disable copy for the own Borrow borrow() => Borrow(__handle); alias borrow this; struct Borrow { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } pragma(inline, true) Borrow witClone() const @safe @nogc nothrow { return Borrow(__handle); } /++ +/ DisplayEntity getDisplay() @trusted nothrow { auto _ret = __import_getDisplay(this.__handle); auto _handle0 = DisplayEntity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-display") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_display") static private extern(C) uint __import_getDisplay(uint) nothrow; /++ +/ Entity getEntity() @trusted nothrow { auto _ret = __import_getEntity(this.__handle); auto _handle0 = Entity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_entity") static private extern(C) uint __import_getEntity(uint) nothrow; /++ +/ TextComponent getText() @trusted nothrow { auto _ret = __import_getText(this.__handle); auto _handle0 = TextComponent(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-text") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_text") static private extern(C) uint __import_getText(uint) nothrow; /++ +/ void setText(TextComponent text) @trusted nothrow { __import_setText(this.__handle, text.__handle); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-text") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_text") static private extern(C) void __import_setText(uint, uint) nothrow; /++ +/ int getLineWidth() @trusted nothrow { auto _ret = __import_getLineWidth(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-line-width") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_line_width") static private extern(C) uint __import_getLineWidth(uint) nothrow; /++ +/ void setLineWidth(int width) @trusted nothrow { __import_setLineWidth(this.__handle, cast(uint)(width)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-line-width") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_line_width") static private extern(C) void __import_setLineWidth(uint, uint) nothrow; /++ +/ int getBackground() @trusted nothrow { auto _ret = __import_getBackground(this.__handle); return cast(int)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-background") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_background") static private extern(C) uint __import_getBackground(uint) nothrow; /++ +/ void setBackground(int color) @trusted nothrow { __import_setBackground(this.__handle, cast(uint)(color)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-background") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_background") static private extern(C) void __import_setBackground(uint, uint) nothrow; /++ +/ byte getTextOpacity() @trusted nothrow { auto _ret = __import_getTextOpacity(this.__handle); return cast(byte)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-text-opacity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_text_opacity") static private extern(C) uint __import_getTextOpacity(uint) nothrow; /++ +/ void setTextOpacity(byte opacity) @trusted nothrow { __import_setTextOpacity(this.__handle, cast(uint)(opacity)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-text-opacity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_text_opacity") static private extern(C) void __import_setTextOpacity(uint, uint) nothrow; /++ +/ bool getShadow() @trusted nothrow { auto _ret = __import_getShadow(this.__handle); return (_ret) != 0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-shadow") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_shadow") static private extern(C) uint __import_getShadow(uint) nothrow; /++ +/ void setShadow(bool shadow) @trusted nothrow { __import_setShadow(this.__handle, cast(uint)(shadow)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-shadow") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_shadow") static private extern(C) void __import_setShadow(uint, uint) nothrow; /++ +/ bool getSeeThrough() @trusted nothrow { auto _ret = __import_getSeeThrough(this.__handle); return (_ret) != 0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-see-through") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_see_through") static private extern(C) uint __import_getSeeThrough(uint) nothrow; /++ +/ void setSeeThrough(bool seeThrough) @trusted nothrow { __import_setSeeThrough(this.__handle, cast(uint)(seeThrough)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-see-through") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_see_through") static private extern(C) void __import_setSeeThrough(uint, uint) nothrow; /++ +/ bool getDefaultBackground() @trusted nothrow { auto _ret = __import_getDefaultBackground(this.__handle); return (_ret) != 0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-default-background") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_default_background") static private extern(C) uint __import_getDefaultBackground(uint) nothrow; /++ +/ void setDefaultBackground(bool defaultBackground) @trusted nothrow { __import_setDefaultBackground(this.__handle, cast(uint)(defaultBackground)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-default-background") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_default_background") static private extern(C) void __import_setDefaultBackground(uint, uint) nothrow; /++ +/ TextAlignment getAlignment() @trusted nothrow { auto _ret = __import_getAlignment(this.__handle); return cast(TextAlignment)(_ret); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.get-alignment") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.get_alignment") static private extern(C) uint __import_getAlignment(uint) nothrow; /++ +/ void setAlignment(TextAlignment alignment) @trusted nothrow { __import_setAlignment(this.__handle, cast(uint)(alignment)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]text-display-entity.set-alignment") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:text_display_entity.set_alignment") static private extern(C) void __import_setAlignment(uint, uint) nothrow; } } /++ Resource specifically for Interaction entities. +/ struct InteractionEntity { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } /++ +/ static Option!(InteractionEntity) fromEntity(Entity.Borrow entity) @trusted nothrow { align(4) void[8] _retArea = void; __import_fromEntity(entity.__handle, _retArea.ptr); Option!(InteractionEntity) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { auto _handle2 = InteractionEntity(*(cast(uint*)(_retArea.ptr + 4))); _option3 = Option!(InteractionEntity).makeSome(_handle2); } else { _option3 = Option!(InteractionEntity).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[static]interaction-entity.from-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:static:interaction_entity.from_entity") static private extern(C) void __import_fromEntity(uint, void*) nothrow; pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } @wasmImport!("pumpkin:plugin/display@0.1.0", "[resource-drop]interaction-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:resource_drop:interaction_entity") static private extern(C) void __import_drop(uint) @nogc nothrow; pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) typeof(this) witClone() const @safe @nogc nothrow { return typeof(this)(__handle); } // TODO: make RAII? disable copy for the own Borrow borrow() => Borrow(__handle); alias borrow this; struct Borrow { package(wit) uint __handle = 0; pragma(inline, true) package(wit) this(uint handle) @safe @nogc nothrow { __handle = handle; } pragma(inline, true) void witFree() @safe @nogc nothrow {} pragma(inline, true) void witDrop() @trusted @nogc nothrow { if (!__handle) return; __import_drop(__handle); __handle = 0; } pragma(inline, true) Borrow witClone() const @safe @nogc nothrow { return Borrow(__handle); } /++ +/ Entity getEntity() @trusted nothrow { auto _ret = __import_getEntity(this.__handle); auto _handle0 = Entity(_ret); return _handle0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.get-entity") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.get_entity") static private extern(C) uint __import_getEntity(uint) nothrow; /++ +/ float getWidth() @trusted nothrow { auto _ret = __import_getWidth(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.get-width") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.get_width") static private extern(C) float __import_getWidth(uint) nothrow; /++ +/ void setWidth(float width) @trusted nothrow { __import_setWidth(this.__handle, width); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.set-width") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.set_width") static private extern(C) void __import_setWidth(uint, float) nothrow; /++ +/ float getHeight() @trusted nothrow { auto _ret = __import_getHeight(this.__handle); return _ret; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.get-height") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.get_height") static private extern(C) float __import_getHeight(uint) nothrow; /++ +/ void setHeight(float height) @trusted nothrow { __import_setHeight(this.__handle, height); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.set-height") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.set_height") static private extern(C) void __import_setHeight(uint, float) nothrow; /++ +/ bool getResponse() @trusted nothrow { auto _ret = __import_getResponse(this.__handle); return (_ret) != 0; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.get-response") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.get_response") static private extern(C) uint __import_getResponse(uint) nothrow; /++ +/ void setResponse(bool response) @trusted nothrow { __import_setResponse(this.__handle, cast(uint)(response)); } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.set-response") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.set_response") static private extern(C) void __import_setResponse(uint, uint) nothrow; /++ +/ Option!(Uuid) getLastAttacker() @trusted nothrow { align(8) void[24] _retArea = void; __import_getLastAttacker(this.__handle, _retArea.ptr); Option!(Uuid) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { wit.pumpkin.plugin.uuid.imports.Uuid _record2 = { high: *(cast(ulong*)(_retArea.ptr + 8)), low: *(cast(ulong*)(_retArea.ptr + 16)), }; _option3 = Option!(Uuid).makeSome(_record2); } else { _option3 = Option!(Uuid).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.get-last-attacker") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.get_last_attacker") static private extern(C) void __import_getLastAttacker(uint, void*) nothrow; /++ +/ Option!(Uuid) getLastInteraction() @trusted nothrow { align(8) void[24] _retArea = void; __import_getLastInteraction(this.__handle, _retArea.ptr); Option!(Uuid) _option3 = void; bool _isSome3 = (cast(uint)(*(cast(ubyte*)(_retArea.ptr + 0)))) != 0; if (_isSome3) { wit.pumpkin.plugin.uuid.imports.Uuid _record2 = { high: *(cast(ulong*)(_retArea.ptr + 8)), low: *(cast(ulong*)(_retArea.ptr + 16)), }; _option3 = Option!(Uuid).makeSome(_record2); } else { _option3 = Option!(Uuid).makeNone; } auto _flush4 = _option3; return _flush4; } /// ditto @wasmImport!("pumpkin:plugin/display@0.1.0", "[method]interaction-entity.get-last-interaction") pragma(mangle, "__wit_import_pumpkin:plugin__display@0.1.0__:method:interaction_entity.get_last_interaction") static private extern(C) void __import_getLastInteraction(uint, void*) nothrow; } }