DhLanguage: Devhelp Reference Manual

## DhLanguage DhLanguage |

## Functions

DhLanguage * | dh_language_new ()
void | dh_language_free ()
const gchar * | dh_language_get_name ()
gint | dh_language_compare ()
gint | dh_language_compare_by_name ()
gint | dh_language_get_n_books_enabled ()
void | dh_language_inc_n_books_enabled ()
gboolean | dh_language_dec_n_books_enabled ()

## Types and Values

struct | DhLanguage

## Object Hierarchy

        GObject
        ╰── DhLanguage

## Description

## Functions

### dh_language_new ()

    DhLanguage *
    dh_language_new (const gchar *name);

Create a new DhLanguage object.

#### Parameters

name | the name of the language |

#### Returns

a new DhLanguage object

### dh_language_free ()

    void
    dh_language_free (DhLanguage *language);

`dh_language_free` has been deprecated since version 3.24 and should not be used in newly-written code.

Use `g_object_unref()` instead.

Free memory associated with the language.

#### Parameters

language | a DhLanguage object |

### dh_language_get_name ()

    const gchar *
    dh_language_get_name (DhLanguage *language);

Get the language name.

#### Parameters

language | a DhLanguage object |

#### Returns

The name of the language

### dh_language_compare ()

    gint
    dh_language_compare (DhLanguage *language_a,
                         DhLanguage *language_b);

Compares the name of `language_a` with the name `language_b` .

#### Parameters

language_a | a DhLanguage object |
language_b | the DhLanguage object to compare with |

#### Returns

an integer less than, equal to, or greater than zero, if the name of `language_a` is <, == or > than the name of `language_b`

### dh_language_compare_by_name ()

    gint
    dh_language_compare_by_name (DhLanguage *language_a,
                                 const gchar *language_name_b);

Compares the name of `language_a` with `language_name_b` .

#### Parameters

language_a | a DhLanguage object |
language_name_b | the language name to compare with |

#### Returns

an integer less than, equal to, or greater than zero, if the name of `language_a` is <, == or > than `language_name_b`

### dh_language_get_n_books_enabled ()

    gint
    dh_language_get_n_books_enabled (DhLanguage *language);

Get the number of enabled books

#### Parameters

language | a DhLanguage object |

#### Returns

The number of enabled books

### dh_language_inc_n_books_enabled ()

    void
    dh_language_inc_n_books_enabled (DhLanguage *language);

Increase the number of enabled books for this language.

#### Parameters

language | a DhLanguage object |

### dh_language_dec_n_books_enabled ()

    gboolean
    dh_language_dec_n_books_enabled (DhLanguage *language);

Decrease the number of enabled books for this language.

#### Parameters

language | a DhLanguage object |

#### Returns

`TRUE` if the counter is decreased to zero, `FALSE` otherwise.

## Types and Values

### struct DhLanguage

    struct DhLanguage;