× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> I'm thinking over key events.  Normally everytime a key is pressed,
> lib5250 calls x5250_terminal_update().  This is a real performance
> problem, since x5250_terminal_update redraws the screen.

Then don't have x5250_terminal_update() redraw the entire screen each
time.  For example, GTK5250 will have it's "terminal_update" function save
what the screen is supposed to look like into a buffer.  Each position of
the buffer is compared with what it was previously, and when a position
has changed, it'll mark it "dirty."  If anything has changed, it sends a
request to GDK saying "I need to repaint" and waits for the repaint event.
When that comes, it redraws only the areas that have changed.

It's important to remember that a keypress usually (but not always) means
that a character is printed on the screen.  In order to print that
character, you must redraw at least part of the screen!  If not, the
character doesn't show up and the user thinks that the emulator is broken.


> My key handler function doesn't have this problem, but it also doesn't
> communicate keystrokes to lib5250.  I need to hand the key strokes off
> to lib5250, but I don't want the screen to flash or flicker because it
> is getting redrawn all the time.

If your getting "flashing" or "flickering" then you're first blanking the
screen out, showing that to the user, and then drawing the text on it and
redisplaying it.   Please consider not blanking the screen out.  If it
never gets blanked, the user won't see a flicker.

The Windows version handles this by drawing it's screen onto a bitmap
(image) file in memory that the user cannot see.  It first blanks out the
whole bitmap, and then draws all of the text onto it, and tells Windows
that it wants to repaint the screen.

When the repaint event occurs, it copies the bitmap to the screen without
ever blanking the screen itself.  Because the screen isn't blanked,
there's no flicker.

> I don't know a thing about autoconf, so I'm using Imake.  Unfortunately,
> that means that if glib and lib5250 aren't where I'm expecting them,
> you're going to have to edit the Imakefile by hand.  If the compile fails
> with complaints about not finding glib.h, edit the Imakefile and replace
> the relevant parts with the output of 'glib-config --cflags'.  Then do
> 'xmkmf' again and things should work.

You should be using pkg-config rather than glib-config, moving forward...
GLIB 2.0 and later do not come with glib-config.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

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