Re: g_signal_connect -- "button_press_event" vs. "pressed"



On Dec 26, 2007 2:55 PM, Charles Packer <mailbox cpacker org> wrote:
> If I code a button like this (I'm using whatever version
> of GTK it is that came with Fedora Core 5)...
>
>         GtkWidget *B = gtk_button_new_with_label (Label);
>         g_signal_connect (GTK_OBJECT (B), "button-press-event",
>                 G_CALLBACK (Happened), "HELLO");
>
> and the callback is this...
>
>         Happened (GtkWidget *W, gpointer Data) {
>                 g_print ("ButtonHappened...|%s|\n", (char *) Data);
>         }
>
> when Happened is executed, it doesn't
> print the data.

I'm having a dejavu? :) you have already asked this question few days ago

look at he signatures:

button-press-event:

gboolean
func (GtkWidget *widget, GdkEventButton *event, gpointer user_data)

pressed:

void
func (GtkButton *button, gpointer user_data)

cheers
-- 
Gian Mario Tagliaretti


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]