XForms: fl_mouse_button problem !

From: Praveen Thiagarajan (praveen@capsl.udel.edu)
Date: Wed Mar 14 2001 - 22:51:26 EST

  • Next message: Steve Lamont: "Re: XForms: fl_mouse_button problem !"

    # To subscribers of the xforms list from Praveen Thiagarajan <praveen@capsl.udel.edu> :

    This might be a little simple, but i am sort of stuck. I am using the
    glcanvas to draw some stuff. Whenever a mouse button event occurs the
    fl_mouse_button(), inside the callback always returns a 0. Any idea as
    to what i am doing wrong here.

    The callback definition is as follows,

    fl_add_canvas_handler(ui->canvas, ButtonPress, mbutton_cb, 0);

    The callback function is as follows,

    int mbutton_cb(FL_OBJECT *ob, Window win, int w, int h, XEvent *xev,
                   void *ud)
        case FL_LEFT_MOUSE:
          printf("LEFT BUTTON\n");
        case FL_RIGHT_MOUSE:
          printf("RIGHT BUTTON\n");
        case FL_MIDDLE_MOUSE:
          printf("MIDDLE BUTTON\n");

      return 0;

    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/

    This archive was generated by hypermail 2b29 : Wed Mar 14 2001 - 17:54:05 EST