ide-run-manager: Builder SDK Reference

## ide-run-manager ide-run-manager |

## Functions

void | (*IdeRunHandler) ()
IdeRunManager * | ide_run_manager_from_context ()
IdeBuildTarget * | ide_run_manager_get_build_target ()
void | ide_run_manager_set_build_target ()
void | ide_run_manager_cancel ()
gboolean | ide_run_manager_get_busy ()
const gchar * | ide_run_manager_get_handler ()
void | ide_run_manager_set_handler ()
void | ide_run_manager_add_handler ()
void | ide_run_manager_remove_handler ()
void | ide_run_manager_run_async ()
gboolean | ide_run_manager_run_finish ()
void | ide_run_manager_discover_default_target_async ()
IdeBuildTarget * | ide_run_manager_discover_default_target_finish ()

## Properties

IdeBuildTarget * | build-target | Read / Write
gboolean | busy | Read
gchar * | handler | Read

## Signals

void | run | Run Last
void | stopped | Run Last

## Types and Values

#define | IDE_TYPE_RUN_MANAGER
| IdeRunManager

## Object Hierarchy

        GObject
        ╰── IdeObject
            ╰── IdeRunManager

## Implemented Interfaces

IdeRunManager implements GInitable and GActionGroup.

## Description

## Functions

### IdeRunHandler ()

    void
    (*IdeRunHandler) (IdeRunManager *self,
                      IdeRunner *runner,
                      gpointer user_data);

### ide_run_manager_from_context ()

    IdeRunManager *
    ide_run_manager_from_context (IdeContext *context);

#### Parameters

context | a IdeContext |

#### Returns

an IdeRunManager.

[transfer none]

Since: 3.32

### ide_run_manager_get_build_target ()

    IdeBuildTarget *
    ide_run_manager_get_build_target (IdeRunManager *self);

Gets the build target that will be executed by the run manager which was either specified to `ide_run_manager_run_async()` or determined by the build system.

#### Returns

An IdeBuildTarget or `NULL` if no build target has been set.

[transfer none]

Since: 3.32

### ide_run_manager_set_build_target ()

    void
    ide_run_manager_set_build_target (IdeRunManager *self,
                                      IdeBuildTarget *build_target);

### ide_run_manager_cancel ()

    void
    ide_run_manager_cancel (IdeRunManager *self);

### ide_run_manager_get_busy ()

    gboolean
    ide_run_manager_get_busy (IdeRunManager *self);

### ide_run_manager_get_handler ()

    const gchar *
    ide_run_manager_get_handler (IdeRunManager *self);

### ide_run_manager_set_handler ()

    void
    ide_run_manager_set_handler (IdeRunManager *self,
                                 const gchar *id);

### ide_run_manager_add_handler ()

    void
    ide_run_manager_add_handler (IdeRunManager *self,
                                 const gchar *id,
                                 const gchar *title,
                                 const gchar *icon_name,
                                 const gchar *accel,
                                 IdeRunHandler run_handler,
                                 gpointer user_data,
                                 GDestroyNotify user_data_destroy);

### ide_run_manager_remove_handler ()

    void
    ide_run_manager_remove_handler (IdeRunManager *self,
                                    const gchar *id);

### ide_run_manager_run_async ()

    void
    ide_run_manager_run_async (IdeRunManager *self,
                               IdeBuildTarget *build_target,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

### ide_run_manager_run_finish ()

    gboolean
    ide_run_manager_run_finish (IdeRunManager *self,
                                GAsyncResult *result,
                                GError **error);

### ide_run_manager_discover_default_target_async ()

    void
    ide_run_manager_discover_default_target_async
                                   (IdeRunManager *self,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

### ide_run_manager_discover_default_target_finish ()

    IdeBuildTarget *
    ide_run_manager_discover_default_target_finish
                                   (IdeRunManager *self,
                                    GAsyncResult *result,
                                    GError **error);

#### Returns

An IdeBuildTarget if successful; otherwise `NULL` and `error` is set.

[transfer full]

Since: 3.32

## Types and Values

### IDE_TYPE_RUN_MANAGER

    #define IDE_TYPE_RUN_MANAGER (ide_run_manager_get_type())

### IdeRunManager

    typedef struct _IdeRunManager IdeRunManager;

## Property Details

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

      “build-target”             IdeBuildTarget *

The IdeBuildTarget that will be run.

Owner: IdeRunManager

Flags: Read / Write

### The `“busy”` property

      “busy”                     gboolean

Busy.

Owner: IdeRunManager

Flags: Read

Default value: FALSE

### The `“handler”` property

      “handler”                  gchar *

Handler.

Owner: IdeRunManager

Flags: Read

Default value: "run"

## Signal Details

### The `“run”` signal

    void
    user_function (IdeRunManager *self,
                   IdeRunner     *runner,
                   gpointer       user_data)

This signal is emitted right before `ide_runner_run_async()` is called on an IdeRunner. It can be used by plugins to tweak things right before the runner is executed.

The current run handler (debugger, profiler, etc) is run as the default handler for this function. So connect with `G_SIGNAL_AFTER` if you want to be nofied after the run handler has executed. It's unwise to change things that the run handler might expect. Generally if you want to change settings, do that before the run handler has exected.

#### Parameters

self | An IdeRunManager |
runner | An IdeRunner |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“stopped”` signal

    void
    user_function (IdeRunManager *iderunmanager,
                   gpointer       user_data)

This signal is emitted when the run manager has stopped the currently executing inferior.

#### Parameters

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

Flags: Run Last

Since: 3.32