#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 {
namespace Access {
/// Elementary access selection interface
/// This is a BETA class. It can be modified or removed in the future. Do not use it for product development.
[Efl.Access.ISelectionConcrete.NativeMethods]
[Efl.Eo.BindingEntity]
public interface ISelection :
Efl.Eo.IWrapper, IDisposable
{
/// Gets the number of currently selected children
/// Number of currently selected children
int GetSelectedChildrenCount();
/// Gets child for given child index
/// Index of child
/// Child object
Efl.Object GetSelectedChild(int selected_child_index);
/// Adds selection for given child index
/// Index of child
/// true if selection was added, false otherwise
bool ChildSelect(int child_index);
/// Removes selection for given child index
/// Index of child
/// true if selection was removed, false otherwise
bool SelectedChildDeselect(int child_index);
/// Determines if child specified by index is selected
/// Index of child
/// true if child is selected, false otherwise
bool IsChildSelected(int child_index);
/// Adds selection for all children
/// true if selection was added to all children, false otherwise
bool AllChildrenSelect();
/// Clears the current selection
/// true if selection was cleared, false otherwise
bool ClearAccessSelection();
/// Removes selection for given child index
/// Index of child
/// true if selection was removed, false otherwise
bool ChildDeselect(int child_index);
/// Called when selection has been changed.
event EventHandler AccessSelectionChangedEvt;
/// Gets the number of currently selected children
/// Number of currently selected children
int SelectedChildrenCount {
get;
}
}
/// Elementary access selection interface
/// This is a BETA class. It can be modified or removed in the future. Do not use it for product development.
sealed public class ISelectionConcrete :
Efl.Eo.EoWrapper
, ISelection
{
/// Pointer to the native class description.
public override System.IntPtr NativeClass
{
get
{
if (((object)this).GetType() == typeof(ISelectionConcrete))
{
return GetEflClassStatic();
}
else
{
return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
}
}
}
/// 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.
private ISelectionConcrete(ConstructingHandle ch) : base(ch)
{
}
[System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
efl_access_selection_interface_get();
/// Initializes a new instance of the class.
/// Internal usage: This is used when interacting with C code and should not be used directly.
/// The native pointer to be wrapped.
private ISelectionConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
{
}
/// Called when selection has been changed.
public event EventHandler AccessSelectionChangedEvt
{
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_ACCESS_SELECTION_EVENT_ACCESS_SELECTION_CHANGED";
AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value);
}
}
remove
{
lock (eflBindingEventLock)
{
string key = "_EFL_ACCESS_SELECTION_EVENT_ACCESS_SELECTION_CHANGED";
RemoveNativeEventHandler(efl.Libs.Elementary, key, value);
}
}
}
/// Method to raise event AccessSelectionChangedEvt.
public void OnAccessSelectionChangedEvt(EventArgs e)
{
var key = "_EFL_ACCESS_SELECTION_EVENT_ACCESS_SELECTION_CHANGED";
IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, 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);
}
/// Gets the number of currently selected children
/// Number of currently selected children
public int GetSelectedChildrenCount() {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_selected_children_count_get_ptr.Value.Delegate(this.NativeHandle);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Gets child for given child index
/// Index of child
/// Child object
public Efl.Object GetSelectedChild(int selected_child_index) {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_selected_child_get_ptr.Value.Delegate(this.NativeHandle,selected_child_index);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Adds selection for given child index
/// Index of child
/// true if selection was added, false otherwise
public bool ChildSelect(int child_index) {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_child_select_ptr.Value.Delegate(this.NativeHandle,child_index);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Removes selection for given child index
/// Index of child
/// true if selection was removed, false otherwise
public bool SelectedChildDeselect(int child_index) {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_selected_child_deselect_ptr.Value.Delegate(this.NativeHandle,child_index);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Determines if child specified by index is selected
/// Index of child
/// true if child is selected, false otherwise
public bool IsChildSelected(int child_index) {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_is_child_selected_ptr.Value.Delegate(this.NativeHandle,child_index);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Adds selection for all children
/// true if selection was added to all children, false otherwise
public bool AllChildrenSelect() {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_all_children_select_ptr.Value.Delegate(this.NativeHandle);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Clears the current selection
/// true if selection was cleared, false otherwise
public bool ClearAccessSelection() {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_clear_ptr.Value.Delegate(this.NativeHandle);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Removes selection for given child index
/// Index of child
/// true if selection was removed, false otherwise
public bool ChildDeselect(int child_index) {
var _ret_var = Efl.Access.ISelectionConcrete.NativeMethods.efl_access_selection_child_deselect_ptr.Value.Delegate(this.NativeHandle,child_index);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Gets the number of currently selected children
/// Number of currently selected children
public int SelectedChildrenCount {
get { return GetSelectedChildrenCount(); }
}
private static IntPtr GetEflClassStatic()
{
return Efl.Access.ISelectionConcrete.efl_access_selection_interface_get();
}
/// Wrapper for native methods and virtual method delegates.
/// For internal use by generated code only.
public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
{
private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
/// 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_access_selection_selected_children_count_get_static_delegate == null)
{
efl_access_selection_selected_children_count_get_static_delegate = new efl_access_selection_selected_children_count_get_delegate(selected_children_count_get);
}
if (methods.FirstOrDefault(m => m.Name == "GetSelectedChildrenCount") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_selected_children_count_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_selected_children_count_get_static_delegate) });
}
if (efl_access_selection_selected_child_get_static_delegate == null)
{
efl_access_selection_selected_child_get_static_delegate = new efl_access_selection_selected_child_get_delegate(selected_child_get);
}
if (methods.FirstOrDefault(m => m.Name == "GetSelectedChild") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_selected_child_get"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_selected_child_get_static_delegate) });
}
if (efl_access_selection_child_select_static_delegate == null)
{
efl_access_selection_child_select_static_delegate = new efl_access_selection_child_select_delegate(child_select);
}
if (methods.FirstOrDefault(m => m.Name == "ChildSelect") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_child_select"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_child_select_static_delegate) });
}
if (efl_access_selection_selected_child_deselect_static_delegate == null)
{
efl_access_selection_selected_child_deselect_static_delegate = new efl_access_selection_selected_child_deselect_delegate(selected_child_deselect);
}
if (methods.FirstOrDefault(m => m.Name == "SelectedChildDeselect") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_selected_child_deselect"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_selected_child_deselect_static_delegate) });
}
if (efl_access_selection_is_child_selected_static_delegate == null)
{
efl_access_selection_is_child_selected_static_delegate = new efl_access_selection_is_child_selected_delegate(is_child_selected);
}
if (methods.FirstOrDefault(m => m.Name == "IsChildSelected") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_is_child_selected"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_is_child_selected_static_delegate) });
}
if (efl_access_selection_all_children_select_static_delegate == null)
{
efl_access_selection_all_children_select_static_delegate = new efl_access_selection_all_children_select_delegate(all_children_select);
}
if (methods.FirstOrDefault(m => m.Name == "AllChildrenSelect") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_all_children_select"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_all_children_select_static_delegate) });
}
if (efl_access_selection_clear_static_delegate == null)
{
efl_access_selection_clear_static_delegate = new efl_access_selection_clear_delegate(access_selection_clear);
}
if (methods.FirstOrDefault(m => m.Name == "ClearAccessSelection") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_clear"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_clear_static_delegate) });
}
if (efl_access_selection_child_deselect_static_delegate == null)
{
efl_access_selection_child_deselect_static_delegate = new efl_access_selection_child_deselect_delegate(child_deselect);
}
if (methods.FirstOrDefault(m => m.Name == "ChildDeselect") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_selection_child_deselect"), func = Marshal.GetFunctionPointerForDelegate(efl_access_selection_child_deselect_static_delegate) });
}
return descs;
}
/// Returns the Eo class for the native methods of this class.
/// The native class pointer.
public override IntPtr GetEflClass()
{
return Efl.Access.ISelectionConcrete.efl_access_selection_interface_get();
}
#pragma warning disable CA1707, CS1591, SA1300, SA1600
private delegate int efl_access_selection_selected_children_count_get_delegate(System.IntPtr obj, System.IntPtr pd);
public delegate int efl_access_selection_selected_children_count_get_api_delegate(System.IntPtr obj);
public static Efl.Eo.FunctionWrapper efl_access_selection_selected_children_count_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_selected_children_count_get");
private static int selected_children_count_get(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_access_selection_selected_children_count_get was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
int _ret_var = default(int);
try
{
_ret_var = ((ISelection)ws.Target).GetSelectedChildrenCount();
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_selected_children_count_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
}
}
private static efl_access_selection_selected_children_count_get_delegate efl_access_selection_selected_children_count_get_static_delegate;
[return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))]
private delegate Efl.Object efl_access_selection_selected_child_get_delegate(System.IntPtr obj, System.IntPtr pd, int selected_child_index);
[return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))]
public delegate Efl.Object efl_access_selection_selected_child_get_api_delegate(System.IntPtr obj, int selected_child_index);
public static Efl.Eo.FunctionWrapper efl_access_selection_selected_child_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_selected_child_get");
private static Efl.Object selected_child_get(System.IntPtr obj, System.IntPtr pd, int selected_child_index)
{
Eina.Log.Debug("function efl_access_selection_selected_child_get was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
Efl.Object _ret_var = default(Efl.Object);
try
{
_ret_var = ((ISelection)ws.Target).GetSelectedChild(selected_child_index);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_selected_child_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), selected_child_index);
}
}
private static efl_access_selection_selected_child_get_delegate efl_access_selection_selected_child_get_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_selection_child_select_delegate(System.IntPtr obj, System.IntPtr pd, int child_index);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_selection_child_select_api_delegate(System.IntPtr obj, int child_index);
public static Efl.Eo.FunctionWrapper efl_access_selection_child_select_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_child_select");
private static bool child_select(System.IntPtr obj, System.IntPtr pd, int child_index)
{
Eina.Log.Debug("function efl_access_selection_child_select was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((ISelection)ws.Target).ChildSelect(child_index);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_child_select_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), child_index);
}
}
private static efl_access_selection_child_select_delegate efl_access_selection_child_select_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_selection_selected_child_deselect_delegate(System.IntPtr obj, System.IntPtr pd, int child_index);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_selection_selected_child_deselect_api_delegate(System.IntPtr obj, int child_index);
public static Efl.Eo.FunctionWrapper efl_access_selection_selected_child_deselect_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_selected_child_deselect");
private static bool selected_child_deselect(System.IntPtr obj, System.IntPtr pd, int child_index)
{
Eina.Log.Debug("function efl_access_selection_selected_child_deselect was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((ISelection)ws.Target).SelectedChildDeselect(child_index);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_selected_child_deselect_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), child_index);
}
}
private static efl_access_selection_selected_child_deselect_delegate efl_access_selection_selected_child_deselect_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_selection_is_child_selected_delegate(System.IntPtr obj, System.IntPtr pd, int child_index);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_selection_is_child_selected_api_delegate(System.IntPtr obj, int child_index);
public static Efl.Eo.FunctionWrapper efl_access_selection_is_child_selected_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_is_child_selected");
private static bool is_child_selected(System.IntPtr obj, System.IntPtr pd, int child_index)
{
Eina.Log.Debug("function efl_access_selection_is_child_selected was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((ISelection)ws.Target).IsChildSelected(child_index);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_is_child_selected_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), child_index);
}
}
private static efl_access_selection_is_child_selected_delegate efl_access_selection_is_child_selected_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_selection_all_children_select_delegate(System.IntPtr obj, System.IntPtr pd);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_selection_all_children_select_api_delegate(System.IntPtr obj);
public static Efl.Eo.FunctionWrapper efl_access_selection_all_children_select_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_all_children_select");
private static bool all_children_select(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_access_selection_all_children_select was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((ISelection)ws.Target).AllChildrenSelect();
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_all_children_select_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
}
}
private static efl_access_selection_all_children_select_delegate efl_access_selection_all_children_select_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_selection_clear_delegate(System.IntPtr obj, System.IntPtr pd);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_selection_clear_api_delegate(System.IntPtr obj);
public static Efl.Eo.FunctionWrapper efl_access_selection_clear_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_clear");
private static bool access_selection_clear(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_access_selection_clear was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((ISelection)ws.Target).ClearAccessSelection();
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_clear_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
}
}
private static efl_access_selection_clear_delegate efl_access_selection_clear_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_selection_child_deselect_delegate(System.IntPtr obj, System.IntPtr pd, int child_index);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_selection_child_deselect_api_delegate(System.IntPtr obj, int child_index);
public static Efl.Eo.FunctionWrapper efl_access_selection_child_deselect_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_selection_child_deselect");
private static bool child_deselect(System.IntPtr obj, System.IntPtr pd, int child_index)
{
Eina.Log.Debug("function efl_access_selection_child_deselect was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((ISelection)ws.Target).ChildDeselect(child_index);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_selection_child_deselect_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), child_index);
}
}
private static efl_access_selection_child_deselect_delegate efl_access_selection_child_deselect_static_delegate;
#pragma warning restore CA1707, CS1591, SA1300, SA1600
}
}
}
}
#if EFL_BETA
#pragma warning disable CS1591
public static class Efl_AccessISelectionConcrete_ExtensionMethods {
}
#pragma warning restore CS1591
#endif