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.listener;
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.spatial;
24 import godot.node;
25 /**
26 
27 */
28 @GodotBaseClass struct Listener
29 {
30 	enum string _GODOT_internal_name = "Listener";
31 public:
32 @nogc nothrow:
33 	union { godot_object _godot_object; Spatial _GODOT_base; }
34 	alias _GODOT_base this;
35 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
36 	package(godot) __gshared bool _classBindingInitialized = false;
37 	package(godot) static struct _classBinding
38 	{
39 		__gshared:
40 		@GodotName("make_current") GodotMethod!(void) makeCurrent;
41 		@GodotName("clear_current") GodotMethod!(void) clearCurrent;
42 		@GodotName("is_current") GodotMethod!(bool) isCurrent;
43 		@GodotName("get_listener_transform") GodotMethod!(Transform) getListenerTransform;
44 	}
45 	bool opEquals(in Listener other) const { return _godot_object.ptr is other._godot_object.ptr; }
46 	Listener opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
47 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
48 	mixin baseCasts;
49 	static Listener _new()
50 	{
51 		static godot_class_constructor constructor;
52 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Listener");
53 		if(constructor is null) return typeof(this).init;
54 		return cast(Listener)(constructor());
55 	}
56 	@disable new(size_t s);
57 	/**
58 	
59 	*/
60 	void makeCurrent()
61 	{
62 		checkClassBinding!(typeof(this))();
63 		ptrcall!(void)(_classBinding.makeCurrent, _godot_object);
64 	}
65 	/**
66 	
67 	*/
68 	void clearCurrent()
69 	{
70 		checkClassBinding!(typeof(this))();
71 		ptrcall!(void)(_classBinding.clearCurrent, _godot_object);
72 	}
73 	/**
74 	
75 	*/
76 	bool isCurrent() const
77 	{
78 		checkClassBinding!(typeof(this))();
79 		return ptrcall!(bool)(_classBinding.isCurrent, _godot_object);
80 	}
81 	/**
82 	
83 	*/
84 	Transform getListenerTransform() const
85 	{
86 		checkClassBinding!(typeof(this))();
87 		return ptrcall!(Transform)(_classBinding.getListenerTransform, _godot_object);
88 	}
89 }