## OGMJobSpawn

OGMJobSpawn — Base class for all spawns

## Functions

gint | ogmjob_spawn_run ()
void | ogmjob_spawn_cancel ()
void | ogmjob_spawn_suspend ()
void | ogmjob_spawn_resume ()
void | ogmjob_spawn_set_async ()
gboolean | ogmjob_spawn_get_async ()
OGMJobSpawn * | ogmjob_spawn_get_parent ()
void | ogmjob_spawn_set_parent ()
void | ogmjob_spawn_propagate_error ()

## Signals

void | cancel | No Hooks
void | progress | No Hooks
void | resume | No Hooks
gint | run | No Hooks
void | suspend | No Hooks

## Types and Values

struct | OGMJobSpawn

## Object Hierarchy

        GObject
        ╰── OGMJobSpawn
            ├── OGMJobContainer
            ╰── OGMJobExec

## Includes

    #include <ogmjob-spawn.h>

## Description

## Functions

### ogmjob_spawn_run ()

    gint
    ogmjob_spawn_run (OGMJobSpawn *spawn,
                      GError **error);

Runs a spawn.

#### Parameters

spawn | An OGMJobSpawn |
error | Location for error, or `NULL` |

#### Returns

An OGMJobResultType

### ogmjob_spawn_cancel ()

    void
    ogmjob_spawn_cancel (OGMJobSpawn *spawn);

Cancels a spawn.

#### Parameters

spawn | An OGMJobSpawn |

### ogmjob_spawn_suspend ()

    void
    ogmjob_spawn_suspend (OGMJobSpawn *spawn);

Suspends a spawn.

#### Parameters

spawn | An OGMJobSpawn |

### ogmjob_spawn_resume ()

    void
    ogmjob_spawn_resume (OGMJobSpawn *spawn);

Resumes a suspended spawn.

#### Parameters

spawn | An OGMJobSpawn |

### ogmjob_spawn_set_async ()

    void
    ogmjob_spawn_set_async (OGMJobSpawn *spawn,
                            gboolean async);

Sets whether to run the spawn asynchronously.

#### Parameters

spawn | An OGMJobSpawn |
async | TRUE if asynchronous |

### ogmjob_spawn_get_async ()

    gboolean
    ogmjob_spawn_get_async (OGMJobSpawn *spawn);

Gets whether to run the spawn asynchronously.

#### Parameters

spawn | An OGMJobSpawn |

#### Returns

TRUE if asynchronous

### ogmjob_spawn_get_parent ()

    OGMJobSpawn *
    ogmjob_spawn_get_parent (OGMJobSpawn *spawn);

Returns the parent container of a spawn.

#### Parameters

spawn | An OGMJobSpawn |

#### Returns

An OGMJobSpawn, or NULL

### ogmjob_spawn_set_parent ()

    void
    ogmjob_spawn_set_parent (OGMJobSpawn *spawn,
                             OGMJobSpawn *parent);

Sets the container as the parent of a widget.

#### Parameters

spawn | An OGMJobSpawn |
parent | The parent container |

### ogmjob_spawn_propagate_error ()

    void
    ogmjob_spawn_propagate_error (OGMJobSpawn *spawn,
                                  GError *error);

Propagates `error` in `spawn` .

#### Parameters

spawn | An OGMJobSpawn |
error | An GError |

## Types and Values

### struct OGMJobSpawn

    struct OGMJobSpawn;

## Signal Details

### The `“cancel”` signal

    void
    user_function (OGMJobSpawn *spawn,
                   gpointer     user_data)

Emitted each time a spawn is canceled.

#### Parameters

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

Flags: No Hooks

### The `“progress”` signal

    void
    user_function (OGMJobSpawn *spawn,
                   gdouble      fraction,
                   gpointer     user_data)

Emitted each time a spawn progresses.

#### Parameters

spawn | the spawn that received the signal |
fraction | fraction of the spawn that's been completed |
user_data | user data set when the signal handler was connected. |

Flags: No Hooks

### The `“resume”` signal

    void
    user_function (OGMJobSpawn *spawn,
                   gpointer     user_data)

Emitted each time a suspended spawn is resumed.

#### Parameters

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

Flags: No Hooks

### The `“run”` signal

    gint
    user_function (OGMJobSpawn *spawn,
                   gpointer     user_data)

Emitted each time a spawn is run.

#### Parameters

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

#### Returns

An OGMJobResultType

Flags: No Hooks

### The `“suspend”` signal

    void
    user_function (OGMJobSpawn *spawn,
                   gpointer     user_data)

Emitted each time a spawn is suspended.

#### Parameters

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

Flags: No Hooks