GtexBuildTool: Enter TeX Reference Manual

## GtexBuildTool GtexBuildTool — Build tool |

## Functions

GtexBuildTool * | gtex_build_tool_new ()
GtexBuildTool * | gtex_build_tool_clone ()
void | gtex_build_tool_add_job ()
GList * | gtex_build_tool_get_jobs ()
const gchar * | gtex_build_tool_get_description ()
gchar * | gtex_build_tool_to_xml ()
void | gtex_build_tool_run_async ()
void | gtex_build_tool_run_finish ()

## Properties

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

## Types and Values

struct | GtexBuildTool

## Object Hierarchy

        GObject
        ╰── GtexBuildTool

## Includes

    #include <gtex.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 GtexBuildJob's to run. And a list of files to open when the build jobs are successfully run.

## Functions

### gtex_build_tool_new ()

    GtexBuildTool *
    gtex_build_tool_new (void);

#### Returns

a new GtexBuildTool object.

### gtex_build_tool_clone ()

    GtexBuildTool *
    gtex_build_tool_clone (GtexBuildTool *build_tool);

Clones a build tool (deep copy).

#### Parameters

build_tool | the build tool to clone. |

#### Returns

the cloned build tool.

[transfer full]

### gtex_build_tool_add_job ()

    void
    gtex_build_tool_add_job (GtexBuildTool *build_tool,
                             GtexBuildJob *build_job);

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

#### Parameters

build_tool | a GtexBuildTool. |
build_job | a GtexBuildJob. |

### gtex_build_tool_get_jobs ()

    GList *
    gtex_build_tool_get_jobs (GtexBuildTool *build_tool);

#### Parameters

build_tool | a GtexBuildTool. |

#### Returns

the list of GtexBuildJob's.

[element-type GtexBuildJob][transfer none]

### gtex_build_tool_get_description ()

    const gchar *
    gtex_build_tool_get_description (GtexBuildTool *build_tool);

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

#### Parameters

build_tool | a GtexBuildTool. |

#### Returns

the description.

### gtex_build_tool_to_xml ()

    gchar *
    gtex_build_tool_to_xml (GtexBuildTool *tool);

#### Parameters

tool | a GtexBuildTool object. |

#### Returns

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

### gtex_build_tool_run_async ()

    void
    gtex_build_tool_run_async (GtexBuildTool *build_tool,
                               GFile *file,
                               GtexBuildView *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. |

### gtex_build_tool_run_finish ()

    void
    gtex_build_tool_run_finish (GtexBuildTool *build_tool,
                                GAsyncResult *result);

Finishes the operation started with `gtex_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

### struct GtexBuildTool

    struct GtexBuildTool;

## Property Details

### The `“description”` property

      “description”              char *

Owner: GtexBuildTool

Flags: Read / Write / Construct

Default value: NULL

### The `“enabled”` property

      “enabled”                  gboolean

Owner: GtexBuildTool

Flags: Read / Write / Construct

Default value: FALSE

### The `“extensions”` property

      “extensions”               char *

Owner: GtexBuildTool

Flags: Read / Write / Construct

Default value: NULL

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

      “files-to-open”            char *

Owner: GtexBuildTool

Flags: Read / Write / Construct

Default value: NULL

### The `“icon”` property

      “icon”                     char *

Owner: GtexBuildTool

Flags: Read / Write / Construct

Default value: NULL

### The `“id”` property

      “id”                       int

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

Owner: GtexBuildTool

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0

### The `“label”` property

      “label”                    char *

Owner: GtexBuildTool

Flags: Read / Write / Construct

Default value: NULL