Example #1
0
void x_sync_off()
{
	Disp_Obj *dop;

	dop = curr_dop();
	if( dop == NO_DISP_OBJ ) return;

	XSynchronize(dop->do_dpy,False);
}
Example #2
0
File: dpymenu.c Project: nasa/QuIP
static COMMAND_FUNC( do_tell_dpy )
{
	Disp_Obj *dop;
	const char *s;

	s=NAMEOF("name of variable in which to deposit name of current display");

	dop = curr_dop();
	if( dop == NULL ){
		WARN("do_tell_dpy:  no current display!?");
		return;
	}

	assign_var(s,DO_NAME(dop));
}
Example #3
0
File: motif.c Project: E-LLP/QuIP
void make_panel(QSP_ARG_DECL  Panel_Obj *po,int width,int height)
{
#ifdef HAVE_MOTIF
	Arg al[64];
	int ac = 0;

	SET_PO_DOP(po, curr_dop());
#ifdef CAUTIOUS
	if( PO_DOP(po) == NO_DISP_OBJ )
		ERROR1("CAUTIOUS:  no display object");
#endif


	set_curr_win(PO_ROOTW(po));
	/* let the panel share a colormap? */

	/* set parameters for the "panel" (shell) to be created */
	XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;	/* used to be true!? */
	XtSetArg(al[ac], XmNx, po->po_x); ac++;
	XtSetArg(al[ac], XmNy, po->po_y); ac++;
	XtSetArg(al[ac], XmNwidth, width); ac++;
	XtSetArg(al[ac], XmNheight, height); ac++;

	po->po_frame_obj = (Widget) XtAppCreateShell(PO_NAME(po), "guimenu",
				applicationShellWidgetClass, display,
				al, ac);

	if( po->po_frame_obj == (Widget) NULL )
		ERROR1("error creating frame");

	ac = 0;
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	po->po_panel_obj = XmCreateForm(po->po_frame_obj, (String) NULL,
				al, ac);

	if( (Widget) po->po_panel_obj == (Widget) NULL )
		ERROR1("error creating panel");

	po->po_dpy = XtDisplay(po->po_frame_obj);
	po->po_screen_no = DefaultScreen(po->po_dpy);
	po->po_gc = DefaultGC(po->po_dpy,DefaultScreen(po->po_dpy));
	po->po_visual = DefaultVisual(po->po_dpy,po->po_screen_no);

	/* indicate that the panel has not yet been realized */
	po->po_realized = 0;
	/* po->po_flags = 0; */		/* the caller did this already... */

	XtManageChild(po->po_panel_obj);

	/* XXX unsupported until I figure this out */
	/*po->po_xwin = xv_get(po->po_frame_obj,XV_XID);*/

	/* this gives "incomplete type" compiler error */
	/* po->po_xwin = po->po_panel_obj->core.window; */

	po->po_xwin = XtWindow( po->po_panel_obj );
//fprintf(stderr,"XtWindow returned 0x%lx\n",(long)po->po_xwin);

#endif /* HAVE_MOTIF */

	/* For compatibility w/ iOS, we make a viewer with the same
	 * name that points to the same window...
	 */
} /* end make_panel */