Property definitions

gtk $ GtkWidget :: defaultinit
# Base class for all widgets
# See: https://developer.gnome.org/gtk3/stable/GtkWidget.html
extern class GtkWidget `{GtkWidget *`}
	fun show_all `{ gtk_widget_show_all(self); `}

	fun signal_connect(signal_name: String, to_call: GtkCallable, user_data: nullable Object) import String.to_cstring, GtkCallable.signal, Object.as not nullable `{
		NitGtkSignal *data = malloc(sizeof(NitGtkSignal));

		GtkCallable_incr_ref(to_call);
		Object_incr_ref(user_data);

		data->to_call = to_call;
		data->user_data = user_data;

		/*Use G_CALLBACK() to cast the callback function to a GCallback*/
		g_signal_connect(self,
		                 String_to_cstring(signal_name),
		                 G_CALLBACK(nit_gtk_callback_func),
		                 data);
	`}

	redef fun ==(o) do return o isa GtkWidget and equal_to_gtk_widget(o)

	private fun equal_to_gtk_widget(o: GtkWidget): Bool `{
		return self == o;
	`}

	# Set the minimum dimension of this widget
	fun set_size_request(width, height: Int) `{
		gtk_widget_set_size_request(self, width, height);
	`}

	fun bg_color=(state: GtkStateType, color: GdkRGBA) `{
		gtk_widget_override_background_color(self, state, color);
	`}

	# with gtk it's possible to set fg_color to all widget: is it correct? is fg color inherited?
	# GdkColor color;
	fun fg_color=(state: GtkStateType, color: GdkRGBA) `{
		gtk_widget_override_color(self, state, color);
	`}

	# Sets the sensitivity of a widget. sensitive -> the user can interact with it.
	# Insensitive -> widget "grayed out" and the user can"t interact with them
	fun sensitive=(sensitive: Bool) `{
		gtk_widget_set_sensitive(self, sensitive);
	`}

	# return the sensitivity of the widget
	fun sensitive: Bool `{
		return gtk_widget_get_sensitive(self);
	`}

	# Set the visibility of the widget
	fun visible=(visible: Bool) `{
		gtk_widget_set_visible(self, visible);
	`}

	# Get the visibility of the widget only
	fun visible_self: Bool `{
		return gtk_widget_get_visible(self);
	`}

	# Destroy the widget
	fun destroy `{ gtk_widget_destroy(self); `}

	# Show the widget on screen
	#
	# See: `show_all` to recursively show this widget and contained widgets.
	fun show `{ gtk_widget_show(self); `}

	# Hide the widget (reverse the effects of `show`)
	fun hide `{ gtk_widget_hide(self); `}

	# Vertical alignement of this widget
	fun valign=(value: GtkAlign) `{ gtk_widget_set_valign(self, value); `}

	# Horizontal alignement of this widget
	fun halign=(value: GtkAlign) `{ gtk_widget_set_halign(self, value); `}
end
lib/gtk/v3_4/gtk_core.nit:68,1--147,3