Completion.createContext

Create a new #GtkSourceCompletionContext for completion. The position where the completion occurs can be specified by position. If position is null, the current cursor position will be used.

Parameters

positiona #GtkTextIter, or null.

Returns

a new #GtkSourceCompletionContext.

The reference being returned is a 'floating' reference, so if you invoke [gtksource.completion.Completion.start] with this context you don't need to unref it.