Interface
IdeVcs
Prerequisite
In order to implement Vcs, your type must inherit fromIdeObject
.
Instance methods
ide_vcs_get_config
Retrieves an IdeVcsConfig
for the IdeVcs
provided. If the IdeVcs
implementation does not
support access to configuration, then NULL
is returned.
ide_vcs_get_workdir
Retrieves the working directory for the context. This is the root of where the project files exist.
ide_vcs_is_ignored
This function will check if file
is considered an “ignored file” by
the underlying Version Control System.
ide_vcs_list_status_async
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.
ide_vcs_path_is_ignored
This function acts like ide_vcs_is_ignored()
except that it
allows for using a regular file-system path.
Signals
Ide.Vcs::changed
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.
Interface structure
struct IdeVcsInterface {
GTypeInterface parent_interface;
char* (* get_display_name) (
IdeVcs* self
);
GFile* (* get_workdir) (
IdeVcs* self
);
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
);
void (* list_branches_async) (
IdeVcs* self,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
GPtrArray* (* list_branches_finish) (
IdeVcs* self,
GAsyncResult* result,
GError** error
);
void (* list_tags_async) (
IdeVcs* self,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
GPtrArray* (* list_tags_finish) (
IdeVcs* self,
GAsyncResult* result,
GError** error
);
void (* switch_branch_async) (
IdeVcs* self,
IdeVcsBranch* branch,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
gboolean (* switch_branch_finish) (
IdeVcs* self,
GAsyncResult* result,
GError** error
);
void (* push_branch_async) (
IdeVcs* self,
IdeVcsBranch* branch,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
gboolean (* push_branch_finish) (
IdeVcs* self,
GAsyncResult* result,
GError** error
);
}
Interface members
parent_interface |
|
No description available. | |
get_display_name |
|
No description available. | |
get_workdir |
|
No description available. | |
is_ignored |
|
No description available. | |
get_priority |
|
No description available. | |
changed |
|
No description available. | |
get_config |
|
No description available. | |
get_branch_name |
|
No description available. | |
list_status_async |
|
No description available. | |
list_status_finish |
|
No description available. | |
list_branches_async |
|
No description available. | |
list_branches_finish |
|
No description available. | |
list_tags_async |
|
No description available. | |
list_tags_finish |
|
No description available. | |
switch_branch_async |
|
No description available. | |
switch_branch_finish |
|
No description available. | |
push_branch_async |
|
No description available. | |
push_branch_finish |
|
No description available. |
Virtual methods
Ide.Vcs.get_config
Retrieves an IdeVcsConfig
for the IdeVcs
provided. If the IdeVcs
implementation does not
support access to configuration, then NULL
is returned.
Ide.Vcs.get_workdir
Retrieves the working directory for the context. This is the root of where the project files exist.
Ide.Vcs.is_ignored
This function will check if file
is considered an “ignored file” by
the underlying Version Control System.
Ide.Vcs.list_status_async
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.