Re: changin pixmap on mouse enter
- From: Paul Davis <pbd Op Net>
- To: neeraj sharma <neeraj_champion yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: changin pixmap on mouse enter
- Date: Fri, 09 Nov 2001 02:30:32 -0500
> I put a pixmap on a button now on click of that
>button
> I want to change that pixmap and connect to another
> window of the application.Do anybody has solution for
>that.
>In doing that main problem I think I am facing is to
>pass my own arguments in the function
>on_button_clicked.As it has predefined arguments.
yes, just like all GTK+ signal handling functions. you have to gather
up the arguments into a struct, and pass a pointer to it when you
connect to the signal. hints:
typedef struct {
int foo;
void *bar;
float baz;
} MyStruct;
MyStruct *ms = g_new (1, MyStruct);
ms->foo = 1;
ms->bar = ms;
ms->baz = M_PI;
gtk_signal_connect (GTK_OBJECT(button), "clicked",
(GtkSignalFunc) on_button_clicked,
(gpointer) ms);
void on_button_clicked (GtkWidget *w, gpointer data)
{
MyStruct *ms = (MyStruct *) data;
.... do something ...
}
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]