Xlib Binding or Re-implementation?
From: Ben Atkin (bma3_at_dana.ucc.nau.edu)
Date: 03/16/04
- Next message: Gautier Write-only: "Ann: TeXCAD 4.1"
- Previous message: Hyman Rosen: "Re: abstract sub programs overriding"
- Next in thread: Preben Randhol: "Re: Xlib Binding or Re-implementation?"
- Reply: Preben Randhol: "Re: Xlib Binding or Re-implementation?"
- Reply: Ludovic Brenta: "Re: Xlib Binding or Re-implementation?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Mar 2004 13:20:25 -0800
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)<ENTER>
.
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,<ENTER>
.
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!
- Next message: Gautier Write-only: "Ann: TeXCAD 4.1"
- Previous message: Hyman Rosen: "Re: abstract sub programs overriding"
- Next in thread: Preben Randhol: "Re: Xlib Binding or Re-implementation?"
- Reply: Preben Randhol: "Re: Xlib Binding or Re-implementation?"
- Reply: Ludovic Brenta: "Re: Xlib Binding or Re-implementation?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|