[EflSharp] Separate efl and Circle cs files and Update cs files (#786)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_navigation_bar.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { 
8 /// <summary>Navigation_Bar widget.
9 /// Navigation_Bar widget provides a bar form useful for navigation. Navigation_Bar has a back button which is used to navigate to the previous content in the stack.</summary>
10 [NavigationBarNativeInherit]
11 public class NavigationBar : Efl.Ui.LayoutBase, Efl.Eo.IWrapper,Efl.IContent,Efl.IText
12 {
13     ///<summary>Pointer to the native class description.</summary>
14     public override System.IntPtr NativeClass {
15         get {
16             if (((object)this).GetType() == typeof (NavigationBar))
17                 return Efl.Ui.NavigationBarNativeInherit.GetEflClassStatic();
18             else
19                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
20         }
21     }
22     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
23         efl_ui_navigation_bar_class_get();
24     ///<summary>Creates a new instance.</summary>
25     ///<param name="parent">Parent instance.</param>
26     ///<param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
27     public NavigationBar(Efl.Object parent
28             , System.String style = null) :
29         base(efl_ui_navigation_bar_class_get(), typeof(NavigationBar), parent)
30     {
31         if (Efl.Eo.Globals.ParamHelperCheck(style))
32             SetStyle(Efl.Eo.Globals.GetParamHelper(style));
33         FinishInstantiation();
34     }
35     ///<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>
36     protected NavigationBar(System.IntPtr raw) : base(raw)
37     {
38                 RegisterEventProxies();
39     }
40     ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
41     protected NavigationBar(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
42     ///<summary>Verifies if the given object is equal to this one.</summary>
43     public override bool Equals(object obj)
44     {
45         var other = obj as Efl.Object;
46         if (other == null)
47             return false;
48         return this.NativeHandle == other.NativeHandle;
49     }
50     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
51     public override int GetHashCode()
52     {
53         return this.NativeHandle.ToInt32();
54     }
55     ///<summary>Turns the native pointer into a string representation.</summary>
56     public override String ToString()
57     {
58         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
59     }
60 private static object ContentChangedEvtKey = new object();
61     /// <summary>Sent after the content is set or unset using the current content object.
62     /// (Since EFL 1.22)</summary>
63     public event EventHandler<Efl.IContentContentChangedEvt_Args> ContentChangedEvt
64     {
65         add {
66             lock (eventLock) {
67                 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
68                 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ContentChangedEvt_delegate)) {
69                     eventHandlers.AddHandler(ContentChangedEvtKey , value);
70                 } else
71                     Eina.Log.Error($"Error adding proxy for event {key}");
72             }
73         }
74         remove {
75             lock (eventLock) {
76                 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
77                 if (RemoveNativeEventHandler(key, this.evt_ContentChangedEvt_delegate)) { 
78                     eventHandlers.RemoveHandler(ContentChangedEvtKey , value);
79                 } else
80                     Eina.Log.Error($"Error removing proxy for event {key}");
81             }
82         }
83     }
84     ///<summary>Method to raise event ContentChangedEvt.</summary>
85     public void On_ContentChangedEvt(Efl.IContentContentChangedEvt_Args e)
86     {
87         EventHandler<Efl.IContentContentChangedEvt_Args> evt;
88         lock (eventLock) {
89         evt = (EventHandler<Efl.IContentContentChangedEvt_Args>)eventHandlers[ContentChangedEvtKey];
90         }
91         evt?.Invoke(this, e);
92     }
93     Efl.EventCb evt_ContentChangedEvt_delegate;
94     private void on_ContentChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
95     {
96         Efl.IContentContentChangedEvt_Args args = new Efl.IContentContentChangedEvt_Args();
97       args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
98         try {
99             On_ContentChangedEvt(args);
100         } catch (Exception e) {
101             Eina.Log.Error(e.ToString());
102             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
103         }
104     }
105
106     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
107     protected override void RegisterEventProxies()
108     {
109         base.RegisterEventProxies();
110         evt_ContentChangedEvt_delegate = new Efl.EventCb(on_ContentChangedEvt_NativeCallback);
111     }
112     /// <summary>Back button to navigate to the previous content in the stack.
113 /// The back button works only if the Navigation_Bar widget is contained in the Stack widget(Efl.Ui.Stack class). e.g. The Navigation_Bar widget is set in the Navigation_Layout widget and the Navigation_Layout widget is pushed to the Stack widget.
114 /// 
115 /// The back button is hidden by default and it can be visible. e.g. efl_gfx_entity_visible_set(efl_part(navigation_bar, &quot;back_button&quot;), EINA_TRUE);</summary>
116     public Efl.Ui.NavigationBarPartBackButton BackButton
117     {
118         get
119         {
120             return Efl.IPartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, "back_button") as Efl.Ui.NavigationBarPartBackButton;
121         }
122     }
123     /// <summary>Swallowed sub-object contained in this object.
124     /// (Since EFL 1.22)</summary>
125     /// <returns>The object to swallow.</returns>
126     virtual public Efl.Gfx.IEntity GetContent() {
127          var _ret_var = Efl.IContentNativeInherit.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
128         Eina.Error.RaiseIfUnhandledException();
129         return _ret_var;
130  }
131     /// <summary>Swallowed sub-object contained in this object.
132     /// (Since EFL 1.22)</summary>
133     /// <param name="content">The object to swallow.</param>
134     /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
135     virtual public bool SetContent( Efl.Gfx.IEntity content) {
136                                  var _ret_var = Efl.IContentNativeInherit.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), content);
137         Eina.Error.RaiseIfUnhandledException();
138                         return _ret_var;
139  }
140     /// <summary>Unswallow the object in the current container and return it.
141     /// (Since EFL 1.22)</summary>
142     /// <returns>Unswallowed object</returns>
143     virtual public Efl.Gfx.IEntity UnsetContent() {
144          var _ret_var = Efl.IContentNativeInherit.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
145         Eina.Error.RaiseIfUnhandledException();
146         return _ret_var;
147  }
148     /// <summary>Retrieves the text string currently being displayed by the given text object.
149     /// Do not free() the return value.
150     /// 
151     /// See also <see cref="Efl.IText.GetText"/>.
152     /// (Since EFL 1.22)</summary>
153     /// <returns>Text string to display on it.</returns>
154     virtual public System.String GetText() {
155          var _ret_var = Efl.ITextNativeInherit.efl_text_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
156         Eina.Error.RaiseIfUnhandledException();
157         return _ret_var;
158  }
159     /// <summary>Sets the text string to be displayed by the given text object.
160     /// See also <see cref="Efl.IText.GetText"/>.
161     /// (Since EFL 1.22)</summary>
162     /// <param name="text">Text string to display on it.</param>
163     /// <returns></returns>
164     virtual public void SetText( System.String text) {
165                                  Efl.ITextNativeInherit.efl_text_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), text);
166         Eina.Error.RaiseIfUnhandledException();
167                          }
168     /// <summary>Swallowed sub-object contained in this object.
169 /// (Since EFL 1.22)</summary>
170 /// <value>The object to swallow.</value>
171     public Efl.Gfx.IEntity Content {
172         get { return GetContent(); }
173         set { SetContent( value); }
174     }
175     private static IntPtr GetEflClassStatic()
176     {
177         return Efl.Ui.NavigationBar.efl_ui_navigation_bar_class_get();
178     }
179 }
180 public class NavigationBarNativeInherit : Efl.Ui.LayoutBaseNativeInherit{
181     public new  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
182     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
183     {
184         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
185         var methods = Efl.Eo.Globals.GetUserMethods(type);
186         if (efl_content_get_static_delegate == null)
187             efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
188         if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
189             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)});
190         if (efl_content_set_static_delegate == null)
191             efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
192         if (methods.FirstOrDefault(m => m.Name == "SetContent") != null)
193             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)});
194         if (efl_content_unset_static_delegate == null)
195             efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
196         if (methods.FirstOrDefault(m => m.Name == "UnsetContent") != null)
197             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)});
198         if (efl_text_get_static_delegate == null)
199             efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
200         if (methods.FirstOrDefault(m => m.Name == "GetText") != null)
201             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_get_static_delegate)});
202         if (efl_text_set_static_delegate == null)
203             efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
204         if (methods.FirstOrDefault(m => m.Name == "SetText") != null)
205             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_set_static_delegate)});
206         descs.AddRange(base.GetEoOps(type));
207         return descs;
208     }
209     public override IntPtr GetEflClass()
210     {
211         return Efl.Ui.NavigationBar.efl_ui_navigation_bar_class_get();
212     }
213     public static new  IntPtr GetEflClassStatic()
214     {
215         return Efl.Ui.NavigationBar.efl_ui_navigation_bar_class_get();
216     }
217
218
219     [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IEntity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
220
221
222     [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IEntity efl_content_get_api_delegate(System.IntPtr obj);
223      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");
224      private static Efl.Gfx.IEntity content_get(System.IntPtr obj, System.IntPtr pd)
225     {
226         Eina.Log.Debug("function efl_content_get was called");
227         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
228         if(wrapper != null) {
229                         Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
230             try {
231                 _ret_var = ((NavigationBar)wrapper).GetContent();
232             } catch (Exception e) {
233                 Eina.Log.Warning($"Callback error: {e.ToString()}");
234                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
235             }
236         return _ret_var;
237         } else {
238             return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
239         }
240     }
241     private static efl_content_get_delegate efl_content_get_static_delegate;
242
243
244      [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.IEntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.IEntity content);
245
246
247      [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.IEntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.IEntity content);
248      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");
249      private static bool content_set(System.IntPtr obj, System.IntPtr pd,  Efl.Gfx.IEntity content)
250     {
251         Eina.Log.Debug("function efl_content_set was called");
252         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
253         if(wrapper != null) {
254                                                 bool _ret_var = default(bool);
255             try {
256                 _ret_var = ((NavigationBar)wrapper).SetContent( content);
257             } catch (Exception e) {
258                 Eina.Log.Warning($"Callback error: {e.ToString()}");
259                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
260             }
261                         return _ret_var;
262         } else {
263             return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  content);
264         }
265     }
266     private static efl_content_set_delegate efl_content_set_static_delegate;
267
268
269     [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IEntity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
270
271
272     [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IEntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IEntity efl_content_unset_api_delegate(System.IntPtr obj);
273      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");
274      private static Efl.Gfx.IEntity content_unset(System.IntPtr obj, System.IntPtr pd)
275     {
276         Eina.Log.Debug("function efl_content_unset was called");
277         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
278         if(wrapper != null) {
279                         Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
280             try {
281                 _ret_var = ((NavigationBar)wrapper).UnsetContent();
282             } catch (Exception e) {
283                 Eina.Log.Warning($"Callback error: {e.ToString()}");
284                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
285             }
286         return _ret_var;
287         } else {
288             return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
289         }
290     }
291     private static efl_content_unset_delegate efl_content_unset_static_delegate;
292
293
294      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd);
295
296
297      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_text_get_api_delegate(System.IntPtr obj);
298      public static Efl.Eo.FunctionWrapper<efl_text_get_api_delegate> efl_text_get_ptr = new Efl.Eo.FunctionWrapper<efl_text_get_api_delegate>(_Module, "efl_text_get");
299      private static System.String text_get(System.IntPtr obj, System.IntPtr pd)
300     {
301         Eina.Log.Debug("function efl_text_get was called");
302         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
303         if(wrapper != null) {
304                         System.String _ret_var = default(System.String);
305             try {
306                 _ret_var = ((NavigationBar)wrapper).GetText();
307             } catch (Exception e) {
308                 Eina.Log.Warning($"Callback error: {e.ToString()}");
309                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
310             }
311         return _ret_var;
312         } else {
313             return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
314         }
315     }
316     private static efl_text_get_delegate efl_text_get_static_delegate;
317
318
319      private delegate void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String text);
320
321
322      public delegate void efl_text_set_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String text);
323      public static Efl.Eo.FunctionWrapper<efl_text_set_api_delegate> efl_text_set_ptr = new Efl.Eo.FunctionWrapper<efl_text_set_api_delegate>(_Module, "efl_text_set");
324      private static void text_set(System.IntPtr obj, System.IntPtr pd,  System.String text)
325     {
326         Eina.Log.Debug("function efl_text_set was called");
327         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
328         if(wrapper != null) {
329                                                 
330             try {
331                 ((NavigationBar)wrapper).SetText( text);
332             } catch (Exception e) {
333                 Eina.Log.Warning($"Callback error: {e.ToString()}");
334                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
335             }
336                                 } else {
337             efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  text);
338         }
339     }
340     private static efl_text_set_delegate efl_text_set_static_delegate;
341 }
342 } }