Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ LookupIEDB(3W) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

OlCreateInputEventDB(3W)

OlClassSearchIEDB(3W)

OlClassSearchTextDB(3W)

OlWidgetSearchIEDB(3W)

OlWidgetSearchTextDB(3W)

OlLookupInputEvent(3W)



OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


                                Database Utilities

NAME
      OlLookupInputEvent - translates an X event to an OPEN LOOK virtual event

SYNOPSIS
      #include <Xol/OpenLook.h>
          ...
      void
      OlLookupInputEvent(w, xevent, virtual_event_ret, db_flag)
              Widget          w;
              XEvent *        xevent;
              OlVirtualEvent  virtualeventret;
              XtPointer       dbflag;

DESCRIPTION
      The OlLookupInputEvent procedure is used to translate a X event to an
      OPEN LOOK virtual event. The X event (xevent) could be a KeyPress,
      ButtonPress, ButtonRelease, EnterNotify, LeaveNotify, or MotionNotify
      event. The procedure attempts to translate this event based on the
      setting of the OPEN LOOK defined dynamic databases.

      The virtual_event_ret parameter is a pointer to an OlVirtualEventRec
      structure:

      typedef struct {
           Boolean         consumed;
           XEvent *        xevent;
           Modifiers       dontcare;
           OlVirtualName   virtualname;
           KeySym          keysym;
           String          buffer;
           Cardinal          length;
           Cardinal        itemindex;
      } OlVirtualEventRec, *OlVirtualEvent;

      If the X event is a KeyPress, the keysym, buffer, and length information
      will be included in virtual_event_ret. The information was returned from
      a call to XLookupString(3X).

      The db_flag parameter is an XtPointer type.  The valid values are
      OLDEFAULTIE, OLCOREIE, OLTEXTIE, or the return value from a
      OlCreateInputEventDB(3W) call.

      The (w, db_flag) pair determines the searching database(s).  If the
      db_flag value is not OLDEFAULTIE then only the given database (e.g.,
      OLTEXTIE means: search the OPEN LOOK TEXT database) will be searched,
      otherwise a search stack will be built. This stack is based on the widget
      information (w) and the registering order (see OlSearchClassIEDB(3W),
      OlSearchClassTextDB(3W), OlSearchWidgetIEDB(3W), and
      OlSearchWidgetTextDB(3W) for details) to determine the searching
      database(s). Once this stack is built, the procedure uses the LIFO (Last


10/89                                                                    Page 1







OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


      In First Out) fashion to perform the search.

      All widgets have an XtNconsumeEvent callback.  When this callback is
      called, the call_data field is a pointer to an OlVirtualEventRec
      structure which is filled in with the results of calling
      OlLookupInputEvent()fP with the db_flag set to OL_DEFAULT_IE.

   OPEN LOOK Defined Databases
      NOTE: For readability, we have abbreviated the following keys in the
      Default Bindings column:
      __________________________
     | Key         Abbreviation|
     |_________________________|
     | Shift key   s           |
     | Alt key     a           |
     | Ctrl key    c           |
     |_________________________|
      ________________________________________________________________________________
     |                           Core Database (OLCOREIE)                          |
     |________________|____________________|____________________|____________________|
     |________________|____________________|____________________|____________________|
     | Command Name   |  Virtual Expression|  Virtual Event     |  Default Binding   |
     |________________|____________________|____________________|____________________|
      ________________________________________________________________________________
       ADJUST            adjustBtn            OL_ADJUST            <Button2>
      ________________________________________________________________________________
       ADJUSTKEY         adjustKey            OL_ADJUSTKEY         c s<ampersand>
      ________________________________________________________________________________
       CANCEL            cancelKey            OL_CANCEL            <Escape>
      ________________________________________________________________________________
       CONSTRAIN         constrainBtn         OL_CONSTRAIN         c<Button1>
      ________________________________________________________________________________
       COPY              copyKey              OL_COPY              c<Insert>
      ________________________________________________________________________________
       CUT               cutKey               OL_CUT               s<Delete>
      ________________________________________________________________________________
       DEFAULTACTION     defaultActionKey     OL_DEFAULTACTION     <Return>,c<Return>
      ________________________________________________________________________________
       DRAG              dragKey              OL_DRAG              <F5>
      ________________________________________________________________________________
       DROP              dropKey              OL_DROP              <F2>
      ________________________________________________________________________________
       DUPLICATEKEY      duplicateKey         OL_DUPLICATEKEY      s<space>
      ________________________________________________________________________________
       HELP              helpKey              OL_HELP              <F1>
      ________________________________________________________________________________
       HSBMENU           horizSBMenuKey       OL_HSBMENU           a c<r>
      ________________________________________________________________________________
       MENU              menuBtn              OL_MENU              <Button3>
      ________________________________________________________________________________
       MENUDEFAULT       menuDefaultBtn       OL_MENUDEFAULT       s<Button3>
      ________________________________________________________________________________


Page 2                                                                    10/89







OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


      ________________________________________________________________________________
     |                           Core Database (OLCOREIE)                          |
     |________________|____________________|____________________|____________________|
     |________________|____________________|____________________|____________________|
     | Command Name   |  Virtual Expression|  Virtual Event     |  Default Binding   |
     |________________|____________________|____________________|____________________|
       MENUDEFAULTKEY    menuDefaultKey       OL_MENUDEFAULTKEY    c<M>,s<F4>
      ________________________________________________________________________________
       MENUKEY           menuKey              OL_MENUKEY           c<m>,<F4>
      ________________________________________________________________________________
       MOVEDOWN          downKey              OL_MOVEDOWN          <Down>
      ________________________________________________________________________________
       MOVELEFT          leftKey              OL_MOVELEFT          <Left>
      ________________________________________________________________________________
       MOVERIGHT         rightKey             OL_MOVERIGHT         <Right>
      ________________________________________________________________________________
       MOVEUP            upKey                OL_MOVEUP            <Up>
      ________________________________________________________________________________
       MULTIDOWN         multiDownKey         OL_MULTIDOWN         c<Down>
      ________________________________________________________________________________
       MULTILEFT         multiLeftKey         OL_MULTILEFT         c<Left>
      ________________________________________________________________________________
       MULTIRIGHT        multiRightKey        OL_MULTIRIGHT        c<Right>
      ________________________________________________________________________________
       MULTIUP           multiUpKey           OL_MULTIUP           c<Up>
      ________________________________________________________________________________
       NEXTAPP           nextAppKey           OL_NEXTAPP           a<Escape>
      ________________________________________________________________________________
       NEXT_FIELD        nextFieldKey         OL_NEXT_FIELD        <Tab>,c<Tab>
      ________________________________________________________________________________
       NEXTWINDOW        nextWinKey           OL_NEXTWINDOW        a<F6>
      ________________________________________________________________________________
       PAGEDOWN          pageDownKey          OL_PAGEDOWN          c<Next>
      ________________________________________________________________________________
       PAGELEFT          pageLeftKey          OL_PAGELEFT          c<bracketleft>
      ________________________________________________________________________________
       PAGERIGHT         pageRightKey         OL_PAGERIGHT         c<bracketright>
      ________________________________________________________________________________
       PAGEUP            pageUpKey            OL_PAGEUP            c<Prior>
      ________________________________________________________________________________
       PAN               panBtn               OL_PAN               a<Button1>
      ________________________________________________________________________________
       PASTE             pasteKey             OL_PASTE             s<Insert>
      ________________________________________________________________________________
       PREVAPP           prevAppKey           OL_PREVAPP           a s<Escape>
      ________________________________________________________________________________
       PREV_FIELD        prevFieldKey         OL_PREV_FIELD        s<Tab>,c s<Tab>
      ________________________________________________________________________________
       PROPERTY          propertiesKey        OL_PROPERTY          c<p>
      ________________________________________________________________________________
       SCROLLBOTTOM      scrollBottomKey      OL_SCROLLBOTTOM      a<Next>
      ________________________________________________________________________________


10/89                                                                    Page 3







OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


      ________________________________________________________________________________
     |                           Core Database (OLCOREIE)                          |
     |________________|____________________|____________________|____________________|
     |________________|____________________|____________________|____________________|
     | Command Name   |  Virtual Expression|  Virtual Event     |  Default Binding   |
     |________________|____________________|____________________|____________________|
       SCROLLDOWN        scrollDownKey        OL_SCROLLDOWN        <Next>
      ________________________________________________________________________________
       SCROLLLEFT        scrollLeftKey        OL_SCROLLLEFT        a<bracketleft>
      ________________________________________________________________________________
       SCROLLLEFTEDGE    scrollLeftEdgeKey    OL_SCROLLLEFTEDGE    a s<braceleft>
      ________________________________________________________________________________
       SCROLLRIGHT       scrollRightKey       OL_SCROLLRIGHT       a<bracketright>
      ________________________________________________________________________________
       SCROLLRIGHTEDGE   scrollRightEdgeKey   OL_SCROLLRIGHTEDGE   a s<braceright>
      ________________________________________________________________________________
       SCROLLTOP         scrollTopKey         OL_SCROLLTOP         a<Prior>
      ________________________________________________________________________________
       SCROLLUP          scrollUpKey          OL_SCROLLUP          <Prior>
      ________________________________________________________________________________
       SELCHARBAK        selCharBakKey        OL_SELCHARBAK        s<Left>
      ________________________________________________________________________________
       SELCHARFWD        selCharFwdKey        OL_SELCHARFWD        s<Right>
      ________________________________________________________________________________
       SELECT            selectBtn            OL_SELECT            <Button1>
      ________________________________________________________________________________
       SELECTKEY         selectKey            OL_SELECTKEY         <space>,c<space>
      ________________________________________________________________________________
       SELFLIPENDS       selFlipEndsKey       OL_SELFLIPENDS       a<Insert>
      ________________________________________________________________________________
       SELLINE           selLineKey           OL_SELLINE           c a<Left>
      ________________________________________________________________________________
       SELLINEBAK        selLineBakKey        OL_SELLINEBAK        s<Home>
      ________________________________________________________________________________
       SELLINEFWD        selLineFwdKey        OL_SELLINEFWD        s<End>
      ________________________________________________________________________________
       SELWORDBAK        selWordBakKey        OL_SELWORDBAK        c s<Left>
      ________________________________________________________________________________
       SELWORDFWD        selWordFwdKey        OL_SELWORDFWD        c s<Right>
      ________________________________________________________________________________
       STOP              stopKey              OL_STOP              c<s>
      ________________________________________________________________________________
       TOGGLEPUSHPIN     togglePushpinKey     OL_TOGGLEPUSHPIN     c<t>
      ________________________________________________________________________________
       UNDO              undoKey              OL_UNDO              a<BackSpace>
      ________________________________________________________________________________
       VSBMENU           vertSBMenuKey        OL_VSBMENU           c<r>
      ________________________________________________________________________________
       WINDOWMENU        windowMenuKey        OL_WINDOWMENU        s<Escape>
      ________________________________________________________________________________
       WORKSPACEMENU     workspaceMenuKey     OL_WORKSPACEMENU     c<w>
      ________________________________________________________________________________


Page 4                                                                    10/89







OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


      ________________________________________________________________________________
     |                           Core Database (OLCOREIE)                          |
     |________________|____________________|____________________|____________________|
     |________________|____________________|____________________|____________________|
     | Command Name   |  Virtual Expression|  Virtual Event     |  Default Binding   |
     |________________|____________________|____________________|____________________|
      _________________________________________________________________________
     |                       Text Database (OLTEXTIE)                       |
     |_______________|_____________________|________________|_________________|
     |_______________|_____________________|________________|_________________|
     | Command Name  |  Virtual Expression |  Virtual Event |  Default Button |
     |_______________|_____________________|________________|_________________|
      _________________________________________________________________________
       CHARBAK          charBakKey            OL_CHARBAK       <Left>
      _________________________________________________________________________
       CHARFWD          charFwdKey            OL_CHARFWD       <Right>
      _________________________________________________________________________
       DELCHARBAK       delCharBakKey         OL_DELCHARBAK    <BackSpace>
      _________________________________________________________________________
       DELCHARFWD       delCharFwdKey         OL_DELCHARFWD    <Delete>
      _________________________________________________________________________
       DELLINE          delLineKey            OL_DELLINE       a s<Delete>
      _________________________________________________________________________
       DELLINEBAK       delLineBakKey         OL_DELLINEBAK    c<BackSpace>
      _________________________________________________________________________
       DELLINEFWD       delLineFwdKey         OL_DELLINEFWD    c<Delete>
      _________________________________________________________________________
       DELWORDBAK       delWordBakKey         OL_DELWORDBAK    c s<BackSpace>
      _________________________________________________________________________
       DELWORDFWD       delWordFwdKey         OL_DELWORDFWD    c s<Delete>
      _________________________________________________________________________
       DOCEND           docEndKey             OL_DOCEND        c<End>
      _________________________________________________________________________
       DOCSTART         docStartKey           OL_DOCSTART      c<Home>
      _________________________________________________________________________
       LINEEND          lineEndKey            OL_LINEEND       <End>
      _________________________________________________________________________
       LINESTART        lineStartKey          OL_LINESTART     <Home>
      _________________________________________________________________________
       PANEEND          paneEndKey            OL_PANEEND       c s<End>
      _________________________________________________________________________
       PANESTART        paneStartKey          OL_PANESTART     c s<Home>
      _________________________________________________________________________
       RETURN           returnKey             OL_RETURN        <Return>
      _________________________________________________________________________
       ROWDOWN          rowDownKey            OL_ROWDOWN       <Down>
      _________________________________________________________________________
       ROWUP            rowUpKey              OL_ROWUP         <Up>
      _________________________________________________________________________
       WORDBAK          wordBakKey            OL_WORDBAK       c<Left>
      _________________________________________________________________________
       WORDFWD          wordFwdKey            OL_WORDFWD       c<Right>


10/89                                                                    Page 5







OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


      _________________________________________________________________________
     |                       Text Database (OLTEXTIE)                       |
     |_______________|_____________________|________________|_________________|
     |_______________|_____________________|________________|_________________|
     | Command Name  |  Virtual Expression |  Virtual Event |  Default Button |
     |_______________|_____________________|________________|_________________|
     |_______________|_____________________|________________|_________________|

SEE ALSO
      OlCreateInputEventDB(3W)
      OlClassSearchIEDB(3W)
      OlClassSearchTextDB(3W)
      OlWidgetSearchIEDB(3W)
      OlWidgetSearchTextDB(3W)
      XtNconsumeEvent discussion in "Primitive Widget Resources" section

   EXAMPLE
               ...
      #include <Xol/OpenLook.h>
               ...
      OlVirtualEventRec    ve;

           /* To look up the OPEN LOOK CORE database */
      OlLookupInputEvent(w, xevent, &ve, OLCOREIE);
      switch (ve.virtualname)
      {
           case OLUNKNOWNINPUT:
               ...
                break;
           case OLUNKNOWNBTNINPUT:
               ...
                break;
           case OLUNKNOWKEYINPUT:
               ...
                break;
           case OLADJUST:
                printf ("pressed the adjustBtn\n");
               ...
                break;
           case OLADJUSTKEY:
                printf ("pressed the adjustKey\n");
               ...
                break;
               ...
      }
               ...
               ...
      #include <Xol/OpenLook.h>
               ...
      OlVirtualEventRec     ve;
           /* To look up the OPEN LOOK TEXT database */
      OlLookupInputEvent(w, xevent, &ve, OLTEXTIE);


Page 6                                                                    10/89







OlLookupInputEvent(3W)           UNIX System V           OlLookupInputEvent(3W)


      switch (ve.virtualname)
      {
               ...
           case OLDOCEND:
                printf ("pressed the docEndKey\n");
               ...
                break;
           case OLLINEEND:
                printf ("pressed the lineEndKey\n");
               ...
                break;
               ...
      }
               ...
      #include <Xol/OpenLook.h>
               ...
      OlVirtualEventRec     ve;
           /* To look up all possible databases */
           /* assume: "w" is a textfield widget */
      OlLookupInputEvent(w, xevent, &ve, OLDEFAULTIE);
      switch (ve.virtualname)
      {
               ...
      case OLADJUST:
           printf ("pressed the adjustBtn\n");
               ...
                break;
           case OLADJUSTKEY:
                printf ("pressed the adjustKey\n");
              ...
                break;
               ...
           case OLDOCEND:
                printf ("pressed the docEndKey\n");
               ...
                break;
           case OLLINEEND:
                printf ("pressed the lineEndKey\n");
               ...
                break;
               ...
      }












10/89                                                                    Page 7





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026