View Full Version : [GTK+] delete_event and destroy handlers

April 10th, 2009, 01:05 AM
I recently began adapting my CLI program to GTK and finally narrowed my compile-time bugs to these:
interface.c: In function ‘start’:
interface.c:367: error: ‘delete_event’ undeclared (first use in this function)
interface.c:367: error: (Each undeclared identifier is reported only once
interface.c:367: error: for each function it appears in.)
interface.c:372: error: ‘destroy’ undeclared (first use in this function)interface.c does import <gtk/gtk.h>; what else might I be missing? Are these handlers obsolete, by any chance?

EDIT: I'm sorry, this was a stupid question. I'm supposed to define the callbacks... I thought they were predefined.


April 10th, 2009, 01:12 AM
Need more context information (the code itself) to see whats happening, but probabily you're tryingto connect a signal, and you need to pass "delete-event" (as a string, not as an identifier).

April 10th, 2009, 02:54 PM
Nah, I had monkeyed some code which passed a delete_event callback and then stupidly deleted the callback's definition. Weeks later as I came back to the project, I thought it was a predefined function.