Re: How to operate dynamicly allocated data
- From: Lindley M French <lfrench1 gmu edu>
- To: gtk-list gnome org
- Subject: Re: How to operate dynamicly allocated data
- Date: Fri, 22 Feb 2008 16:45:16 -0500
Well, the way that seems obvious to me would be to attach the newly allocated data in some way to the user_data pointer passed to the first callback, and have it accessible via the user_data pointer of the second callback as well.
In the simplest case, the pointer passed to the first would be the address of the pointer passed to the second.
----- Original Message -----
From: Daniel Lewandowski <dereach gmail com>
Date: Friday, February 22, 2008 4:30 pm
Subject: How to operate dynamicly allocated data
> Hi,
> I'd like to ask about idea how to make in program written in C/gtk
> operation on dynamic allocated data between few callback function.
>
> I have two buttons.
> On clicked first I call callback and inside this function I read data
> from file. Data is allocated inside dynamic structure like this one:
>
> X = g_new0 (gfloat, number_of_my_data_in_file);
>
> Now I'd like to have access to this data when I clicked other button
> later, in other callback function.
>
> How to do this ?
>
>
> Daniel
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]