/* Standard headers */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
/* Local headers */
#include "ablibs.h"
#include "abimport.h"
#include "proto.h"
#include <photon/PxImage.h>
int
ShowImage( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo )
{
PhImage_t *myImg;
char myImgFlnm[20] = "PICTURE.BMP";
/* eliminate 'unreferenced' warnings */
widget = widget, apinfo = apinfo, cbinfo = cbinfo;
if ((myImg = PxLoadImage( myImgFlnm, NULL)) == NULL) {
fprintf( stderr, "Error loading image file %s\n", myImgFlnm);
PtExit( EXIT_FAILURE );
}
PtSetResource(ABW_lblMyImg, Pt_ARG_LABEL_IMAGE, myImg, 0);
return( Pt_CONTINUE );
}
Explanation
NULL
pointer.PtSetResource
and is identified
by its ABW_
manifest. The particular resource to be
modified (set) is given by the second parameter, which is
specified using the Pt_ARG_
identifier. The use of
the last parameter depends on the resource being set.Home | About Me | Copyright © Neil Carter |
Content last updated: 2003-09-23