Syntax
ItemBlock ItemGetBlock( const ITEM *item );
Arguments
item is the ITEM to read.
Return value
The stored callback, or NULL if the input is NULL or has another type.
Description
Check the returned function pointer before calling it.
Example
#include "xdev-wtui.h"
#include <stdio.h>
static int doubleValue( int value )
{
return value * 2;
}
int main( void )
{
ITEM *item = ItemPutBlock( NULL, doubleValue );
ItemBlock operation = ItemGetBlock( item );
if( operation )
printf( "%d\n", operation( 21 ) );
ItemRelease( item );
return 0;
}
Output
42