Method

GtkWindowresize

Declaration [src]

void
gtk_window_resize (
  GtkWindow* window,
  gint width,
  gint height
)

Description [src]

Resizes the window as if the user had done so, obeying geometry constraints. The default geometry constraint is that windows may not be smaller than their size request; to override this constraint, call gtk_widget_set_size_request() to set the window’s request to a smaller value.

If gtk_window_resize() is called before showing a window for the first time, it overrides any default size set with gtk_window_set_default_size().

Windows may not be resized smaller than 1 by 1 pixels.

When using client side decorations, GTK+ will do its best to adjust the given size so that the resulting window size matches the requested size without the title bar, borders and shadows added for the client side decorations, but there is no guarantee that the result will be totally accurate because these widgets added for client side decorations depend on the theme and may not be realized or visible at the time gtk_window_resize() is issued.

If the GtkWindow has a titlebar widget (see gtk_window_set_titlebar()), then typically, gtk_window_resize() will compensate for the height of the titlebar widget only if the height is known when the resulting GtkWindow configuration is issued. For example, if new widgets are added after the GtkWindow configuration and cause the titlebar widget to grow in height, this will result in a window content smaller that specified by gtk_window_resize() and not a larger window.

Parameters

width

Type: gint

Width in pixels to resize the window to.

height

Type: gint

Height in pixels to resize the window to.