## IdeHighlighter IdeHighlighter |

## Functions

IdeHighlightResult | (*IdeHighlightCallback) ()
void | ide_highlighter_update ()

## Properties

IdeContext * | context | Write / Construct Only

## Types and Values

#define | IDE_TYPE_HIGHLIGHTER
enum | IdeHighlightResult
struct | IdeHighlighterInterface
| IdeHighlighter

## Object Hierarchy

        GEnum
        ╰── IdeHighlightResult
        GInterface
        ╰── IdeHighlighter

## Prerequisites

IdeHighlighter requires IdeObject.

## Description

## Functions

### IdeHighlightCallback ()

    IdeHighlightResult
    (*IdeHighlightCallback) (const GtkTextIter *begin,
                             const GtkTextIter *end,
                             const gchar *style_name);

### ide_highlighter_update ()

    void
    ide_highlighter_update (IdeHighlighter *self,
                            IdeHighlightCallback callback,
                            const GtkTextIter *range_begin,
                            const GtkTextIter *range_end,
                            GtkTextIter *location);

Incrementally processes more of the buffer for highlighting. If `callback` returns `IDE_HIGHLIGHT_STOP`, then this vfunc should stop processing and return, having set `location` to the current position of processing.

If processing the entire range was successful, then `location` should be set to `range_end` .

#### Parameters

self | A IdeHighlighter. |
callback | A callback to apply a given style. | [scope call]
range_begin | The beginning of the range to update. |
range_end | The end of the range to update. |
location | How far the highlighter got in the update. | [out]

## Types and Values

### IDE_TYPE_HIGHLIGHTER

    #define IDE_TYPE_HIGHLIGHTER (ide_highlighter_get_type())

### enum IdeHighlightResult

#### Members

IDE_HIGHLIGHT_STOP |  |
IDE_HIGHLIGHT_CONTINUE |  |

### struct IdeHighlighterInterface

    struct IdeHighlighterInterface {
      GTypeInterface parent_interface;

      /**
       * IdeHighlighter::update:
       *
       * #IdeHighlighter should call callback() with the range and style-name of
       * the style to apply. Callback will ensure that the style exists and style
       * it appropriately based on the style scheme.
       *
       * If @callback returns %IDE_HIGHLIGHT_STOP, the caller has run out of its
       * time slice and should yield back to the highlight engine.
       *
       * @location should be set to the position that the highlighter got to
       * before yielding back to the engine.
       */
      void (*update)     (IdeHighlighter       *self,
                          IdeHighlightCallback  callback,
                          const GtkTextIter    *range_begin,
                          const GtkTextIter    *range_end,
                          GtkTextIter          *location);

      void (*set_engine) (IdeHighlighter       *self,
                          IdeHighlightEngine   *engine);
    };

### IdeHighlighter

    typedef struct _IdeHighlighter IdeHighlighter;

## Property Details

### The `“context”` property

      “context”                  IdeContext *

Context.

Flags: Write / Construct Only