## String Set

String Set — Set of unique strings

## Functions

FontManagerStringSet * | font_manager_string_set_new ()
FontManagerStringSet * | font_manager_string_set_new_from_strv ()
guint | font_manager_string_set_size ()
const gchar * | font_manager_string_set_get ()
void | font_manager_string_set_add ()
void | font_manager_string_set_add_all ()
gboolean | font_manager_string_set_contains ()
gboolean | font_manager_string_set_contains_all ()
void | font_manager_string_set_remove ()
void | font_manager_string_set_remove_all ()
void | font_manager_string_set_retain_all ()
GList * | font_manager_string_set_list ()
void | font_manager_string_set_foreach ()
void | font_manager_string_set_sort ()
void | font_manager_string_set_clear ()
GStrv | font_manager_string_set_to_strv ()

## Properties

guint | size | Read

## Signals

void | changed | Run Last

## Types and Values

#define | FONT_MANAGER_TYPE_STRING_SET
struct | FontManagerStringSetClass
| FontManagerStringSet

## Object Hierarchy

        GObject
        ╰── FontManagerStringSet
            ╰── FontManagerSelections

## Includes

    #include <font-manager-string-set.h>

## Description

FontManagerStringSet provides a convenient way to store and access a set of strings.

## Functions

### font_manager_string_set_new ()

    FontManagerStringSet *
    font_manager_string_set_new (void);

#### Returns

A newly-created FontManagerStringSet. Free the returned object using ``g_object_unref()``.

[transfer full]

### font_manager_string_set_new_from_strv ()

    FontManagerStringSet *
    font_manager_string_set_new_from_strv (GStrv strv);

#### Parameters

strv | (array zero-terminated=1) (element-type utf8) (not nullable) (transfer none) : `NULL` terminated array of strings to include in the returned set |

#### Returns

A newly-created FontManagerStringSet. Free the returned object using ``g_object_unref()``.

[transfer full]

### font_manager_string_set_size ()

    guint
    font_manager_string_set_size (FontManagerStringSet *self);

#### Parameters

self | FontManagerStringSet |

#### Returns

Returns the number of strings contained in `self`

### font_manager_string_set_get ()

    const gchar *
    font_manager_string_set_get (FontManagerStringSet *self,
                                 guint index);

#### Parameters

self | a FontManagerStringSet |
index | index of entry to retrieve |

#### Returns

A string which is owned by FontManagerStringSet and should not be modified or freed. `NULL` on error or if index could not be retrieved.

[transfer none][nullable]

### font_manager_string_set_add ()

    void
    font_manager_string_set_add (FontManagerStringSet *self,
                                 const gchar *str);

#### Parameters

self | FontManagerStringSet |
str | string to add to FontManagerStringSet |

### font_manager_string_set_add_all ()

    void
    font_manager_string_set_add_all (FontManagerStringSet *self,
                                     FontManagerStringSet *add);

#### Parameters

self | FontManagerStringSet |
add | FontManagerStringSet to add to `self` . | [transfer none]

### font_manager_string_set_contains ()

    gboolean
    font_manager_string_set_contains (FontManagerStringSet *self,
                                      const gchar *str);

#### Parameters

self | FontManagerStringSet |
str | string to look for in FontManagerStringSet |

#### Returns

`TRUE` if `self` contains str

### font_manager_string_set_contains_all ()

    gboolean
    font_manager_string_set_contains_all (FontManagerStringSet *self,
                                          FontManagerStringSet *contents);

#### Parameters

self | FontManagerStringSet |
contents | FontManagerStringSet to check against. | [transfer none]

#### Returns

`TRUE` if all strings in `contents` are contained in `self`

### font_manager_string_set_remove ()

    void
    font_manager_string_set_remove (FontManagerStringSet *self,
                                    const gchar *str);

#### Parameters

self | FontManagerStringSet |
str | string to remove from FontManagerStringSet |

### font_manager_string_set_remove_all ()

    void
    font_manager_string_set_remove_all (FontManagerStringSet *self,
                                        FontManagerStringSet *remove);

#### Parameters

self | FontManagerStringSet |
remove | FontManagerStringSet containing strings to remove. | [transfer none]

### font_manager_string_set_retain_all ()

    void
    font_manager_string_set_retain_all (FontManagerStringSet *self,
                                        FontManagerStringSet *retain);

Remove any elements not contained in `retain`

#### Parameters

self | FontManagerStringSet |
retain | FontManagerStringSet. | [transfer none]

### font_manager_string_set_list ()

    GList *
    font_manager_string_set_list (FontManagerStringSet *self);

#### Parameters

self | FontManagerStringSet |

#### Returns

A GList containing the contents of FontManagerStringSet. Use g_list_free_full(list, g_free) when done using the list.

[element-type utf8][transfer full]

### font_manager_string_set_foreach ()

    void
    font_manager_string_set_foreach (FontManagerStringSet *self,
                                     GFunc func,
                                     gpointer user_data);

Calls a function for each string of a FontManagerStringSet. `func` must not add elements to or remove elements from the FontManagerStringSet.

#### Parameters

self | FontManagerStringSet |
func | GFunc to call for each string in the set. | [scope call]
user_data | user data to pass to the function |

### font_manager_string_set_sort ()

    void
    font_manager_string_set_sort (FontManagerStringSet *self);

Sorts the set, using `compare_func`

#### Parameters

self | FontManagerStringSet |

### font_manager_string_set_clear ()

    void
    font_manager_string_set_clear (FontManagerStringSet *self);

Clear all strings from `self`

#### Parameters

self | FontManagerStringSet |

### font_manager_string_set_to_strv ()

    GStrv
    font_manager_string_set_to_strv (FontManagerStringSet *self);

#### Parameters

self | a FontManagerStringSet |

#### Returns

The returned value should be freed with ``g_strfreev()`` when no longer needed.

[array zero-terminated=1][element-type utf8][transfer full]

## Types and Values

### FONT_MANAGER_TYPE_STRING_SET

    #define FONT_MANAGER_TYPE_STRING_SET (font_manager_string_set_get_type())

### struct FontManagerStringSetClass

    struct FontManagerStringSetClass {
        GObjectClass parent_class;

        void (* changed) (FontManagerStringSet *self);
    };

### FontManagerStringSet

    typedef struct _FontManagerStringSet FontManagerStringSet;

## Property Details

### The `“size”` property

      “size”                     guint

Number of strings contained in this set

Owner: FontManagerStringSet

Flags: Read

Default value: 0

## Signal Details

### The `“changed”` signal

    void
    user_function (FontManagerStringSet *fontmanagerstringset,
                   gpointer              user_data)

Flags: Run Last