home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 18912 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  2.7 KB

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
  2. From: jeffc@magician.larc.nasa.gov (Jeff Cleveland)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: JAM from JYACC - mouse buttons ?
  5. Message-ID: <1992Dec25.004339.24556@sm.sony.co.jp>
  6. Date: 25 Dec 92 00:43:39 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: NASA Langley Research Center, Hampton, VA  USA
  10. Lines: 53
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: 24 Dec 92 16:13:25 GMT
  14. Message-Id: <1hcnj5INNcep@rave.larc.nasa.gov>
  15. Newsgroups: comp.sys.sun.apps,comp.windows.open-look,comp.windows.x
  16. References: <izeek.725202592@techunix.technion.ac.il>
  17. Sender: xpert-request@expo.lcs.mit.edu
  18.  
  19. In article <izeek.725202592@techunix.technion.ac.il>, izeek@techunix.technion.ac.il (Ilan Aisic) writes:
  20. > I'm posting this on behalf of a friend who is using JAM on top of OpenWindows
  21. > on a Sun SPARC to create an application.
  22. > My friend complains that she can only program JAM to accept left button (the 
  23. > SELECT button) from the mouse.  If she presses the right mouse button (MENU), 
  24. > her application displays the default OW menu that she doesn't want.
  25. > In fact, she would like to assign the JAM "Help" function to the middle or 
  26. > right mouse button instead of a keyboard combination as suggested.
  27. > The solution if any, should not alter the OpenWindows behavior (xmodmap).
  28. > If there are JAM experts out there, I also have another question:
  29. > How do I get from a JAM application some Xlib variables like the
  30. > Display pointer, the Window id, etc.  If someone wants to add some
  31. > X - extentions to a JAM application how he/she go about it?
  32.  
  33. I have done a lot of X11/Motif customizing of JAM.  
  34.  
  35. In order to add widgets, you need the additional JAM/pi product. It contains
  36. a routine called
  37.  
  38.   sm_drawingarea()
  39.  
  40. that returns the Widget of the current screen. There should be a similar call
  41. in the Open Windows version. Once you have that widget, you can use the myriad 
  42. of Xt conversion routines to get the values you need.
  43.  
  44. for example:
  45.   widget=sm_drawingarea();
  46.   display=XtDisplay( widget );  /* get the display used for this widget. */
  47.   screen=XtScreen( widget );    /* get the screen used for this widget.  */
  48.  
  49. In order to change the mouse button, I think you need to change the definition
  50. for the button in the X resource file for jam (XJam). It is usually located
  51. in /usr/lib/X11/app-defaults. There you can assign operations to the mouse
  52. buttons. (Again, you need the JAM/pi product.)
  53.  
  54. If you don't have JAM\pi, then you might be able to alter the session maanger
  55. to watch for button down events, but this would be a lot of work.
  56.  
  57.  
  58.  
  59. Jeff Cleveland
  60. Unisys Corporation 
  61. NASA Langley Research Center
  62. Hampton Virginia
  63. jeffc@magician.larc.nasa.gov
  64.