#define EFL_BETA #pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.Threading; using System.ComponentModel; namespace Efl { /// Object representing the application itself. /// (Since EFL 1.22) [Efl.App.NativeMethods] [Efl.Eo.BindingEntity] public abstract class App : Efl.Loop, Efl.Core.ICommandLine { /// Pointer to the native class description. public override System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(App)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr efl_app_class_get(); /// Initializes a new instance of the class. /// Parent instance. public App(Efl.Object parent= null ) : base(efl_app_class_get(), parent) { FinishInstantiation(); } /// Subclasses should override this constructor if they are expected to be instantiated from native code. /// Do not call this constructor directly. /// Tag struct storing the native handle of the object being constructed. protected App(ConstructingHandle ch) : base(ch) { } /// Initializes a new instance of the class. /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. /// The native pointer to be wrapped. protected App(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } [Efl.Eo.PrivateNativeClass] private class AppRealized : App { private AppRealized(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } } /// Initializes a new instance of the class. /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly. /// The pointer to the base native Eo class. /// The Efl.Object parent of this instance. protected App(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent) { } /// Called when the application is not going be displayed or otherwise used by a user for some time /// (Since EFL 1.22) public event EventHandler PauseEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_PAUSE"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_PAUSE"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event PauseEvt. public void OnPauseEvt(EventArgs e) { var key = "_EFL_APP_EVENT_PAUSE"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// Called before a window is rendered after a pause event /// (Since EFL 1.22) public event EventHandler ResumeEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_RESUME"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_RESUME"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event ResumeEvt. public void OnResumeEvt(EventArgs e) { var key = "_EFL_APP_EVENT_RESUME"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// Called when the application's windows are all destroyed /// (Since EFL 1.22) public event EventHandler StandbyEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_STANDBY"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_STANDBY"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event StandbyEvt. public void OnStandbyEvt(EventArgs e) { var key = "_EFL_APP_EVENT_STANDBY"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// Called before starting the shutdown of the application /// (Since EFL 1.22) public event EventHandler TerminateEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_TERMINATE"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_TERMINATE"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event TerminateEvt. public void OnTerminateEvt(EventArgs e) { var key = "_EFL_APP_EVENT_TERMINATE"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object /// (Since EFL 1.22) public event EventHandler SignalUsr1Evt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_SIGNAL_USR1"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_SIGNAL_USR1"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event SignalUsr1Evt. public void OnSignalUsr1Evt(EventArgs e) { var key = "_EFL_APP_EVENT_SIGNAL_USR1"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object /// (Since EFL 1.22) public event EventHandler SignalUsr2Evt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_SIGNAL_USR2"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_SIGNAL_USR2"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event SignalUsr2Evt. public void OnSignalUsr2Evt(EventArgs e) { var key = "_EFL_APP_EVENT_SIGNAL_USR2"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object /// (Since EFL 1.22) public event EventHandler SignalHupEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { EventArgs args = EventArgs.Empty; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_APP_EVENT_SIGNAL_HUP"; AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_APP_EVENT_SIGNAL_HUP"; RemoveNativeEventHandler(efl.Libs.Ecore, key, value); } } } /// Method to raise event SignalHupEvt. public void OnSignalHupEvt(EventArgs e) { var key = "_EFL_APP_EVENT_SIGNAL_HUP"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero); } /// Returns the app object that is representing this process /// Note: This function call only works in the main loop thread of the process. /// (Since EFL 1.22) /// Application for this process public static Efl.App GetAppMain() { var _ret_var = Efl.App.NativeMethods.efl_app_main_get_ptr.Value.Delegate(); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Indicates the version of EFL with which this application was compiled against/for. /// This might differ from . /// (Since EFL 1.22) /// Efl build version virtual public Efl.Version GetBuildEflVersion() { var _ret_var = Efl.App.NativeMethods.efl_app_build_efl_version_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); var __ret_tmp = Eina.PrimitiveConversion.PointerToManaged(_ret_var); return __ret_tmp; } /// Indicates the currently running version of EFL. /// This might differ from . /// (Since EFL 1.22) /// Efl version virtual public Efl.Version GetEflVersion() { var _ret_var = Efl.App.NativeMethods.efl_app_efl_version_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); var __ret_tmp = Eina.PrimitiveConversion.PointerToManaged(_ret_var); return __ret_tmp; } /// A commandline that encodes arguments in a command string. This command is unix shell-style, thus whitespace separates arguments unless escaped. Also a semi-colon ';', ampersand '&', pipe/bar '|', hash '#', bracket, square brace, brace character ('(', ')', '[', ']', '{', '}'), exclamation mark '!', backquote '`', greator or less than ('>' '<') character unless escaped or in quotes would cause args_count/value to not be generated properly, because it would force complex shell interpretation which will not be supported in evaluating the arg_count/value information, but the final shell may interpret this if this is executed via a command-line shell. To not be a complex shell command, it should be simple with paths, options and variable expansions, but nothing more complex involving the above unescaped characters. /// "cat -option /path/file" "cat 'quoted argument'" "cat ~/path/escaped argument" "/bin/cat escaped argument VARIABLE" etc. /// /// It should not try and use "complex shell features" if you want the arg_count and arg_value set to be correct after setting the command string. For example none of: /// /// "VAR=x /bin/command && /bin/othercommand >& /dev/null" "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" etc. /// /// If you set the command the arg_count/value property contents can change and be completely re-evaluated by parsing the command string into an argument array set along with interpreting escapes back into individual argument strings. virtual public System.String GetCommand() { var _ret_var = Efl.Core.ICommandLineConcrete.NativeMethods.efl_core_command_line_command_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Use an array to fill this object /// Every element of a string is a argument. /// An array where every array field is an argument /// On success true, false otherwise virtual public bool SetCommandArray(Eina.Array array) { var _in_array = array.Handle; array.Own = false; array.OwnContent = false; var _ret_var = Efl.Core.ICommandLineConcrete.NativeMethods.efl_core_command_line_command_array_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),_in_array); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Use a string to fill this object /// The string will be split at every unescaped ' ', every resulting substring will be a new argument to the command line. /// A command in form of a string /// On success true, false otherwise virtual public bool SetCommandString(System.String str) { var _ret_var = Efl.Core.ICommandLineConcrete.NativeMethods.efl_core_command_line_command_string_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),str); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Get the accessor which enables access to each argument that got passed to this object. virtual public Eina.Accessor CommandAccess() { var _ret_var = Efl.Core.ICommandLineConcrete.NativeMethods.efl_core_command_line_command_access_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return new Eina.Accessor(_ret_var, false); } /// Returns the app object that is representing this process /// Note: This function call only works in the main loop thread of the process. /// (Since EFL 1.22) /// Application for this process public static Efl.App AppMain { get { return GetAppMain(); } } /// Indicates the version of EFL with which this application was compiled against/for. /// This might differ from . /// (Since EFL 1.22) /// Efl build version public Efl.Version BuildEflVersion { get { return GetBuildEflVersion(); } } /// Indicates the currently running version of EFL. /// This might differ from . /// (Since EFL 1.22) /// Efl version public Efl.Version EflVersion { get { return GetEflVersion(); } } /// A commandline that encodes arguments in a command string. This command is unix shell-style, thus whitespace separates arguments unless escaped. Also a semi-colon ';', ampersand '&', pipe/bar '|', hash '#', bracket, square brace, brace character ('(', ')', '[', ']', '{', '}'), exclamation mark '!', backquote '`', greator or less than ('>' '<') character unless escaped or in quotes would cause args_count/value to not be generated properly, because it would force complex shell interpretation which will not be supported in evaluating the arg_count/value information, but the final shell may interpret this if this is executed via a command-line shell. To not be a complex shell command, it should be simple with paths, options and variable expansions, but nothing more complex involving the above unescaped characters. /// "cat -option /path/file" "cat 'quoted argument'" "cat ~/path/escaped argument" "/bin/cat escaped argument VARIABLE" etc. /// /// It should not try and use "complex shell features" if you want the arg_count and arg_value set to be correct after setting the command string. For example none of: /// /// "VAR=x /bin/command && /bin/othercommand >& /dev/null" "VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &" etc. /// /// If you set the command the arg_count/value property contents can change and be completely re-evaluated by parsing the command string into an argument array set along with interpreting escapes back into individual argument strings. public System.String Command { get { return GetCommand(); } } /// Use an array to fill this object /// Every element of a string is a argument. /// An array where every array field is an argument public Eina.Array CommandArray { set { SetCommandArray(value); } } /// Use a string to fill this object /// The string will be split at every unescaped ' ', every resulting substring will be a new argument to the command line. /// A command in form of a string public System.String CommandString { set { SetCommandString(value); } } private static IntPtr GetEflClassStatic() { return Efl.App.efl_app_class_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public new class NativeMethods : Efl.Loop.NativeMethods { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore); /// Gets the list of Eo operations to override. /// The list of Eo operations to be overload. public override System.Collections.Generic.List GetEoOps(System.Type type) { var descs = new System.Collections.Generic.List(); var methods = Efl.Eo.Globals.GetUserMethods(type); if (efl_app_build_efl_version_get_static_delegate == null) { efl_app_build_efl_version_get_static_delegate = new efl_app_build_efl_version_get_delegate(build_efl_version_get); } if (methods.FirstOrDefault(m => m.Name == "GetBuildEflVersion") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_app_build_efl_version_get"), func = Marshal.GetFunctionPointerForDelegate(efl_app_build_efl_version_get_static_delegate) }); } if (efl_app_efl_version_get_static_delegate == null) { efl_app_efl_version_get_static_delegate = new efl_app_efl_version_get_delegate(efl_version_get); } if (methods.FirstOrDefault(m => m.Name == "GetEflVersion") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_app_efl_version_get"), func = Marshal.GetFunctionPointerForDelegate(efl_app_efl_version_get_static_delegate) }); } if (efl_core_command_line_command_get_static_delegate == null) { efl_core_command_line_command_get_static_delegate = new efl_core_command_line_command_get_delegate(command_get); } if (methods.FirstOrDefault(m => m.Name == "GetCommand") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_get"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_get_static_delegate) }); } if (efl_core_command_line_command_array_set_static_delegate == null) { efl_core_command_line_command_array_set_static_delegate = new efl_core_command_line_command_array_set_delegate(command_array_set); } if (methods.FirstOrDefault(m => m.Name == "SetCommandArray") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_array_set"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_array_set_static_delegate) }); } if (efl_core_command_line_command_string_set_static_delegate == null) { efl_core_command_line_command_string_set_static_delegate = new efl_core_command_line_command_string_set_delegate(command_string_set); } if (methods.FirstOrDefault(m => m.Name == "SetCommandString") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_string_set"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_string_set_static_delegate) }); } if (efl_core_command_line_command_access_static_delegate == null) { efl_core_command_line_command_access_static_delegate = new efl_core_command_line_command_access_delegate(command_access); } if (methods.FirstOrDefault(m => m.Name == "CommandAccess") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_access"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_access_static_delegate) }); } descs.AddRange(base.GetEoOps(type)); return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.App.efl_app_class_get(); } #pragma warning disable CA1707, CS1591, SA1300, SA1600 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] private delegate Efl.App efl_app_main_get_delegate(); [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] public delegate Efl.App efl_app_main_get_api_delegate(); public static Efl.Eo.FunctionWrapper efl_app_main_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_app_main_get"); private static Efl.App app_main_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_app_main_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Efl.App _ret_var = default(Efl.App); try { _ret_var = App.GetAppMain(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_app_main_get_ptr.Value.Delegate(); } } private delegate System.IntPtr efl_app_build_efl_version_get_delegate(System.IntPtr obj, System.IntPtr pd); public delegate System.IntPtr efl_app_build_efl_version_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_app_build_efl_version_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_app_build_efl_version_get"); private static System.IntPtr build_efl_version_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_app_build_efl_version_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Efl.Version _ret_var = default(Efl.Version); try { _ret_var = ((App)ws.Target).GetBuildEflVersion(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var); } else { return efl_app_build_efl_version_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_app_build_efl_version_get_delegate efl_app_build_efl_version_get_static_delegate; private delegate System.IntPtr efl_app_efl_version_get_delegate(System.IntPtr obj, System.IntPtr pd); public delegate System.IntPtr efl_app_efl_version_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_app_efl_version_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_app_efl_version_get"); private static System.IntPtr efl_version_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_app_efl_version_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Efl.Version _ret_var = default(Efl.Version); try { _ret_var = ((App)ws.Target).GetEflVersion(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var); } else { return efl_app_efl_version_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_app_efl_version_get_delegate efl_app_efl_version_get_static_delegate; [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_core_command_line_command_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_core_command_line_command_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_core_command_line_command_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_core_command_line_command_get"); private static System.String command_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_core_command_line_command_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { System.String _ret_var = default(System.String); try { _ret_var = ((App)ws.Target).GetCommand(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_core_command_line_command_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_core_command_line_command_get_delegate efl_core_command_line_command_get_static_delegate; [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_core_command_line_command_array_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr array); [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_core_command_line_command_array_set_api_delegate(System.IntPtr obj, System.IntPtr array); public static Efl.Eo.FunctionWrapper efl_core_command_line_command_array_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_core_command_line_command_array_set"); private static bool command_array_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr array) { Eina.Log.Debug("function efl_core_command_line_command_array_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { var _in_array = new Eina.Array(array, true, true); bool _ret_var = default(bool); try { _ret_var = ((App)ws.Target).SetCommandArray(_in_array); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_core_command_line_command_array_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), array); } } private static efl_core_command_line_command_array_set_delegate efl_core_command_line_command_array_set_static_delegate; [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_core_command_line_command_string_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String str); [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_core_command_line_command_string_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String str); public static Efl.Eo.FunctionWrapper efl_core_command_line_command_string_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_core_command_line_command_string_set"); private static bool command_string_set(System.IntPtr obj, System.IntPtr pd, System.String str) { Eina.Log.Debug("function efl_core_command_line_command_string_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { bool _ret_var = default(bool); try { _ret_var = ((App)ws.Target).SetCommandString(str); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_core_command_line_command_string_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), str); } } private static efl_core_command_line_command_string_set_delegate efl_core_command_line_command_string_set_static_delegate; private delegate System.IntPtr efl_core_command_line_command_access_delegate(System.IntPtr obj, System.IntPtr pd); public delegate System.IntPtr efl_core_command_line_command_access_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_core_command_line_command_access_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_core_command_line_command_access"); private static System.IntPtr command_access(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_core_command_line_command_access was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Eina.Accessor _ret_var = default(Eina.Accessor); try { _ret_var = ((App)ws.Target).CommandAccess(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var.Handle; } else { return efl_core_command_line_command_access_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_core_command_line_command_access_delegate efl_core_command_line_command_access_static_delegate; #pragma warning restore CA1707, CS1591, SA1300, SA1600 } } } #if EFL_BETA #pragma warning disable CS1591 public static class EflApp_ExtensionMethods { public static Efl.BindableProperty> CommandArray(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.App { return new Efl.BindableProperty>("command_array", fac); } public static Efl.BindableProperty CommandString(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.App { return new Efl.BindableProperty("command_string", fac); } } #pragma warning restore CS1591 #endif