TeplStackItem

TeplStackItem — Contains a GtkWidget plus additional infos

Functions

Types and Values

struct TeplStackItem

Object Hierarchy

    GObject
    ╰── TeplStackItem

Includes

#include <tepl/tepl.h>

Description

TeplStackItem contains a GtkWidget plus additional pieces of information.

The semantics of the different attributes:

  • "widget": The main content, as a GtkWidget.

  • "name": An ID as a UTF-8 string. Not displayed in the UI. Uniquely identifies an item within a list.

  • "title": A human-readable title that can be shown in the UI to choose this item (a UTF-8 string).

  • "icon-name": An icon-name representing this item, can be shown in the UI to choose this item. Can be used for “icon-name”.

Functions

tepl_stack_item_new ()

TeplStackItem *
tepl_stack_item_new (GtkWidget *widget,
                     const gchar *name,
                     const gchar *title,
                     const gchar *icon_name);

Parameters

widget

for the "widget" attribute.

 

name

for the "name" attribute.

[nullable]

title

for the "title" attribute.

[nullable]

icon_name

for the "icon-name" attribute.

[nullable]

Returns

a new TeplStackItem.

Since: 6.6


tepl_stack_item_get_widget ()

GtkWidget *
tepl_stack_item_get_widget (TeplStackItem *item);

Parameters

item

a TeplStackItem.

 

Returns

the "widget" attribute. Is NULL when the widget has been destroyed.

[transfer none][nullable]

Since: 6.6


tepl_stack_item_get_infos ()

void
tepl_stack_item_get_infos (TeplStackItem *item,
                           gchar **name,
                           gchar **title,
                           gchar **icon_name);

Gets some pieces of information from item .

Parameters

item

a TeplStackItem.

 

name

the "name" attribute.

[out][optional][nullable][transfer full]

title

the "title" attribute.

[out][optional][nullable][transfer full]

icon_name

the "icon-name" attribute.

[out][optional][nullable][transfer full]

Since: 6.6


tepl_stack_item_compare_by_title ()

gint
tepl_stack_item_compare_by_title (TeplStackItem *a,
                                  TeplStackItem *b);

A GCompareFunc for the TeplStackItem "title" attribute.

Parameters

a

a TeplStackItem.

 

b

a TeplStackItem.

 

Returns

the usual return value for a GCompareFunc.

Since: 6.6

Types and Values

struct TeplStackItem

struct TeplStackItem;