Crate sourceview5

Source
Expand description

§GtkSourceView 5 Rust bindings

This library contains safe Rust bindings for GtkSourceView.

See also

Re-exports§

pub use ffi;

Modules§

prelude
subclass
Traits intended for creating custom types.

Structs§

Annotation
Represents an annotation added to View, it has a line property, description, icon and a style.
AnnotationProvider
It is used to provide annotations and display them on View and also populate HoverDisplay when the user hovers over an annotation.
Annotations
Use this object to manage Annotations. Each View has a single annotation manager and it is guaranteed to be the same for the lifetime of View.
Buffer
Subclass of gtk::TextBuffer.
Completion
Main Completion Object.
CompletionCell
Widget for single cell of completion proposal.
CompletionContext
The context of a completion.
CompletionProposal
Interface for completion proposals.
CompletionProvider
Completion provider interface.
CompletionSnippets
A CompletionProvider for the completion of snippets.
CompletionWords
A CompletionProvider for the completion of words.
Encoding
Character encoding.
File
On-disk representation of a Buffer.
FileLoader
Load a file into a GtkSourceBuffer.
FileSaver
Save a Buffer into a file.
FileSaverFlags
Flags to define the behavior of a FileSaverFlags.
Gutter
Gutter object for View.
GutterLines
Collected information about visible lines.
GutterRenderer
Gutter cell renderer.
GutterRendererPixbuf
Renders a pixbuf in the gutter.
GutterRendererText
Renders text in the gutter.
Hover
Interactive tooltips.
HoverContext
Context for populating HoverDisplay contents.
HoverDisplay
Display for interactive tooltips.
HoverProvider
Interface to populate interactive tooltips.
Indenter
Auto-indentation interface.
Language
Represents a syntax highlighted language.
LanguageManager
Provides access to Languages.
Map
Widget that displays a map for a specific View.
Mark
Mark object for Buffer.
MarkAttributes
The source mark attributes object.
PrintCompositor
Compose a Buffer for printing.
Region
Region utility.
RegionIter
An opaque datatype.
SearchContext
Search context.
SearchSettings
Search settings.
Snippet
Quick insertion code snippets.
SnippetChunk
A chunk of text within the source snippet.
SnippetContext
Context for expanding SnippetChunk.
SnippetManager
Provides access to Snippet.
SortFlags
SpaceDrawer
Represent white space characters with symbols.
SpaceLocationFlags
#GtkSourceSpaceLocationFlags contains flags for white space locations.
SpaceTypeFlags
#GtkSourceSpaceTypeFlags contains flags for white space types.
Style
Represents a style.
StyleScheme
Controls the appearance of View.
StyleSchemeChooser
Interface implemented by widgets for choosing style schemes.
StyleSchemeChooserButton
A button to launch a style scheme selection dialog.
StyleSchemeChooserWidget
A widget for choosing style schemes.
StyleSchemeManager
Provides access to StyleSchemes.
StyleSchemePreview
A preview widget for StyleScheme.
Tag
A tag that can be applied to text in a Buffer.
View
Subclass of gtk::TextView.
VimIMContext
Vim emulation.

Enums§

AnnotationStyle
BackgroundPatternType
BracketMatchType
ChangeCaseType
CompletionActivation
CompletionColumn
CompressionType
FileLoaderError
An error code used with the GTK_SOURCE_FILE_LOADER_ERROR domain.
FileSaverError
An error code used with the GTK_SOURCE_FILE_SAVER_ERROR domain.
GutterRendererAlignmentMode
The alignment mode of the renderer, when a cell spans multiple lines (due to text wrapping).
NewlineType
SmartHomeEndType
ViewGutterPosition

Functions§

check_version
Like GTK_SOURCE_CHECK_VERSION, but the check for gtk_source_check_version is at runtime instead of compile time. This is useful for compiling against older versions of GtkSourceView, but using features from newer versions.
finalize
Free the resources allocated by GtkSourceView. For example it unrefs the singleton objects.
init
Initializes the GtkSourceView library (e.g. for the internationalization).
major_version
Returns the major version number of the GtkSourceView library. (e.g. in GtkSourceView version 3.20.0 this is 3.)
micro_version
Returns the micro version number of the GtkSourceView library. (e.g. in GtkSourceView version 3.20.0 this is 0.)
minor_version
Returns the minor version number of the GtkSourceView library. (e.g. in GtkSourceView version 3.20.0 this is 20.)
scheduler_add
Simplified version of scheduler_add_full().
scheduler_add_full
Adds a new callback that will be executed as time permits on the main thread.
scheduler_remove
Removes a scheduler callback previously registered with scheduler_add() or scheduler_add_full().
utils_escape_search_text
Use this function to escape the following characters: \n, \r, \t and \.
utils_unescape_search_text
Use this function before SearchSettingsExt::set_search_text(), to unescape the following sequences of characters: \n, \r, \t and \\. The purpose is to easily write those characters in a search entry.