## GtkBuilderListItemFactory GtkBuilderListItemFactory — A listitem factory using ui files |

## Functions

GtkListItemFactory * | gtk_builder_list_item_factory_new_from_bytes ()
GtkListItemFactory * | gtk_builder_list_item_factory_new_from_resource ()
GBytes * | gtk_builder_list_item_factory_get_bytes ()
const char * | gtk_builder_list_item_factory_get_resource ()
GtkBuilderScope * | gtk_builder_list_item_factory_get_scope ()

## Properties

GBytes * | bytes | Read / Write / Construct Only
char * | resource | Read / Write / Construct Only
GtkBuilderScope * | scope | Read / Write / Construct Only

## Types and Values

| GtkBuilderListItemFactory

## Object Hierarchy

        GObject
        ╰── GtkListItemFactory
            ╰── GtkBuilderListItemFactory

## Includes

    #include <gtk/gtk.h>

## Description

GtkBuilderListItemFactory is a GtkListItemFactory that creates widgets by instantiating GtkBuilder UI templates. The templates must be extending GtkListItem, and typically use GtkExpressions to obtain data from the items in the model.

Example:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <interface>
      <template class="GtkListItem">
        <property name="child">
          <object class="GtkLabel">
            <property name="xalign">0</property>
            <binding name="label">
              <lookup name="name" type="SettingsKey">
                <lookup name="item">GtkListItem</lookup>
              </lookup>
            </binding>
          </object>
        </property>
      </template>
    </interface>

## Functions

### gtk_builder_list_item_factory_new_from_bytes ()

    GtkListItemFactory *
    gtk_builder_list_item_factory_new_from_bytes
                                   (GtkBuilderScope *scope,
                                    GBytes *bytes);

Creates s new GtkBuilderListItemFactory that instantiates widgets using `bytes` as the data to pass to GtkBuilder.

#### Parameters

scope | A scope to use when instantiating. | [nullable][transfer none]
bytes | the bytes containing the ui file to instantiate |

#### Returns

a new GtkBuilderListItemFactory

### gtk_builder_list_item_factory_new_from_resource ()

    GtkListItemFactory *
    gtk_builder_list_item_factory_new_from_resource
                                   (GtkBuilderScope *scope,
                                    const char *resource_path);

Creates s new GtkBuilderListItemFactory that instantiates widgets using data read from the given `resource_path` to pass to GtkBuilder.

#### Parameters

scope | A scope to use when instantiating. | [nullable][transfer none]
resource_path | valid path to a resource that contains the data |

#### Returns

a new GtkBuilderListItemFactory

### gtk_builder_list_item_factory_get_bytes ()

    GBytes *
    gtk_builder_list_item_factory_get_bytes
                                   (GtkBuilderListItemFactory *self);

Gets the data used as the GtkBuilder UI template for constructing listitems.

#### Parameters

self | a GtkBuilderListItemFactory |

#### Returns

The GtkBuilder data.

[transfer none]

### gtk_builder_list_item_factory_get_resource ()

    const char *
    gtk_builder_list_item_factory_get_resource
                                   (GtkBuilderListItemFactory *self);

If the data references a resource, gets the path of that resource.

#### Parameters

self | a GtkBuilderListItemFactory |

#### Returns

The path to the resource or `NULL` if none.

[transfer none][nullable]

### gtk_builder_list_item_factory_get_scope ()

    GtkBuilderScope *
    gtk_builder_list_item_factory_get_scope
                                   (GtkBuilderListItemFactory *self);

Gets the scope used when constructing listitems.

#### Parameters

self | a GtkBuilderListItemFactory |

#### Returns

The scope used when constructing listitems.

[transfer none][nullable]

## Types and Values

### GtkBuilderListItemFactory

    typedef struct _GtkBuilderListItemFactory GtkBuilderListItemFactory;

## Property Details

### The `“bytes”` property

      “bytes”                    GBytes *

bytes containing the UI definition

Owner: GtkBuilderListItemFactory

Flags: Read / Write / Construct Only

### The `“resource”` property

      “resource”                 char *

resource containing the UI definition

Owner: GtkBuilderListItemFactory

Flags: Read / Write / Construct Only

Default value: NULL

### The `“scope”` property

      “scope”                    GtkBuilderScope *

scope to use when instantiating listitems

Owner: GtkBuilderListItemFactory

Flags: Read / Write / Construct Only