X-Git-Url: http://nitlanguage.org?ds=sidebyside diff --git a/lib/gtk/v3_4/gtk_core.nit b/lib/gtk/v3_4/gtk_core.nit index cee996c..64b7b49 100644 --- a/lib/gtk/v3_4/gtk_core.nit +++ b/lib/gtk/v3_4/gtk_core.nit @@ -116,6 +116,17 @@ extern class GtkWidget `{GtkWidget *`} fun visible_self: Bool is extern `{ return gtk_widget_get_visible(recv); `} + + # Destroy the widget + fun destroy `{ gtk_widget_destroy(recv); `} + + # Show the widget on screen + # + # See: `show_all` to recursively show this widget and contained widgets. + fun show `{ gtk_widget_show(recv); `} + + # Hide the widget (reverse the effects of `show`) + fun hide `{ gtk_widget_hide(recv); `} end #Base class for widgets which contain other widgets @@ -393,8 +404,8 @@ extern class GtkEntry `{GtkEntry *`} return (GtkEntry *)gtk_entry_new(); `} - fun text : String is extern import String.to_cstring`{ - return NativeString_to_s( (char *)gtk_entry_get_text( recv ) ); + fun text : String is extern import NativeString.to_s_with_copy `{ + return NativeString_to_s_with_copy( (char *)gtk_entry_get_text( recv ) ); `} fun text=( value : String) is extern import String.to_cstring`{