Method
IdeBufferManagerload_file_async
Declaration
void
ide_buffer_manager_load_file_async (
IdeBufferManager* self,
GFile* file,
IdeBufferOpenFlags flags,
IdeNotification* notif,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
Description
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.
Parameters
file-
Type:
GFileA
GFile.The argument can be NULL.The data is owned by the caller of the method. flags-
Type:
IdeBufferOpenFlagsOptional flags for loading the buffer.
notif-
Type:
IdeNotificationA location for an
IdeNotification, orNULL.The argument can be NULL.The data is owned by the caller of the method. cancellable-
Type:
GCancellableA
GCancellableorNULL.The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackA callback to execute upon completion of the operation.
The argument can be NULL. user_data-
Type:
gpointerClosure data for
callback.The argument can be NULL.The data is owned by the caller of the method.