From: Prabhakaran Selvadurai <[EMAIL PROTECTED]>
Subject: event handling in SDK for Linux..

I looked at the Testplay.cpp which comes with the SDK. It has an
event-handling section for MAC while the player is playing. How Do we do a
similar thing in a Linux Console (i.e. no X-Window).
I would appreciate if anybody could shed some light on this..
..

Here is the code section which doing the even-hanling for MAC..


while (!pPlayer->IsDone())
        {
            WaitNextEvent(everyEvent, &event, 30, nil);
            switch (event.what)
            {
                case keyDown:
                case autoKey:
                    // Determine if command-period pressed
                    if( (event.modifiers & cmdKey) != 0 )
                    {
                        theChar = (event.message & charCodeMask);
                        if (theChar == kPeriodKey)
                        {
                           goto cleanup;
                        }
                    }
                    break;
            }
        
            // Send all events to the player engine
            PNxEvent pPNxEvent;
            pPNxEvent.event  = ((EventRecord*)&event)->what;
            pPNxEvent.param1 = &event;
        
            if ( event.what == updateEvt ) {
                ::BeginUpdate( (WindowPtr)event.message );
            }
        
            pEngine->EventOccurred(&pPNxEvent);
        
            if ( event.what == updateEvt ) {
                ::EndUpdate( (WindowPtr)event.message );
            }
            } */while (!pPlayer->IsDone())
        {
            WaitNextEvent(everyEvent, &event, 30, nil);
            switch (event.what)
            {
                case keyDown:
                case autoKey:
                    // Determine if command-period pressed
                    if( (event.modifiers & cmdKey) != 0 )
                    {
                        theChar = (event.message & charCodeMask);
                        if (theChar == kPeriodKey)
                        {
                           goto cleanup;
                        }
                    }
                    break;
            }
        
            // Send all events to the player engine
            PNxEvent pPNxEvent;
            pPNxEvent.event  = ((EventRecord*)&event)->what;
            pPNxEvent.param1 = &event;
        
            if ( event.what == updateEvt ) {
                ::BeginUpdate( (WindowPtr)event.message );
            }
        
            pEngine->EventOccurred(&pPNxEvent);
        
            if ( event.what == updateEvt ) {
                ::EndUpdate( (WindowPtr)event.message );
            }
            } */




thanks
Prabha



*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites.  Archives of RealForum can
be found at http://realforum.real.com

If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:

    unsubscribe realforum

or from another account, besides the address you subscribed with:

    unsubscribe realforum <[EMAIL PROTECTED]>

Reply via email to