/// <summary>Sets given cursors to the start and end positions of the annotation. /// The cursors <c>start</c> and <c>end</c> will be set to the start and end positions of the given annotation <c>annotation</c>.</summary> /// <param name="annotation">Annotation handle to query</param> /// <param name="start">Cursor to be set to the start position of the annotation in the text</param> /// <param name="end">Cursor to be set to the end position of the annotation in the text</param> public void GetAnnotationPositions(Efl.TextAnnotateAnnotation annotation, Efl.TextCursorCursor start, Efl.TextCursorCursor end) { Efl.ITextAnnotateConcrete.NativeMethods.efl_text_annotation_positions_get_ptr.Value.Delegate(this.NativeHandle, annotation, start, end); Eina.Error.RaiseIfUnhandledException(); }
private static Efl.TextAnnotateAnnotation cursor_item_annotation_get(System.IntPtr obj, System.IntPtr pd, Efl.TextCursorCursor cur) { Eina.Log.Debug("function efl_text_cursor_item_annotation_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Efl.TextAnnotateAnnotation _ret_var = default(Efl.TextAnnotateAnnotation); try { _ret_var = ((ITextAnnotate)ws.Target).GetCursorItemAnnotation(cur); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_text_cursor_item_annotation_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), cur)); } }
/// <summary>Inserts an annotation format in a specified range [<c>start</c>, <c>end</c> - 1]. /// The <c>format</c> will be applied to the given range, and the <c>annotation</c> handle will be returned for further handling.</summary> /// <param name="start">Start of range</param> /// <param name="end">End of range</param> /// <param name="format">Annotation format</param> /// <returns>Handle of inserted annotation</returns> public Efl.TextAnnotateAnnotation AnnotationInsert(Efl.TextCursorCursor start, Efl.TextCursorCursor end, System.String format) { var _ret_var = Efl.ITextAnnotateConcrete.NativeMethods.efl_text_annotation_insert_ptr.Value.Delegate(this.NativeHandle, start, end, format); Eina.Error.RaiseIfUnhandledException(); return(_ret_var); }
/// <summary>Returns an iterator of all the handles in a range.</summary> /// <param name="start">Start of range</param> /// <param name="end">End of range</param> /// <returns>Handle of the Annotation</returns> public Eina.Iterator <Efl.TextAnnotateAnnotation> GetRangeAnnotations(Efl.TextCursorCursor start, Efl.TextCursorCursor end) { var _ret_var = Efl.ITextAnnotateConcrete.NativeMethods.efl_text_range_annotations_get_ptr.Value.Delegate(this.NativeHandle, start, end); Eina.Error.RaiseIfUnhandledException(); return(new Eina.Iterator <Efl.TextAnnotateAnnotation>(_ret_var, true)); }
private static void annotation_positions_get(System.IntPtr obj, System.IntPtr pd, Efl.TextAnnotateAnnotation annotation, Efl.TextCursorCursor start, Efl.TextCursorCursor end) { Eina.Log.Debug("function efl_text_annotation_positions_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((ITextAnnotate)ws.Target).GetAnnotationPositions(annotation, start, end); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_text_annotation_positions_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), annotation, start, end); } }
private static System.IntPtr range_annotations_get(System.IntPtr obj, System.IntPtr pd, Efl.TextCursorCursor start, Efl.TextCursorCursor end) { Eina.Log.Debug("function efl_text_range_annotations_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Eina.Iterator <Efl.TextAnnotateAnnotation> _ret_var = default(Eina.Iterator <Efl.TextAnnotateAnnotation>); try { _ret_var = ((ITextAnnotate)ws.Target).GetRangeAnnotations(start, end); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } _ret_var.Own = false; return(_ret_var.Handle); } else { return(efl_text_range_annotations_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end)); } }
private static Efl.TextAnnotateAnnotation cursor_item_insert(System.IntPtr obj, System.IntPtr pd, Efl.TextCursorCursor cur, System.String item, System.String format) { Eina.Log.Debug("function efl_text_cursor_item_insert was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Efl.TextAnnotateAnnotation _ret_var = default(Efl.TextAnnotateAnnotation); try { _ret_var = ((ITextAnnotate)wrapper).CursorItemInsert(cur, item, format); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_text_cursor_item_insert_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), cur, item, format)); } }