## PhoshClamp

PhoshClamp — A container limiting its natural size request

## Functions

GtkWidget * | phosh_clamp_new ()
gint | phosh_clamp_get_natural_size ()
void | phosh_clamp_set_natural_size ()

## Properties

int | natural-size | Read / Write

## Types and Values

#define | PHOSH_TYPE_CLAMP
| PhoshClamp

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── PhoshClamp

## Implemented Interfaces

PhoshClamp implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

This should not be confused with `HdyClamp`, which limits the size allocated to its child and adds a dynamic margin around it. `PhoshClamp` instead constraints the requested natural size, the child will still be allocated all that the clamp gets.

## Functions

### phosh_clamp_new ()

    GtkWidget *
    phosh_clamp_new (void);

Creates a new PhoshClamp.

#### Returns

a new PhoshClamp

### phosh_clamp_get_natural_size ()

    gint
    phosh_clamp_get_natural_size (PhoshClamp *self);

Gets the maximum natural size request.

#### Parameters

self | a PhoshClamp |

#### Returns

the maximum natural size request.

### phosh_clamp_set_natural_size ()

    void
    phosh_clamp_set_natural_size (PhoshClamp *self,
                                  gint natural_size);

Sets the maximum natural size request.

#### Parameters

self | a PhoshClamp |
natural_size | the maximum natural size |

## Types and Values

### PHOSH_TYPE_CLAMP

    #define PHOSH_TYPE_CLAMP (phosh_clamp_get_type())

### PhoshClamp

    typedef struct _PhoshClamp PhoshClamp;

## Property Details

### The `“natural-size”` property

      “natural-size”             int

The maximum natural size request.

Owner: PhoshClamp

Flags: Read / Write

Allowed values: >= -1

Default value: -1