Simple question



Good day,
Developers!

I just have a simple question:

have a window with >> delete_event << attached to a callback, something
like:

void
delete_event_cb (GtkWidget *widget,
                 GdkEvent *event,
                 gpointer data)
{
        ...
        /* destroy window */
        ...
}

When I call this event I pass it a window I want to destroy as data
argument (gpointer). Now, is it OK to call this func from a button
callback (I want to destroy window from this callback now - eg cancel
button):

void
button_cancel (GtkWidget *widget,
               gpointer data)
{
        ...
        delete_event (widget, NULL, data);
}

Thanks!





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