Property definitions

gtk $ GtkWindow :: defaultinit
# Toplevel which can contain other widgets
# See: https://developer.gnome.org/gtk3/stable/GtkWindow.html
extern class GtkWindow `{GtkWindow *`}
	super GtkBin

	new (typ: GtkWindowType) `{
		return (GtkWindow *)gtk_window_new(typ);
	`}

	# Connect the "destroy" signal to `quit_gtk`
	fun connect_destroy_signal_to_quit `{
		g_signal_connect(self, "destroy", G_CALLBACK(gtk_main_quit), NULL);
	`}

	fun title=(title: String) import String.to_cstring `{
		gtk_window_set_title(self, String_to_cstring(title));
	`}

	# The "destroy" signal is emitted when a widget is destroyed, either by explicitly calling gtk_widget_destroy() or when the widget is unparented. Top-level GtkWindows are also destroyed when the Close window control button is clicked.
	fun on_close(to_call: GtkCallable, user_data: nullable Object)
	do
		signal_connect("destroy", to_call, user_data)
	end

	# Resize the window as if the user had done so
	fun resize(width, height: Int) `{
		return gtk_window_resize(self, width, height);
	`}

	fun resizable: Bool `{
		return gtk_window_get_resizable(self);
	`}

	fun resizable=(is_resizable: Bool) `{
		return gtk_window_set_resizable(self, is_resizable);
	`}

	# Activates the current focused widget within the window.
	# returns TRUE if a widget got activated.
	fun activate_focus: Bool `{
		return gtk_window_activate_focus(self);
	`}

	# Sets a window modal or non-modal. Modal windows prevent interaction with other windows in the same application.
	fun modal=(is_modal: Bool) `{
		gtk_window_set_modal(self, is_modal);
	`}

	# Windows can't actually be 0x0 in size, they must be at least 1x1
	# but passing 0 for width and height is OK, resulting in a 1x1 default size.
	# params width in pixels, or -1 to unset the default width
	# params height in pixels, or -1 to unset the default height
	fun default_size(width: Int, height: Int) `{
		gtk_window_set_default_size(self, width, height);
	`}

	# Activates the default widget for the window
	# unless the current focused widget has been configured to receive the default action (see gtk_widget_set_receives_default()), in which case the focused widget is activated.
	fun activate_default: Bool `{
		return gtk_window_activate_default(self);
	`}

	fun gravity: GdkGravity `{
		return gtk_window_get_gravity(self);
	`}

	fun gravity=(window_grav: GdkGravity) `{
		gtk_window_set_gravity(self, window_grav);
	`}

#	fun position: GtkWindowPosition `{
#		return gtk_window_get_position(self);
#	`}
#
#	fun position=(window_pos: GtkWindowPosition) `{
#		gtk_window_set_position(self, window_pos);
#	`}

	fun active: Bool `{
		return gtk_window_is_active(self);
	`}

	# Returns whether the input focus is within this GtkWindow. For real toplevel windows, this is identical to gtk_window_is_active(), but for embedded windows, like GtkPlug, the results will differ.
	fun has_toplevel_focus: Bool `{
		return gtk_window_has_toplevel_focus(self);
	`}

	fun get_focus: GtkWidget `{
		return gtk_window_get_focus(self);
	`}

	fun set_focus(widget: GtkWidget) `{
		return gtk_window_set_focus(self, widget);
	`}

	fun get_default_widget: GtkWidget `{
		return gtk_window_get_default_widget(self);
	`}

	fun set_default_widget(widget: GtkWidget) `{
		return gtk_window_set_default(self, widget);
	`}

	fun maximize `{
		return gtk_window_maximize(self);
	`}

	fun unmaximize `{
		return gtk_window_unmaximize(self);
	`}

	fun fullscreen `{
		return gtk_window_fullscreen(self);
	`}

	fun unfullscreen `{
		return gtk_window_unfullscreen(self);
	`}

	fun keep_above=(setting: Bool) `{
		gtk_window_set_keep_above(self, setting);
	`}

	fun keep_below=(setting: Bool) `{
		gtk_window_set_keep_below(self, setting);
	`}

	# Try to convince the window manage to decorate or not this window
	fun decorated=(setting: Bool) `{ gtk_window_set_decorated(self, setting); `}
end
lib/gtk/v3_4/gtk_core.nit:194,1--323,3