TeplPanelItem

TeplPanelItem — Panel item data

Functions

Properties

char * icon-name Read / Write / Construct Only
char * name Read / Write / Construct Only
int position Read / Write / Construct Only
char * title Read / Write / Construct Only
GtkWidget * widget Read / Write / Construct Only

Types and Values

struct TeplPanelItem

Object Hierarchy

    GObject
    ╰── TeplPanelItem

Includes

#include <tepl/tepl.h>

Description

A TeplPanelItem object contains a GtkWidget plus associated information.

Functions

tepl_panel_item_new ()

TeplPanelItem *
tepl_panel_item_new (GtkWidget *widget,
                     const gchar *name,
                     const gchar *title,
                     const gchar *icon_name,
                     gint position);

Creates a new TeplPanelItem object.

See the properties for the meaning of the parameters.

Parameters

widget

a GtkWidget.

 

name

the name.

 

title

the title.

[nullable]

icon_name

the icon-name.

[nullable]

position

the position.

 

Returns

a new TeplPanelItem object.

[transfer full]

Since: 6.11


tepl_panel_item_get_widget ()

GtkWidget *
tepl_panel_item_get_widget (TeplPanelItem *item);

Parameters

item

a TeplPanelItem.

 

Returns

the value of the “widget” property.

[transfer none][nullable]

Since: 6.8


tepl_panel_item_get_name ()

const gchar *
tepl_panel_item_get_name (TeplPanelItem *item);

Parameters

item

a TeplPanelItem.

 

Returns

the value of the “name” property.

Since: 6.8


tepl_panel_item_get_title ()

const gchar *
tepl_panel_item_get_title (TeplPanelItem *item);

Parameters

item

a TeplPanelItem.

 

Returns

the value of the “title” property.

[nullable]

Since: 6.8


tepl_panel_item_get_icon_name ()

const gchar *
tepl_panel_item_get_icon_name (TeplPanelItem *item);

Parameters

item

a TeplPanelItem.

 

Returns

the value of the “icon-name” property.

[nullable]

Since: 6.8


tepl_panel_item_get_position ()

gint
tepl_panel_item_get_position (TeplPanelItem *item);

Parameters

item

a TeplPanelItem.

 

Returns

the value of the “position” property.

Since: 6.11


tepl_panel_item_compare ()

gint
tepl_panel_item_compare (TeplPanelItem *a,
                         TeplPanelItem *b);

A GCompareFunc that takes into account the “position” property in priority, and falls back to the “title” property if two items have the same position.

Parameters

a

a TeplPanelItem.

 

b

a TeplPanelItem.

 

Returns

the usual return value for a GCompareFunc.

Since: 6.11


tepl_panel_item_compare_by_title ()

gint
tepl_panel_item_compare_by_title (TeplPanelItem *a,
                                  TeplPanelItem *b);

A GCompareFunc that takes into account only the “title” property.

Parameters

a

a TeplPanelItem.

 

b

a TeplPanelItem.

 

Returns

the usual return value for a GCompareFunc.

Since: 6.8

Types and Values

struct TeplPanelItem

struct TeplPanelItem;

Property Details

The “icon-name” property

  “icon-name”                char *

The icon name.

It can be shown in the UI to choose this item, for example with the GtkImage's “icon-name” property.

Owner: TeplPanelItem

Flags: Read / Write / Construct Only

Default value: NULL

Since: 6.11


The “name” property

  “name”                     char *

The name.

It is an ID as a UTF-8 string. It is not displayed in the UI. It uniquely identifies an item within a list.

Owner: TeplPanelItem

Flags: Read / Write / Construct Only

Default value: NULL

Since: 6.11


The “position” property

  “position”                 int

The position.

Used to sort items in the desired order.

Owner: TeplPanelItem

Flags: Read / Write / Construct Only

Default value: 0

Since: 6.11


The “title” property

  “title”                    char *

The title.

It is a human-readable UTF-8 string that can be shown in the UI to choose this item.

Owner: TeplPanelItem

Flags: Read / Write / Construct Only

Default value: NULL

Since: 6.11


The “widget” property

  “widget”                   GtkWidget *

The GtkWidget (the main content).

Owner: TeplPanelItem

Flags: Read / Write / Construct Only

Since: 6.11