IdeConfig: Builder SDK Reference

## IdeConfig IdeConfig |

## Functions

const gchar * | ide_config_get_append_path ()
void | ide_config_set_append_path ()
const gchar * | ide_config_get_id ()
const gchar * | ide_config_get_runtime_id ()
void | ide_config_set_runtime_id ()
const gchar * | ide_config_get_toolchain_id ()
void | ide_config_set_toolchain_id ()
gboolean | ide_config_get_dirty ()
void | ide_config_set_dirty ()
const gchar * | ide_config_get_display_name ()
void | ide_config_set_display_name ()
IdeBuildLocality | ide_config_get_locality ()
void | ide_config_set_locality ()
gboolean | ide_config_get_ready ()
IdeRuntime * | ide_config_get_runtime ()
void | ide_config_set_runtime ()
IdeToolchain * | ide_config_get_toolchain ()
void | ide_config_set_toolchain ()
gchar ** | ide_config_get_environ ()
const gchar * | ide_config_getenv ()
void | ide_config_setenv ()
gboolean | ide_config_get_debug ()
void | ide_config_set_debug ()
const gchar * | ide_config_get_prefix ()
void | ide_config_set_prefix ()
const gchar * | ide_config_get_config_opts ()
void | ide_config_set_config_opts ()
const gchar * | ide_config_get_run_opts ()
void | ide_config_set_run_opts ()
const gchar * const * | ide_config_get_build_commands ()
void | ide_config_set_build_commands ()
GFile * | ide_config_get_build_commands_dir ()
void | ide_config_set_build_commands_dir ()
const gchar * const * | ide_config_get_post_install_commands ()
void | ide_config_set_post_install_commands ()
gint | ide_config_get_parallelism ()
void | ide_config_set_parallelism ()
IdeEnvironment * | ide_config_get_environment ()
void | ide_config_set_environment ()
guint | ide_config_get_sequence ()
const gchar * | ide_config_get_app_id ()
void | ide_config_set_app_id ()
void | ide_config_apply_path ()
gboolean | ide_config_supports_runtime ()
const gchar * | ide_config_get_internal_string ()
void | ide_config_set_internal_string ()
const gchar * const * | ide_config_get_internal_strv ()
void | ide_config_set_internal_strv ()
gboolean | ide_config_get_internal_boolean ()
void | ide_config_set_internal_boolean ()
gint | ide_config_get_internal_int ()
void | ide_config_set_internal_int ()
gint64 | ide_config_get_internal_int64 ()
void | ide_config_set_internal_int64 ()
gpointer | ide_config_get_internal_object ()
void | ide_config_set_internal_object ()

## Properties

gchar * | app-id | Read / Write
gchar * | append-path | Read / Write
GStrv | build-commands | Read / Write
GFile * | build-commands-dir | Read / Write
gchar * | config-opts | Read / Write
gboolean | debug | Read / Write
gboolean | dirty | Read / Write
gchar * | display-name | Read / Write
GStrv | environ | Read
gchar * | id | Read / Write / Construct Only
IdeBuildLocality | locality | Read / Write
gint | parallelism | Read / Write
GStrv | post-install-commands | Read / Write
gchar * | prefix | Read / Write
gboolean | ready | Read
gchar * | run-opts | Read / Write
IdeRuntime * | runtime | Read / Write
gchar * | runtime-id | Read / Write
IdeToolchain * | toolchain | Read / Write
gchar * | toolchain-id | Read / Write

## Signals

void | changed | Run Last

## Types and Values

#define | IDE_TYPE_CONFIG
enum | IdeBuildLocality
struct | IdeConfigClass
| IdeConfig

## Object Hierarchy

        GFlags
        ╰── IdeBuildLocality
        GObject
        ╰── IdeObject
            ╰── IdeConfig

## Description

## Functions

### ide_config_get_append_path ()

    const gchar *
    ide_config_get_append_path (IdeConfig *self);

### ide_config_set_append_path ()

    void
    ide_config_set_append_path (IdeConfig *self,
                                const gchar *append_path);

### ide_config_get_id ()

    const gchar *
    ide_config_get_id (IdeConfig *self);

### ide_config_get_runtime_id ()

    const gchar *
    ide_config_get_runtime_id (IdeConfig *self);

### ide_config_set_runtime_id ()

    void
    ide_config_set_runtime_id (IdeConfig *self,
                               const gchar *runtime_id);

### ide_config_get_toolchain_id ()

    const gchar *
    ide_config_get_toolchain_id (IdeConfig *self);

Gets the toolchain id for the configuration.

#### Parameters

self | An IdeConfig |

#### Returns

The id of an IdeToolchain or `NULL`.

[transfer none][nullable]

Since: 3.32

### ide_config_set_toolchain_id ()

    void
    ide_config_set_toolchain_id (IdeConfig *self,
                                 const gchar *toolchain_id);

Sets the toolchain id for the configuration.

#### Parameters

self | An IdeConfig |
toolchain_id | The id of an IdeToolchain |

Since: 3.32

### ide_config_get_dirty ()

    gboolean
    ide_config_get_dirty (IdeConfig *self);

### ide_config_set_dirty ()

    void
    ide_config_set_dirty (IdeConfig *self,
                          gboolean dirty);

### ide_config_get_display_name ()

    const gchar *
    ide_config_get_display_name (IdeConfig *self);

### ide_config_set_display_name ()

    void
    ide_config_set_display_name (IdeConfig *self,
                                 const gchar *display_name);

### ide_config_get_locality ()

    IdeBuildLocality
    ide_config_get_locality (IdeConfig *self);

### ide_config_set_locality ()

    void
    ide_config_set_locality (IdeConfig *self,
                             IdeBuildLocality locality);

### ide_config_get_ready ()

    gboolean
    ide_config_get_ready (IdeConfig *self);

Determines if the configuration is ready for use.

#### Parameters

self | An IdeConfig |

#### Returns

`TRUE` if the configuration is ready for use.

Since: 3.32

### ide_config_get_runtime ()

    IdeRuntime *
    ide_config_get_runtime (IdeConfig *self);

Gets the runtime for the configuration.

#### Parameters

self | An IdeConfig |

#### Returns

An IdeRuntime.

[transfer none][nullable]

Since: 3.32

### ide_config_set_runtime ()

    void
    ide_config_set_runtime (IdeConfig *self,
                            IdeRuntime *runtime);

### ide_config_get_toolchain ()

    IdeToolchain *
    ide_config_get_toolchain (IdeConfig *self);

Gets the toolchain for the configuration.

#### Parameters

self | An IdeConfig |

#### Returns

An IdeToolchain.

[transfer full][nullable]

Since: 3.32

### ide_config_set_toolchain ()

    void
    ide_config_set_toolchain (IdeConfig *self,
                              IdeToolchain *toolchain);

Sets the toolchain for the configuration.

#### Parameters

self | An IdeConfig |
toolchain | An IdeToolchain or `NULL` to use the default one. | [nullable]

Since: 3.32

### ide_config_get_environ ()

    gchar **
    ide_config_get_environ (IdeConfig *self);

Gets the environment to use when spawning processes.

#### Parameters

self | An IdeConfig |

#### Returns

An array of key=value environment variables.

[transfer full]

Since: 3.32

### ide_config_getenv ()

    const gchar *
    ide_config_getenv (IdeConfig *self,
                       const gchar *key);

### ide_config_setenv ()

    void
    ide_config_setenv (IdeConfig *self,
                       const gchar *key,
                       const gchar *value);

### ide_config_get_debug ()

    gboolean
    ide_config_get_debug (IdeConfig *self);

### ide_config_set_debug ()

    void
    ide_config_set_debug (IdeConfig *self,
                          gboolean debug);

### ide_config_get_prefix ()

    const gchar *
    ide_config_get_prefix (IdeConfig *self);

### ide_config_set_prefix ()

    void
    ide_config_set_prefix (IdeConfig *self,
                           const gchar *prefix);

### ide_config_get_config_opts ()

    const gchar *
    ide_config_get_config_opts (IdeConfig *self);

### ide_config_set_config_opts ()

    void
    ide_config_set_config_opts (IdeConfig *self,
                                const gchar *config_opts);

### ide_config_get_run_opts ()

    const gchar *
    ide_config_get_run_opts (IdeConfig *self);

Gets the command line options to use when running the target application. The result should be parsed with `g_shell_parse_argv()` to convert the run options to an array suitable for use in argv.

#### Parameters

self | a IdeConfig |

#### Returns

A string containing the run options or `NULL` if none have been set.

[transfer none][nullable]

Since: 3.32

### ide_config_set_run_opts ()

    void
    ide_config_set_run_opts (IdeConfig *self,
                             const gchar *run_opts);

Sets the run options to use when running the target application. See `ide_config_get_run_opts()` for more information.

#### Parameters

self | a IdeConfig |
run_opts | the run options for the target application. | [nullable]

Since: 3.32

### ide_config_get_build_commands ()

    const gchar * const  *
    ide_config_get_build_commands (IdeConfig *self);

### ide_config_set_build_commands ()

    void
    ide_config_set_build_commands (IdeConfig *self,
                                   const gchar *const *build_commands);

### ide_config_get_build_commands_dir ()

    GFile *
    ide_config_get_build_commands_dir (IdeConfig *self);

#### Parameters

self | a IdeConfig |

#### Returns

a GFile or `NULL`.

[transfer none][nullable]

Since: 3.32

### ide_config_set_build_commands_dir ()

    void
    ide_config_set_build_commands_dir (IdeConfig *self,
                                       GFile *build_commands_dir);

### ide_config_get_post_install_commands ()

    const gchar * const  *
    ide_config_get_post_install_commands (IdeConfig *self);

### ide_config_set_post_install_commands ()

    void
    ide_config_set_post_install_commands (IdeConfig *self,
                                          const gchar *const *post_install_commands);

### ide_config_get_parallelism ()

    gint
    ide_config_get_parallelism (IdeConfig *self);

### ide_config_set_parallelism ()

    void
    ide_config_set_parallelism (IdeConfig *self,
                                gint parallelism);

### ide_config_get_environment ()

    IdeEnvironment *
    ide_config_get_environment (IdeConfig *self);

#### Returns

An IdeEnvironment.

[transfer none]

Since: 3.32

### ide_config_set_environment ()

    void
    ide_config_set_environment (IdeConfig *self,
                                IdeEnvironment *environment);

### ide_config_get_sequence ()

    guint
    ide_config_get_sequence (IdeConfig *self);

This returns a sequence number for the configuration. This is useful for build systems that want to clear the "dirty" bit on the configuration so that they need not bootstrap a second time. This should be done by checking the sequence number before executing the bootstrap, and only cleared if the sequence number matches after performing the bootstrap. This indicates no changes have been made to the configuration in the mean time.

#### Parameters

self | An IdeConfig |

#### Returns

A monotonic sequence number.

Since: 3.32

### ide_config_get_app_id ()

    const gchar *
    ide_config_get_app_id (IdeConfig *self);

Gets the application ID for the configuration.

#### Parameters

self | An IdeConfig |

#### Returns

A string.

[transfer none][nullable]

Since: 3.32

### ide_config_set_app_id ()

    void
    ide_config_set_app_id (IdeConfig *self,
                           const gchar *app_id);

### ide_config_apply_path ()

    void
    ide_config_apply_path (IdeConfig *self,
                           IdeSubprocessLauncher *launcher);

### ide_config_supports_runtime ()

    gboolean
    ide_config_supports_runtime (IdeConfig *self,
                                 IdeRuntime *runtime);

### ide_config_get_internal_string ()

    const gchar *
    ide_config_get_internal_string (IdeConfig *self,
                                    const gchar *key);

### ide_config_set_internal_string ()

    void
    ide_config_set_internal_string (IdeConfig *self,
                                    const gchar *key,
                                    const gchar *value);

### ide_config_get_internal_strv ()

    const gchar * const  *
    ide_config_get_internal_strv (IdeConfig *self,
                                  const gchar *key);

### ide_config_set_internal_strv ()

    void
    ide_config_set_internal_strv (IdeConfig *self,
                                  const gchar *key,
                                  const gchar *const *value);

### ide_config_get_internal_boolean ()

    gboolean
    ide_config_get_internal_boolean (IdeConfig *self,
                                     const gchar *key);

### ide_config_set_internal_boolean ()

    void
    ide_config_set_internal_boolean (IdeConfig *self,
                                     const gchar *key,
                                     gboolean value);

### ide_config_get_internal_int ()

    gint
    ide_config_get_internal_int (IdeConfig *self,
                                 const gchar *key);

### ide_config_set_internal_int ()

    void
    ide_config_set_internal_int (IdeConfig *self,
                                 const gchar *key,
                                 gint value);

### ide_config_get_internal_int64 ()

    gint64
    ide_config_get_internal_int64 (IdeConfig *self,
                                   const gchar *key);

### ide_config_set_internal_int64 ()

    void
    ide_config_set_internal_int64 (IdeConfig *self,
                                   const gchar *key,
                                   gint64 value);

### ide_config_get_internal_object ()

    gpointer
    ide_config_get_internal_object (IdeConfig *self,
                                    const gchar *key);

Gets the value associated with `key` if it is a GObject.

#### Parameters

self | An IdeConfig |
key | The key to get |

#### Returns

a GObject or `NULL`.

[nullable][transfer none][type GObject.Object]

Since: 3.32

### ide_config_set_internal_object ()

    void
    ide_config_set_internal_object (IdeConfig *self,
                                    const gchar *key,
                                    gpointer instance);

Sets the value for `key` to `instance` .

#### Parameters

self | an IdeConfig |
key | the key to set |
instance | a GObject or `NULL`. | [type GObject.Object][nullable]

Since: 3.32

## Types and Values

### IDE_TYPE_CONFIG

    #define IDE_TYPE_CONFIG (ide_config_get_type())

### enum IdeBuildLocality

#### Members

IDE_BUILD_LOCALITY_IN_TREE |  |
IDE_BUILD_LOCALITY_OUT_OF_TREE |  |
IDE_BUILD_LOCALITY_DEFAULT |  |

### struct IdeConfigClass

    struct IdeConfigClass {
      IdeObjectClass parent;

      IdeRuntime *(*get_runtime)      (IdeConfig *self);
      void        (*set_runtime)      (IdeConfig *self,
                                       IdeRuntime       *runtime);
      gboolean    (*supports_runtime) (IdeConfig *self,
                                       IdeRuntime       *runtime);
    };

### IdeConfig

    typedef struct _IdeConfig IdeConfig;

## Property Details

### The `“app-id”` property

      “app-id”                   gchar *

The application ID (such as org.gnome.Builder).

Flags: Read / Write

Default value: NULL

### The `“append-path”` property

      “append-path”              gchar *

Append to PATH environment variable.

Flags: Read / Write

Default value: NULL

### The `“build-commands”` property

      “build-commands”           GStrv

Build commands.

Flags: Read / Write

### The `“build-commands-dir”` property

      “build-commands-dir”       GFile *

Directory to run build commands from.

Flags: Read / Write

### The `“config-opts”` property

      “config-opts”              gchar *

Parameters to bootstrap the project.

Flags: Read / Write

Default value: NULL

### The `“debug”` property

      “debug”                    gboolean

Debug.

Flags: Read / Write

Default value: TRUE

### The `“dirty”` property

      “dirty”                    gboolean

If the configuration has been changed.

Flags: Read / Write

Default value: FALSE

### The `“display-name”` property

      “display-name”             gchar *

Display Name.

Flags: Read / Write

Default value: NULL

### The `“environ”` property

      “environ”                  GStrv

Environ.

Flags: Read

### The `“id”` property

      “id”                       gchar *

Id.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“locality”` property

      “locality”                 IdeBuildLocality

Where the build may occur.

Flags: Read / Write

Default value: IDE_BUILD_LOCALITY_IN_TREE | IDE_BUILD_LOCALITY_OUT_OF_TREE

### The `“parallelism”` property

      “parallelism”              gint

Parallelism.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“post-install-commands”` property

      “post-install-commands”    GStrv

Post install commands.

Flags: Read / Write

### The `“prefix”` property

      “prefix”                   gchar *

Prefix.

Flags: Read / Write

Default value: NULL

### The `“ready”` property

      “ready”                    gboolean

If the configuration can be used for building.

Flags: Read

Default value: FALSE

### The `“run-opts”` property

      “run-opts”                 gchar *

The options for running the target application.

Flags: Read / Write

Default value: NULL

### The `“runtime”` property

      “runtime”                  IdeRuntime *

Runtime.

Flags: Read / Write

### The `“runtime-id”` property

      “runtime-id”               gchar *

The identifier of the runtime.

Flags: Read / Write

Default value: "host"

### The `“toolchain”` property

      “toolchain”                IdeToolchain *

Toolchain.

Flags: Read / Write

### The `“toolchain-id”` property

      “toolchain-id”             gchar *

The identifier of the toolchain.

Flags: Read / Write

Default value: "default"

## Signal Details

### The `“changed”` signal

    void
    user_function (IdeConfig *ideconfig,
                   gpointer   user_data)

Flags: Run Last