internal static Dummy.StructComplex structComplexWithValues() { var Farray = new Eina.Array <string>(); Farray.Add("0x0"); Farray.Add("0x2A"); Farray.Add("0x42"); var Flist = new Eina.List <string>(); Flist.Add("0x0"); Flist.Add("0x2A"); Flist.Add("0x42"); var Fhash = new Eina.Hash <string, string>(); Fhash["aa"] = "aaa"; Fhash["bb"] = "bbb"; Fhash["cc"] = "ccc"; var Fiterator = ((Eina.Array <string>)Farray).GetIterator(); var Faccessor = ((Eina.Array <string>)Farray).GetAccessor(); var Fany_value = new Eina.Value(Eina.ValueType.Double); Fany_value.Set(-9007199254740992.0); var Fany_value_ref = new Eina.Value(Eina.ValueType.String); Fany_value_ref.Set("abc"); var Fbinbuf = new Eina.Binbuf(); Fbinbuf.Append(126); var Fslice = new Eina.Slice(Eina.MemoryNative.Alloc(1), (UIntPtr)1); Marshal.WriteByte(Fslice.Mem, 125); var Fobj = new Dummy.Numberwrapper(); Fobj.Number = 42; return(new Dummy.StructComplex( farray: Farray, flist: Flist, fhash: Fhash, fiterator: Fiterator, faccessor: Faccessor, fanyValue: Fany_value, fanyValueRef: Fany_value_ref, fbinbuf: Fbinbuf, fslice: Fslice, fobj: Fobj )); }
override public bool EinaSliceOut(ref Eina.Slice slice) { slice_out_flag = true; slice_out_seq = (byte[])BaseSequence.Values(); slice_out_pinned = GCHandle.Alloc(slice_out_seq, GCHandleType.Pinned); IntPtr ptr = slice_out_pinned.AddrOfPinnedObject(); slice.Mem = ptr; slice.Len = (UIntPtr)slice_out_seq.Length; return(true); }
private static Eina.Error write(System.IntPtr obj, System.IntPtr pd, ref Eina.Slice slice, ref Eina.Slice remaining) { Eina.Log.Debug("function efl_io_writer_write was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { remaining = default(Eina.Slice); Eina.Error _ret_var = default(Eina.Error); try { _ret_var = ((IWriter)wrapper).Write(ref slice, ref remaining); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_io_writer_write_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ref slice, ref remaining)); } }
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)); } }
override public bool EinaSliceIn(Eina.Slice slice) { slice_in_flag = true; return(slice.GetBytes().SequenceEqual(BaseSequence.Values())); }
private static void drag_start(System.IntPtr obj, System.IntPtr pd, Efl.Ui.SelectionFormat format, Eina.Slice data, Efl.Ui.SelectionAction action, IntPtr icon_func_data, Efl.Dnd.DragIconCreateInternal icon_func, EinaFreeCb icon_func_free_cb, uint seat) { Eina.Log.Debug("function efl_ui_dnd_drag_start was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Efl.Dnd.DragIconCreateWrapper icon_func_wrapper = new Efl.Dnd.DragIconCreateWrapper(icon_func, icon_func_data, icon_func_free_cb); try { ((IDndConcrete)wrapper).DragStart(format, data, action, icon_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_drag_start_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), format, data, action, icon_func_data, icon_func, icon_func_free_cb, seat); } }