int main ( int argc , char **argv ) /************************************************************************ * main * * * * Main program for ncolor. * * * * main ( argc, argv ) * * Input paramaters: * * argc int number of input arguments * * **argv char input arguments * * * * Output paramaters: * * NONE * ** * * Log: * * E. Safford/GSC 12/98 initial coding * * T. Piper/SAIC 05/03 removed proto_ncolor.h * * T. Piper/SAIC 07/03 removed unnecessary xwcmn.h * ***********************************************************************/ { Widget top_level; XtAppContext app; Screen *screen; /*---------------------------------------------------------------------*/ top_level = XtAppInitialize( &app, RESOURCE_FILE, NULL, 0, &argc, argv, NULL, NULL, 0); screen = XtScreen(top_level); XtVaSetValues (top_level, XmNminWidth, 625, XmNx, 90, XmNy, HeightOfScreen(screen) - 25, NULL); /* * check resource file */ NxmRes_check(XtDisplay(top_level), RESOURCE_FILE, NULL); /* * initialize GEMPAK variables */ if ( NxmGmpkInit(top_level, 2, NULL ) != 0 ) { exit(1); } ncolor_create(top_level); XtRealizeWidget(top_level); NxmGmpkRgstr(top_level, "ncolor", NULL); XtAppMainLoop(app); return(0); }
int wnxm_NxmGmpkInit( Widget wid, int mode, void( *init_func )(int *iret ) ) /************************************************************************ * wnxm_NxmGmpkInit * * * * void wnxm_NxmGmpkInit( wid, mode, init_func ) * * * * Input parameters: * * wid Widget widget id * * mode int 1 = map, 2 = graph * * *init_func() void initialization function from appl * * * * Output parameters: * * None * * Return: * * int G_NORMAL = successful * * -1 = error * ** * * Log: * * E. Safford/SAIC 12/07 initial coding * ***********************************************************************/ { return( NxmGmpkInit( wid, mode, init_func ) ); }