thanks. Anyway I was looking for some C code, so that I can make
bindings for higher level languages as Python.

You have already some C code, because tn5250 is really lib5250 plus several
demo applications.

For example, you can do this:

Tn5250Terminal *t = tn5250_new(Tn5250Terminal, 1);
t->data = tn5250_new(struct _Tn5250TerminalPrivate, 1);
t->data->xxxx = yyyy;

t->conn_fd = -1;
t->init = my_terminal_init;
t->term = my_terminal_term;
t->destroy = my_terminal_destroy;
t->width = NULL;
t->height = NULL;
t->flags = NULL;
t->update = my_terminal_update;
t->update_indicators = my_terminal_update_indicators;
t->waitevent = NULL;
t->getkey = my_terminal_getkey;
t->putkey = NULL;
t->beep = my_terminal_beep;
t->enhanced = NULL;
t->config = NULL;
t->create_window = NULL;
t->destroy_window = NULL;
t->create_scrollbar = NULL;
t->destroy_scrollbar = NULL;
t->destroy_menubar = NULL;
t->create_menubar = NULL;
t->destroy_menuitem = NULL;
t->create_menuitem = NULL;


tn5250_display_set_terminal(display, t);


Now you have your own term, that will relay all the needed screen updates in
your own functions. Now keep an internal representation of the screen there
and act accordingly.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.