[fpc-pascal] gdk_window_get_frame_extents
Flávio Etrusco
flavio.etrusco at gmail.com
Mon Jun 4 00:10:02 CEST 2007
I don't have access to FPC right now, but it seems as if PGdkRectangle
is a pointer type already, not a record type?
-Flávio
On 6/3/07, Airr <airrsongs at gmail.com> wrote:
> Hello, all.
>
> I'm trying to get the current position and size of a GTK2 gtkwindow
> using the following:
>
> ===
> function configure_event(widget: PGtkWidget; event : PGdkEvent; data :
> gpointer):gboolean;cdecl;
>
> var
> grect :PGdkRectangle;
>
> begin
> gdk_window_get_frame_extents(GDK_WINDOW(widget^.window), at grect);
>
>
> configure_event := True;
> end;
> ===
>
> The signal is attached to the window via:
>
> ===
> g_signal_connect (G_OBJECT (window), 'configure_event',
> G_CALLBACK (@configure_event), NULL);
> ===
>
> Executing the program results in:
>
> An unhandled exception occurred at $0000004B :
> EAccessViolation : Access violation
> $0000004B
>
> FPC version is:
> Free Pascal Compiler version 2.0.4 [2007/02/02] for i386
>
> OS is: Kubuntu 7.04
>
> Any thoughts on why this is causing the AV?
>
> Thanks!
>
> AIR.
> --
> "Programming is like Poetry. Sometimes the words just escape you..."
> -me, to my manager.
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list