예제 #1
0
                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));
                    }
                }
예제 #2
0
        /// <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);
        }
예제 #3
0
        /// <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();
        }
예제 #4
0
        /// <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);
        }
예제 #5
0
 ///<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;
 }
예제 #6
0
 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);
     }
 }
예제 #7
0
        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);
            }
        }
예제 #8
0
                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));
                    }
                }
예제 #9
0
 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));
 }
예제 #10
0
 /// <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();
 }