Top | ![]() |
![]() |
![]() |
![]() |
void | (*IdeBufferForeachFunc) () |
IdeBufferManager * | ide_buffer_manager_from_context () |
void | ide_buffer_manager_foreach () |
void | ide_buffer_manager_load_file_async () |
IdeBuffer * | ide_buffer_manager_load_file_finish () |
void | ide_buffer_manager_save_all_async () |
gboolean | ide_buffer_manager_save_all_finish () |
gboolean | ide_buffer_manager_has_file () |
IdeBuffer * | ide_buffer_manager_find_buffer () |
gssize | ide_buffer_manager_get_max_file_size () |
void | ide_buffer_manager_set_max_file_size () |
void | ide_buffer_manager_apply_edits_async () |
gboolean | ide_buffer_manager_apply_edits_finish () |
void | buffer-loaded | Run Last |
void | buffer-saved | Run Last |
void | buffer-unloaded | Run Last |
void | load-buffer | Run Last |
void (*IdeBufferForeachFunc) (IdeBuffer *buffer
,gpointer user_data
);
Callback prototype for ide_buffer_manager_foreach()
.
Since: 3.32
IdeBufferManager *
ide_buffer_manager_from_context (IdeContext *context
);
Gets the IdeBufferManager for the IdeContext.
Since: 3.32
void ide_buffer_manager_foreach (IdeBufferManager *self
,IdeBufferForeachFunc foreach_func
,gpointer user_data
);
Calls foreach_func
for every buffer registered.
Since: 3.32
void ide_buffer_manager_load_file_async (IdeBufferManager *self
,GFile *file
,IdeBufferOpenFlags flags
,IdeNotification *notif
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Requests that file
be loaded by the buffer manager. Depending on flags
,
this may result in a new view being displayed in a Builder workspace.
If file
is NULL
, then a new temporary file is created with an
incrementing number to denote the document, such as "unsaved file 1".
After completion, callback
will be executed and you can receive the buffer
that was loaded with ide_buffer_manager_load_file_finish()
.
If a buffer has already been loaded from file
, the operation will complete
using that existing buffer.
If a buffer is currently loading for file
, the operation will complete
using that existing buffer after it has completed loading.
If notif
is non-NULL, it will be updated with status information while
loading the document.
self |
||
file |
a GFile. |
[nullable] |
flags |
optional flags for loading the buffer |
|
notif |
a location for an IdeNotification, or |
[nullable] |
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to execute upon completion of the operation |
|
user_data |
closure data for |
Since: 3.32
IdeBuffer * ide_buffer_manager_load_file_finish (IdeBufferManager *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to ide_buffer_manager_laod_file_async()
.
Since: 3.32
void ide_buffer_manager_save_all_async (IdeBufferManager *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests that the IdeBufferManager save all of the loaded buffers to disk.
callback
will be executed after all the buffers have been saved.
self |
||
cancellable |
a GCancellable. |
[nullable] |
callback |
a callback to execute upon completion |
|
user_data |
closure data for |
Since: 3.32
gboolean ide_buffer_manager_save_all_finish (IdeBufferManager *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to save all buffers.
Since: 3.32
gboolean ide_buffer_manager_has_file (IdeBufferManager *self
,GFile *file
);
Checks to see if a buffer has been loaded which contains the contents
of file
.
Since: 3.32
IdeBuffer * ide_buffer_manager_find_buffer (IdeBufferManager *self
,GFile *file
);
Locates the IdeBuffer that matches GFile, if any.
Since: 3.32
gssize
ide_buffer_manager_get_max_file_size (IdeBufferManager *self
);
Gets the max file size that will be allowed to be loaded from disk. This is useful to protect Builder from files that would overload the various subsystems.
Since: 3.32
void ide_buffer_manager_set_max_file_size (IdeBufferManager *self
,gssize max_file_size
);
void ide_buffer_manager_apply_edits_async (IdeBufferManager *self
,GPtrArray *edits
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests that all of edits
are applied to the buffers
in the project. If the buffer has not been loaded for a particular edit,
it will be loaded.
callback
should call ide_buffer_manager_apply_edits_finish()
to get the
result of this operation.
self |
||
edits |
An GPtrArray of IdeTextEdit. |
[transfer full][element-type IdeTextEdit] |
cancellable |
a GCancellable or |
[allow-none] |
callback |
the callback to complete the request |
|
user_data |
user data for |
Since: 3.32
gboolean ide_buffer_manager_apply_edits_finish (IdeBufferManager *self
,GAsyncResult *result
,GError **error
);
The IdeBufferOpenFlags enumeration is used to specify how a document should be opened by the workbench. Plugins may want to have a bit of control over where the document is opened, and this provides a some control over that.
Since: 3.32
“max-file-size”
property “max-file-size” gint64
The "max-file-size" property is the largest file size in bytes that Builder will attempt to load. Larger files will fail to load to help ensure that Builder's buffer manager does not attempt to load files that will slow the buffer management beyond usefulness.
Owner: IdeBufferManager
Flags: Read / Write
Allowed values: >= -1
Default value: 10485760
Since: 3.32
“buffer-loaded”
signalvoid user_function (IdeBufferManager *self, IdeBuffer *buffer, gpointer user_data)
The "buffer-loaded" signal is emitted when an IdeBuffer has loaded a file from storage.
Flags: Run Last
Since: 3.32
“buffer-saved”
signalvoid user_function (IdeBufferManager *self, IdeBuffer *buffer, gpointer user_data)
The "buffer-saved" signal is emitted when an IdeBuffer has been saved to storage.
Flags: Run Last
Since: 3.32
“buffer-unloaded”
signalvoid user_function (IdeBufferManager *self, IdeBuffer *buffer, gpointer user_data)
The "buffer-unloaded" signal is emitted when an IdeBuffer has been unloaded from the buffer manager.
Flags: Run Last
Since: 3.32
“load-buffer”
signalvoid user_function (IdeBufferManager *idebuffermanager, IdeBuffer *arg1, gboolean arg2, gpointer user_data)
Flags: Run Last