placing console clients and library
Marcus Brinkmann <[email protected]>
| Newsgroups | gmane.os.hurd.devel.readers |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have started to work on libcons, the console client library. There will be at least two programs using it: ccons and pcons (super-silly names, ccons is the curses console, pcons is the PC console). The client library wraps the complete communication protocol between the client and the server, and also will implement common features (like a screensaver framework etc). I have started libcons in a separate directory libcons/. This is how it looks so far, just to give you an impression: Makefile demuxer.c init-init.c opts-version.c cons-lookup.c dir-changed.c init-loop.c priv.h cons-switch.c extra-version.c mutations.h cons.h file-changed.c opts-std-startup.c There will be more files, of course. I can not say yet if this is the best way to slice it, but it seems to work out ok. Clients will then implement a couple of callbacks to update sections of the screen etc, and feed input and input-related events into the library in separate threads (with support from the library, potentially). As much as I hate to introduce new directories, this seems to make most sense to me. Now, the curses client is actually rather small, because a lot of the meat is in ncurses. The current stand-alone version (without using libcons) is only 22k. So I hope to put this into utils/ as a single file. The VGA/PC kbd client will be larger, though, and fall apart naturally into several components. This includes the VGA hardware access and keyboard layouts. Some of the files that it will contain are now in console/, those are bdf.h, bdf.c, vga.h, vga.c, vga-hw.h, dynafont.h, dynafont.c. This does not include the input half at all, which will eventually cover xkb and mouse events, and the whistles and bells as screen saver components, default fonts, etc. So I guess that the PC client is best in its own directory,which then could also contain the curses client if it is desirable, but I don't care either way. The immediate next step is libcons though, then the curses client in utils/ (because it already is usable) and then the PC client. What do you think? Thanks, Marcus