From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bfb0b9f73a13c53e,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-16 13:20:26 PST Path: archiver1.google.com!postnews2.google.com!not-for-mail From: bma3@dana.ucc.nau.edu (Ben Atkin) Newsgroups: comp.lang.ada Subject: Xlib Binding or Re-implementation? Date: 16 Mar 2004 13:20:25 -0800 Organization: http://groups.google.com Message-ID: <985cbdf6.0403161320.7d1e090c@posting.google.com> NNTP-Posting-Host: 67.24.239.40 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1079472025 6020 127.0.0.1 (16 Mar 2004 21:20:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 16 Mar 2004 21:20:25 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:6354 Date: 2004-03-16T13:20:25-08:00 List-Id: I beginning work on creating a text-editor in Xlib using Ada. The reason I choose to use Xlib, rather than a toolkit, is because I want to learn to build GUI toolkits because I don't like any of the current options available in *nix. I also think that Ada has a lot of features that would come in handy such as having both tagged and untagged types, polymorphism, and type safety. Most importantly, Ada has features that support good software engineering practices, which I plan to use in the development of this program. A guiding principle behind my project is that when software tries to be clever by doing something that is what the user wanted 95% of the time, the other 5% of the time, it only serves to frustrate the user, and makes it not worth the benefit other 95% of the time. This means, that when you are programming, the indentation behavior by default, with autoindenting turned on is as such: 1. When you press enter, unless you are inside a function call, the indentation is the same as the preceding line. Example (keys in angle brackets, cursor is '.'): procedure Add_N (X : in out Integer, N : in Integer) . 2. When you press enter inside a function call, the indentation is aligned with the first non-whitespace character beyond the last opening parenthesis in the previous line. Example: procedure Add_N ( X : in out Integer, . This stops the maddening behavior of automatically jumping to the next space when you want to write "begin" with the 'b' aligned with the 'p' in procedure. Another thing I hate about other advanced text editors is when it re-indents on the LINE YOU'RE TYPING ON. This is the way it is in ObjectAda. Well, anyway, now that I've introduced myself and my project to the Ada community, on to the question: First, do any of you know of any good, free Xlib bindings? I have run into a lot of dead links. Second, if I create my own, do you think it would be better to: A. Write a thin binding to the C Xlib, using pragmas. B. Write a thick binding to the C Xlib (don't know how I would go about this). C. Port Xlib.c, Xlib.h, etc. to Ada, using sockets. Then I could make some changes that would make it more robust (the same things that the freedesktop.org people are trying to do with http://www.freedesktop.org/Software/xcb, but using Ada, which goes really well with all of their suggestions). I am thinking about doing it the part C way, but starting with it working for my text editor. I don't fully understand the security risks of it, so it may behoove me and the rest of the 'nix community to keep work to myself and a private group of testers before releasing it, unless the X server implementation is robust enough to handle slightly garbled output. I realize this could be a long project, but I am so dissatisfied with GTK's approach that I think a new approach is needed. Besides, more experimental projects are needed on the 'nix desktop. Copying is a terrible way to develop software. Thanks for any advice!