IdeBuildSystem

IdeBuildSystem

Functions

Properties

GFile * project-file Read / Write / Construct Only

Types and Values

Object Hierarchy

    GInterface
    ╰── IdeBuildSystem

Prerequisites

IdeBuildSystem requires IdeObject.

Known Implementations

IdeBuildSystem is implemented by IdeFallbackBuildSystem.

Description

Functions

ide_build_system_from_context ()

IdeBuildSystem *
ide_build_system_from_context (IdeContext *context);

Gets the build system for the context. If no build system has been registered, then this returns NULL.

Parameters

context

a IdeContext

 

Returns

an IdeBuildSystem.

[transfer none][nullable]

Since: 3.32


ide_build_system_get_id ()

gchar *
ide_build_system_get_id (IdeBuildSystem *self);

ide_build_system_get_display_name ()

gchar *
ide_build_system_get_display_name (IdeBuildSystem *self);

ide_build_system_get_priority ()

gint
ide_build_system_get_priority (IdeBuildSystem *self);

ide_build_system_get_builddir ()

gchar *
ide_build_system_get_builddir (IdeBuildSystem *self,
                               IdePipeline *pipeline);

ide_build_system_get_project_version ()

gchar *
ide_build_system_get_project_version (IdeBuildSystem *self);

If the build system supports it, gets the project version as configured in the build system's configuration files.

Parameters

self

a IdeBuildSystem

 

Returns

a string containing the project version.

[transfer full][nullable]

Since: 3.32


ide_build_system_get_build_flags_async ()

void
ide_build_system_get_build_flags_async
                               (IdeBuildSystem *self,
                                GFile *file,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

ide_build_system_get_build_flags_finish ()

gchar **
ide_build_system_get_build_flags_finish
                               (IdeBuildSystem *self,
                                GAsyncResult *result,
                                GError **error);

Returns

.

[transfer full]

Since: 3.32


ide_build_system_get_build_flags_for_files_async ()

void
ide_build_system_get_build_flags_for_files_async
                               (IdeBuildSystem *self,
                                GPtrArray *files,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

This function will get build flags for all files and returns map of file and its build flags as GHashTable.

Parameters

self

An IdeBuildSystem instance.

 

files

array of files whose build flags has to be retrieved.

[element-type GFile][transfer none]

cancellable

a GCancellable to cancel getting build flags.

[allow-none]

callback

function to be called after getting build flags.

 

user_data

data to pass to callback .

 

Since: 3.32


ide_build_system_get_build_flags_for_files_finish ()

GHashTable *
ide_build_system_get_build_flags_for_files_finish
                               (IdeBuildSystem *self,
                                GAsyncResult *result,
                                GError **error);

Parameters

self

an IdeBuildSystem

 

result

a GAsyncResult

 

error

a location for a GError or NULL

 

Returns

a GHashTable or GFile to GStrv.

[element-type Ide.File GStrv][transfer full]

Since: 3.32


ide_build_system_get_build_flags_for_dir_async ()

void
ide_build_system_get_build_flags_for_dir_async
                               (IdeBuildSystem *self,
                                GFile *directory,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

ide_build_system_get_build_flags_for_dir_finish ()

GHashTable *
ide_build_system_get_build_flags_for_dir_finish
                               (IdeBuildSystem *self,
                                GAsyncResult *result,
                                GError **error);

Parameters

self

an IdeBuildSystem

 

result

a GAsyncResult

 

error

a location for a GError or NULL

 

Returns

a GHashTable of GFile to GStrv.

[element-type Ide.File GStrv][transfer full]

Since: 3.32


ide_build_system_supports_toolchain ()

gboolean
ide_build_system_supports_toolchain (IdeBuildSystem *self,
                                     IdeToolchain *toolchain);

Checks whether the build system supports the given toolchain.

Parameters

self

an IdeBuildSystem

 

toolchain

a IdeToolchain

 

Returns

TRUE if the toolchain is supported by the build system, FALSE otherwise

Since: 3.32

Types and Values

IDE_TYPE_BUILD_SYSTEM

#define IDE_TYPE_BUILD_SYSTEM (ide_build_system_get_type())

struct IdeBuildSystemInterface

struct IdeBuildSystemInterface {
  GTypeInterface parent_iface;

  gint        (*get_priority)                      (IdeBuildSystem       *self);
  void        (*get_build_flags_async)             (IdeBuildSystem       *self,
                                                    GFile                *file,
                                                    GCancellable         *cancellable,
                                                    GAsyncReadyCallback   callback,
                                                    gpointer              user_data);
  gchar     **(*get_build_flags_finish)            (IdeBuildSystem       *self,
                                                    GAsyncResult         *result,
                                                    GError              **error);
  void        (*get_build_flags_for_files_async)   (IdeBuildSystem       *self,
                                                    GPtrArray            *files,
                                                    GCancellable         *cancellable,
                                                    GAsyncReadyCallback   callback,
                                                    gpointer              user_data);
  GHashTable *(*get_build_flags_for_files_finish)  (IdeBuildSystem       *self,
                                                    GAsyncResult         *result,
                                                    GError              **error);
  gchar      *(*get_builddir)                      (IdeBuildSystem       *self,
                                                    IdePipeline     *pipeline);
  gchar      *(*get_id)                            (IdeBuildSystem       *self);
  gchar      *(*get_display_name)                  (IdeBuildSystem       *self);
  gboolean    (*supports_toolchain)                (IdeBuildSystem       *self,
                                                    IdeToolchain         *toolchain);
  gchar      *(*get_project_version)               (IdeBuildSystem       *self);
};

IdeBuildSystem

typedef struct _IdeBuildSystem IdeBuildSystem;

Property Details

The “project-file” property

  “project-file”             GFile *

The project file.

Flags: Read / Write / Construct Only