1 /** 2 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.visualshadernodetexture; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.meta; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.object; 22 import godot.classdb; 23 import godot.visualshadernode; 24 import godot.texture; 25 import godot.resource; 26 import godot.reference; 27 /** 28 29 */ 30 @GodotBaseClass struct VisualShaderNodeTexture 31 { 32 enum string _GODOT_internal_name = "VisualShaderNodeTexture"; 33 public: 34 @nogc nothrow: 35 union { godot_object _godot_object; VisualShaderNode _GODOT_base; } 36 alias _GODOT_base this; 37 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 38 package(godot) __gshared bool _classBindingInitialized = false; 39 package(godot) static struct _classBinding 40 { 41 __gshared: 42 @GodotName("set_source") GodotMethod!(void, long) setSource; 43 @GodotName("get_source") GodotMethod!(VisualShaderNodeTexture.Source) getSource; 44 @GodotName("set_texture") GodotMethod!(void, Texture) setTexture; 45 @GodotName("get_texture") GodotMethod!(Texture) getTexture; 46 @GodotName("set_texture_type") GodotMethod!(void, long) setTextureType; 47 @GodotName("get_texture_type") GodotMethod!(VisualShaderNodeTexture.TextureType) getTextureType; 48 } 49 bool opEquals(in VisualShaderNodeTexture other) const { return _godot_object.ptr is other._godot_object.ptr; } 50 VisualShaderNodeTexture opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 51 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 52 mixin baseCasts; 53 static VisualShaderNodeTexture _new() 54 { 55 static godot_class_constructor constructor; 56 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualShaderNodeTexture"); 57 if(constructor is null) return typeof(this).init; 58 return cast(VisualShaderNodeTexture)(constructor()); 59 } 60 @disable new(size_t s); 61 /// 62 enum TextureType : int 63 { 64 /** 65 66 */ 67 typeData = 0, 68 /** 69 70 */ 71 typeColor = 1, 72 /** 73 74 */ 75 typeNormalmap = 2, 76 } 77 /// 78 enum Source : int 79 { 80 /** 81 82 */ 83 sourceTexture = 0, 84 /** 85 86 */ 87 sourceScreen = 1, 88 /** 89 90 */ 91 source2dTexture = 2, 92 /** 93 94 */ 95 source2dNormal = 3, 96 } 97 /// 98 enum Constants : int 99 { 100 sourceTexture = 0, 101 typeData = 0, 102 typeColor = 1, 103 sourceScreen = 1, 104 typeNormalmap = 2, 105 source2dTexture = 2, 106 source2dNormal = 3, 107 } 108 /** 109 110 */ 111 void setSource(in long value) 112 { 113 checkClassBinding!(typeof(this))(); 114 ptrcall!(void)(_classBinding.setSource, _godot_object, value); 115 } 116 /** 117 118 */ 119 VisualShaderNodeTexture.Source getSource() const 120 { 121 checkClassBinding!(typeof(this))(); 122 return ptrcall!(VisualShaderNodeTexture.Source)(_classBinding.getSource, _godot_object); 123 } 124 /** 125 126 */ 127 void setTexture(Texture value) 128 { 129 checkClassBinding!(typeof(this))(); 130 ptrcall!(void)(_classBinding.setTexture, _godot_object, value); 131 } 132 /** 133 134 */ 135 Ref!Texture getTexture() const 136 { 137 checkClassBinding!(typeof(this))(); 138 return ptrcall!(Texture)(_classBinding.getTexture, _godot_object); 139 } 140 /** 141 142 */ 143 void setTextureType(in long value) 144 { 145 checkClassBinding!(typeof(this))(); 146 ptrcall!(void)(_classBinding.setTextureType, _godot_object, value); 147 } 148 /** 149 150 */ 151 VisualShaderNodeTexture.TextureType getTextureType() const 152 { 153 checkClassBinding!(typeof(this))(); 154 return ptrcall!(VisualShaderNodeTexture.TextureType)(_classBinding.getTextureType, _godot_object); 155 } 156 /** 157 158 */ 159 @property VisualShaderNodeTexture.Source source() 160 { 161 return getSource(); 162 } 163 /// ditto 164 @property void source(long v) 165 { 166 setSource(v); 167 } 168 /** 169 170 */ 171 @property Texture texture() 172 { 173 return getTexture(); 174 } 175 /// ditto 176 @property void texture(Texture v) 177 { 178 setTexture(v); 179 } 180 /** 181 182 */ 183 @property VisualShaderNodeTexture.TextureType textureType() 184 { 185 return getTextureType(); 186 } 187 /// ditto 188 @property void textureType(long v) 189 { 190 setTextureType(v); 191 } 192 }