ANNC: ConEmu 0.2

In this version, some stuff actually works! And there’s a cute
"pulsating" cursor as well… :wink:

http://olofson.net/mixed.html

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -’

Hi.

In this version, some stuff actually works! And there’s a cute
"pulsating" cursor as well… :wink:

Very cool! But SDL backend gets much more flexibility then console,
like moving cursor around with arrow keys. BTW, generic getc() won’t
allow that and in text mode I get these ^[[D character combos that is
the normal behaviour for plain stdio and termios.

Maybe you should create a new API for advanced stuff based on ncurses,
since you used a window abstraction that is exaclty what ncurses do.
I know… it’s not fun to mess with ncurses (or termios, ugh). And
there are ms-windows complications. Maybe you should try something
based on conio. That reminds me of the old Borland C for DOS days…

But if you just want something to output warning messages when
something goes wrong, you already did it and it works perfectly.
I don’t know if it’s better leaving the rest to a GUI library.

Cya!On Tue, 12 Mar 2002 02:16:31 +0100 David Olofson <david.olofson at reologica.se> wrote:

@Pedro_Medeiros

Hi.

In this version, some stuff actually works! And there’s a cute
"pulsating" cursor as well… :wink:

Very cool! But SDL backend gets much more flexibility then console,
like moving cursor around with arrow keys.

Actually, I’ve seen old “consoles” that give you “ASCII” codes for arrow
keys and other stuff, and I’m primarily writing ConEmu to port an
application that used to run on such a console… Rather than emulating
PC BIOS keyboard input calls or some other crap, or add another input
API, I decided to make use of some of the codes in the 0…31 range, to
keep everything in one place, with the simplest possible interface.

BTW, generic getc() won’t
allow that and in text mode I get these ^[[D character combos that is
the normal behaviour for plain stdio and termios.

There you see! :slight_smile: The keys are indeed mapped, although these days, you
normally get them as ANSI escape sequences rather than nonstandard ASCII
codes. As to ConEmu’s stdio mode, it’s not up to date - and it’s not
supposed to support cursor control anyway.

There will be some kind of ANSI mode for “real” text consoles. The stdio
backend is just an emergency solution if there’s really no other way to
communicate with the world outside.

Either way, I’ll consider detecting ANSI codes in the input. Maybe the
stdio and ANSI targets could simply share a single, ANSI-enabled input
implementation?

Maybe you should create a new API for advanced stuff based on ncurses,
since you used a window abstraction that is exaclty what ncurses do.
I know… it’s not fun to mess with ncurses (or termios, ugh). And
there are ms-windows complications.

Those will have to be dealt with as well, as the next step is
implementing a target for communication over serial lines, to allow
running the UI on a Windows machine.

Maybe you should try something
based on conio.

Problem is that conio does not exist on Linux in a usable form, AFAIK.
The main reason for implementing ConEmu is that I need something
portable with an API similar to that of conio, so that I can
reimplement Borland’s “constream”, my extensions to that, and other stuff
I need to run our old DOS application on Linux - optionally with the
actual window on a remote Windows box.

That reminds me of the old Borland C for DOS days…

Yeah… That’s exactly where this stuff is coming from, from a design POV

  • I just extended it a bit.

But if you just want something to output warning messages when
something goes wrong, you already did it and it works perfectly.

More importantly, as soon as multiple windows work properly, I can just
port the C++ wrapper class and actually have the (running sinnce a few
weeks, but very silent) DOS application show it’s face again. :slight_smile:

(The fact that ConEmu windows will handle overlapping is just an extra
bonus, BTW.)

I don’t know if it’s better leaving the rest to a GUI library.

Then I would have to completely rewrite the whole calibration/testing UI
of our DOS application. As if that isn’t enough, I’d have to figure out a
way of “piping” the GUI through an RS-232 serial line, which is running a
custom protocol…

There’s no time for that right now.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Tuesday 12 March 2002 01:08, Pedro Medeiros wrote:

On Tue, 12 Mar 2002 02:16:31 +0100 David Olofson <david.olofson at reologica.se> wrote: