Add the ability to check if an id is a valid event handler or not.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5844 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
45ba680eb6
commit
30712505f1
|
@ -165,6 +165,11 @@ bool widgetIsA(const widget *self, const classInfo *instanceOf)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool widgetIsEventHandler(const widget *self, int id)
|
||||
{
|
||||
return widgetGetEventHandlerById(self, id) ? true : false;
|
||||
}
|
||||
|
||||
static bool widgetAnimationTimerCallback(widget *self, const event *evt,
|
||||
int handlerId, void *userData)
|
||||
{
|
||||
|
|
|
@ -726,6 +726,14 @@ int widgetAddTimerEventHandler(widget *self, eventType type, int interval,
|
|||
*/
|
||||
void widgetRemoveEventHandler(widget *self, int id);
|
||||
|
||||
/**
|
||||
* Returns if id is that of a valid event handler.
|
||||
*
|
||||
* @param self The widget to check if id is a valid event handler for.
|
||||
* @param id The id in question.
|
||||
*/
|
||||
bool widgetIsEventHandler(const widget *self, int id);
|
||||
|
||||
/**
|
||||
* Returns the user-data for the event whose id is id.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue