## LatexilaBuildJob

LatexilaBuildJob — Build job

## Functions

LatexilaBuildJob * | latexila_build_job_new ()
LatexilaBuildJob * | latexila_build_job_clone ()
gchar * | latexila_build_job_to_xml ()
void | latexila_build_job_run_async ()
gboolean | latexila_build_job_run_finish ()

## Properties

gchar * | command | Read / Write / Construct
LatexilaPostProcessorType | post-processor-type | Read / Write / Construct

## Types and Values

| LatexilaBuildJob

## Object Hierarchy

        GObject
        ╰── LatexilaBuildJob

## Includes

    #include <latexila.h>

## Description

A build job. It contains a command (as a string) and a post-processor type.

## Functions

### latexila_build_job_new ()

    LatexilaBuildJob *
    latexila_build_job_new (void);

#### Returns

a new LatexilaBuildJob object.

### latexila_build_job_clone ()

    LatexilaBuildJob *
    latexila_build_job_clone (LatexilaBuildJob *build_job);

Clones a build job (deep copy).

#### Parameters

build_job | the build job to clone. |

#### Returns

the cloned build job.

[transfer full]

### latexila_build_job_to_xml ()

    gchar *
    latexila_build_job_to_xml (LatexilaBuildJob *build_job);

#### Parameters

build_job | a LatexilaBuildJob object. |

#### Returns

the XML contents of the `build_job` . Free with `g_free()`.

### latexila_build_job_run_async ()

    void
    latexila_build_job_run_async (LatexilaBuildJob *build_job,
                                  GFile *file,
                                  LatexilaBuildView *build_view,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Runs asynchronously the build job on a file with the messages displayed in a build view. When the operation is finished, `callback` will be called. You can then call `latexila_build_job_run_finish()`.

#### Parameters

build_job | a build job. |
file | a file. |
build_view | a build view. |
cancellable | a GCancellable object. |
callback | the callback to call when the operation is finished. |
user_data | the data to pass to the callback function. |

### latexila_build_job_run_finish ()

    gboolean
    latexila_build_job_run_finish (LatexilaBuildJob *build_job,
                                   GAsyncResult *result);

Finishes the operation started with `latexila_build_job_run_async()`.

Before calling this function, you should keep a reference to `result` as long as the build messages are displayed in the build view.

#### Parameters

build_job | a build job. |
result | a GAsyncResult. |

#### Returns

`TRUE` if the build job has run successfully.

## Types and Values

### LatexilaBuildJob

    typedef struct _LatexilaBuildJob LatexilaBuildJob;

## Property Details

### The `“command”` property

      “command”                  gchar *

Flags: Read / Write / Construct

Default value: NULL

### The `“post-processor-type”` property

      “post-processor-type”      LatexilaPostProcessorType

Flags: Read / Write / Construct

Default value: LATEXILA_POST_PROCESSOR_TYPE_ALL_OUTPUT