Re: [gtk-list] How to use a gpointer?
- From: "Christian B. Westermann" <christian westermann phim unibe ch>
 
- To: gtk-list redhat com
 
- Subject: Re: [gtk-list] How to use a gpointer?
 
- Date: Wed, 03 Mar 1999 15:37:01 +0100
 
..........
as far as gpointer is void*:
gtk_signal_connect(GTK_OBJECT(button),"clicked",
GTK_SIGNAL_FUNC(handle_value),(gpointer)(&value));
> .
> .
> .
> static void handle_value(GtkWidget *widget,gpointer data)
> {
> int the_value;
> 
> the_value=??????data; 
and the_value=*((int*)date);
This should work.
No, it didn't. What do you mean with "as far as gpointer is void*"?
Can you maybe give me another example, how you can pass an int into a
GTK_SIGNAL_FUNC using the gpointer?
Chris
-- 
====================================================================
Ch. B. Westermann
University of Bern         
Physikalisches Institut      
Sidlerstrasse 5            phone: +41(0)31 6314417
3012 Bern                    fax: +41(0)31 6314405
Switzerland                email: christian.westermann@phim.unibe.ch
 			   http://phimcasymir.unibe.ch/casymir/cas_SS.html
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]