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.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.visualscriptnode;
24 import godot.resource;
25 import godot.reference;
26 /**
27 
28 */
29 @GodotBaseClass struct VisualScriptInputAction
30 {
31 	enum string _GODOT_internal_name = "VisualScriptInputAction";
32 public:
33 @nogc nothrow:
34 	union { godot_object _godot_object; VisualScriptNode _GODOT_base; }
35 	alias _GODOT_base this;
36 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
37 	package(godot) __gshared bool _classBindingInitialized = false;
38 	package(godot) static struct _classBinding
39 	{
40 		__gshared:
41 		@GodotName("set_action_name") GodotMethod!(void, String) setActionName;
42 		@GodotName("get_action_name") GodotMethod!(String) getActionName;
43 		@GodotName("set_action_mode") GodotMethod!(void, long) setActionMode;
44 		@GodotName("get_action_mode") GodotMethod!(VisualScriptInputAction.Mode) getActionMode;
45 	}
46 	bool opEquals(in VisualScriptInputAction other) const { return _godot_object.ptr is other._godot_object.ptr; }
47 	VisualScriptInputAction opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
48 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
49 	mixin baseCasts;
50 	static VisualScriptInputAction _new()
51 	{
52 		static godot_class_constructor constructor;
53 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptInputAction");
54 		if(constructor is null) return typeof(this).init;
55 		return cast(VisualScriptInputAction)(constructor());
56 	}
57 	@disable new(size_t s);
58 	/// 
59 	enum Mode : int
60 	{
61 		/**
62 		
63 		*/
64 		modePressed = 0,
65 		/**
66 		
67 		*/
68 		modeReleased = 1,
69 		/**
70 		
71 		*/
72 		modeJustPressed = 2,
73 		/**
74 		
75 		*/
76 		modeJustReleased = 3,
77 	}
78 	/// 
79 	enum Constants : int
80 	{
81 		modePressed = 0,
82 		modeReleased = 1,
83 		modeJustPressed = 2,
84 		modeJustReleased = 3,
85 	}
86 	/**
87 	
88 	*/
89 	void setActionName(StringArg0)(in StringArg0 name)
90 	{
91 		checkClassBinding!(typeof(this))();
92 		ptrcall!(void)(_classBinding.setActionName, _godot_object, name);
93 	}
94 	/**
95 	
96 	*/
97 	String getActionName() const
98 	{
99 		checkClassBinding!(typeof(this))();
100 		return ptrcall!(String)(_classBinding.getActionName, _godot_object);
101 	}
102 	/**
103 	
104 	*/
105 	void setActionMode(in long mode)
106 	{
107 		checkClassBinding!(typeof(this))();
108 		ptrcall!(void)(_classBinding.setActionMode, _godot_object, mode);
109 	}
110 	/**
111 	
112 	*/
113 	VisualScriptInputAction.Mode getActionMode() const
114 	{
115 		checkClassBinding!(typeof(this))();
116 		return ptrcall!(VisualScriptInputAction.Mode)(_classBinding.getActionMode, _godot_object);
117 	}
118 	/**
119 	
120 	*/
121 	@property String action()
122 	{
123 		return getActionName();
124 	}
125 	/// ditto
126 	@property void action(String v)
127 	{
128 		setActionName(v);
129 	}
130 	/**
131 	
132 	*/
133 	@property VisualScriptInputAction.Mode mode()
134 	{
135 		return getActionMode();
136 	}
137 	/// ditto
138 	@property void mode(long v)
139 	{
140 		setActionMode(v);
141 	}
142 }