## LatexilaBuildTool

LatexilaBuildTool — Build tool

## Functions

LatexilaBuildTool * | latexila_build_tool_new ()
LatexilaBuildTool * | latexila_build_tool_clone ()
void | latexila_build_tool_add_job ()
GList * | latexila_build_tool_get_jobs ()
const gchar * | latexila_build_tool_get_description ()
gchar * | latexila_build_tool_to_xml ()
void | latexila_build_tool_run_async ()
void | latexila_build_tool_run_finish ()

## Properties

gchar * | description | Read / Write / Construct
gboolean | enabled | Read / Write / Construct
gchar * | extensions | Read / Write / Construct
gchar * | files-to-open | Read / Write / Construct
gchar * | icon | Read / Write / Construct
gint | id | Read / Write / Construct
gchar * | label | Read / Write / Construct

## Types and Values

| LatexilaBuildTool

## Object Hierarchy

        GObject
        ╰── LatexilaBuildTool

## Includes

    #include <latexila.h>

## Description

A build tool. It contains some basic properties: a label, a description, an icon, etc. It contains a list of file extensions for which the build tool can run on. More interestingly, it contains the list of LatexilaBuildJob's to run. And a list of files to open when the build jobs are successfully run.

## Functions

### latexila_build_tool_new ()

    LatexilaBuildTool *
    latexila_build_tool_new (void);

#### Returns

a new LatexilaBuildTool object.

### latexila_build_tool_clone ()

    LatexilaBuildTool *
    latexila_build_tool_clone (LatexilaBuildTool *build_tool);

Clones a build tool (deep copy).

#### Parameters

build_tool | the build tool to clone. |

#### Returns

the cloned build tool.

[transfer full]

### latexila_build_tool_add_job ()

    void
    latexila_build_tool_add_job (LatexilaBuildTool *build_tool,
                                 LatexilaBuildJob *build_job);

Adds a build job at the end of the list (in O(1)).

#### Parameters

build_tool | a LatexilaBuildTool. |
build_job | a LatexilaBuildJob. |

### latexila_build_tool_get_jobs ()

    GList *
    latexila_build_tool_get_jobs (LatexilaBuildTool *build_tool);

#### Parameters

build_tool | a LatexilaBuildTool. |

#### Returns

the list of LatexilaBuildJob's.

[element-type LatexilaBuildJob][transfer none]

### latexila_build_tool_get_description ()

    const gchar *
    latexila_build_tool_get_description (LatexilaBuildTool *build_tool);

Gets the description. The label is returned if the description is empty.

#### Parameters

build_tool | a LatexilaBuildTool. |

#### Returns

the description.

### latexila_build_tool_to_xml ()

    gchar *
    latexila_build_tool_to_xml (LatexilaBuildTool *tool);

#### Parameters

tool | a LatexilaBuildTool object. |

#### Returns

the XML contents of the build tool. Free with `g_free()`.

### latexila_build_tool_run_async ()

    void
    latexila_build_tool_run_async (LatexilaBuildTool *build_tool,
                                   GFile *file,
                                   LatexilaBuildView *build_view,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

Run a build tool on a file with the messages displayed in a build view.

#### Parameters

build_tool | a build tool. |
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_tool_run_finish ()

    void
    latexila_build_tool_run_finish (LatexilaBuildTool *build_tool,
                                    GAsyncResult *result);

Finishes the operation started with `latexila_build_tool_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. `result` is needed for example to show/hide some messages when the "More details" button is toggled.

#### Parameters

build_tool | a build tool. |
result | a GAsyncResult. |

## Types and Values

### LatexilaBuildTool

    typedef struct _LatexilaBuildTool LatexilaBuildTool;

## Property Details

### The `“description”` property

      “description”              gchar *

Flags: Read / Write / Construct

Default value: NULL

### The `“enabled”` property

      “enabled”                  gboolean

Flags: Read / Write / Construct

Default value: FALSE

### The `“extensions”` property

      “extensions”               gchar *

Flags: Read / Write / Construct

Default value: NULL

### The `“files-to-open”` property

      “files-to-open”            gchar *

Flags: Read / Write / Construct

Default value: NULL

### The `“icon”` property

      “icon”                     gchar *

Flags: Read / Write / Construct

Default value: NULL

### The `“id”` property

      “id”                       gint

The build tool ID. It is used only by the default build tools, for saving in GSettings the lists of enabled/disabled build tools.

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0

### The `“label”` property

      “label”                    gchar *

Flags: Read / Write / Construct

Default value: NULL