Re: GTK_WINDOW to GDK_WINDOW



Havoc Pennington wrote:

Just use GTK_WINDOW (window)->allocation.width,
GTK_WINDOW (window)->allocation.height, for the window size.

I hate to say it but:

(from my callback.c)

void CloseApp( GtkWidget *window, gpointer data )
{
        preferences *gp = data;

        gp->default_toplevel_x = GTK_WINDOW(window)->allocation.width;
        gp->default_toplevel_y = GTK_WINDOW(window)->allocation.height;

        g_print( "X: %d\n", gp->default_toplevel_x );
        g_print( "Y: %d\n", gp->default_toplevel_y );

        gtk_main_quit();
}

[egon leela src]$ make
gcc -Wall -g `gtk-config --cflags` -c callback.c
callback.c: In function `CloseApp':
callback.c:25: structure has no member named `allocation'
callback.c:26: structure has no member named `allocation'
make: *** [callback.o] Error 1

[egon leela src]$ rpm -qa | grep "^gtk+-"
gtk+-1.2.8-6mdk
gtk+-devel-1.2.8-6mdk

--
Pretend there's a witty saying here.

Cole Tuininga




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]