home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / x-faq / part6 < prev    next >
Internet Message Format  |  1996-10-03  |  56KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!bone.think.com!paperboy.osf.org!june.osf.org!dbl
  2. From: dbl@osf.org (David Lewis)
  3. Newsgroups: comp.windows.x,news.answers,comp.answers
  4. Subject: comp.windows.x Frequently Asked Questions (FAQ) 6/7
  5. Followup-To: poster
  6. Date: 2 Oct 1996 20:16:34 GMT
  7. Organization: Open Software Foundation
  8. Lines: 1078
  9. Approved: news-answers-request@MIT.Edu
  10. Distribution: world
  11. Expires: Sun, 27 Oct 1996 00:00:00 GMT
  12. Message-ID: <52uij2$bs0@paperboy.osf.org>
  13. Reply-To: faq%craft@uunet.uu.net (X FAQ maintenance address)
  14. NNTP-Posting-Host: june.osf.org
  15. Summary: useful information about the X Window System
  16. Xref: senator-bedfellow.mit.edu comp.windows.x:110958 news.answers:83418 comp.answers:21529
  17.  
  18. Archive-name: x-faq/part6
  19. Last-modified: 1996/09/26
  20.  
  21. ----------------------------------------------------------------------
  22. Subject: 111)  Where can I find X tools callable from shell scripts?
  23. I want to have a shell script pop up menus and yes/no dialog boxes if the user 
  24. is running X.
  25.  
  26. Several tools in the R3 contrib/ area were developed to satisfy these needs:
  27. yorn pops up a yes/no box, xmessage displays a string, etc. There are several
  28. versions of these tools; few, if any, have made it to the R4 contrib/ area,
  29. though they may still be available on various archive sites.
  30.  
  31. XScript, a collection of X shell scripts, is on csc.canberra.edu.au under
  32. /pub/motif/xscript and also on ftp.x.org; it includes several stand-alone X
  33. applications which can be embedded in shell scripts. XScript requires
  34. tclMotif 1.0 or later.
  35.  
  36. In addition, Richard Hesketh (rlh2@ukc.ac.uk) has posted the xmenu package to
  37. comp.sources.x ("v08i008: xmenu") for 1-of-n choices.  [7/90]
  38.  
  39. Two versions of XPrompt have been posted to comp.sources.x, the latter being
  40. an unauthorized rewrite. [R. Forsman (thoth@reef.cis.ufl.edu), 1/91]
  41.  
  42. There is a version of XMenu available from comp.sources.x; it is being worked
  43. on and will likely be re-released.
  44.  
  45. xp-1.1.tar.Z, xpick-1.1.tar.Z and xzap-1.1.tar.Z on ftp.x.org's R5contrib/
  46. are tools by Gerry.Tomlinson@newcastle.ac.UK which act as X versions of the
  47. simple display and choice-making tools in K&P. [4/92]
  48.  
  49. ----------------------------------------------------------------------
  50. Subject: 112)! Where can I get an X-based debugger?
  51.  
  52. The Data Display Debugger (DDD) is a Motif user interface to GDB and DBX.  DDD
  53. provides a graphical data display in which data structures are displayed as
  54. graphs. A simple mouse click dereferences pointers or views structure contents.
  55. Sources are available via FTP from
  56. ftp://ftp.x.org/contrib/utilities/ddd-1.4d.tar.gz [4/96]; binaries (Sun, Linux,
  57. and others) are available from
  58. ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/ddd/bin/ . See also
  59. http://www.cs.tu-bs.de/softech/ddd/ for reference information.
  60.  
  61. Cygnus Support puts out GDBtk, which is a tcl/tk based interface that is
  62. compiled into GDB. GDBtk 4.15.1 is available from ftp.cygnus.com, as
  63. pub/gdbtk/gdbtk-4.15.1.tar.gz. [4/96]
  64.  
  65. UPS is a source-level debugger which runs under the X11 (and SunView) window
  66. systems on Sun, DEC, and Linux platforms. It is available from
  67. ftp://ftp.x.org/contrib/devel_tools/ups-2.45.2.tar.Z , along with several
  68. binaries. Also in that archive is a 3.14 beta and a 3.7 alpha [7/95].  Rod
  69. Armstrong (rod@san-jose.ate.slb.com) has made some unofficial enhancements;
  70. they are at ftp://ftp.x.org/contrib/devel_tools/ups-2.54-RGA.README and
  71. ftp://ftp.x.org/contrib/devel_tools/ups-2.54-RGA.tar.gz .
  72.  
  73. xdbx, an X interface to the dbx debugger, is available via ftp from
  74. ftp://ftp.x.org/R5contrib/xdbx2.1.tar.Z . The current and apparently final
  75. version [1/91] is 2.1 patchlevel 2.
  76.  
  77. An X interface to gdb called xxgdb is similar to xdbx 2.1.2.  
  78. Sources are on ftp://ftp.x.org/R5contrib/xxgdb.108.tar.gz [3/96].
  79.  
  80. mxgdb is a Motif interface to gdb by Jim Tsillas (jtsillas@proteon.com);
  81. version 1.2.1 is on ftp://ftp.x.org/contrib/devel_tools/mxgdb-1.2.1.tar.gz
  82. [3/96].
  83.  
  84. Also:
  85.  
  86. Certain vendors (MIPS, Sun, SCO) ship X-based debuggers. Sun's SPARCworks is
  87. an integrated development environment.
  88.  
  89. CenterLine's CodeCenter (617-498-3000) source-level debugger, available on most
  90. major platforms, includes an X-based interface.
  91.  
  92. The PDB debugger is part of the OI distribution.
  93.  
  94. The Energize Programming System developed by Lucid and now sold by Tartan
  95. is a tightly-integrated development
  96. environment for C and C++ programs. Energize incorporates a graphical user interface
  97. on top of an extended version of gdb. Info: tnt-support@tartan.com,
  98. +1 412-856-3600.
  99.  
  100. ----------------------------------------------------------------------
  101. Subject: 113)  Is there a "pseudo-tty" or fake X display I can use?
  102.  
  103. Applications often have a need to run against an X display which isn't tied
  104. to a physical display -- perhaps to make a screendump, or to run when the
  105. software expects to have an open display. In these cases, the X Virtual Frame
  106. Buffer can be used. It is a full X server which doesn't open any devices (the
  107. output can be a memory-mapped file) but which otherwise behaves as an X
  108. display. It is also useful for testing. The Xvfb is part of the X11R6
  109. distribution, in programs/Xserver; set the configuration option in
  110. config/{machine}.cf to build the distribution with this server.
  111.  
  112. ----------------------------------------------------------------------
  113. Subject: 114)! How can I "tee" an X program identically to several displays? 
  114.  
  115. There are several protocol multiplexor tools which provide for the
  116. simultaneous display of X clients on any number of machines. This ability to
  117. echo one display onto another is useful for demo purposes, for teaching, and
  118. for testing. Other related programs are useful as conferencing mechanisms;
  119. they typically involve several parties, with the results of the electronic
  120. conference visible on all screens:
  121.  
  122. XMX (an X Protocol Multiplexor) is a standalone utility for sharing an X
  123. Window System session on multiple displays. XMX takes advantage of the
  124. networked nature of the X Window System by acting as an intermediary between
  125. X clients and X servers.  In this way, XMX works with any X clients and any X
  126. servers, without the need to modify either.  XMX accepts multiple X client
  127. connections, and displays client graphics on multiple X displays.  XMX paints
  128. the same graphics on all servers, providing a WYSIWIS (What You See Is What I
  129. See) environment.  An upcoming version is being developed. In the current
  130. version, one machine controls input while all others are passive observers,
  131. an arrangement which does not allow private work.  XMX version 1 multicasts a
  132. complete X session (as opposed to individual windows) to any number of X
  133. servers. The X server which provides input to the shared X client
  134. applications (the "master") is established at setup time and remains fixed
  135. throughout the session.  Similarly, the "slave" servers which participate in
  136. the multicast are established at the start.  There is no facility for adding
  137. or removing a server to or from the session.  The software is available at
  138. ftp://ftp.cs.brown.edu/pub/xmx-1.1.tar.Z .  For more info see
  139. http://www.cs.brown.edu/software/xmx/ . [6/96]
  140.  
  141. XTV is a conference program which can be used to duplicate the "chalkboard"
  142. on several displays. Release 1 is available on the X11R5 contrib tapes; a
  143. more recent version [7/95] is on ftp://ftp.cs.odu.edu/pub/wahab/XTV/ ;
  144. binaries for several systems and source are there. Information:
  145. wahab@cs.odu.edu. [6/96]
  146.  
  147. Shared X, a modified X library to give dynamic multi-display support, by
  148. Michael Altenhofen (altenhofen@kampus.enet.dec.com), was
  149. done as part of the NESTOR project being conducted at Digital CEC Karlsruhe
  150. in collaboration with the University of Karlsruhe.  (The NESTOR project is
  151. described in "Upgrading A Window System For Tutoring Functions", Michael
  152. Altenhofen et al., in the proceedings of the EXUG Conference 11/90.)
  153. It provides "naive" X applications with the capability to
  154. work with several displays simultaneously, dynamically add and remove
  155. new displays and hand input control from display to display.
  156. shX was mainly intended to be used in a student/tutor environment,
  157. where the tutor would need to see the students current work, make some
  158. modifications to it on-line and would then drop out of the application
  159. again. It may be generally useful for group work and presentations.
  160. Sources are on ftp://ftp.x.org/R5contrib/shX.tar.Z . [6/96]
  161.  
  162. Modifications to shX for color mapping and private color allocation by Mark
  163. J. Handley (M.Handley@cs.ucl.ac.uk) are on 
  164. ftp://cs.ucl.ac.uk/car/shX.ucl.tar.Z .
  165.  
  166. XTrap is an extension to X that facilitates user emulation; it can be used to
  167. record and then replay an X session.  Device input synthesis, device input
  168. monitoring, and grapics request output monitoring are supported by XTrap.
  169. XTrap comes with a client-side library which makes the new functionality
  170. easier to use in an X application.  XTrap also comes with sample clients
  171. which demonstrate the various capabilities of the extension and library.
  172. Please see the man page within programs/xtrap/xtrap.man for more
  173. information.  It is available as
  174. ftp://ftp.x.org/contrib/extensions/XTrap_R6_v34.tar.Z .  (Note: the XTEST and
  175. RECORD extensions in R6 provide input synthesis and protocol recording
  176. respectively.  Taken together, they provide functionality similar to XTrap.)
  177. [6/96]
  178.  
  179. The program "wscrawl" is a demo of the networking capabilities of X-Windows.
  180. Wscrawl can be thought of as a paint program shared between multiple people,
  181. displays, and workstations.  Any number of people can draw independently of
  182. each other, yet they all work on the same picture.  The word "wscrawl" stands
  183. for "window-scrawl". The user may think of wscrawl as a paint program shared
  184. by any number of people at the same time.  When wscrawl is run, it opens up a
  185. separate window on each participant's display.  From that point onward, each
  186. participant sees the actions and ideas of every other participant as they
  187. occur. Each individual may simply watch, or participate at any moment.  Any
  188. individual may exit out of the session at any time without affecting the
  189. other participants.  Sources are on
  190. ftp://sunsite.unc.edu//pub/archives/comp.sources.x/wscrawl/part01.Z . [6/96]
  191.  
  192. Shdr (by Rank Xerox EuroPARC) implements a simple shared whiteboard, with
  193. scribble-style drawing and text drawing.  The drawing surface is entirely
  194. shared and entirely unstructured, being simply a bit plane. The mouse acts
  195. either as a pen (in 'draw') mode or an eraser (in 'erase' mode). When no
  196. mouse button is pressed, it acts as a pointing device; movements are echoed
  197. on the remote screen.  It features continuous telepointing to both sides, so
  198. there's no mode switch between marking, pointing and entering text.  There's
  199. no chalk-passing mechanism; both sides can make/erase marks at once. The
  200. drawing object is replicated on both sides, so that the network traffic is
  201. reduced.  Sources are on ftp://parcftp.xerox.com/pub/europarc/shdr.tar.Z 1.3a
  202. appears to be the final version. [6/96]
  203.  
  204. xmove is a pseudoserver (aka proxy server) which allows you to dynamically
  205. move an X application between servers See The X Resource (Summer 1994) for an
  206. article on the motivation for and construction of xmove.  Version 1.2f is
  207. current [6/96]; sources are on ftp://ftp.cs.columbia.edu/pub/xmove/ .
  208.  
  209. Vartalaap is a multiparty multimedia conferencing system that works over Unix
  210. sockets; the interface is based on XView.  It's available at
  211. ftp://ftp.x.org/R5contrib/vartalaap.tar.Z.
  212.  
  213. Collage is a synchronous collaborative data analysis tool for use over the
  214. Internet.  Features include a shared whiteboard, screen capture/sharing, a
  215. shared text editor, and data-analysis tools.  Sources are on
  216. ftp://ftp.ncsa.uiuc.edu/UNIX/XCollage/Collage1.3/ .  
  217.  
  218. TeamRooms provides "shared spaces" on the Internet allowing groups to share
  219. information.  These electronic team rooms provide places to meet in
  220. real-time, or a common locale to leave information for other collaborators.
  221. TeamRooms combines real-time groupware technologies such as shared
  222. whiteboards, chat rooms, and customizable groupware applets with a persistent
  223. work environment.  A beta 1.0 is at
  224. http://www.cpsc.ucalgary.ca/projects/grouplab/teamrooms/ , for several
  225. systems. [8/96]
  226.  
  227. GroupKit is a Tcl/Tk extension that provides facilities for building
  228. real-time groupware applications such as shared whiteboards, meeting tools,
  229. games, discussion tools, etc.  The package comes with over 30 sample
  230. groupware applications/demos.
  231. http://www.cpsc.ucalgary.ca/projects/grouplab/groupkit/ . [9/96]
  232.  
  233. GroupKit is a Tcl/Tk extension that provides facilities for building
  234. real-time groupware applications such as shared whiteboards, meeting tools,
  235. games, discussion tools, etc.  Version 3.2 was released 8/96. Sources are on
  236. http://www.cpsc.ucalgary.ca/projects/grouplab/groupkit/ .
  237.  
  238. Also of use [commercial products not recently confirmed]:
  239.  
  240. X/TeleScreen is a commercial implementation of a "tee"ing program.
  241. Information: info@nis.com.
  242.  
  243. Hewlett-Packard Co. has a commercial product, "HP SharedX" which works under
  244. HP-UX currently on their 300, 400, and 700 series workstations and their HP
  245. 700/RX X Stations.  Machines receiving shared windows can be any X server.
  246. HP SharedX consists of a server extensions and a Motif based user interface
  247. process.  Contact your local HP sales rep. for more information.
  248.  
  249. IBM offers a commercial product.
  250.  
  251. Sun offers multi-user confering software called ShowMe.
  252.  
  253. InSoft (Mechanicsburg, PA, USA, 717-730-9501) offers multi-user conferencing
  254. software called Communique. Version 3.0 is available on Sun and HP
  255. platforms.
  256.  
  257. TeamConference is a product which allows real-time sharing of X windows.  For
  258. more info: http://www.spectra.com/products/teamC.html .
  259.  
  260. [Thanks in part to scott@spectra.com (Tim Scott), 5/91, and to Peter Cigehn
  261. (peter@lulea.trab.se), 8/92 ]
  262.  
  263. ----------------------------------------------------------------------
  264. Subject: 115)! Can I use C++ with X11? Motif? XView?
  265.  
  266. The X11R4 and later header files are compatible with C++. The Motif 1.1
  267. header files are usable as is inside extern "C" {...}. However, the
  268. definition of String in Intrinsic.h can conflict with the libg++ or other
  269. String class and needs to be worked around.
  270.  
  271. Some other projects which can help:
  272.  
  273. WWL, a set of C++ classes by Jean-Daniel Fekete to wrap X Toolkit widgets, is
  274. available via anonymous FTP from ftp.x.org as R5contrib/WWL-1.2.tar.Z 
  275. or lri.lri.fr (129.175.15.1) as pub/WWL-1.2.tar.Z. It works by building a
  276. set of C++ classes in parallel to the class tree of the widgets.
  277.  
  278. The C++ InterViews toolkit is obtainable via anonymous FTP from
  279. interviews.stanford.edu. InterViews uses a box/glue model similar to that of
  280. TeX for constructing user interfaces and supports multiple looks on the user
  281. interfaces. Some of its sample applications include a WYSIWIG document editor
  282. (doc), a MacDraw-like drawing program (idraw) and an interface builder
  283. (ibuild). Many of the ideas in InterViews are being folded into Fresco.
  284.  
  285. THINGS, a class library written at the Rome Air Force Base by the Strategic
  286. Air Command, available as freeware on archive sites.
  287.  
  288. Motif++ is a public-domain library that defines C++ class wrappers for Motif
  289. 1.1 and 1.2; it adds an "application" class for, e.g., initializing X, and
  290. also integrates WCL and the Xbae widget set. This work was developed by
  291. Ronald van Loon <rvloon@motif.xs4all.nl> based on X++, a set of bindings done
  292. by the University of Lowell Graphics Research Laboratory. The current sources
  293. are available from decuac.dec.com (192.5.214.1) in
  294. /pub/X11/motif++.28.jul.93.tar.gz; in the UK check src.doc.ic.ac.uk. Send to
  295. motif++-request@motif.xs4all.nl to be added to the mailing list.
  296.  
  297. Xm++ is a user interface framework for C++ using the Motif and Athena
  298. toolkits.  Source is on ftp.x.org as contrib/devel_tools/Xm++.0.62.tar.Z; or
  299. email to xmplus@ani.univie.ac.at.
  300.  
  301. YACL, Yet Another Class Library, by M. A. Sridhar
  302. (sridhar@usceast.cs.scarolina.edu) implements a general-purpose programming
  303. library, using X/Motif and MSWindows for graphical-user-interface needs.
  304. Sources are on ftp.cs.scarolina.edu (129.252.131.11), in /pub/yacl.  Version
  305. 1.5 was released 3/96.
  306.  
  307. Qt is a complete and well-developed object-oriented framework for developing
  308. graphical user interface applications using C++. Version 1.0 was released
  309. 8/96. For information, contact Troll Tech at sales@troll.no, fax +47
  310. 22646949, or http://www.troll.no/qt/ . A mailing list exists; send the single
  311. word "subscribe" to qt-interest-request@nvg.unit.no.
  312.  
  313. Modello is an object-oriented interface to the Display PostScript System that
  314. is designed to provide a foundation for WYSIWYG applications and the tools to
  315. built support them.  Files are in ftp://ftp.x.org/contrib/devel_tools/DPS/ .
  316. A beta release became available 4/96.
  317.  
  318. V is a portable C++ GUI Framework intended to develop a wide variety of
  319. applications on different graphical interface platforms. Most standard GUI
  320. objects are supported by V, including windows with menus, status bars, tool
  321. bars, and a drawing canvas; modal and modeless dialogs with the most common
  322. controls (buttons, lists, labels, text entry, check and radio buttons, etc.);
  323. and portable printing support.  Sources are on http://www.cs.unm.edu/~wampler
  324. and on ftp://sunsite.unc.edu/pub/Linux/X11/libs/v-1.05.tar.gz . Version 1.05
  325. was released 2/96.
  326.  
  327. Xl is a protocol implementor for C++; see ftp://humm.whoi.edu/pub/Xl/ .
  328.  
  329. The xarm C++ wrapper to Motif is at 1.2.1 [12/95]; it is at
  330. ftp://sunsite.unc.edu/pub/Linux/X11/devel/Xarm-1.2.1.tar.gz .
  331.  
  332. The Theseus++ User Interface Toolkit Release 2.5.2 is a copylefted C++
  333. user-interface toolkit for X and Motif. Sources are on archimedes.igd.fhg.de
  334. in /pub/Theseus++/theseus++-2.5.2.
  335.  
  336. The source code examples for Doug Young's "Object-Oriented Programming with
  337. C++ and OSF/Motif" [ISBN 0-13-630252-1] do not include "widget wrappers" but
  338. do include a set of classes that encapsulates higher-level facilities
  339. commonly needed by Motif- or other Xt-based applications; check ftp.x.org in
  340. R5contrib/young.cxx.tar.Z. This software is now being produced commercially
  341. as "ViewKit" by SGI; ICS is a reseller (http://www.ics.com/ ).
  342.  
  343. The Hungry Programmers have written a ViewKit toolkit; the Hungry ViewKit is
  344. available under Gnu Public License terms from:
  345. ftp://pain.csrv.uidaho.edu/pub/hungry/viewkit/ . Info: hungry@uidaho.edu.
  346.  
  347. UIT is a set of C++ classes embedding the XView toolkit; it is intended for
  348. use with Sun's OpenWindows Developers Guide 3.0 builder tool. Sources are on
  349. ftp.x.org as R5contrib/UIT.tar.Z. This tool may since have become GIT (GNU
  350. Interactive Tools).
  351.  
  352. The Andrew User Interface System provides a rich C++ toolkit.  Version 6.3 is
  353. on the R6 tapes.  You may be able to use the Remote Andrew Demo service to
  354. try this software; try "finger help@atk.itc.cmu.edu" for help. Version 7.4 is
  355. now [8/96] available; see ftp://ftp.andrew.cmu.edu/pub/AUIS/ .
  356.  
  357. The DD++ library is a C++ wrapper for the Motif 1.2 drag and drop preregister
  358. protocol; sources are on ftp.x.org:contrib/libraries/DD++1.2.tar.Z [3/95].
  359.  
  360. A "minimal Motif C++ library wrapper" (using GNU Public License terms) is
  361. available from ftp.lasermoon.co.uk in ftp.lasermoon.co.uk as /pub/products/Xad.
  362. Information is available from xmmin@sytek.it.
  363.  
  364. Rogue Wave offers "View.h++" for C++ programmers using Motif. Info:
  365. 1-800-487-3217 or +1 503 754 2311.
  366.  
  367. wxWindows from the Artificial Intelligence group at Edinburgh University is
  368. available for Motif and Windows NT/95. It includes a GUI builder.
  369.  
  370. A product called "Commonview" by Glockenspiel Ltd, Ireland, apparently is a
  371. C++-based toolkit for multiple window systems, including PM, Windows, and
  372. X/Motif. This product is one of an increasing number of C++ toolkits which
  373. offer X (typically Motif) as one user-interface choice.
  374.  
  375. Xv++ is sold by Qualix (415-572-0200; fax -1300); it implements an interface
  376. from the GIL files that Sun's OpenWindows Developers Guide 3.0 produces to
  377. Xview wrapper classes in C++.
  378.  
  379. The Microsoft Foundation Class (MFC) library from Bristol (info@bristol.com)
  380. is a GUI class library for Windows, Mac, and Motif applications.
  381.  
  382. Pure Software's (formerly ParcPlace's; formerly Solbourne's) Object Interface
  383. is a full user-interface toolkit (from Xlib up) developed for C++; it offers
  384. both OpenLook and Motif visuals. The OI package includes a builder.
  385.  
  386. ----------------------------------------------------------------------
  387. Subject: 116)  Where can I obtain alternate language bindings to X/Xt/Motif?
  388.  
  389. Versions of the CLX Lisp bindings are part of the X11 core source
  390. distributions. A version of CLX is on the R5 tape; version 5.0.2 [9/92] is on
  391. ftp.x.org in R5contrib/CLX.R5.02.tar.Z.
  392.  
  393. GNU SmallTalk has a beta native SmallTalk binding to X called STIX (by
  394. Steven.Byrne@Eng.Sun.COM). It is still in its beginning stages, and
  395. documentation is sparse outside the SmallTalk code itself. The sources are
  396. available as /pub/gnu/smalltalk-1.1.1.tar.Z on prep.ai.mit.edu (18.71.0.38)
  397. or ugle.unit.no (129.241.1.97).
  398.  
  399. Xm++ for Smalltalk is a class library for building Motif or Athena
  400. applications.  It can be used with GNU Smalltalk (1.1.1). The main sources
  401. are on sokrates.ani.univie.ac.at (131.130.32.110) in /pub/Xm++.
  402.  
  403. Prolog bindings (called "XWIP") written by Ted Kim at UCLA while supported in
  404. part by DARPA are available by anonymous FTP from
  405. ftp.x.org:R5contrib/xwip-0.6.tar.Z [4/93]. These prolog language bindings
  406. depend on having a Quintus-type foreign function interface in your prolog.
  407. The developer has gotten it to work with Quintus and SICStus prolog.
  408. Inquiries should go to xwip@cs.ucla.edu.
  409.  
  410. Elk, the Extension Language Kit, is a Scheme implementation with Scheme
  411. bindings to Xlib, the Programmer's Interface of Xt, the Athena widget set,
  412. and the OSF/Motif widget set. Sources are in ftp.x.org as
  413. contrib/devel_tools/elk-3.0.tar.gz. For more information see also
  414. http://www.informatik.uni-bremen.de/~net/elk .
  415.  
  416. TCL bindings to Motif 1.[12] by Jan Newmarch (jan@pandonia.canberra.edu.au)
  417. are on csc.canberra.edu.au and ftp.x.org (in contrib/devel_tools/tclMotif*).
  418. Version 1.4 was released 4/95.
  419.  
  420. x-scm, a bolt-on accessory for Aubrey Jaffer's "scm" Scheme interpreter that
  421. provides an interface to Xlib, Motif, and OpenLook, is now available via FTP
  422. from altdorf.ai.mit.edu:archive/scm/xscm1.05.tar.Z and
  423. nexus.yorku.ca:pub/scheme/new/xscm1.05.tar.Z.
  424.  
  425. Poplog V14.2 is offered by Integral Solutions Ltd. (Phone +44 (0)256 882028;
  426. Fax +44 (0)256 882182; Email isl@integ.uucp); it is an integrated programming
  427. environment consisting of the programming languages Pop-11, Prolog, Standard
  428. ML, and Lisp which are compiled to machine code via a common virtual machine.
  429. Pop-11 provides an interface to the X Toolkit which can be accessed from all
  430. other Poplog languages. The OLIT, Motif, and Athena widget sets are
  431. supported, in addition to the custom Poplog (Xpw) widget set.  High-level
  432. Pop-11 libraries allow graph drawing, turtle graphics, and the simple
  433. creation of basic button/menu based interfaces.
  434.  
  435. WINTERP is an Xlisp-based Motif toolkit (by Niels Mayer) allowing for rapid
  436. prototyping and interpretive programming. Its interactive application
  437. development and delivery environment features a high-level object-oriented
  438. interface to the OSF/Motif Widgets and Xtoolkit, a high-level object-oriented
  439. 2.5D graphics/animation widget based on Xtango's path-transition animation
  440. paradigm, and facilities for communicating with other Unix processes and
  441. data.  WINTERP's interpreter is "serverized" so that other applications can
  442. communicate with WINTERP-based applications via unix domain sockets, or
  443. optionally, through internet domain sockets. WINTERP's built-in interpreter
  444. is based on XLISP-PLUS, which is a small, fast, portable, C-implemented
  445. interpreter providing a subset of Common-Lisp functionality and a
  446. Smalltalk-inspired object system.  A major new release, WINTERP 2.03, is on
  447. the X11R6 contrib tapes; version 2.03 [7/94] is on ftp.x.org in
  448. contrib/devel_tools/. Info:  winterp-source@netcom.com. See also
  449. http://www.eit.com/software/winterp/winterp.html .
  450.  
  451. The SAIC Ada-X11 (for Ada 83) bindings are through anonymous ftp in /pub from
  452. stars.rosslyn.unisys.com (128.126.164.2) and
  453. falcon.stars.ballston.paramax.com (129.204.6.253).
  454.  
  455. There is an X/Ada study team sponsored by NASA JSC, which apparently is
  456. working out bindings. Information: xada@ghg.hou.tx.us.
  457.  
  458. Ada bindings to Motif, explicitly, will eventually be made available by the
  459. Jet Propulsion Laboratories, probably through the normal electronic means.
  460. Advance information can be obtained from dsouleles@dsfvax.jpl.nasa.gov, who
  461. may respond as time permits.
  462.  
  463. AdaMotif is a complete binding to X and Motif for the Ada language (Ada 83?),
  464. for many common systems; it is based in part upon the SAIC/Unisys bindings
  465. and also includes a UIL to Ada translator. Info: Systems Engineering Research
  466. Corporation, 1-800-Ada-SERC (well!serc@apple.com).
  467.  
  468. Free Ada95 X11 bindings were commissioned along with the 1995 update of the
  469. language definition and are now available as stable beta software from Mitch
  470. Gart of Intermetrics (mg@camb.inmet.com); they are due on the Intermetrics
  471. web site very soon. These offer complete thin bindings to Xlib, Xt and Motif.
  472. As thin bindings, the normal X documentation (e.g. the O'Reilly series)
  473. applies unchanged. Common problems such a string handling and variadic
  474. arguments to functions have been solved and are fully described in the
  475. accompanying documentation. [Thanks to Chris.Morgan@baesema.co.uk, 12/95.]
  476.  
  477. There is a binding for X11 and Motif which is in the public domain and takes
  478. advantage of Ada 95 features.  Although it is still [3/96] being fine tuned,
  479. it is largely complete, and is well on it way to becoming the de facto
  480. standard for Ada binding to X.  Developers around the world are starting to
  481. churn out some very impressive demonstration programs, both original and
  482. ported from X and Motif demos.  For general information on all varieties of
  483. Ada bindings including X, check
  484.     http://lglwww.epfl.ch/Ada/Resources/Bindings.html
  485. The X11 Ada95 bindings in particular can be located at:
  486.     http://www.inmet.com/~mg/x11ada/x11ada.html
  487. The home page for X/Ada development is at
  488.     http://www.ocsystems.com/xada/
  489. [thanks to G. Vincent Castellano, gvc@ocsystems.com] 
  490.  
  491. The X Consortium, although not involved in producing Ada bindings for X,
  492. maintains a partial listing of people involved in X and Ada; information is
  493. available from Donna Converse, converse@x.org.
  494.  
  495. ----------------------------------------------------------------------
  496. Subject: 117)! Where can I obtain alternate X toolkits?
  497.  
  498. The Tk toolkit provides a Motif-like object set for use typically with tcl,
  499. an interpreted language. See the FAQ list for comp.lang.tcl. The main source
  500. area is sprite.berkeley.edu (128.32.150.27) in pub/tcl. Version 7.5 was
  501. released 5/96 along with version 4.1 of TK; see
  502. ftp://ftp.smli.com/pub/tcl for sources and 
  503. http://www.sunlabs.com/research/tcl for information.
  504.  
  505. Marx is an interpreted script language  based  on  a  C-like syntax.   It
  506. provides a quick way of creating Graphical User Interfaces in X windows.
  507. Besides GUI  building,  marx also provides simplified schemes for UNIX
  508. process control, direct shell command/script execution and inter-client
  509. communication via sockets.  Version 1.1b1 was released 6/96. See
  510. http://spock.ece.drexel.edu/marx for information.
  511.  
  512. EZWGL, the EZ widget and graphics library, implements a few Motif like
  513. widgets and a few OpenGL like graphics commands.  EZWGL is released under
  514. terms of the GPL. It can be found at
  515. ftp://ftp.x.org/contrib/widgets/EZWGL.tgz . Information: Maorong Zou
  516. (zou@math.arizona.edu) [8/96]
  517.  
  518. ParcPlace (Pure Software?) is making freely available its popular
  519. ObjectBuilder and Object Interface (OI) products for the Linux operating
  520. system.  ObjectBuilder is a GUI builder written completely in C++, that
  521. enables UNIX C++ developers to apply the principles of object-orientation to
  522. the development of user interfaces. OI, a C++ class library, provides the
  523. toolkit foundation for ObjectBuilder. OI implements the look-and-feel of both
  524. Motif 1.2 and OPEN LOOK. OI is built directly on top of Xlib and is
  525. unencumbered by runtime royalties to any party.  ObjectBuilder and OI are
  526. very extensible, actively facilitating the use of subclassing to create new,
  527. reusable, user interface components.  Sources are on tsx-11.mit.edu in
  528. /pub/linux/packages/OI and available from ParcPlace (+1 408 481 9090).
  529.  
  530. Garnet is a Common Lisp-based GUI toolkit. Information is available from
  531. garnet@cs.cmu.edu.
  532.  
  533. ----------------------------------------------------------------------
  534. Subject: 118)  TOPIC: BUILDING THE X DISTRIBUTION [topic needs updating to R6]
  535. ----------------------------------------------------------------------
  536. Subject: 119)  What's a good source of information on configuring the X build?
  537.  
  538.     This FAQ includes information on a number of "gotchas" that can bite 
  539. you on particular system. However, the best source of general information on 
  540. building the X11 release is found in the Release Notes. The file is bundled 
  541. separately from the rest of the release, so if it's become separated from your 
  542. sources you can FTP another copy separately: the file RELNOTES.[ms,PS,TXT] at 
  543. the top of the distribution. The file RELNOTES is also available from the 
  544. xstuff mail server.
  545.     In addition, O'Reilly & Associates' Volume 8 on X Administration
  546. includes information on configuring and building X.
  547.  
  548. ----------------------------------------------------------------------
  549. Subject: 120)  Why doesn't X11R6 work on Solaris with GCC 2.7.0?
  550.  
  551. There is a misfeature in gcc's handling of -R options; see the Solaris FAQ in
  552. ftp.fwi.uva.nl in directory /pub/solaris for details and for a fix.
  553.  
  554. ----------------------------------------------------------------------
  555. Subject: 121)  Why doesn't my Sun with a cg6 work with R5?
  556.  
  557.     Apparently gcc is the problem; it seems to produce fine code for all
  558. Sun displays except for the cgsix. The new sunGX.o distributed with fix-07 
  559. may fix the problem (note: not known to work on Solaris).
  560.  
  561. ----------------------------------------------------------------------
  562. Subject: 122)  What are these build problems with Solaris 2.5?
  563.  
  564. The problems with Solaris 2.5 are still rolling in. Known problems for now
  565. include:
  566.  
  567.     - a change to the signature for gettimeofday() which can be solved
  568. by setting -D_SVID_GETTOD in the build flags
  569.  
  570.     - use of longs with "L" suffixes in the header files, causing the
  571. R6 makedepend to fail; no known solution right now other than editing the
  572. top-level Makefile to omit the "make depend" step from "make World". Fixed
  573. in X11R6.1.
  574.     
  575. ----------------------------------------------------------------------
  576. Subject: 123)  Why doesn't my Sun with SunOS 4.1 know about _dlsym, etc.?
  577.  
  578.     If you get errors with _dlsym _dlopen _dlclose undefined, link with 
  579. libdl.a.  Add "-ldl" to your and eventually to your site.def.  You may want to 
  580. surround it with "-Bstatic -ldl -Bdynamic" if you add it to the EXTRA_LIBRARIES
  581. variable, since "syslibs" get added after EXTRA_LIBRARIES on the eventual 
  582. compilation command; otherwise you may not have a shared libdl.  (Or compile 
  583. the stubs shared.)
  584.  
  585. [thanks to Joe Backo (joe.backo@East.Sun.COM), 12/91]
  586.  
  587. ----------------------------------------------------------------------
  588. Subject: 124)  What is this "_get_wmShellWidgetClass undefined" error?
  589.  
  590.     In SunOS 4.1.2 Sun fixed a shared-library bug in ld which conflicts
  591. with the way X builds the shared Xmu library, causing these symbols, notably, 
  592. to be undefined when building some X11 clients on SunOS 4.1.[23]: 
  593.     _get_wmShellWidgetClass
  594.     _get_applicationShellWidgetClass
  595. Compiling "-Bstatic -lXmu -Bdynamic" is overkill; be sure to set
  596. OSTeenyVersion correctly in the config/sun.cf file and rebuild X11R5.
  597.  
  598. To solve the problem if you are using OpenWindows 3.0 (X11R4-based Xt), please 
  599. contact your local Sun office and request the following patches:
  600.  
  601. Patch i.d.      Description
  602. 100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
  603. 100573-03       4.1.x OpenWindows 3.0 undefined symbols when using
  604.                         shared libXmu
  605.  
  606. [Greg Earle, earle@Sun.COM; 7/92] 
  607.  
  608. A source patch for use with the X11R4 libraries was developed by Conrad 
  609. Kimball (cek@sdc.boeing.com); it retrofits into R4 some fixes made in R5 to
  610. get around this problem. The patch is on ftp.x.org in [1/93]
  611.     R5contrib/X11R4_sunos4.1.2_patch_version3.Z
  612.  
  613. ----------------------------------------------------------------------
  614. Subject: 125)  Why don't xterm or xinit work on Solaris 2.4?
  615.  
  616. The Solaris FAQ describes a problem in which xinit dies with "user signal 1"
  617. and traces it to some changes to libc.so and libthread.so. The Solaris FAQ
  618. describes the necessary patch to obtain from Sun; the FAQ is available from
  619. ftp.fwi.uva.nl in directory /pub/solaris. The X fix is to apply fix-11
  620. to X11R6; the problem is fixed in the later patches to X11R6.
  621.  
  622. ----------------------------------------------------------------------
  623. Subject: 126)  What's this problem with undefined _X symbols on SunOS 4.1.3?
  624.  
  625.         Make sure to set the OSTeenyVersion in the mit/config/sun.cf file
  626. if you see that vast numbers of Xlib functions are undefined in your X11R5 
  627. build:
  628.  
  629.   >cc -o bmtoa bmtoa.o -O -pipe  -L../.././lib/Xmu -lXmu -L/work1/X11R5/lib
  630.   >ld: Undefined symbol
  631.   >   _XGetVisualInfo
  632.   >   _XFree
  633.     ...
  634.  
  635. ----------------------------------------------------------------------
  636. Subject: 127)  Why does cc get used when I build X11R5 with gcc?
  637.  
  638.     When X11R5 was written gcc (version 1.X) did not support shared 
  639. libraries. Those parts requiring shared libraries are compiled with cc, those 
  640. that don't are compiled with gcc.
  641.   
  642. ----------------------------------------------------------------------
  643. Subject: 128)  What are these I/O errors running X built with gcc?
  644. When I try to run xinit or the Xsun server I get the error 
  645.     "Getting interface configuration: Operation not supported on socket. 
  646.     Fatal server bug! no screens found."
  647.  
  648.     Running the gcc fixincludes script apparently didn't work. You can do 
  649. this simple test:
  650.  
  651.     #include <sys/ioctl.h>
  652.     SIOCGIFCONF
  653.  
  654. Run that through cc -E and gcc -E.  The last line of output is the piece of 
  655. interest; it should be identical (modulo irrelevant differences like 
  656. whitespace).  If the gcc version has 'x' where the cc version has 'i', your 
  657. fixincludes run didn't work for some reason or other; go back to your gcc
  658. sources and run `fixincludes`; then rebuild the X distribution. If they are 
  659. identical, try running a make clean in mit/server and rebuilding, just to make 
  660. sure everything gets compiled with the proper include files.  
  661.  
  662. [courtesy der Mouse, mouse@LARRY.MCRCIM.MCGILL.EDU; 9/90]
  663.  
  664. ----------------------------------------------------------------------
  665. Subject: 129)  What are these problems compiling the X11R5 server on SunOS 4.1.1?
  666. The file <sundev/cg6reg.h> isn't being found.
  667.  
  668.     Sun omitted <sundev/cg6reg.h> from SunOS 4.1.1. Remove the #include 
  669. from sunCG6C.c and replace it with the line 
  670.     #define CG6_VADDR_COLOR   0x70016000
  671. The file has changed from earlier versions of SunOS and should not be copied 
  672. from another distribution.
  673.  
  674. ----------------------------------------------------------------------
  675. Subject: 130)  Can OW 3.0 OLIT programs run with R5 Xt? (_XtQString undefined)
  676.  
  677. This is a bug in the OLIT.  _XtQString was an external symbol that existed in
  678. X11R4 (upon which OW 3.0's libXt is based).  It wasn't documented and was
  679. removed in X11R5 (the Consoritum's guarantee of upward compatibility between
  680. the R4 and R5 libraries only applied to the documented interface).
  681.  
  682. A workaround is to temporarily set your LD_LIBRARY_PATH to point to the X11R4
  683. or OpenWindows Xt library that you linked the program against.
  684.  
  685. [10/92; from Barry Margolin (barmar@think.com); 3/93 from Jeff Francis 
  686. (jpf@heliocentric.com)]
  687.  
  688. ----------------------------------------------------------------------
  689. Subject: 131)  How do I get around the SunOS 4.1 security hole?
  690.  
  691.     There is a security problem with certain R4 clients (xterm and xload)
  692. running under SunOS 4.1 that have been installed setuid root and are using 
  693. shared libraries; to avoid the problem, do one of these:
  694.     1) make the program non-setuid. You should consult your system
  695. administrator concerning protection of resources (e.g. ptys and /dev/kmem) used
  696. by these programs, to make sure that you do not create additional security 
  697. problems at your site.
  698.     2) relink the programs statically (using -Bstatic).
  699.     3) install the libraries before linking and link with absolute paths
  700. to the libraries.
  701.  
  702. [from rws@x.org (Bob Scheifler), 12/90]
  703.  
  704. Newer versions  of xterm (R5/R6) do this automatically by rebuilding xterm
  705. against the newly-installed libraries when xterm is being installed; this
  706. prevents an suid program from being built with libraries specified
  707. relatively. Note that this may cause an inconvenience when doing the
  708. installation from NFS-mounted disks.  Xload has been rewritten to avoid the
  709. problem.
  710.  
  711. ----------------------------------------------------------------------
  712. Subject: 132)  How do I get around the frame-buffer security hole?
  713.  
  714.     On many systems the frame-buffer is unsecured by default; this permits 
  715. anyone who can log into your workstation to peek at your windowing session by 
  716. accessing the frame-buffer directly, or, as less of a privacy issue but perhaps
  717. more annoying, to [accidentally] start up a second X session on your console 
  718. display. Check the man page for fbtab(5).
  719.  
  720. [Thanks to Art Mulder (art@cs.ualberta.ca); 2/93.]
  721.  
  722. ----------------------------------------------------------------------
  723. Subject: 133)  TOPIC: BUILDING X PROGRAMS 
  724. ----------------------------------------------------------------------
  725. Subject: 134)  What is Imake?
  726.  
  727. Imake is not a replacement for the make program; instead, it is a
  728. makefile-generator that takes advantages of the include-file and macro-
  729. processing capabilities of the C preprocessor cpp to generate makefiles
  730. suitable for building software on a particular system. Although it is not
  731. specific to X, the X release uses it to help solve a number of the
  732. configuration issues that arise in making such a large system widely
  733. portable.
  734.  
  735. Imake is difficult to understand, in part because the process by which the
  736. system-specific configuration files, system-independent configuration files,
  737. and individual Imakefiles are melded to produce a Makefile is not obvious.
  738.  
  739. There have been several different versions of imake; the R3, R4, R5 and R6
  740. versions are different.
  741.  
  742.     You can obtain information on imake from these sources:
  743.     - the release notes and imake man page include information on using
  744. Imake to build X
  745.     - the R6 file xc/config/cf/README contains a list of imake variables
  746.     - the R4 and R5 release notes and imake man page include information on
  747. using Imake to build X
  748.     - the R4 and R5 file mit/config/README also contains useful information
  749.     - on the R4 tapes, contrib/doc/imake/imake.tex is Mark Moraes' R3/R4
  750. guide to imake.
  751.     - the R5 mit/doc/config/usenixws/paper.ms contains a paper by Jim
  752. Fulton on an early version of Imake
  753.  
  754.     - Paul DuBois (dubois@primate.wisc.edu) has written a useful
  755. explanation of how Imake works and how to use it in configuring X for non-
  756. supported systems; the document is available from
  757. http://www.primate.wisc.edu/software/imake-stuff , or try ftp.primate.wisc.edu
  758. in the directory ~ftp/pub/imake-stuff; look for config-X11R4.ms (troff) and
  759. config-X11R4.ps (PostScript). Some supplemental appendices are nearby.
  760. [7/91: document version is now 1.06] They are also available by gopher to
  761. gopher.primate.wisc.edu under "Primate Center Software Archives".
  762.     - see "System Administration - Imake: Friend or Foe?" by Dinah McNutt
  763. in the November 1991 issue of SunExpert.
  764.     - German readers should look for "Das Meta-Make / I make, you make / 
  765. Schwerelos" by Rainer Klute in the June 1992 "iX 
  766. Multiuser-Multitasking-Magazin", directed at application programmers needing to
  767. write Imakefiles. An English-language derivative of this article is in The
  768. X Journal, issue 2:1.
  769.     - The O'Reilly X Resource issue #2 contains Paul Davey's article on
  770. demystifying Imake.
  771.     - Alain Brossard's working document full of tips on Imake is in 
  772. sunline.epfl.ch:pub/imakefile.1.Z.
  773.     - O'Reilly has published (7/93) "Software Portability with imake" by
  774. Paul DuBois; ISBN 1-56592-055-4. The book's electronic examples and
  775. additional software are on ftp.primate.wisc.edu in pub/imake-book;
  776. imake.tar.Z is a stand-alone imake installation. Also try 
  777. http://www.primate.wisc.edu/software/imake-book .
  778.  
  779. [1/91;12/91;5/92;8/92;7/93; 12/95]
  780.  
  781. ----------------------------------------------------------------------
  782. Subject: 135)  Where can I get imake?
  783.  
  784. Versions are distributed with the R4, R5, and R6 releases. An earlier version
  785. is distributed with the X11R3 release; some third-party toolkits redistribute
  786. versions of imake along with their own implementations of the template and
  787. configuration files. There are no real standards for such configuration
  788. files, although most *current* contributed software expects the templates
  789. distributed with X11R5 or X11R6.
  790.  
  791. ftp.x.org contains the R5 distribution unpacked, so you can pick up imake
  792. without picking up the entire distribution.
  793.  
  794. A stand-alone version of Imake, but one stemming from X11R5, is in
  795. ftp.germany.eu.net:pub/X11/misc/imake/imake-pure.tar.Z (192.76.144.75).
  796.  
  797. A stand-alone version of Imake, but one stemming from X11R5, is in
  798. ftp.primate.wisc.edu:pub/imake-book/imake.tar.Z.
  799.  
  800. ----------------------------------------------------------------------
  801. Subject: 136)  I have a program with an Imakefile but no Makefile. What to do?
  802.  
  803. If you have R4 or later installed on your system, run "xmkmf". This
  804. is a script which runs imake for you with the correct arguments. The output
  805. is a Makefile configured for your system and based on the Imakefile.  Then
  806. run make, which will use that new Makefile to compile the program.
  807.  
  808. ----------------------------------------------------------------------
  809. Subject: 137)  Why can't I link to the Xlib shape routines?
  810. When I try to compile certain programs, I get the following link error:
  811.     Undefined:
  812.     _XShapeQueryExtension
  813.     _XShapeCombineMask
  814.  
  815.     These routines are actually part of the Shape Extension to X (SHAPE)
  816. which was introduced in the X11R4 distribution and allows non-rectangular
  817. windows.  Like the other sample server extensions, the shape extension will 
  818. only run on a server which supports it.  Pre-X11R4 servers, as well as many 
  819. vendor-supplied servers, do not support the shape extension, in which case 
  820. they will display rectangular windows anyway.
  821.  
  822.     In order to use the shape extension, you must link to the library 
  823. libXext.a.  In the X11 distribution, this library and the associated includes
  824. will be in the mit/extensions directory.  If you do not have these files, do 
  825. not despair:  many freeware programs which use the shape extension can also be 
  826. compiled without it by removing the -DSHAPE define from the Makefile; you can
  827. probably do this and compile successfully against your older vendor-supplied X 
  828. libraries.
  829.  
  830. [from John B. Melby, melby%yk.fujitsu.co.jp@uunet.uu.net, 3/91]
  831.  
  832. ----------------------------------------------------------------------
  833. Subject: 138)  What are these problems with "_XtInherit not found" on the Sun?
  834. When I link a X program that I wrote on a SunOS 4.0.3 or 4.1 machine I get the 
  835. error "ld.so: symbol not found _XtInherit".
  836.  
  837.     What you are seeing is a side-effect of a kludge in the R4 libXt.a to 
  838. get Sun shared libraries working.  Apparently, you can't share a function that 
  839. is both called and compared, as _XtInherit is. This was handled by putting 
  840. _XtInherit in the same file as a function that is always used, thereby 
  841. guaranteeing that it would be loaded -- that is, in Initialize.c, where 
  842. XtToolkitInitialize() and XtInitialize() reside. These routines would normally
  843. be called.
  844.  
  845.     You are probably seeing this error because your program is not a normal
  846. Xt-based program and does not call XtToolkitInitialize() anywhere. 
  847.     1) it may be a program that uses Xt functions but never opens a 
  848. connection to the X server.  [OSF/Motif's 1.1.0 UIL had this problem; it called
  849. XtMalloc() and other Xt functions.] The solution is to add the call to your 
  850. program; the function does not have to be executed, just linked in.
  851.     2) alternatively, your program doesn't need any Xt functions and is
  852. correct in not calling XtToolkitInitialize() -- it may be an Xlib or XView 
  853. program. In this case, you can remove -lXt from your link command. 
  854.  
  855.     It should not be necessary to link the shared libraries statically,
  856. although this will certainly solve the problem.
  857.     
  858. [from Jordan Hayes (now jordan@Thinkbank.COM) and Danny Backx (db@sunbim.be); 
  859. 11/90]
  860.  
  861. You may also see this error compiling X11R5 programs on a SunOS 4.1.3 machine;
  862. be sure to set OSTeenyVersion to 3 in the config/sun.cf file.
  863.  
  864. ----------------------------------------------------------------------
  865. Subject: 139)  TOPIC: PROGRAMMING PROBLEMS AND PUZZLES
  866. ----------------------------------------------------------------------
  867. Subject: 140)  Why doesn't my program get the keystrokes I select for (sic)?
  868.  
  869.     The window manager controls how the input focus is transferred from one
  870. window to another.  In order to get keystrokes, your program must ask the
  871. window manager for the input focus.  To do this, you must set up what are
  872. called "hints" for the window manager.  If your applications is Xlib-based, you
  873. can use something like the following:
  874.  
  875.         XWMHints wmhints;
  876.         ...
  877.         wmhints.flags = InputHint;
  878.         wmhints.input = True;
  879.         XSetWMHints(dpy, window, &wmhints)
  880.  
  881. If your application is based on the Xt Intrinsics, you can set the XtNinput 
  882. resource to be True (as you probably want to in any case); if you don't have
  883. source, you can start up the application with the resource '*input:True'.
  884.  
  885. Certain window managers, notably dxwm and olwm, are very picky about having 
  886. this done. 
  887.  
  888.     If you are using Sun's OpenWindows olwm, you can also add this resource
  889. to your defaults file to use clients that aren't ICCCM-compliant.
  890.     OpenWindows.FocusLenience:       true
  891.  
  892. [mostly courtesy Dave Lemke of NCD and Stuart Marks of Sun]
  893.  
  894. ----------------------------------------------------------------------
  895. Subject: 141)  How do I deiconify a window?
  896.  
  897. To de-iconify a window, map it with XMapWindow().  To iconify a window, use 
  898. XIconifyWindow().
  899.  
  900. ----------------------------------------------------------------------
  901. Subject: 142)  How do I figure out what window manager is running?
  902.  
  903. You can't reliably tell; whatever mechanism you could use could be spoofed in
  904. any case.
  905.  
  906. For most cases, you shouldn't care which window manager is running, so long
  907. as you do things in an ICCCM-conformant manner. There are some cases in which
  908. particular window managers are known to do things wrong; checking for
  909. particular hints placed on the window by the window manager so that you can
  910. sidestep the problem may be appropriate in these cases. Alternatively, it may
  911. be appropriate to determine which window manager is running in order to take
  912. advantage of specific *added* features (such as olwm's push-pin menus) in
  913. order to give your program *added* functionality. Beware of usurping the
  914. window manager's functions by providing that functionality even when it is
  915. missing; this surely leads to future compatibility problems.
  916.  
  917. ----------------------------------------------------------------------
  918. Subject: 143)  Is there a skeleton X program available?
  919.  
  920. There is no general framework such as the TransSkel program for the Macintosh
  921. which handles lots of the odds and ends and overhead of development under a
  922. window system and which can be used as a platform for additional development.
  923. In X, the problem is typically solved by using an interactive application
  924. builder tool or by using cut&paste on existing X applications. Good
  925. applications which you might look to manipulate when you want to "test just
  926. this one little thing" include contrib/clients/xskel, a simple R4 program
  927. that puts up a window and allows sketching in it and offers a starting point
  928. for quick hacks, the Xaw examples in the examples/ directory in the X
  929. distributions, and the Xlib "Hello World" example in the R3 doc/HelloWorld
  930. and R4 doc/tutorials/HelloWorld; an updated version of this program which
  931. uses R4 Xlib calls and current ICCCM conventions was posted in 2/90 to
  932. comp.windows.x by Glenn Widener of Tektronix.  [3/90]
  933.  
  934. In addition, a sample Xt program (for Xaw or Xm) by Rainer Klute showing how
  935. to open multiple displays and how to catch a broken display connection is
  936. available on ftp.x.org in R5contrib/mdisp.tar.Z. [4/92]
  937.  
  938. A sample multi-display Xt/Xaw program by Oliver Jones is on ftp.x.org in
  939. R5contrib/MultiUserVote.tar.Z. (See also his article in The X Resource, Issue
  940. 3, "Multi-User Application Software Using Xt".)
  941.  
  942. ----------------------------------------------------------------------
  943. Subject: 144)  How can I incorporate an Xlib program in my Xt program?
  944.  
  945. As older Xlib programs are ported to Xt it often makes sense to preserve
  946. their Xlib-ness while still having Xt-based menus, scrollbars, and other
  947. GUIisms of current Xt toolkits.  The basic problem in merging the two models
  948. is in the event-delivery mechanism. In an Xt program, the application enters
  949. an infinite loop in XtAppMainLoop() and Xt thereafter dispatches events to
  950. widgets without the application's intervention; in contrast, Xlib programs
  951. typically track the set of events they are interested in and the possible
  952. windows on which those events can occur and hence call XNextEvent directly
  953. and then determine what action to take on the event received.
  954.  
  955. One possible solution may be to widgetize the Xlib application. A faster
  956. solution is probably to break XtAppMainLoop() into its components (R5 version
  957. shown):
  958.  
  959.     void XtAppMainLoop(app)
  960.         XtAppContext app;
  961.     {
  962.         XEvent event;
  963.  
  964.         for (;;) {
  965.         XtAppNextEvent(app, &event);
  966.         XtDispatchEvent(&event);
  967.         }
  968.     }
  969.  
  970. and then change the dispatch call to be something like
  971.  
  972.     if (!XtDispatchEvent(&event))
  973.         my_dispatch_xlib_event(&event);
  974.  
  975. That is, if Xt isn't interested in dispatching the event, it must be an event
  976. on one of the windows created via the code incorporated from the Xlib program
  977. and can be dispatched in the same way as in the original program.
  978.  
  979. You can also use this technique in Xt programs in order to handle events not
  980. normally handled well by Xt; there is support in the translation/action
  981. mechanism for being notified of PropertyNotify events, but it may be easier
  982. to dispatch the event yourself, perhaps to receive a message from another
  983. application on a window whose ID your application has made available.
  984.  
  985. ----------------------------------------------------------------------
  986. Subject: 145)  Why does XtGetValues not work for me (sic)?
  987.  
  988.     The XtGetValues interface for retrieving resources from a widget is
  989. sensitive to the type of variable. Your code may be doing something like this:
  990.     {
  991.     Arg args[3];
  992.     int i;
  993.     int sensitive;        /* oops; wrong data type */
  994.     i=0;
  995.     XtSetArg (args[i], XtNsensitive, &sensitive); i++;
  996.     XtGetValues(widget, args, i );
  997.     ...
  998.     }
  999.  
  1000. But XtNsensitive is a Boolean, which on most machines is a single byte; 
  1001. declaring the variable "sensitive" as Boolean works properly. This problem 
  1002. comes up often when using particular toolkits that redefine the Xt types 
  1003. Dimension and Position; code that assumes they are int will have similar 
  1004. problems if those types are actually short. In general: you are safe if you
  1005. use the actual type of the resource, as it appears in the widget's man page.
  1006. [11/90]
  1007.  
  1008. ----------------------------------------------------------------------
  1009. Subject: 146)  Why don't XtConfigureWidget/XtResizeWidget/XtMoveWidget work?
  1010.  
  1011. You're probably trying to use these functions from application code.  They
  1012. should be used only internally to widgets; these functions are for a parent
  1013. Composite widget to change the geometry of its children.  An application
  1014. which calls XtMoveWidget, for example, effectively defeats geometry
  1015. negotiation and the Composite parent's internal state (if any) will no longer
  1016. be correct. (The Xt specification goes into more detail.)
  1017.  
  1018. The only way for your application to request a geometry change for a widget
  1019. is to issue an XtSetValues call setting some of the geometry resources.
  1020. Although this call will result in the widget-internal functions' being
  1021. called, your application code must use the standard XtSetValues interface or
  1022. risk the widgets' data becoming corrupted.
  1023.  
  1024. Note that functions defined in <X11/IntrinsicP.h>, as these are, are
  1025. typically reserved for use by widgets.
  1026.  
  1027. Other promising functions, XtMakeGeometryRequest() and XtMakeResizeRequest(),
  1028. are also for use only by widgets, in this case by a child to request a change
  1029. from its parent.
  1030.  
  1031. The Xlib calls XMoveWindow() and XResizeWindow() should similarly be avoided;
  1032. they shouldn't be used to change XtNx, XtNy, XtNwidth, or XtNheight.
  1033.  
  1034. ----------------------------------------------------------------------
  1035. Subject: 140)+ How do I check whether an Xt widget is still valid?
  1036.  
  1037. You may be tempted to use a check like this one to determine whether the
  1038. widget has yet to be destroyed:
  1039.  
  1040.     (XtWindowToWidget(XtDisplay(toplevel), XtWindow(widget)) == widget)
  1041.  
  1042. However, this is not a robust solution. It depends on assumptions about how
  1043. Xt uses memory allocation and how that memory allocation works; in addition,
  1044. it assumes that no subsequent widgets are created with the same handle and
  1045. window id.
  1046.  
  1047. In addition, XtIsWidget() simply checks whether an existing, valid object
  1048. is a widget or a gadget. It can't be used to check for current existence.
  1049.  
  1050. In general, you should track destruction, possibly by using
  1051. XtNdestroyCallback callbacks.
  1052.  
  1053. ----------------------------------------------------------------------
  1054. Subject: 147)  Why can't I get data back in my callback procedure?
  1055.  
  1056. You may hit a situation in which using XtAddCallback(button, XtNcallback,
  1057. CBproc, pointer) doesn't work to retrieve "pointer".
  1058.  
  1059. Almost certainly, what you are seeing is the effect of using local variables
  1060. after they are no longer in existence. In the above line of code, "pointer"
  1061. is probably a local variable declared within the block of code making the call
  1062. to XtAddCallback; it is valid only within the scope of the callback, and is
  1063. not valid by the time the callback CBproc gets called. Within CBproc, the
  1064. client_data argument is pointing to somewhere on the stack -- whereever
  1065. pointer was when it was used.  
  1066.  
  1067. Short of using global or static data, the best solution is to allocate a
  1068. pointer to the data you need and free it in the callback routine.
  1069.  
  1070. Short values such as integers can be passed directly without resorting to
  1071. this code; nor do you need to do allocations for other data which will be in
  1072. existence when the callback is called, such as other widgets which haven't
  1073. been destroyed.
  1074.  
  1075. ----------------------------------------------------------------------
  1076. Subject: 148)  Why isn't there an XtReparentWidget call like XReparentWindow?
  1077.  
  1078. Although there are various details of the current implementation of the Xt
  1079. internals which make reparenting difficult, the major reason that no such
  1080. call exists is that it remains undefined what the set of resources for the
  1081. "new" widget should be. Resources are typically set based on the location in
  1082. the instance hierarchy; what resources should change if the instance moves?
  1083. What should happen to the widget's children? And by the time such semantics
  1084. are defined, there would probably be little advantage over destroying the old
  1085. widget and creating a new widget in the correct location with the desired
  1086. resources, as setting the resources correctly is the majority of work in
  1087. creating a new widget.
  1088.  
  1089. Note that reparenting is possible in the OI toolkit.
  1090.  
  1091. ----------------------------------------------------------------------
  1092.  
  1093. David B. Lewis                     faq%craft@uunet.uu.net
  1094.  
  1095.         "Just the FAQs, ma'am." -- Joe Friday 
  1096.