Top |
void gedit_commands_load_location (GeditWindow *window
,GFile *location
,const GtkSourceEncoding *encoding
,gint line_pos
,gint column_pos
);
Loads location
. Ignores non-existing locations.
window |
||
location |
a GFile to load |
|
encoding |
the GtkSourceEncoding of |
[allow-none] |
line_pos |
the line position to place the cursor |
|
column_pos |
the line column to place the cursor |
GSList * gedit_commands_load_locations (GeditWindow *window
,const GSList *locations
,const GtkSourceEncoding *encoding
,gint line_pos
,gint column_pos
);
Loads locations
. Ignore non-existing locations.
window |
||
locations |
the locations to load. |
[element-type Gio.File] |
encoding |
the GtkSourceEncoding. |
[allow-none] |
line_pos |
the line position to place the cursor |
|
column_pos |
the line column to place the cursor |
void gedit_commands_save_document (GeditWindow *window
,GeditDocument *document
);
Asynchronously save document
. document
must belong to window
. If you need
the result of the operation, use gedit_commands_save_document_async()
.
void gedit_commands_save_document_async (GeditDocument *document
,GeditWindow *window
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously save the document
. document
must belong to window
. The
source object of the async task is document
(which will be the first
parameter of the GAsyncReadyCallback).
When the operation is finished, callback
will be called. You can then call
gedit_commands_save_document_finish()
to get the result of the operation.
document |
the GeditDocument to save. |
|
window |
a GeditWindow. |
|
cancellable |
optional GCancellable object, |
[nullable] |
callback |
a GAsyncReadyCallback to call when the operation is finished. |
[scope async] |
user_data |
the data to pass to the |
[closure] |
Since: 3.14
gboolean gedit_commands_save_document_finish (GeditDocument *document
,GAsyncResult *result
);
Finishes an asynchronous document saving operation started with
gedit_commands_save_document_async()
.
Note that there is no error parameter because the errors are already handled by gedit.
Since: 3.14
void
gedit_commands_save_all_documents (GeditWindow *window
);
Asynchronously save all documents belonging to window
. The result of the
operation is not available, so it's difficult to know whether all the
documents are correctly saved.