找到input_cb的位置,假如下面的代码。
int MY_input_cb ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
UF_STYLER_item_value_type_t value;
int irc;
char string[133];
/* Make sure User Function is available. */
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
/* read your input */
value.item_id=MY_ITEM;
value.indicator=UF_STYLER_STRING_VALUE;
value.item_attr=UF_STYLER_VALUE;
UF_STYLER_ask_value(dialog_id, [$value)]
strcpy(string, value.value.string);
UF_STYLER_free_value([$value)]
/** add it to the single list */
value.item_id=MY_ITEM_LIST;
value.item_attr = UF_STYLER_LIST_INSERT;
value.subitem_index = UF_STYLER_NO_SUB_INDEX;
value.indicator = UF_STYLER_STRING_VALUE;
value.value.string = string;
irc = UF_STYLER_set_value(dialog_id, [$value)]
if(irc)
{
char message[132];
UF_get_fail_message(irc, message);
} UF_terminate (); |