Re: Closing windows in GTK
- From: John Coppens <john jcoppens com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Closing windows in GTK
- Date: Sat, 4 Jun 2005 16:22:33 -0300
On Sat, 04 Jun 2005 20:22:02 +0200
Francisco Fernandez <franfernandezb coit es> wrote:
When GTK shows windows, is assigned any kind of id to them? I mean,
that way I could obtain a reference instead of passing them as
parameters to the callbacks...
Hi Francisco.
You don't get windows for free. You have to create the window with a
sentence like:
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
This gives you 'window' as a pointer to the window, which can then be
close with
gtk_widget_destroy(window); (or hide and show)
and you can pass 'window' as 'data' to the button if you like, or you can
hang it on the button with the g_object_set_data function.
Check the "GTK+ 2.0 Tutorial" there's tons of information there.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]