GdkToplevelLayout

GdkToplevelLayout — Information for presenting toplevels

Types and Values

Object Hierarchy

    GBoxed
    ╰── GdkToplevelLayout

Includes

#include <gdk/gdk.h>

Description

Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).

The GdkToplevelLayout struct contains information that is necessary to do so, and is passed to gdk_toplevel_present().

Functions

gdk_toplevel_layout_new ()

GdkToplevelLayout *
gdk_toplevel_layout_new (int min_width,
                         int min_height);

Create a toplevel layout description.

Used together with gdk_toplevel_present() to describe how a toplevel surface should be placed and behave on-screen.

The size is in ”application pixels”, not ”device pixels” (see gdk_surface_get_scale_factor()).

[constructor]

Parameters

min_width

the minimum width for the layout

 

min_height

the minimum height for the layout

 

Returns

newly created instance of GdkToplevelLayout.

[transfer full]


gdk_toplevel_layout_ref ()

GdkToplevelLayout *
gdk_toplevel_layout_ref (GdkToplevelLayout *layout);

Increases the reference count of layout .

Parameters

layout

a GdkToplevelLayout

 

Returns

the same layout


gdk_toplevel_layout_unref ()

void
gdk_toplevel_layout_unref (GdkToplevelLayout *layout);

Decreases the reference count of layout .

Parameters

layout

a GdkToplevelLayout

 

gdk_toplevel_layout_copy ()

GdkToplevelLayout *
gdk_toplevel_layout_copy (GdkToplevelLayout *layout);

Create a new GdkToplevelLayout and copy the contents of layout into it.

Parameters

layout

a GdkToplevelLayout

 

Returns

a copy of layout .

[transfer full]


gdk_toplevel_layout_equal ()

gboolean
gdk_toplevel_layout_equal (GdkToplevelLayout *layout,
                           GdkToplevelLayout *other);

Check whether layout and other has identical layout properties.

Parameters

layout

a GdkToplevelLayout

 

other

another GdkToplevelLayout

 

Returns

TRUE if layout and other have identical layout properties, otherwise FALSE.


gdk_toplevel_layout_set_maximized ()

void
gdk_toplevel_layout_set_maximized (GdkToplevelLayout *layout,
                                   gboolean maximized);

Sets whether the layout should cause the surface to be maximized when presented.

Parameters

layout

a GdkToplevelLayout

 

maximized

TRUE to maximize

 

gdk_toplevel_layout_get_maximized ()

gboolean
gdk_toplevel_layout_get_maximized (GdkToplevelLayout *layout);

Returns whether the layout should present the surface as maximized.

Parameters

layout

a GdkToplevelLayout

 

Returns

TRUE if the layout is maximized


gdk_toplevel_layout_set_fullscreen ()

void
gdk_toplevel_layout_set_fullscreen (GdkToplevelLayout *layout,
                                    gboolean fullscreen,
                                    GdkMonitor *monitor);

Sets whether the layout should cause the surface to be fullscreen when presented.

Parameters

layout

a GdkToplevelLayout

 

fullscreen

TRUE to fullscreen the surface

 

monitor

the monitor to fullscreen on.

[nullable]

gdk_toplevel_layout_get_fullscreen ()

gboolean
gdk_toplevel_layout_get_fullscreen (GdkToplevelLayout *layout);

Returns whether the layout should cause the surface to be fullscreen when presented.

Parameters

layout

a GdkToplevelLayout

 

Returns

TRUE if layout is fullscreen


gdk_toplevel_layout_get_fullscreen_monitor ()

GdkMonitor *
gdk_toplevel_layout_get_fullscreen_monitor
                               (GdkToplevelLayout *layout);

Returns the monitor that the layout is fullscreening the surface on.

Parameters

layout

a GdkToplevelLayout

 

Returns

the monitor on which layout fullscreens.

[nullable][transfer none]


gdk_toplevel_layout_get_min_width ()

int
gdk_toplevel_layout_get_min_width (GdkToplevelLayout *layout);

Returns the minimum width of the given layout.

Parameters

layout

a GdkToplevelLayout

 

Returns

the minimum width of layout


gdk_toplevel_layout_get_min_height ()

int
gdk_toplevel_layout_get_min_height (GdkToplevelLayout *layout);

Returns the minimum height of the given layout.

Parameters

layout

a GdkToplevelLayout

 

Returns

the minimum height of layout


gdk_toplevel_layout_set_resizable ()

void
gdk_toplevel_layout_set_resizable (GdkToplevelLayout *layout,
                                   gboolean resizable);

Sets whether the layout should allow the user to resize the surface after it has been presented.

Parameters

layout

a GdkToplevelLayout

 

resizable

TRUE to allow resizing

 

gdk_toplevel_layout_get_resizable ()

gboolean
gdk_toplevel_layout_get_resizable (GdkToplevelLayout *layout);

Returns whether the layout should allow the user to resize the surface.

Parameters

layout

a GdkToplevelLayout

 

Returns

TRUE if the layout is resizable

Types and Values

GdkToplevelLayout

typedef struct _GdkToplevelLayout GdkToplevelLayout;