adw-clamp

adw-clamp

Functions

Properties

GtkWidget * child Read / Write
int maximum-size Read / Write
int tightening-threshold Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── AdwClamp

Implemented Interfaces

AdwClamp implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkOrientable.

Description

Functions

adw_clamp_new ()

GtkWidget *
adw_clamp_new (void);

Creates a new AdwClamp.

Returns

a new AdwClamp

Since: 1.0


adw_clamp_get_child ()

GtkWidget *
adw_clamp_get_child (AdwClamp *self);

Gets the child widget of self .

Parameters

self

a AdwClamp

 

Returns

the child widget of self .

[nullable][transfer none]

Since: 1.0


adw_clamp_set_child ()

void
adw_clamp_set_child (AdwClamp *self,
                     GtkWidget *child);

Sets the child widget of self .

Parameters

self

a AdwClamp

 

child

the child widget.

[nullable]

Since: 1.0


adw_clamp_get_maximum_size ()

int
adw_clamp_get_maximum_size (AdwClamp *self);

Gets the maximum size to allocate to the contained child. It is the width if self is horizontal, or the height if it is vertical.

Parameters

self

a AdwClamp

 

Returns

the maximum width to allocate to the contained child.

Since: 1.0


adw_clamp_set_maximum_size ()

void
adw_clamp_set_maximum_size (AdwClamp *self,
                            int maximum_size);

Sets the maximum size to allocate to the contained child. It is the width if self is horizontal, or the height if it is vertical.

Parameters

self

a AdwClamp

 

maximum_size

the maximum size

 

Since: 1.0


adw_clamp_get_tightening_threshold ()

int
adw_clamp_get_tightening_threshold (AdwClamp *self);

Gets the size starting from which the clamp will tighten its grip on the child.

Parameters

self

a AdwClamp

 

Returns

the size starting from which the clamp will tighten its grip on the child.

Since: 1.0


adw_clamp_set_tightening_threshold ()

void
adw_clamp_set_tightening_threshold (AdwClamp *self,
                                    int tightening_threshold);

Sets the size starting from which the clamp will tighten its grip on the child.

Parameters

self

a AdwClamp

 

tightening_threshold

the tightening threshold

 

Since: 1.0

Types and Values

ADW_TYPE_CLAMP

#define ADW_TYPE_CLAMP (adw_clamp_get_type())

AdwClamp

typedef struct _AdwClamp AdwClamp;

Property Details

The “child” property

  “child”                    GtkWidget *

The child widget.

Owner: AdwClamp

Flags: Read / Write


The “maximum-size” property

  “maximum-size”             int

The maximum size to allocate to the child. It is the width if the clamp is horizontal, or the height if it is vertical.

Owner: AdwClamp

Flags: Read / Write

Allowed values: >= 0

Default value: 600

Since: 1.0


The “tightening-threshold” property

  “tightening-threshold”     int

The size starting from which the clamp will tighten its grip on the child, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum width, the child will be allocated all the available size.

If the threshold is greater than the maximum size to allocate to the child, the child will be allocated all the width up to the maximum. If the threshold is lower than the minimum size to allocate to the child, that size will be used as the tightening threshold.

Effectively, tightening the grip on the child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.

Owner: AdwClamp

Flags: Read / Write

Allowed values: >= 0

Default value: 400

Since: 1.0