## ide-vcs-monitor ide-vcs-monitor |

## Functions

IdeVcsMonitor * | ide_vcs_monitor_from_context ()
IdeVcsFileInfo * | ide_vcs_monitor_ref_info ()
GFile * | ide_vcs_monitor_ref_root ()
void | ide_vcs_monitor_set_root ()
IdeVcs * | ide_vcs_monitor_ref_vcs ()
void | ide_vcs_monitor_set_vcs ()
guint64 | ide_vcs_monitor_get_sequence ()

## Properties

GFile * | root | Read / Write
IdeVcs * | vcs | Read / Write

## Signals

void | changed | Run Last
void | reloaded | Run Last

## Types and Values

#define | IDE_TYPE_VCS_MONITOR
| IdeVcsMonitor

## Object Hierarchy

        GObject
        ╰── IdeObject
            ╰── IdeVcsMonitor

## Description

## Functions

### ide_vcs_monitor_from_context ()

    IdeVcsMonitor *
    ide_vcs_monitor_from_context (IdeContext *context);

Gets the IdeVcsMonitor for a context.

#### Parameters

context | an IdeContext |

#### Returns

an IdeVcsMonitor.

[nullable][transfer none]

Since: 3.32

### ide_vcs_monitor_ref_info ()

    IdeVcsFileInfo *
    ide_vcs_monitor_ref_info (IdeVcsMonitor *self,
                              GFile *file);

Gets an IdeVcsFileInfo for the given `file` .

If the file information has not been loaded, `NULL` is returned. You can wait for “reloaded” and query again if you expect the info to be there.

#### Parameters

self | a IdeVcsMonitor |
file | a GFile |

#### Returns

an IdeVcsFileInfo or `NULL`.

[transfer full][nullable]

Since: 3.32

### ide_vcs_monitor_ref_root ()

    GFile *
    ide_vcs_monitor_ref_root (IdeVcsMonitor *self);

Gets the “root” property and increments the reference count of the GFile by one.

#### Parameters

self | a IdeVcsMonitor |

#### Returns

a GFile or `NULL`.

[transfer full][nullable]

Since: 3.32

### ide_vcs_monitor_set_root ()

    void
    ide_vcs_monitor_set_root (IdeVcsMonitor *self,
                              GFile *file);

### ide_vcs_monitor_ref_vcs ()

    IdeVcs *
    ide_vcs_monitor_ref_vcs (IdeVcsMonitor *self);

Increments the reference count of the IdeVcs monitored using the IdeVcsMonitor and returns it.

#### Parameters

self | a IdeVcsMonitor |

#### Returns

an IdeVcs or `NULL`.

[transfer full][nullable]

Since: 3.32

### ide_vcs_monitor_set_vcs ()

    void
    ide_vcs_monitor_set_vcs (IdeVcsMonitor *self,
                             IdeVcs *vcs);

### ide_vcs_monitor_get_sequence ()

    guint64
    ide_vcs_monitor_get_sequence (IdeVcsMonitor *self);

## Types and Values

### IDE_TYPE_VCS_MONITOR

    #define IDE_TYPE_VCS_MONITOR (ide_vcs_monitor_get_type())

### IdeVcsMonitor

    typedef struct _IdeVcsMonitor IdeVcsMonitor;

## Property Details

### The `“root”` property

      “root”                     GFile *

The "root" property is the root of the file-system to begin monitoring for changes.

Owner: IdeVcsMonitor

Flags: Read / Write

Since: 3.32

### The `“vcs”` property

      “vcs”                      IdeVcs *

The "vcs" property is the version control system to be queried for additional status information when a file has been discovered to have been changed.

Owner: IdeVcsMonitor

Flags: Read / Write

Since: 3.32

## Signal Details

### The `“changed”` signal

    void
    user_function (IdeVcsMonitor    *self,
                   GFile            *file,
                   GFile            *other_file,
                   GFileMonitorEvent event,
                   gpointer          user_data)

The "changed" signal is emitted when a file has been discovered to have been changed on disk.

#### Parameters

self | an IdeVcsMonitor |
file | a GFile |
other_file | a GFile or `NULL`. | [nullable]
event | a GFileMonitorEvent |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“reloaded”` signal

    void
    user_function (IdeVcsMonitor *self,
                   gpointer       user_data)

The "reloaded" signal is emitted when the monitor has been reloaded.

#### Parameters

self | an IdeVcsMonitor |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32