OGMJobSpawn

OGMJobSpawn — Base class for all spawns

Synopsis


#include <ogmjob-spawn.h>

                    OGMJobSpawn;
gint                ogmjob_spawn_run                    (OGMJobSpawn *spawn,
                                                         GError **error);
void                ogmjob_spawn_cancel                 (OGMJobSpawn *spawn);
void                ogmjob_spawn_suspend                (OGMJobSpawn *spawn);
void                ogmjob_spawn_resume                 (OGMJobSpawn *spawn);
void                ogmjob_spawn_set_async              (OGMJobSpawn *spawn,
                                                         gboolean async);
gboolean            ogmjob_spawn_get_async              (OGMJobSpawn *spawn);
OGMJobSpawn*        ogmjob_spawn_get_parent             (OGMJobSpawn *spawn);
void                ogmjob_spawn_set_parent             (OGMJobSpawn *spawn,
                                                         OGMJobSpawn *parent);
void                ogmjob_spawn_propagate_error        (OGMJobSpawn *spawn,
                                                         GError *error);

Object Hierarchy

  GObject
   +----OGMJobSpawn
         +----OGMJobContainer
         +----OGMJobExec

Signals

  "cancel"                                         : Run Last / No Recursion / No Hooks
  "progress"                                       : Run Last / No Recursion / No Hooks
  "resume"                                         : Run Last / No Recursion / No Hooks
  "run"                                            : Run Last / No Recursion / No Hooks
  "suspend"                                        : Run Last / No Recursion / No Hooks

Description

Details

OGMJobSpawn

typedef struct _OGMJobSpawn OGMJobSpawn;


ogmjob_spawn_run ()

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

Runs a spawn.

spawn :

An OGMJobSpawn

error :

Location for error, or NULL

Returns :

An OGMJobResultType

ogmjob_spawn_cancel ()

void                ogmjob_spawn_cancel                 (OGMJobSpawn *spawn);

Cancels a spawn.

spawn :

An OGMJobSpawn

ogmjob_spawn_suspend ()

void                ogmjob_spawn_suspend                (OGMJobSpawn *spawn);

Suspends a spawn.

spawn :

An OGMJobSpawn

ogmjob_spawn_resume ()

void                ogmjob_spawn_resume                 (OGMJobSpawn *spawn);

Resumes a suspended spawn.

spawn :

An OGMJobSpawn

ogmjob_spawn_set_async ()

void                ogmjob_spawn_set_async              (OGMJobSpawn *spawn,
                                                         gboolean async);

Sets whether to run the spawn asynchronously.

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.

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.

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.

spawn :

An OGMJobSpawn

parent :

The parent container

ogmjob_spawn_propagate_error ()

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

Propagates error in spawn.

spawn :

An OGMJobSpawn

error :

An GError

Signal Details

The "cancel" signal

void                user_function                      (OGMJobSpawn *spawn,
                                                        gpointer     user_data)      : Run Last / No Recursion / No Hooks

Emitted each time a spawn is canceled.

spawn :

the spawn that received the signal

user_data :

user data set when the signal handler was connected.

The "progress" signal

void                user_function                      (OGMJobSpawn *spawn,
                                                        gdouble      fraction,
                                                        gpointer     user_data)      : Run Last / No Recursion / No Hooks

Emitted each time a spawn progresses.

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.

The "resume" signal

void                user_function                      (OGMJobSpawn *spawn,
                                                        gpointer     user_data)      : Run Last / No Recursion / No Hooks

Emitted each time a suspended spawn is resumed.

spawn :

the spawn that received the signal

user_data :

user data set when the signal handler was connected.

The "run" signal

gint                user_function                      (OGMJobSpawn *spawn,
                                                        gpointer     user_data)      : Run Last / No Recursion / No Hooks

Emitted each time a spawn is run.

spawn :

the spawn that received the signal

user_data :

user data set when the signal handler was connected.

Returns :

An OGMJobResultType

The "suspend" signal

void                user_function                      (OGMJobSpawn *spawn,
                                                        gpointer     user_data)      : Run Last / No Recursion / No Hooks

Emitted each time a spawn is suspended.

spawn :

the spawn that received the signal

user_data :

user data set when the signal handler was connected.