private static bool has_owner(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionType type, uint seat) { Eina.Log.Debug("function efl_ui_selection_has_owner was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { bool _ret_var = default(bool); try { _ret_var = ((ISelectionConcrete)wrapper).HasOwner(type, seat); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_ui_selection_has_owner_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), type, seat)); } }
/// <summary>Determine whether the selection data has owner</summary> /// <param name="type">Selection type</param> /// <param name="seat">Specified seat for multiple seats case.</param> /// <returns>EINA_TRUE if there is object owns selection, otherwise EINA_FALSE</returns> public bool HasOwner(Efl.Ui.SelectionType type, uint seat) { var _ret_var = Efl.Ui.ISelectionNativeInherit.efl_ui_selection_has_owner_ptr.Value.Delegate(this.NativeHandle, type, seat); Eina.Error.RaiseIfUnhandledException(); return(_ret_var); }
/// <summary>Get the data from the object that has selection</summary> /// <param name="type">Selection Type</param> /// <param name="format">Selection Format</param> /// <param name="data_func">Data ready function pointer</param> /// <param name="seat">Specified seat for multiple seats case.</param> /// <returns></returns> public void GetSelection(Efl.Ui.SelectionType type, Efl.Ui.SelectionFormat format, Efl.Ui.SelectionDataReady data_func, uint seat) { GCHandle data_func_handle = GCHandle.Alloc(data_func); Efl.Ui.ISelectionNativeInherit.efl_ui_selection_get_ptr.Value.Delegate(this.NativeHandle, type, format, GCHandle.ToIntPtr(data_func_handle), Efl.Ui.SelectionDataReadyWrapper.Cb, Efl.Eo.Globals.free_gchandle, seat); Eina.Error.RaiseIfUnhandledException(); }
/// <summary>Set the selection data to the object</summary> /// <param name="type">Selection Type</param> /// <param name="format">Selection Format</param> /// <param name="data">Selection data</param> /// <param name="seat">Specified seat for multiple seats case.</param> /// <returns>Future for tracking when the selection is lost</returns> public Eina.Future SetSelection(Efl.Ui.SelectionType type, Efl.Ui.SelectionFormat format, Eina.Slice data, uint seat) { var _ret_var = Efl.Ui.ISelectionNativeInherit.efl_ui_selection_set_ptr.Value.Delegate(this.NativeHandle, type, format, data, seat); Eina.Error.RaiseIfUnhandledException(); return(_ret_var); }
///<summary>Constructor for SelectionChanged.</summary> public SelectionChanged( Efl.Ui.SelectionType Type = default(Efl.Ui.SelectionType), int Seat = default(int), System.IntPtr Display = default(System.IntPtr), bool Exist = default(bool)) { this.Type = Type; this.Seat = Seat; this.Display = Display; this.Exist = Exist; }
private static void selection_clear(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionType type, uint seat) { Eina.Log.Debug("function efl_ui_selection_clear was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { try { ((ISelectionConcrete)wrapper).ClearSelection(type, seat); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_selection_clear_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), type, seat); } }
private static void selection_get(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionType type, Efl.Ui.SelectionFormat format, IntPtr data_func_data, Efl.Ui.SelectionDataReadyInternal data_func, EinaFreeCb data_func_free_cb, uint seat) { Eina.Log.Debug("function efl_ui_selection_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Efl.Ui.SelectionDataReadyWrapper data_func_wrapper = new Efl.Ui.SelectionDataReadyWrapper(data_func, data_func_data, data_func_free_cb); try { ((ISelectionConcrete)wrapper).GetSelection(type, format, data_func_wrapper.ManagedCb, seat); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_selection_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), type, format, data_func_data, data_func, data_func_free_cb, seat); } }
private static Eina.Future selection_set(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionType type, Efl.Ui.SelectionFormat format, Eina.Slice data, uint seat) { Eina.Log.Debug("function efl_ui_selection_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Eina.Future _ret_var = default(Eina.Future); try { _ret_var = ((ISelectionConcrete)wrapper).SetSelection(type, format, data, seat); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_ui_selection_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), type, format, data, seat)); } }
public System.Threading.Tasks.Task <Eina.Value> SetSelectionAsync(Efl.Ui.SelectionType type, Efl.Ui.SelectionFormat format, Eina.Slice data, uint seat, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { Eina.Future future = SetSelection(type, format, data, seat); return(Efl.Eo.Globals.WrapAsync(future, token)); }
/// <summary>Clear the selection data from the object</summary> /// <param name="type">Selection Type</param> /// <param name="seat">Specified seat for multiple seats case.</param> /// <returns></returns> public void ClearSelection(Efl.Ui.SelectionType type, uint seat) { Efl.Ui.ISelectionNativeInherit.efl_ui_selection_clear_ptr.Value.Delegate(this.NativeHandle, type, seat); Eina.Error.RaiseIfUnhandledException(); }