1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>Navigation_Layout widget.
9 /// Navigation_Layout widget provides a layout form useful for navigation. Navigation_Layout widget is used to be pushed to or popped from Stack widget(Efl.Ui.Stack class) as a content.</summary>
10 [NavigationLayoutNativeInherit]
11 public class NavigationLayout : Efl.Ui.LayoutBase, Efl.Eo.IWrapper,Efl.Content
13 public new static System.IntPtr klass = System.IntPtr.Zero;
14 public new static Efl.Ui.NavigationLayoutNativeInherit nativeInherit = new Efl.Ui.NavigationLayoutNativeInherit();
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass {
18 if (((object)this).GetType() == typeof (NavigationLayout))
19 return Efl.Ui.NavigationLayoutNativeInherit.GetEflClassStatic();
21 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
24 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
25 efl_ui_navigation_layout_class_get();
26 ///<summary>Creates a new instance.</summary>
27 ///<param name="parent">Parent instance.</param>
28 ///<param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
29 public NavigationLayout(Efl.Object parent
30 , System.String style = null) :
31 base(efl_ui_navigation_layout_class_get(), typeof(NavigationLayout), parent)
33 if (Efl.Eo.Globals.ParamHelperCheck(style))
34 SetStyle(Efl.Eo.Globals.GetParamHelper(style));
35 FinishInstantiation();
37 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
38 public NavigationLayout(System.IntPtr raw) : base(raw)
40 register_event_proxies();
42 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
43 protected NavigationLayout(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
44 ///<summary>Casts obj into an instance of this type.</summary>
45 public new static NavigationLayout static_cast(Efl.Object obj)
48 throw new System.ArgumentNullException("obj");
49 return new NavigationLayout(obj.NativeHandle);
51 ///<summary>Verifies if the given object is equal to this one.</summary>
52 public override bool Equals(object obj)
54 var other = obj as Efl.Object;
57 return this.NativeHandle == other.NativeHandle;
59 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
60 public override int GetHashCode()
62 return this.NativeHandle.ToInt32();
64 ///<summary>Turns the native pointer into a string representation.</summary>
65 public override String ToString()
67 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
69 private static object ContentChangedEvtKey = new object();
70 /// <summary>Sent after the content is set or unset using the current content object.</summary>
71 public event EventHandler<Efl.ContentContentChangedEvt_Args> ContentChangedEvt
75 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
76 if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_ContentChangedEvt_delegate)) {
77 eventHandlers.AddHandler(ContentChangedEvtKey , value);
79 Eina.Log.Error($"Error adding proxy for event {key}");
84 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
85 if (remove_cpp_event_handler(key, this.evt_ContentChangedEvt_delegate)) {
86 eventHandlers.RemoveHandler(ContentChangedEvtKey , value);
88 Eina.Log.Error($"Error removing proxy for event {key}");
92 ///<summary>Method to raise event ContentChangedEvt.</summary>
93 public void On_ContentChangedEvt(Efl.ContentContentChangedEvt_Args e)
95 EventHandler<Efl.ContentContentChangedEvt_Args> evt;
97 evt = (EventHandler<Efl.ContentContentChangedEvt_Args>)eventHandlers[ContentChangedEvtKey];
101 Efl.EventCb evt_ContentChangedEvt_delegate;
102 private void on_ContentChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
104 Efl.ContentContentChangedEvt_Args args = new Efl.ContentContentChangedEvt_Args();
105 args.arg = new Efl.Gfx.EntityConcrete(evt.Info);
107 On_ContentChangedEvt(args);
108 } catch (Exception e) {
109 Eina.Log.Error(e.ToString());
110 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
114 protected override void register_event_proxies()
116 base.register_event_proxies();
117 evt_ContentChangedEvt_delegate = new Efl.EventCb(on_ContentChangedEvt_NativeCallback);
119 /// <summary>The bar object which is located at the top area as a title. e.g. Navigation_Bar widget(Efl.Ui.Navigation_Bar) can be used as <c>bar</c>.</summary>
120 /// <returns>The bar object located at the top area of the Navigation Layout.</returns>
121 virtual public Efl.Ui.LayoutBase GetBar() {
122 var _ret_var = Efl.Ui.NavigationLayoutNativeInherit.efl_ui_navigation_layout_bar_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
123 Eina.Error.RaiseIfUnhandledException();
126 /// <summary>The bar object which is located at the top area as a title. e.g. Navigation_Bar widget(Efl.Ui.Navigation_Bar) can be used as <c>bar</c>.</summary>
127 /// <param name="value">The bar object located at the top area of the Navigation Layout.</param>
128 /// <returns></returns>
129 virtual public void SetBar( Efl.Ui.LayoutBase value) {
130 Efl.Ui.NavigationLayoutNativeInherit.efl_ui_navigation_layout_bar_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), value);
131 Eina.Error.RaiseIfUnhandledException();
133 /// <summary>Swallowed sub-object contained in this object.</summary>
134 /// <returns>The object to swallow.</returns>
135 virtual public Efl.Gfx.Entity GetContent() {
136 var _ret_var = Efl.ContentNativeInherit.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
137 Eina.Error.RaiseIfUnhandledException();
140 /// <summary>Swallowed sub-object contained in this object.</summary>
141 /// <param name="content">The object to swallow.</param>
142 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
143 virtual public bool SetContent( Efl.Gfx.Entity content) {
144 var _ret_var = Efl.ContentNativeInherit.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), content);
145 Eina.Error.RaiseIfUnhandledException();
148 /// <summary>Unswallow the object in the current container and return it.</summary>
149 /// <returns>Unswallowed object</returns>
150 virtual public Efl.Gfx.Entity UnsetContent() {
151 var _ret_var = Efl.ContentNativeInherit.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
152 Eina.Error.RaiseIfUnhandledException();
155 /// <summary>The bar object which is located at the top area as a title. e.g. Navigation_Bar widget(Efl.Ui.Navigation_Bar) can be used as <c>bar</c>.</summary>
156 /// <value>The bar object located at the top area of the Navigation Layout.</value>
157 public Efl.Ui.LayoutBase Bar {
158 get { return GetBar(); }
159 set { SetBar( value); }
161 /// <summary>Swallowed sub-object contained in this object.</summary>
162 /// <value>The object to swallow.</value>
163 public Efl.Gfx.Entity Content {
164 get { return GetContent(); }
165 set { SetContent( value); }
167 private static new IntPtr GetEflClassStatic()
169 return Efl.Ui.NavigationLayout.efl_ui_navigation_layout_class_get();
172 public class NavigationLayoutNativeInherit : Efl.Ui.LayoutBaseNativeInherit{
173 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
174 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
176 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
177 if (efl_ui_navigation_layout_bar_get_static_delegate == null)
178 efl_ui_navigation_layout_bar_get_static_delegate = new efl_ui_navigation_layout_bar_get_delegate(bar_get);
179 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_navigation_layout_bar_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_navigation_layout_bar_get_static_delegate)});
180 if (efl_ui_navigation_layout_bar_set_static_delegate == null)
181 efl_ui_navigation_layout_bar_set_static_delegate = new efl_ui_navigation_layout_bar_set_delegate(bar_set);
182 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_navigation_layout_bar_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_navigation_layout_bar_set_static_delegate)});
183 if (efl_content_get_static_delegate == null)
184 efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
185 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_content_get_static_delegate)});
186 if (efl_content_set_static_delegate == null)
187 efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
188 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_content_set_static_delegate)});
189 if (efl_content_unset_static_delegate == null)
190 efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
191 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_content_unset_static_delegate)});
192 descs.AddRange(base.GetEoOps(type));
195 public override IntPtr GetEflClass()
197 return Efl.Ui.NavigationLayout.efl_ui_navigation_layout_class_get();
199 public static new IntPtr GetEflClassStatic()
201 return Efl.Ui.NavigationLayout.efl_ui_navigation_layout_class_get();
205 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.LayoutBase, Efl.Eo.NonOwnTag>))] private delegate Efl.Ui.LayoutBase efl_ui_navigation_layout_bar_get_delegate(System.IntPtr obj, System.IntPtr pd);
208 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.LayoutBase, Efl.Eo.NonOwnTag>))] public delegate Efl.Ui.LayoutBase efl_ui_navigation_layout_bar_get_api_delegate(System.IntPtr obj);
209 public static Efl.Eo.FunctionWrapper<efl_ui_navigation_layout_bar_get_api_delegate> efl_ui_navigation_layout_bar_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_navigation_layout_bar_get_api_delegate>(_Module, "efl_ui_navigation_layout_bar_get");
210 private static Efl.Ui.LayoutBase bar_get(System.IntPtr obj, System.IntPtr pd)
212 Eina.Log.Debug("function efl_ui_navigation_layout_bar_get was called");
213 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
214 if(wrapper != null) {
215 Efl.Ui.LayoutBase _ret_var = default(Efl.Ui.LayoutBase);
217 _ret_var = ((NavigationLayout)wrapper).GetBar();
218 } catch (Exception e) {
219 Eina.Log.Warning($"Callback error: {e.ToString()}");
220 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
224 return efl_ui_navigation_layout_bar_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
227 private static efl_ui_navigation_layout_bar_get_delegate efl_ui_navigation_layout_bar_get_static_delegate;
230 private delegate void efl_ui_navigation_layout_bar_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.LayoutBase, Efl.Eo.NonOwnTag>))] Efl.Ui.LayoutBase value);
233 public delegate void efl_ui_navigation_layout_bar_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Ui.LayoutBase, Efl.Eo.NonOwnTag>))] Efl.Ui.LayoutBase value);
234 public static Efl.Eo.FunctionWrapper<efl_ui_navigation_layout_bar_set_api_delegate> efl_ui_navigation_layout_bar_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_navigation_layout_bar_set_api_delegate>(_Module, "efl_ui_navigation_layout_bar_set");
235 private static void bar_set(System.IntPtr obj, System.IntPtr pd, Efl.Ui.LayoutBase value)
237 Eina.Log.Debug("function efl_ui_navigation_layout_bar_set was called");
238 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
239 if(wrapper != null) {
242 ((NavigationLayout)wrapper).SetBar( value);
243 } catch (Exception e) {
244 Eina.Log.Warning($"Callback error: {e.ToString()}");
245 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
248 efl_ui_navigation_layout_bar_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), value);
251 private static efl_ui_navigation_layout_bar_set_delegate efl_ui_navigation_layout_bar_set_static_delegate;
254 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.Entity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
257 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.Entity efl_content_get_api_delegate(System.IntPtr obj);
258 public static Efl.Eo.FunctionWrapper<efl_content_get_api_delegate> efl_content_get_ptr = new Efl.Eo.FunctionWrapper<efl_content_get_api_delegate>(_Module, "efl_content_get");
259 private static Efl.Gfx.Entity content_get(System.IntPtr obj, System.IntPtr pd)
261 Eina.Log.Debug("function efl_content_get was called");
262 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
263 if(wrapper != null) {
264 Efl.Gfx.Entity _ret_var = default(Efl.Gfx.Entity);
266 _ret_var = ((NavigationLayout)wrapper).GetContent();
267 } catch (Exception e) {
268 Eina.Log.Warning($"Callback error: {e.ToString()}");
269 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
273 return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
276 private static efl_content_get_delegate efl_content_get_static_delegate;
279 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.Entity content);
282 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.Entity content);
283 public static Efl.Eo.FunctionWrapper<efl_content_set_api_delegate> efl_content_set_ptr = new Efl.Eo.FunctionWrapper<efl_content_set_api_delegate>(_Module, "efl_content_set");
284 private static bool content_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.Entity content)
286 Eina.Log.Debug("function efl_content_set was called");
287 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
288 if(wrapper != null) {
289 bool _ret_var = default(bool);
291 _ret_var = ((NavigationLayout)wrapper).SetContent( content);
292 } catch (Exception e) {
293 Eina.Log.Warning($"Callback error: {e.ToString()}");
294 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
298 return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), content);
301 private static efl_content_set_delegate efl_content_set_static_delegate;
304 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.Entity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
307 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.Entity efl_content_unset_api_delegate(System.IntPtr obj);
308 public static Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate> efl_content_unset_ptr = new Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate>(_Module, "efl_content_unset");
309 private static Efl.Gfx.Entity content_unset(System.IntPtr obj, System.IntPtr pd)
311 Eina.Log.Debug("function efl_content_unset was called");
312 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
313 if(wrapper != null) {
314 Efl.Gfx.Entity _ret_var = default(Efl.Gfx.Entity);
316 _ret_var = ((NavigationLayout)wrapper).UnsetContent();
317 } catch (Exception e) {
318 Eina.Log.Warning($"Callback error: {e.ToString()}");
319 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
323 return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
326 private static efl_content_unset_delegate efl_content_unset_static_delegate;