How to use a gpointer?
- From: "Christian B. Westermann" <christian westermann phim unibe ch>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: How to use a gpointer?
- Date: Wed, 03 Mar 1999 11:18:49 +0100
Can anybody show me how to use a gpointer. In the following example I
want to use the variable 'value' in my function 'handle_value'. I filled
the spaces with ??? where I don't know how to do it.
-------------------------------------
int value=10, *value_ptr;
value_ptr=&value;
.
.
.
gtk_signal_connect(GTK_OBJECT(button),"clicked",
GTK_SIGNAL_FUNC(handle_value),(gpointer)???);
.
.
.
static void handle_value(GtkWidget *widget,gpointer data)
{
int the_value;
the_value=??????data;
printf("%i",the_value);
}
-------------------------------------
Thank you
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]