GdkToplevelSize

GdkToplevelSize — Information for computing toplevel size

Types and Values

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

 

gdk_toplevel_size_set_shadow_width ()

void
gdk_toplevel_size_set_shadow_width (GdkToplevelSize *size,
                                    int left,
                                    int right,
                                    int top,
                                    int bottom);

The shadow width corresponds to the part of the computed surface size that would consist of the shadow margin surrounding the window, would there be any.

Parameters

size

a GdkToplevelSize

 

left

width of the left part of the shadow

 

right

width of the right part of the shadow

 

top

height of the top part of the shadow

 

bottom

height of the bottom part of the shadow

 

Types and Values

GdkToplevelSize

typedef struct _GdkToplevelSize GdkToplevelSize;

Struct containing information for computing the size of a GdkToplevel.