Example #1
0
        /// <summary>Queries a given object item for its geometry.
        /// Note that the provided annotation should be an object item type.</summary>
        /// <param name="an">Given annotation to query</param>
        /// <param name="x">X coordinate of the annotation</param>
        /// <param name="y">Y coordinate of the annotation</param>
        /// <param name="w">Width of the annotation</param>
        /// <param name="h">Height of the annotation</param>
        /// <returns><c>true</c> if given annotation is an object item, <c>false</c> otherwise</returns>
        public bool GetItemGeometry(Efl.TextAnnotateAnnotation an, out int x, out int y, out int w, out int h)
        {
            var _ret_var = Efl.ITextAnnotateConcrete.NativeMethods.efl_text_item_geometry_get_ptr.Value.Delegate(this.NativeHandle, an, out x, out y, out w, out h);

            Eina.Error.RaiseIfUnhandledException();
            return(_ret_var);
        }
Example #2
0
            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");
                var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);

                if (ws != null)
                {
                    Efl.TextAnnotateAnnotation _ret_var = default(Efl.TextAnnotateAnnotation);
                    try
                    {
                        _ret_var = ((ITextAnnotate)ws.Target).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));
                }
            }
Example #3
0
            private static bool annotation_del(System.IntPtr obj, System.IntPtr pd, Efl.TextAnnotateAnnotation annotation)
            {
                Eina.Log.Debug("function efl_text_annotation_del was called");

                var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);

                if (ws != null)
                {
                    bool _ret_var = default(bool);
                    try
                    {
                        _ret_var = ((ITextAnnotate)ws.Target).DelAnnotation(annotation);
                    }
                    catch (Exception e)
                    {
                        Eina.Log.Warning($"Callback error: {e.ToString()}");
                        Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
                    }

                    return(_ret_var);
                }
                else
                {
                    return(efl_text_annotation_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), annotation));
                }
            }
Example #4
0
        /// <summary>Deletes given annotation.
        /// All formats applied by <c>annotation</c> will be removed and it will be deleted.
        /// 1.18</summary>
        /// <param name="annotation">Annotation to be removed
        /// 1.20</param>
        /// <returns><c>true</c> on success, <c>false</c> otherwise.
        /// 1.20</returns>
        public bool DelAnnotation(Efl.TextAnnotateAnnotation annotation)
        {
            var _ret_var = Efl.TextAnnotateNativeInherit.efl_text_annotation_del_ptr.Value.Delegate(this.NativeHandle, annotation);

            Eina.Error.RaiseIfUnhandledException();
            return(_ret_var);
        }
Example #5
0
        /// <summary>Whether this is an &quot;item&quot; type of annotation. Should be used before querying the annotation&apos;s geometry, as only &quot;item&quot; annotations have a geometry.
        /// see <see cref="Efl.ITextAnnotate.CursorItemInsert"/> see <see cref="Efl.ITextAnnotate.GetItemGeometry"/></summary>
        /// <param name="annotation">Given annotation</param>
        /// <returns><c>true</c> if given annotation is an object item, <c>false</c> otherwise</returns>
        public bool AnnotationIsItem(Efl.TextAnnotateAnnotation annotation)
        {
            var _ret_var = Efl.ITextAnnotateConcrete.NativeMethods.efl_text_annotation_is_item_ptr.Value.Delegate(this.NativeHandle, annotation);

            Eina.Error.RaiseIfUnhandledException();
            return(_ret_var);
        }
Example #6
0
        /// <summary>A new format for <c>annotation</c>.
        /// This will replace the format applied by <c>annotation</c> with <c>format</c>. Assumes that <c>annotation</c> is a handle for an existing annotation, i.e. one that was added using <see cref="Efl.ITextAnnotate.AnnotationInsert"/> to this object. Otherwise, this will fail and return <c>false</c>.</summary>
        /// <param name="annotation">Given annotation</param>
        /// <param name="format">The new format for the given annotation</param>
        /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>
        public bool SetAnnotation(Efl.TextAnnotateAnnotation annotation, System.String format)
        {
            var _ret_var = Efl.ITextAnnotateConcrete.NativeMethods.efl_text_annotation_set_ptr.Value.Delegate(this.NativeHandle, annotation, format);

            Eina.Error.RaiseIfUnhandledException();
            return(_ret_var);
        }
Example #7
0
            private static bool annotation_set(System.IntPtr obj, System.IntPtr pd, Efl.TextAnnotateAnnotation annotation, System.String format)
            {
                Eina.Log.Debug("function efl_text_annotation_set was called");

                Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
                if (wrapper != null)
                {
                    bool _ret_var = default(bool);
                    try
                    {
                        _ret_var = ((ITextAnnotate)wrapper).SetAnnotation(annotation, 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_annotation_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), annotation, format));
                }
            }
Example #8
0
        /// <summary>A new format for <c>annotation</c>.
        /// This will replace the format applied by <c>annotation</c> with <c>format</c>. Assumes that <c>annotation</c> is a handle for an existing annotation, i.e. one that was added using <see cref="Efl.ITextAnnotate.AnnotationInsert"/> to this object. Otherwise, this will fail and return <c>false</c>.</summary>
        /// <param name="annotation">Given annotation</param>
        /// <returns>The new format for the given annotation</returns>
        public System.String GetAnnotation(Efl.TextAnnotateAnnotation annotation)
        {
            var _ret_var = Efl.ITextAnnotateNativeInherit.efl_text_annotation_get_ptr.Value.Delegate(this.NativeHandle, annotation);

            Eina.Error.RaiseIfUnhandledException();
            return(_ret_var);
        }
Example #9
0
 private static Efl.TextAnnotateAnnotation annotation_insert(System.IntPtr obj, System.IntPtr pd, Efl.TextCursorCursor start, Efl.TextCursorCursor end, System.String format)
 {
     Eina.Log.Debug("function efl_text_annotation_insert was called");
     Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
     if (wrapper != null)
     {
         Efl.TextAnnotateAnnotation _ret_var = default(Efl.TextAnnotateAnnotation);
         try {
             _ret_var = ((TextAnnotate)wrapper).AnnotationInsert(start, end, 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_annotation_insert_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end, format));
     }
 }
Example #10
0
 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");
     Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
     if (wrapper != null)
     {
         Efl.TextAnnotateAnnotation _ret_var = default(Efl.TextAnnotateAnnotation);
         try {
             _ret_var = ((ITextAnnotate)wrapper).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));
     }
 }
Example #11
0
        private static bool item_geometry_get(System.IntPtr obj, System.IntPtr pd, Efl.TextAnnotateAnnotation an, out int x, out int y, out int w, out int h)
        {
            Eina.Log.Debug("function efl_text_item_geometry_get was called");

            Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
            if (wrapper != null)
            {
                x = default(int);      y = default(int);      w = default(int);      h = default(int);                                       bool _ret_var = default(bool);
                try {
                    _ret_var = ((TextAnnotate)wrapper).GetItemGeometry(an, out x, out y, out w, out h);
                } catch (Exception e) {
                    Eina.Log.Warning($"Callback error: {e.ToString()}");
                    Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
                }
                return(_ret_var);
            }
            else
            {
                return(efl_text_item_geometry_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), an, out x, out y, out w, out h));
            }
        }
Example #12
0
            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);
                }
            }
Example #13
0
 /// <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();
 }