BBS水木清华站∶精华区

发信人: gamete.bbs@bbs.ee.ntu.edu.tw (我遇到另一个gamete了), 看板: Linux 
标  题: [转载]X programming on Linux 
发信站: 台大电机 Maxwell 站 (Tue Apr  1 00:30:18 1997) 
转信站: sobee!netnews.ntu!Maxwell 
 
 
********form comp.os.linux.x 
 
-- 
Mark Duenas wrote: 
 Does anyone know where an FAQ on programming 
 X Windows apps on the Linux platform with the 
 default installation?  I've seen commercial 
 motif packages for sale but if they are not 
 needed for programming X please let me know. 
 
You fail to say what distribution you're running. 
 
I suggest that you unpack the source for XFree86. Included in that 
source package is the X11 source. Included with the X11 source is the 
full reference documentation for the basic X11 libraries -- the xlib 
documentation, the raw X server interface documentation, the xt 
documentation for writing widgets, and the xaw documentation (for the 
Athena widget set). Printed out, this all adds up to about a 10-inch 
stack of paper, so have plenty of big binders :-). 
 
Then, look at the xview library. Included with the Xview package is 
a "faq" of sorts on writing programs using the library. Said programs 
are a bit clunky compared to Motif programs, but don't require that 
you buy Motif. For that matter, you can stick with the plain old 
Athena widget set + whatever widgets you can write with xt, but that 
adds more work on your part & is sort of complicated. 
 
If you're wanting to write simple "X" programs with free tools without 
learning much about "X", I suggest that you get Bruce Wample's "V" 
library (which alas does require you to use C++ for your programs). Not 
the most feature-filled library, but it's free, and good for "quickies". 
If you are wanting something a bit more feature-filled, wXwindows does a 
bit more than "V" and allows you to compile both on Unix and under 
 
Windows. (As does "V"). 
 
And of course, you CAN buy Motif. This is especially true if you buy 
a  commercial "screen builder" product for "X" to ease your task of 
programming "X" (which is a pain in the rear)... most of those generate 
Motif code, meaning you'll need Motif to compile them. (LessTif, a free 
re-implementation of Motif, isn't ready for prime time yet, alas). 
 
Most of the problems people have with Motif and CDE deal with the fact 
that those are commercial products copyrighted by the Open Software 
Foundation (which, contrary to its name, is *NOT* a non-profit 
organization!). Motif terms are fairly reasonable -- a one-time lump 
sum  payment to OSF,  no re-distribution royalties. If you wonder why 
CDE is so  expensive for Linux, though, look at OSF's terms to software 
developers -- assuming that there are 1,000 Linux users willing to buy 
CDE from me, I would have to charge over $385 just to cover my costs of 
buying the source (much less the cost of packaging it, porting it to 
Linux, etc). Apparently the OSF is favoring the large Unix vendors who 
ship much more than 1,000 copies, at the expense of the smaller vendors. 
Which makes sense, considering who owns the OSF (DEC, HP, SGI?). 
 
-- 
Eric Lee Green   exec@softdisk.com          Executive Consultants 
Systems Specialist              Educational Administration Solutions 
 
-- 
 
当我看到CAM中的 PEP 循环时 
     我突然领悟到上帝创造我的原因 
 
-- 
 * Origin: ● 台大电机 Maxwell 站 ● From: 140.112.216.29 

BBS水木清华站∶精华区