XForms: X event callback help needed

Jeff Pierce (piercej@preferred.com)
Fri, 03 Oct 1997 09:17:14 -0500

To subscribers of the xforms list from Jeff Pierce <piercej@preferred.com> :

Hi yall,

I have another question for the group.

A while back I aske about how would be the way to get a meter movement
object in xforms. Well, Steve Lamont (thanks spl) gave me the key to
get started and I got one working in no time. I planned to post it on
my homepage, but there was a slight problem concerning "uncovering: the
meter.

To do the meter I created a canvas object and then used Xlib calls to
set the faceplate pixmap as a backgroud and then XClearWindows() would
redraw the pixmap and XDrawLines() to actually draw the meter movement.

While this worked well I noticed that the needle would not be redrawn
after it's window is covered/uncovered by another window. Ofcourse, this
is because the Xforms canvas object only knows about the pixmap meter
face and not the needle. Other commitments allowed no time to pursue
this problem until now.

I read the manual on event callbacks (pages 44-48) and got throughly
confused.

Here is what I tried:


fl_show_form(fd_meter->meter,FL_PLACE_CENTERFREE,FL_FULLBORDER,"meter");
myDisplay = fl_get_display();
meterID = FL_ObjWin(fd_meter->meterCanvas);
fl_add_event_callback(meterID, Expose, dialExpose, 0);

The callbcck is simply:

int dialExpose(XEvent *xev, void *data)
{
printf("In dialExpose().\n");
}

to see if I am getting to it, I ain't!!!!

I then added fl_activate_event_callbacks(meterID);

I now get something to happen, the program terminates.

Can anybody shed some light on the subject?

--------------

Jeff Pierce, wd4nmq
piercej@preferred.com
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/