GtexProject

GtexProject — A project

Functions

Types and Values

struct GtexProject

Object Hierarchy

    GObject
    ╰── GtexProject

Includes

#include <gtex.h>

Description

GtexProject is represented by a directory and contains a main file in it.

Functions

gtex_project_new ()

GtexProject *
gtex_project_new (GFile *directory,
                  GFile *main_file);

Parameters

directory

the directory.

 

main_file

the main file.

 

Returns

a new GtexProject with a reference count of one, or NULL if main_file doesn't belong to the project as represented by directory .

[transfer full][nullable]


gtex_project_get_directory ()

GFile *
gtex_project_get_directory (GtexProject *project);

Parameters

project

a GtexProject.

 

Returns

the project directory.

[transfer none]


gtex_project_get_main_file ()

GFile *
gtex_project_get_main_file (GtexProject *project);

Parameters

project

a GtexProject.

 

Returns

the project main file.

[transfer none]


gtex_project_set_main_file ()

gboolean
gtex_project_set_main_file (GtexProject *project,
                            GFile *main_file);

Changes the main file of project .

For this operation to be successful, main_file needs to belong to the project .

Parameters

project

a GtexProject.

 

main_file

the new main file.

 

Returns

TRUE if and only if the main file has been successfully changed.


gtex_project_conflict ()

gboolean
gtex_project_conflict (GtexProject *project1,
                       GtexProject *project2);

Checks the projects' directories. There are no concepts of sub-projects, so there is a conflict when a project is inside another, or when their directories are equal.

If project1 and project2 reference the same GtexProject object, FALSE is returned.

Parameters

project1

a GtexProject.

 

project2

a GtexProject.

 

Returns

whether both projects are in conflict.


gtex_project_file_belongs_to ()

gboolean
gtex_project_file_belongs_to (GtexProject *project,
                              GFile *file);

Parameters

project

a GtexProject.

 

file

a GFile.

 

Returns

whether file is strictly inside project . If file is equal to the project 's directory, FALSE is returned.


gtex_project_get_directory_path_for_display ()

gchar *
gtex_project_get_directory_path_for_display
                               (GtexProject *project);

Parameters

project

a GtexProject.

 

Returns

the path to the project directory, for display purposes.

[transfer full]


gtex_project_to_xml ()

gchar *
gtex_project_to_xml (GtexProject *project);

Parameters

project

a GtexProject.

 

Returns

project serialized to XML.

[transfer full]

Types and Values

struct GtexProject

struct GtexProject;