Example #1
0
                private static void drag_item_add(System.IntPtr obj, System.IntPtr pd, IntPtr data_func_data, Efl.Dnd.DragDataGetInternal data_func, EinaFreeCb data_func_free_cb, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, IntPtr icon_func_data, Efl.Dnd.DragIconCreateInternal icon_func, EinaFreeCb icon_func_free_cb, IntPtr icon_list_func_data, Efl.Dnd.DragIconListCreateInternal icon_list_func, EinaFreeCb icon_list_func_free_cb, uint seat)
                {
                    Eina.Log.Debug("function efl_ui_dnd_container_drag_item_add was called");
                    Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
                    if (wrapper != null)
                    {
                        Efl.Dnd.DragDataGetWrapper        data_func_wrapper      = new Efl.Dnd.DragDataGetWrapper(data_func, data_func_data, data_func_free_cb);
                        Efl.Dnd.ItemGetWrapper            item_func_wrapper      = new Efl.Dnd.ItemGetWrapper(item_func, item_func_data, item_func_free_cb);
                        Efl.Dnd.DragIconCreateWrapper     icon_func_wrapper      = new Efl.Dnd.DragIconCreateWrapper(icon_func, icon_func_data, icon_func_free_cb);
                        Efl.Dnd.DragIconListCreateWrapper icon_list_func_wrapper = new Efl.Dnd.DragIconListCreateWrapper(icon_list_func, icon_list_func_data, icon_list_func_free_cb);

                        try
                        {
                            ((IDndContainerConcrete)wrapper).AddDragItem(data_func_wrapper.ManagedCb, item_func_wrapper.ManagedCb, icon_func_wrapper.ManagedCb, icon_list_func_wrapper.ManagedCb, seat);
                        }
                        catch (Exception e)
                        {
                            Eina.Log.Warning($"Callback error: {e.ToString()}");
                            Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
                        }
                    }
                    else
                    {
                        efl_ui_dnd_container_drag_item_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), data_func_data, data_func, data_func_free_cb, item_func_data, item_func, item_func_free_cb, icon_func_data, icon_func, icon_func_free_cb, icon_list_func_data, icon_list_func, icon_list_func_free_cb, seat);
                    }
                }
Example #2
0
        private static void drop_item_add(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionFormat format, IntPtr item_func_data, Efl.Dnd.ItemGetInternal item_func, EinaFreeCb item_func_free_cb, uint seat)
        {
            Eina.Log.Debug("function efl_ui_dnd_container_drop_item_add was called");
            Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
            if (wrapper != null)
            {
                Efl.Dnd.ItemGetWrapper item_func_wrapper = new Efl.Dnd.ItemGetWrapper(item_func, item_func_data, item_func_free_cb);

                try {
                    ((DndContainerConcrete)wrapper).AddDropItem(format, item_func_wrapper.ManagedCb, seat);
                } catch (Exception e) {
                    Eina.Log.Warning($"Callback error: {e.ToString()}");
                    Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
                }
            }
            else
            {
                efl_ui_dnd_container_drop_item_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), format, item_func_data, item_func, item_func_free_cb, seat);
            }
        }