Top | ![]() |
![]() |
![]() |
![]() |
void | ide_vcs_register_ignored () |
IdeBufferChangeMonitor * | ide_vcs_get_buffer_change_monitor () |
GFile * | ide_vcs_get_working_directory () |
void | ide_vcs_new_async () |
IdeVcs * | ide_vcs_new_finish () |
gboolean | ide_vcs_is_ignored () |
gboolean | ide_vcs_path_is_ignored () |
gint | ide_vcs_get_priority () |
void | ide_vcs_emit_changed () |
IdeVcsConfig * | ide_vcs_get_config () |
gchar * | ide_vcs_get_branch_name () |
void | ide_vcs_list_status_async () |
GListModel * | ide_vcs_list_status_finish () |
IdeBufferChangeMonitor * ide_vcs_get_buffer_change_monitor (IdeVcs *self
,IdeBuffer *buffer
);
Gets an IdeBufferChangeMonitor for the buffer provided. If the IdeVcs implementation does not
support change monitoring, or cannot for the current file, then NULL
is returned.
GFile *
ide_vcs_get_working_directory (IdeVcs *self
);
Retrieves the working directory for the context. This is the root of where the project files exist.
This function is safe to call from threads holding a reference to self
.
Since: 3.18
void ide_vcs_new_async (IdeContext *context
,int io_priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
IdeVcs * ide_vcs_new_finish (GAsyncResult *result
,GError **error
);
Completes a call to ide_vcs_new_async()
.
gboolean ide_vcs_is_ignored (IdeVcs *self
,GFile *file
,GError **error
);
This function will check if file
is considered an "ignored file" by
the underlying Version Control System.
For convenience, this function will return TRUE
if file
is NULL
.
If self
is NULL
, only static checks against known ignored files
will be performed (such as .git, .flatpak-builder, etc).
TRUE
if the path should be ignored.
Thread safety: This function is safe to call from a thread as IdeVcs implementations are required to ensure this function is thread-safe.
Since: 3.18
gboolean ide_vcs_path_is_ignored (IdeVcs *self
,const gchar *path
,GError **error
);
This function acts like ide_vcs_is_ignored()
except that it
allows for using a regular file-system path.
It will check if the path is absolute or relative to the project directory and adjust as necessary.
For convenience, this function will return TRUE
if path
is NULL
.
If self
is NULL
, only registered ignore patterns will be checked.
TRUE
if the path should be ignored.
Thread safety: This function is safe to call from a thread as IdeVcs implementations are required to ensure this function is thread-safe.
Since: 3.28
IdeVcsConfig *
ide_vcs_get_config (IdeVcs *self
);
Retrieves an IdeVcsConfig for the IdeVcs provided. If the IdeVcs implementation does not
support access to configuration, then NULL
is returned.
gchar *
ide_vcs_get_branch_name (IdeVcs *self
);
Retrieves the name of the branch in the current working directory.
void ide_vcs_list_status_async (IdeVcs *self
,GFile *directory_or_file
,gboolean include_descendants
,gint io_priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Retrieves the status of the files matching the request. If
directory_or_file
is a directory, then all files within that directory
will be scanned for changes. If include_descendants
is TRUE
, the
IdeVcs will scan sub-directories for changes as well.
The function specified by callback
should call ide_vcs_list_status_finish()
to retrieve the result of this asynchronous operation.
self |
a IdeVcs |
|
directory_or_file |
a GFile containing a file or directory within the working tree to retrieve the status of. |
|
include_descendants |
if descendants of |
|
io_priority |
a priority for the IO, such as |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
a callback for the operation |
|
user_data |
closure data for |
Since: 3.28
GListModel * ide_vcs_list_status_finish (IdeVcs *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to ide_vcs_list_status_async()
.
The result of this function is a GListModel containing objects that are IdeVcsFileInfo.
self |
a IdeVcs |
|
result |
a GAsyncResult provided to the callback |
|
error |
a location for a GError |
A GListModel containing an IdeVcsFileInfo for each of the files scanned
by the IdeVcs. Upon failure, NULL
is returned and error
is set.
[transfer full][nullable]
Since: 3.28
struct IdeVcsInterface { GTypeInterface parent_interface; GFile *(*get_working_directory) (IdeVcs *self); IdeBufferChangeMonitor *(*get_buffer_change_monitor) (IdeVcs *self, IdeBuffer *buffer); gboolean (*is_ignored) (IdeVcs *self, GFile *file, GError **error); gint (*get_priority) (IdeVcs *self); void (*changed) (IdeVcs *self); IdeVcsConfig *(*get_config) (IdeVcs *self); gchar *(*get_branch_name) (IdeVcs *self); void (*list_status_async) (IdeVcs *self, GFile *directory_or_file, gboolean include_descendants, gint io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GListModel *(*list_status_finish) (IdeVcs *self, GAsyncResult *result, GError **error); };
“branch-name”
property “branch-name” gchar *
The current name of the branch.
Flags: Read
Default value: NULL
“changed”
signalvoid user_function (IdeVcs *idevcs, gpointer user_data)
The "changed" signal should be emitted when the VCS has detected a change to the underlying VCS storage. This can be used by consumers to reload their respective data structures.
Flags: Run Last