Re: use lib5250 without display
Holger Schurig <[email protected]>
| Newsgroups | gmane.comp.emulators.tn5250 |
|---|---|
| Message-ID | <[email protected]> |
> 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_terminal_init(t); 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. -- This is the Linux 5250 Development Project (LINUX5250) mailing list To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/linux5250 or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/linux5250.