XPWidgetFunc_t
typedef int (* XPWidgetFunc_t)(
XPWidgetMessage inMessage,
XPWidgetID inWidget,
intptr_t inParam1,
intptr_t inParam2);
This function defines your custom widget’s behavior. It will be called by the widgets library to send messages to your widget. The message and widget ID are passed in, as well as two pointer-width signed parameters whose meaning varies with the message. Return 1 to indicate that you have processed the message, 0 to indicate that you have not. For any message that is not understood, return 0.