Top |
Functions
Types and Values
#define | IDE_TYPE_BUFFER |
#define | IDE_BUFFER_LINE_FLAGS_DIAGNOSTICS_MASK |
enum | IdeBufferLineFlags |
struct | IdeBufferClass |
IdeBuffer |
Functions
ide_buffer_get_busy ()
gboolean
ide_buffer_get_busy (IdeBuffer *self
);
Gets the “busy” property. Return whether the buffer is performing background work or not.
ide_buffer_get_changed_on_volume ()
gboolean
ide_buffer_get_changed_on_volume (IdeBuffer *self
);
Gets if the file backing the buffer has changed on the underlying storage.
Use ide_buffer_manager_load_file_async()
to reload the buffer.
ide_buffer_get_content ()
GBytes *
ide_buffer_get_content (IdeBuffer *self
);
Gets the contents of the buffer as GBytes.
By using this function to get the bytes, you allow IdeBuffer to avoid calculating the buffer text unnecessarily, potentially saving on allocations.
Additionally, this allows the buffer to update the state in IdeUnsavedFiles if the content is out of sync.
ide_buffer_get_context ()
IdeContext *
ide_buffer_get_context (IdeBuffer *self
);
Gets the “context” property. This is the IdeContext that owns the buffer.
ide_buffer_get_diagnostic_at_iter ()
IdeDiagnostic * ide_buffer_get_diagnostic_at_iter (IdeBuffer *self
,const GtkTextIter *iter
);
Gets the first diagnostic that overlaps the position
ide_buffer_get_file ()
IdeFile *
ide_buffer_get_file (IdeBuffer *self
);
Gets the underlying file behind the buffer.
ide_buffer_get_line_flags ()
IdeBufferLineFlags ide_buffer_get_line_flags (IdeBuffer *self
,guint line
);
Return the flags set for the IdeBuffer line
number.
(diagnostics and errors messages, line changed or added, notes)
ide_buffer_get_read_only ()
gboolean
ide_buffer_get_read_only (IdeBuffer *self
);
Gets the “read-only” property. This property indicate if the underlying file is read only or not.
ide_buffer_get_highlight_diagnostics ()
gboolean
ide_buffer_get_highlight_diagnostics (IdeBuffer *self
);
Gets the “highlight-diagnostics” property. Return whether the diagnostic warnings and errors should be highlighted.
ide_buffer_get_style_scheme_name ()
const gchar *
ide_buffer_get_style_scheme_name (IdeBuffer *self
);
Gets the “style-scheme-name” property. This property contains the current style scheme used by the buffer.
ide_buffer_get_title ()
const gchar *
ide_buffer_get_title (IdeBuffer *self
);
Gets the “title” property. This property contains a title for the buffer suitable for display.
ide_buffer_set_file ()
void ide_buffer_set_file (IdeBuffer *self
,IdeFile *file
);
Sets the underlying file to use when saving and loading self
to and from storage.
ide_buffer_set_highlight_diagnostics ()
void ide_buffer_set_highlight_diagnostics (IdeBuffer *self
,gboolean highlight_diagnostics
);
Sets the “highlight-diagnostics” property. Sets whether the diagnostic warnings and errors should be highlighted.
ide_buffer_set_style_scheme_name ()
void ide_buffer_set_style_scheme_name (IdeBuffer *self
,const gchar *style_scheme_name
);
Sets the “style-scheme-name” property. Sets the style scheme to be used by this buffer.
Parameters
self |
A IdeBuffer. |
|
style_scheme_name |
A string containing the name of the style scheme to use. |
ide_buffer_trim_trailing_whitespace ()
void
ide_buffer_trim_trailing_whitespace (IdeBuffer *self
);
Trim trailing whitespaces from the buffer.
ide_buffer_check_for_volume_change ()
void
ide_buffer_check_for_volume_change (IdeBuffer *self
);
Update the “read-only” property and the corresponding modification time (mtime).
ide_buffer_get_iter_at_source_location ()
void ide_buffer_get_iter_at_source_location (IdeBuffer *self
,GtkTextIter *iter
,IdeSourceLocation *location
);
Fill iter
with the position designated by location
.
ide_buffer_rehighlight ()
void
ide_buffer_rehighlight (IdeBuffer *self
);
Force the IdeBuffer to rebuild the highlight.
ide_buffer_get_selection_bounds ()
void ide_buffer_get_selection_bounds (IdeBuffer *self
,GtkTextIter *insert
,GtkTextIter *selection
);
This function acts like gtk_text_buffer_get_selection_bounds()
except that it always
places the location of the insert mark at insert
and the location of the selection
mark at selection
.
Calling gtk_text_iter_order()
with the results of this function would be equivalent
to calling gtk_text_buffer_get_selection_bounds()
.
Parameters
self |
A IdeBuffer. |
|
insert |
A GtkTextIter to get the insert position. |
[out] |
selection |
A GtkTextIter to get the selection position. |
[out] |
ide_buffer_get_symbol_resolver ()
IdeSymbolResolver *
ide_buffer_get_symbol_resolver (IdeBuffer *self
);
Gets the symbol resolver for the buffer based on the current language.
ide_buffer_get_symbol_at_location_async ()
void ide_buffer_get_symbol_at_location_async (IdeBuffer *self
,const GtkTextIter *location
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously get a possible symbol at location
.
Parameters
self |
A IdeBuffer. |
|
location |
a GtkTextIter indicating a position to search for a symbol. |
|
cancellable |
A GCancellable. |
|
callback |
A GAsyncReadyCallback. |
|
user_data |
A gpointer to hold user data. |
ide_buffer_get_symbol_at_location_finish ()
IdeSymbol * ide_buffer_get_symbol_at_location_finish (IdeBuffer *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to locate a symbol at a location.
ide_buffer_get_word_at_iter ()
gchar * ide_buffer_get_word_at_iter (IdeBuffer *self
,const GtkTextIter *iter
);
Gets the word found under the position denoted by iter
.
Types and Values
struct IdeBufferClass
struct IdeBufferClass { GtkSourceBufferClass parent_class; void (*cursor_moved) (IdeBuffer *self, const GtkTextIter *location); gpointer _reserved1; gpointer _reserved2; gpointer _reserved3; gpointer _reserved4; gpointer _reserved5; gpointer _reserved6; gpointer _reserved7; gpointer _reserved8; };