source: projects/driver/puncher-backend.h @ 22

Last change on this file since 22 was 17, checked in by sven, 16 years ago

Directory restructuring: Due to the new reader project, I've deciced to
make a general "driver" directory which shall contain all drivers and
their tools or auxillary libraries, seperated by operating system. Thus
we'll get

driver/puncher-backend.h
driver/reader-backend.h

for the general interfaces and implementations in driver/linux and
driver/win32, respectively. While the linux implementation features some
command line tools, the win32/NT implementation has the DLL and DEF files
for user mode programming.

I have not decided already about the reader/ and puncher/ directories, but
I think they could be kept, implementing the reader and puncher both CLI
and GTK frontends.

In the meanwhile, I'm writing the visualisator project from the scratch.
I've already rewritten the LOCHSTREIFEN sources -- now they've got a much
cleaner interface and better source with no more stupid features at the
wrong place. Furthermore it renders according to the public ECMA standard
for paper tapes (ECMA 10).

I'm about to rewrite GtkPaperTape in C++ with gtkmm using a
Controler-Model-View pattern. It is supposed to be able to open multiple
views, implement a full hexeditor (paper tape editor) and display having
many other neat futures. Furthermore the stupid repaint/scrolling bugs
should no more appear in the clean rewrite.

Great disadvantage of the rewriting: It's fairly much to do, and I nearly
speak no C++ some days ago, until I've read several books about it. Using
C++ gives me much more flexibility and a powerful real OO system, nothing
what GObject could serve with, at least not with as few code as Cpp does.

There is a time plan -- the new GTK gui and the driver implementations
shall be done in this week... So a lot of work pending :-)

-- Sven @ workstation la celeste

File size: 713 bytes
Line 
1/**
2 * These are the functions *every* backend must serve.
3 *
4 *
5 *
6 *
7 **/
8
9struct _PuncherBackend {
10    int debug_flag;
11
12#ifdef __linux__
13    int parport_fd;
14    long long time_since_beginning; // etwas lustige Zeitmessung
15#elif __WIN32__ ||  _MSC_VER || __MSDOS__
16    int blaa;
17#endif
18};
19
20typedef struct _PuncherBackend PuncherBackend;
21
22PuncherBackend* puncher_backend_new(int debug_flag);
23int puncher_backend_write_byte(PuncherBackend* c, unsigned char byte);
24int puncher_backend_destroy(PuncherBackend* c);
25#define PUNCHER_BACKEND_DPRINTF(bla...) { if(c->debug_flag) fprintf(stderr,bla); }
26
27#ifdef __WIN32__
28// G++ *braucht* dringend vollstaendige Header
29void puncher_backend_stop(PuncherBackend *c);
30#endif
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License