On Thu, 11 Apr 2002 21:05:08 +0200, Danny Backx wrote:

>Hmm, we're probably using the same version of LessTif but not OpenDX.
>I am using 4.1.3. I don't see a call of _XmMapKeyEvents anywhere.
>Are you using the CVS version of OpenDX ?
>
>       Danny

I can jump in here - I checked out OpenDX/CVS meanwhile! :)

configure checks for _XmMapKeyEvents()!
The code itself seems to be:

/*
** The Public Interface to the above.
*/

#ifndef   _NO_PROTO
Boolean TransferAccelerator(Widget shell, Widget source, String action)
#else  /* _NO_PROTO */
Boolean TransferAccelerator(shell, source, action)
        Widget shell ;
        Widget source ;
        String action ;
#endif /* _NO_PROTO */
{
        /*
        ** Installs an accelerator on shell to fire button source
        ** using the same accelerator
        */
        
        char     *accelerator = (char *) 0 ;
        Boolean   retcode     = False ;
        KeySym    keysym=0 ;
        Modifiers modifiers=0 ;

        /*
        ** Fetch the accelerator for the given source of the event.
        */
        
        XtVaGetValues(source, XmNaccelerator, &accelerator, NULL) ;
        
        if (accelerator != (char *) 0) {
                /*
                ** Convert the accelerator to KeySym/Modifier combination.
                */

#if defined(HAVE_XMMAPKEYEVENTS)
                int        count ;
                int       *type_list;
                KeySym    *keysym_list ;
                Modifiers *modifiers_list ;
                
                count = _XmMapKeyEvents(accelerator, &type_list, &keysym_list, 
&modifiers_list) ;

                if (count > 0) {
                        keysym    = *keysym_list ;
                        modifiers = *modifiers_list ;
                        retcode   = True ;
                }
#else  /* (HAVE_XMMAPKEYEVENTS) */
                int       type ;
                retcode = _XmMapKeyEvent(accelerator, &type, (unsigned *) 
&keysym, 
                             &modifiers) ;
#endif /* (HAVE_XMMAPKEYEVENTS) */

                /*
                ** Install the action.
                */

                if (retcode == True) {
                        retcode = InstallAccelerator(shell, keysym, modifiers, 
source, action) ;
                }

                XtFree(accelerator) ;
        }
        
        return retcode ;
}

---
Alexander Mai
[EMAIL PROTECTED]


_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif

Reply via email to