On Fri, 8 Jul 2005, Brian M. Chappell wrote:

Since my project only has a 160x160 px display (20 char x 20 char with the current font), I need to only display that much of the display buffer. Here is what I am thinking: if I take the display buffer from tn5250 and copy the characters that I want to display into a new 20x20 buffer. Each time I have the cursor move or want the screen to move I can just update the 20x20 buffer. My only real question is where in the code is dbuffer actually pushed to the screen? I need to add a function just like it but pushing my 20x20 buffer to the display.

Data is written to the terminal (screen) when curses_terminal_update() is called. Specifically, tn5250_display_char_at() tells what character or attribute is at a given position. Look for the the following for loop in curses_terminal_update():

   for (y = 0; y < tn5250_display_height(display); y++) {
      if (y > my)
         break;

      move(y, 0);
      for (x = 0; x < tn5250_display_width(display); x++) {
         c = tn5250_display_char_at(display, y, x);

That starts on line 673.

James Rich

It's not the software that's free; it's you.
        - billyskank on Groklaw

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2020 by midrange.com 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].