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.visualscriptinputaction;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.visualscriptnode;
25 /**
26 
27 */
28 @GodotBaseClass struct VisualScriptInputAction
29 {
30 	package(godot) enum string _GODOT_internal_name = "VisualScriptInputAction";
31 public:
32 @nogc nothrow:
33 	union { /** */ godot_object _godot_object; /** */ VisualScriptNode _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 GDNativeClassBinding
38 	{
39 		__gshared:
40 		@GodotName("get_action_mode") GodotMethod!(VisualScriptInputAction.Mode) getActionMode;
41 		@GodotName("get_action_name") GodotMethod!(String) getActionName;
42 		@GodotName("set_action_mode") GodotMethod!(void, long) setActionMode;
43 		@GodotName("set_action_name") GodotMethod!(void, String) setActionName;
44 	}
45 	/// 
46 	pragma(inline, true) bool opEquals(in VisualScriptInputAction other) const
47 	{ return _godot_object.ptr is other._godot_object.ptr; }
48 	/// 
49 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
50 	{ _godot_object.ptr = n; return null; }
51 	/// 
52 	pragma(inline, true) bool opEquals(typeof(null) n) const
53 	{ return _godot_object.ptr is n; }
54 	/// 
55 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
56 	mixin baseCasts;
57 	/// Construct a new instance of VisualScriptInputAction.
58 	/// Note: use `memnew!VisualScriptInputAction` instead.
59 	static VisualScriptInputAction _new()
60 	{
61 		static godot_class_constructor constructor;
62 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptInputAction");
63 		if(constructor is null) return typeof(this).init;
64 		return cast(VisualScriptInputAction)(constructor());
65 	}
66 	@disable new(size_t s);
67 	/// 
68 	enum Mode : int
69 	{
70 		/**
71 		
72 		*/
73 		modePressed = 0,
74 		/**
75 		
76 		*/
77 		modeReleased = 1,
78 		/**
79 		
80 		*/
81 		modeJustPressed = 2,
82 		/**
83 		
84 		*/
85 		modeJustReleased = 3,
86 	}
87 	/// 
88 	enum Constants : int
89 	{
90 		modePressed = 0,
91 		modeReleased = 1,
92 		modeJustPressed = 2,
93 		modeJustReleased = 3,
94 	}
95 	/**
96 	
97 	*/
98 	VisualScriptInputAction.Mode getActionMode() const
99 	{
100 		checkClassBinding!(typeof(this))();
101 		return ptrcall!(VisualScriptInputAction.Mode)(GDNativeClassBinding.getActionMode, _godot_object);
102 	}
103 	/**
104 	
105 	*/
106 	String getActionName() const
107 	{
108 		checkClassBinding!(typeof(this))();
109 		return ptrcall!(String)(GDNativeClassBinding.getActionName, _godot_object);
110 	}
111 	/**
112 	
113 	*/
114 	void setActionMode(in long mode)
115 	{
116 		checkClassBinding!(typeof(this))();
117 		ptrcall!(void)(GDNativeClassBinding.setActionMode, _godot_object, mode);
118 	}
119 	/**
120 	
121 	*/
122 	void setActionName(in String name)
123 	{
124 		checkClassBinding!(typeof(this))();
125 		ptrcall!(void)(GDNativeClassBinding.setActionName, _godot_object, name);
126 	}
127 	/**
128 	
129 	*/
130 	@property String action()
131 	{
132 		return getActionName();
133 	}
134 	/// ditto
135 	@property void action(String v)
136 	{
137 		setActionName(v);
138 	}
139 	/**
140 	
141 	*/
142 	@property VisualScriptInputAction.Mode mode()
143 	{
144 		return getActionMode();
145 	}
146 	/// ditto
147 	@property void mode(long v)
148 	{
149 		setActionMode(v);
150 	}
151 }