Re: performer and FORMS library

New Message Reply Date view Thread view Subject view Author view

Richard Mercille (rim++at++loukoum.neu.sgi.com)
Tue, 13 Dec 1994 13:41:07 +0100


On Dec 13, 10:56am, Desmond Hii Toh Onn wrote:
> Subject: performer and FORMS library
> Has anyone tried integrating Forms and performer?
> what are the issues involved?
>
> thanks in advance for any comment.
>
> Desmond
>
>
>-- End of excerpt from Desmond Hii Toh Onn

*************************************************************************

Hi,

I did two versions of Performer with Forms. One with Performer inside the
form and one with Performer outside.

Normal perfly.c (or complex.c) code with the addition of

*************************
First Case : INSIDE FORMS
*************************

static void
OpenPipeline(pfPipe *p)
{
   long formwin, submwin;

    /* negotiate with window-manager */
    foreground();

    fl_init();
    create_the_forms();
        fl_set_button(Stat,1);
        fl_addto_choice(Mode,"FREE");
        fl_addto_choice(Mode,"FLOAT");
        fl_addto_choice(Mode,"LIMIT");
        fl_addto_choice(Mode,"LOCK");
    formwin = fl_show_form(formGUI,FL_PLACE_CENTER,TRUE,"Title");
    submwin = swinopen(formwin);
                ^^^^ This is the way to get Performer in forms
    winposition(11,735,129,752);
    winconstraints();

        ........

}

***************************
Second Case : OUTSIDE FORMS
***************************

void
formsLink(void)
{
    FL_OBJECT *obj;
    char buf[80];

     /* if remoteGUI is defined user++at++donaim */
     /* You can have the GUI on another host */
    if(remoteGUI) {
        sprintf(buf, "%s:0.0", login);
        if(dglopen(buf, DGLTSOCKET) >= 0) {
            printf("\nRemote connection SUCCEDED\n");
        }
    }

    fl_init();
    create_the_forms();

    /* INITIALIZATION OF FORMS */

    /* Main Loop */
    fl_show_form(pformsRoot, FL_PLACE_CENTER, FALSE, NULL);

    while(!Shared->exitFlag) {
        obj=fl_check_forms();
    }
}

static void
OpenPipeline(pfPipe *p)
{
    pid_t stat;
    float xSize = 800;
    float ySize = 500;

    /* negotiate with window-manager */
    foreground();

    /*
     * Fork user interface
     */
    if((stat=fork()) == 0) {
        formsLink();
        exit(0);
    }

    if(stat < 0) {
        perror("Fork Failed");
        exit(0);
    }

    winopen("IRIS Performer");
    winconstraints();
    /* register events of note with event-queue manager */
    qdevice(ESCKEY);

    /* negotiate with GL */
    pfInitGfx(p);

        .............

}

Ciao

-- 

------------------------- Richard Mercille European Graphics Lab Cortaillod, Switzerland

Email rim++at++neu.sgi.com VMail 5-8408

Phone +41.38.43.35.29 Fax +41.38.43.39.05


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:44 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.