void motif_init(QSP_ARG_DECL const char *progname) { const char *argv[1]; int argc=1; argv[0]=progname; the_dname = check_display(SINGLE_QSP_ARG); /* * initialize the Xt toolkit and create an application context * and shell */ XtSetLanguageProc ( (XtAppContext) NULL, (XtLanguageProc) NULL, (XtPointer) NULL ); XtToolkitInitialize (); globalAppContext = XtCreateApplicationContext (); display = XtOpenDisplay (globalAppContext, the_dname, argv[0],"guimenu", NULL, 0, &argc, (char **)argv); if (!display) { fprintf(stderr, "can't open display\n"); return; } add_event_func(QSP_ARG motif_dispatch); // This is not really a motif-specific thing, // but we do this here because nav_panel_itp is // static to this file... if( nav_panel_itp == NO_ITEM_TYPE ){ init_nav_panels(SINGLE_QSP_ARG); add_genwin(QSP_ARG nav_panel_itp, &navp_genwin_funcs, NULL); } }
void _so_init(QSP_ARG_DECL int argc,const char **argv) { static int so_inited=0; if( so_inited ) return; window_sys_init(SINGLE_QSP_ARG); #ifdef HAVE_MOTIF motif_init(argv[0]); #endif /* HAVE_MOTIF */ #ifndef BUILD_FOR_OBJC if(panel_obj_itp == NULL) init_panel_objs(); /* support for genwin */ add_genwin(panel_obj_itp, &gwfp, NULL); add_sizable(panel_obj_itp,&panel_sf, NULL ); // scrnobj_itp is null at this point!? if( scrnobj_itp == NULL ) init_scrnobjs(); add_sizable(scrnobj_itp,&scrnobj_sf, NULL ); #else //if(panel_obj_itp == NULL) // init_panel_objs(SINGLE_QSP_ARG); #endif /* ! BUILD_FOR_OBJC */ // We need to have genwin's be sizable for ios too!? so_inited=1; }