## GdkToplevelSize GdkToplevelSize — Information for computing toplevel size |

## Functions

void | gdk_toplevel_size_get_bounds ()
void | gdk_toplevel_size_set_size ()
void | gdk_toplevel_size_set_min_size ()

## Types and Values

| GdkToplevelSize

## Includes

    #include <gdk/gdk.h>

## Description

The GdkToplevelSIze struct contains information that may be useful for users of GdkToplevel to compute a surface size. It also carries information back with the computational result.

## Functions

### gdk_toplevel_size_get_bounds ()

    void
    gdk_toplevel_size_get_bounds (GdkToplevelSize *size,
                                  int *bounds_width,
                                  int *bounds_height);

Retrieves the bounds the toplevel is placed within.

The bounds represent the largest size a toplevel may have while still being able to fit within some type of boundary. Depending on the backend, this may be equivalent to the dimensions of the work area or the monitor on which the window is being presented on, or something else that limits the way a toplevel can be presented.

#### Parameters

size | a GdkToplevelSize |
bounds_width | return location for width. | [out]
bounds_height | return location for height. | [out]

### gdk_toplevel_size_set_size ()

    void
    gdk_toplevel_size_set_size (GdkToplevelSize *size,
                                int width,
                                int height);

Sets the size the toplevel prefers to be resized to. The size should be within the bounds (see `gdk_toplevel_size_get_bounds()`). The set size should be considered as a hint, and should not be assumed to be respected by the windowing system, or backend.

#### Parameters

size | a GdkToplevelSize |
width | the width |
height | the height |

### gdk_toplevel_size_set_min_size ()

    void
    gdk_toplevel_size_set_min_size (GdkToplevelSize *size,
                                    int min_width,
                                    int min_height);

The minimum size corresponds to the limitations the toplevel can be shrunk to, without resulting in incorrect painting. A user of a GdkToplevel should calculate these given both the existing size, and the bounds retrieved from the GdkToplevelSize object.

The minimum size should be within the bounds (see `gdk_toplevel_size_get_bounds()`).

#### Parameters

size | a GdkToplevelSize |
min_width | the minimum width |
min_height | the minimum height |

## Types and Values

### GdkToplevelSize

    typedef struct {
      int bounds_width;
      int bounds_height;

      int width;
      int height;
      int min_width;
      int min_height;
    } GdkToplevelSize;

Struct containing information for computing the size of a GdkToplevel.